Site menu:

Categories

Tags

Site search

 

November 2007
M T W T F S S
« Oct   Dec »
 1234
567891011
12131415161718
19202122232425
2627282930  

Archives

Links:

Ubuntu Gutsy suspend/resume

Works very nicely thank you.

However I’ve just spent some time trying to optimise it a little for my laptop (Dell D630). Currently the suspend timings are:

  • press power button and select “suspend”
  • T+2secs /etc/acpi/sleep.sh is called
  • console switch causes 2 sec delay
  • alsa stop causes 1 sec delay
  • T+5secs “echo mem >/sys/power/state” is run
  • T+17secs fans switch off

The resume timings are:
  • press button to go back on again, T=0
  • T+4secs /etc/acpi/sleep.sh resumes
  • video-restore causes 2 sec delay
  • dhcpd-start causes 2 sec delay
  • resumed at T+9secs

If I change the video stuff, things start misbehaving, so I’ve left it alone - a shame as the swap from X to console takes about 2 seconds according to my logging and the video-restore also takes about 2 seconds. “SAVE_VBE_STATE”, “POST_VIDEO” and “USE_DPMS” are all currently enabled in /etc/default/acpi-support.

I have disabled the interface disabling (which always bugged me - particularly the vmnet and bridge devices being dropped). If you are using ndiswrapper or something which doesn’t like suspend/resume then it’s fair enough. My laptop seems to have no issues though - wireless is still associated just fine (ipw3945). Note that you have to whitelist network modules via /etc/default/acpi-support.

I suspect that this is why dhcpd is stopped/started (start takes 2 seconds and occurs whether or not it used to be running) - to ensure that it is started after any removed network interfaces have been re-added.

Sounds works find after a resume for me. As to why the stop script is called “85-alsa-state.sh” and the resume script is called “67-sound.sh”, I’ve no idea. I’ve given up wondering how people can do really cool things and balls up the simple stuff.

Restoring time from the hardware clock actually made life _worse_ for me. I suspect it might be required for hibernate at least - I’ll disable it for now and see how I get on.

The list of steps I’ve done:

  • chmod -x /etc/acpi/suspend.d/55-down-interfaces.sh
  • chmod -x /etc/acpi/suspend.d/65-dhcpd-stop.sh
  • chmod -x /etc/acpi/suspend.d/85-alsa-state.sh
  • chmod -x /etc/acpi/resume.d/50-time.sh
  • chmod -x /etc/acpi/resume.d/62-ifup.sh
  • chmod -x /etc/acpi/resume.d/67-sound.sh
  • chmod -x /etc/acpi/resume.d/69-dhcpd-start.sh
  • edited /etc/default/acpi-support:
    • add “ipw3954 tg3″ to the MODULES_WHITELIST to prevent their removal (/etc/acpi/suspend.d/60-generate-modules-list.sh)

All in all, these changes only knock off a second or so suspend and resume. If I just “echo mem >/sys/power/state” then the box goes quiet very quickly (about 2-3secs (no fans, no screen), but still takes about 15secs total before the hard disk switches off). However on resume I’m sat at a console with a blinking cursor and cannot restore the graphics.

Next steps are:

  • test hibernate (especially for the removal of time.sh)
  • see if I can get rid of those 2 second video delays on suspend and resume
  • see if there is any way to speed up the final suspend/initial resume
  • any USB tweaking? (e.g. to save more power?)
  • raise bug on the dhcpd package to fix the “start even if it was stopped” problem
  • raise bug on alsa-utils (it does a sleep 1 in the stop - no record as to why)

Write a comment