Page 1 of 2

Wake after suspend.

Posted: Sat 13 Jan 2007, 23:36
by msumner
The laptop seems to suspend after being unused for a while, and wakes up as you would expect. The problem is if I close the laptop lid, I get a black screen and have to re-boot. Anyone any ideas on how to fix this? Also, it seems to run hotter when plugged in. One night, I accidently left it on all night and it was pretty hot when I found it even though it was in suspend. I have searched various forums and it seems pretty complicted :? Any help would be greatly appreciated. Thanks, Mike.

Re: Wake after suspend.

Posted: Sat 13 Jan 2007, 23:42
by WhoDo
msumner wrote:The laptop seems to suspend after being unused for a while, and wakes up as you would expect. The problem is if I close the laptop lid, I get a black screen and have to re-boot. Anyone any ideas on how to fix this?
There is a microswitch under the lid that handles the blackout. If it doesn't come back I'd say that's a hardware issue. Check your BIOS for settings that might control the function.
msumner wrote: Also, it seems to run hotter when plugged in. One night, I accidently left it on all night and it was pretty hot when I found it even though it was in suspend.
There should be a BIOS setting (enter Setup on boot) that allows you to control what the fan does when plugged into AC power. You can elect to run the fan while on AC and that will keep the machine running cooler.

Hope that helps.

Posted: Sun 14 Jan 2007, 00:10
by msumner
Thanks whodo. The lid switch works ok in windows, and in ubuntu. Freespire has the same problem as puppy.

Re the heat, the fan does actually come on and off while I am using puppy, but I was surprised at the heat that was generated when it was in suspend. Heat=power, and why does it use that much power when it is doing nothing?

Will look at the bios and see what settings I can find, Cheers, Mike.

Posted: Mon 15 Jan 2007, 19:37
by msumner
I cannot see anything relevant in the boot menu for this. I am sure it is far more complicated judging by what I have seen in various forums. Maybe I should try the ubuntu forum and ask them how they do it? :wink:

Posted: Mon 15 Jan 2007, 21:17
by rarsa
Search the forum for a "suspend script".

I've used it and it works with laptops.

Posted: Tue 16 Jan 2007, 00:24
by msumner
Thanks rarsa, have not found anything helpful searching the forum. Googling "suspend script" produced plenty of stuff but I can't get my head around it. I have not used script before and do not really know where to start. Am I right in thinking that script for one distro may not work in another?

Posted: Tue 16 Jan 2007, 03:23
by rarsa
That's weird (that you didn't find it)

I searched the forum for "suspend script" and it was the third entry

http://www.murga-linux.com/puppy/viewto ... 89&t=13410

Posted: Tue 16 Jan 2007, 07:47
by msumner
:D Thanks Rarsa, I see it now! Had the wrong box checked for the search. :oops: Will give it a try.

Posted: Tue 16 Jan 2007, 20:19
by msumner
Hi rarsa, I am afraid that being a complete nube, I have failed to even get started. I spent a couple of hours trying to learn how to use script, but when you know nothing, it is a case of too much information out there. I forget how many websites I've been on looking for a basic explanation of how to use the terminal, but I am really no better off. I am a bit confused about root as I read somewhere that if you get a # it means you are running as root and that anything you do could rip the heart out of your shiny new linux operating system. I did notice that when I opened the console it says sh-3.00# and so I was concerned that I could do some damage. Is it normal to run as root in puppy?

Assuming I successfully type some script into the console, does it get saved into the kernel so that it is there next time I boot? What if I cock something up, will it leave my flash drive unusable? (I am running puppy from flash drive). I really need a beginners course on this but it is difficult to find something suitable. Any ideas?.

I did eventually try the first line of code in the console, pressed enter, and it retorted with "event not found". Sorry to be so dense :?

Posted: Tue 16 Jan 2007, 20:49
by rarsa
No problem.

You don't type a script in the console.

What you see in that post should be put in a script file.

A script file is a text file that contains a series of commands. That file also needs to be marked as an executable

To simplify your life, I have created the script file and made it executable.

Just do the following:

- Download this file to a directory where you can find it with Rox.
- Open Rox and go to the directory where you saved it to.
- Click on the compressed file "suspend.tar.gz" and follow the instructions to unpack the file to the current folder.
- After you uncompress it you will se a file called "suspend". That one is the script that contains the commands.
- To execute the "suspend" script you just need to click on that file.

Let me know how it goes.

Posted: Tue 16 Jan 2007, 22:21
by msumner
Hi rarsa, thanks for that, I followed your instructions, and the compressed file downloaded to my documents. I appear to have unpacked it, it looks like a page with a console icon over it, but when I click on it, it doesnt do anything. :(

Posted: Tue 16 Jan 2007, 23:20
by Brian C
You might have to set it as executable. In the command prompt, type "chmod +x script_name_here"

Regarding the black screen after waking from suspend, my laptop does that as well in most distros, like Puppy, Mandriva, etc. I think only Ubuntu has managed to bring the screen back after the lid was closed, on either of the three laptops I've used Linux on. The suspend script seems to make it work by switching desktops. Could Puppy be modified to sense the lid switch and switch desktops upon close/open?

Posted: Tue 16 Jan 2007, 23:35
by msumner
that didn't seem to work, but thanks anyway. Dont really understand how switching desktops helps :?

Posted: Wed 17 Jan 2007, 01:46
by rarsa
When I uploaded the file I was at work on a windows computer.

The encoding of the text file wasn't correct. I've fixed it now and uploaded it again.

This time I've tested it.

I am so sorry for the confusion.

It is working for me now. let me know how it goes.

Posted: Wed 17 Jan 2007, 08:05
by msumner
Hi rarsa, I downloaded again and tried it. This time, when I clicked on it, the screen went black so it seemed to go into suspend. :D Hitting the on/off button brought it back, so far so good......but when I close the lid I get a black screen with the wifi light still on, but I have to hard boot to get it back. :(

Posted: Wed 17 Jan 2007, 10:26
by Rickrandom
msumner wrote:anything you do could rip the heart out of your shiny new linux operating system.
If you have a pup_save file on your hard drive, then you can make a copy with a different name as a back-up, and when booting Puppy will ask which one you want to use. If you mess up your current one, just select the back-up one during booting and you're away again. Puppy is very smart in this respect, in that the main parts of the operating system are never directly messed with, your settings in your pup_save file just override the defaults. If you have such a back-up, and it's up to date, don't be afraid to mess about.

Rarsa,

I also tried the script, and it sort of shut down the laptop, but I had a black screen with a white cursor flashing in the top left corner, and pressing the power button didn't bring Puppy back. I had to hold the button for 4 seconds to force it off, then power on again.

I'll look at the BIOS in case there's anything relevant.

I've got a frugal install of PizzaPup3beta, booting with GRUB. I don't know about ACPI and such stuff, but I don't boot with any extra commands. I guess anything necessary could be added to the menu.lst file.

Any advice gratefully received.

Posted: Wed 17 Jan 2007, 12:25
by msumner
Hi rickrandom, I am running 2.13 from flash drive so the save file is on the flash. Should work though? I will give it a try.

Posted: Wed 17 Jan 2007, 12:46
by Rickrandom
If you have space on the flash drive, then I guess making a copy should work fine. It may take a little while, depending on the size of the file you chose at first shutdown, so be patient.

By the way, if you put your location in your profile, people will have a better idea of when you are likely to be on line. Far from essential, of course.

Posted: Wed 17 Jan 2007, 12:51
by msumner
Not far from you, in lincolnshire!

Posted: Wed 17 Jan 2007, 13:50
by rarsa
Yes. For now you must execute the script before closing the lid.

Sorry for the confusion, I thought that part was obvious: How would the computer know that you want to run that script when you close the lid if you haven't told you that?

I know there is a way to trap when the lid is being closed but I haven't investigated.