Wake after suspend.

What works, and doesn't, for you. Be specific, and please include Puppy version.
Message
Author
msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

Wake after suspend.

#1 Post 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.

User avatar
WhoDo
Posts: 4428
Joined: Wed 12 Jul 2006, 01:58
Location: Lake Macquarie NSW Australia

Re: Wake after suspend.

#2 Post 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.

msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

#3 Post 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.

msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

#4 Post 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:

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#5 Post by rarsa »

Search the forum for a "suspend script".

I've used it and it works with laptops.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

#6 Post 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?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#7 Post 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
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

#8 Post by msumner »

:D Thanks Rarsa, I see it now! Had the wrong box checked for the search. :oops: Will give it a try.

msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

#9 Post 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 :?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#10 Post 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.
Attachments
suspend.tar.gz
(684 Bytes) Downloaded 2154 times
Last edited by rarsa on Wed 17 Jan 2007, 01:42, edited 1 time in total.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

#11 Post 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. :(

Brian C
Posts: 168
Joined: Thu 09 Feb 2006, 04:19

#12 Post 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?

msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

#13 Post by msumner »

that didn't seem to work, but thanks anyway. Dont really understand how switching desktops helps :?

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#14 Post 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.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

#15 Post 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. :(

Rickrandom
Posts: 195
Joined: Sat 21 Jan 2006, 05:35
Location: Bedfordshire, UK

#16 Post 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.

msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

#17 Post 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.

Rickrandom
Posts: 195
Joined: Sat 21 Jan 2006, 05:35
Location: Bedfordshire, UK

#18 Post 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.

msumner
Posts: 205
Joined: Fri 05 Jan 2007, 01:10
Location: Lincolnshire, England.

#19 Post by msumner »

Not far from you, in lincolnshire!

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#20 Post 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.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to

Post Reply