LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   acpid, pm-utils, suspend/resume and -current (https://www.linuxquestions.org/questions/slackware-14/acpid-pm-utils-suspend-resume-and-current-745907/)

tuxrules 08-07-2009 05:00 PM

acpid, pm-utils, suspend/resume and -current
 
I've searched around this forum but couldn't get any straight pointers so I'm sorry if this has already been answered. I've always used desktops and never really paid any attention to whole suspend/resume discussion but I recently bought a laptop and would like to suspend/hibernate the laptop. I'm using -Current and XFCE and particularly like xfce power manager.

However, I'm having trouble suspending my laptop and am looking for some answers. I'm sure I'll have many more questions as I learn more about this but I'll start with a few pressing ones.

1. Should I use rc.acpid or xfce power manager or both. Currently I have rc.acpid running and also xfce power manager.

2. I've set xfce power manager to suspend when I close the laptop lid but it never suspends. However, the laptop successfully suspends after specified inactivity timeout. I've provided the /var/log/pm-suspend.log which shows success.

Code:

Initial commandline parameters: --quirk-s3-bios
--quirk-s3-mode
Fri Aug  7 13:08:53 CDT 2009: Running hooks for suspend.
/usr/lib/pm-utils/sleep.d/00auto-quirk suspend suspend: success.
/usr/lib/pm-utils/sleep.d/00logging suspend suspend: Linux sisrana 2.6.30.4-sisrana-smp #1 SMP PREEMPT Wed Aug 5 14:21:11 CDT 2009 i686 Intel(R) Core(TM)2 Duo CPU    T6400  @ 2.00GHz GenuineIntel GNU/Linux
Module                  Size  Used by
nfs                  266096  5
lockd                  66796  1 nfs
auth_rpcgss            35744  1 nfs
sunrpc                176256  13 nfs,lockd,auth_rpcgss
aes_i586                7916  2
aes_generic            26924  1 aes_i586
snd_seq_dummy          2544  0
snd_seq_oss            28288  0
snd_seq_midi_event      6188  1 snd_seq_oss
snd_seq                49296  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device          6328  3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            39040  0
snd_mixer_oss          16588  1 snd_pcm_oss
ipv6                  252756  18
pcmcia                34220  0
pcmcia_core            33056  1 pcmcia
cachefiles            63936  1
fscache                72192  2 nfs,cachefiles
coretemp                5932  0
cpufreq_ondemand        7168  2
speedstep_lib          3824  0
acpi_cpufreq            8376  0
freq_table              3436  2 cpufreq_ondemand,acpi_cpufreq
lp                      9540  0
ppdev                  7376  0
parport_pc            24708  0
parport                32364  3 lp,ppdev,parport_pc
fuse                  54472  1
snd_hda_codec_realtek  194768  1
uvcvideo              59640  0
videodev              35840  1 uvcvideo
v4l1_compat            14512  2 uvcvideo,videodev
snd_hda_intel          24456  1
arc4                    1580  2
usb_storage            49824  0
ecb                    2476  2
snd_hda_codec          58060  2 snd_hda_codec_realtek,snd_hda_intel
iwlagn                92240  0
snd_hwdep              7056  1 snd_hda_codec
snd_pcm                69008  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
iwlcore                90988  1 iwlagn
snd_timer              20020  2 snd_seq,snd_pcm
rtc_cmos              10220  0
led_class              3632  1 iwlcore
rtc_core              16392  1 rtc_cmos
snd                    54052  13 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
fan                    4016  0
uhci_hcd              22268  0
rtc_lib                2348  1 rtc_core
mac80211              170312  2 iwlagn,iwlcore
rfkill                  9552  2 iwlcore
processor              33792  3 acpi_cpufreq
psmouse                42876  0
soundcore              6336  1 snd
snd_page_alloc          8212  2 snd_hda_intel,snd_pcm
ehci_hcd              35128  0
ac                      3984  0
thermal                12712  0
battery                10096  0
input_polldev          3316  0
serio_raw              5360  0
r8169                  32432  0
button                  5180  0
cfg80211              62988  3 iwlagn,iwlcore,mac80211
evdev                  9568  10
mii                    4396  1 r8169
i915                  174856  1
drm                  145216  2 i915
i2c_algo_bit            5424  1 i915
video                  18560  1 i915
thermal_sys            14932  4 fan,processor,thermal,video
hwmon                  2152  2 coretemp,thermal_sys
output                  2604  1 video
iTCO_wdt              10704  0
iTCO_vendor_support    2864  1 iTCO_wdt
i2c_i801                9344  0
i2c_core              20864  4 i915,drm,i2c_algo_bit,i2c_i801
intel_agp              26044  1
agpgart                30700  2 drm,intel_agp
shpchp                32448  0
sg                    26016  0
            total      used      free    shared    buffers    cached
Mem:      2980508    758796    2221712          0      63568    322144
-/+ buffers/cache:    373084    2607424
Swap:      6291448          0    6291448
success.
/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
/usr/lib/pm-utils/sleep.d/01grub suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.
/usr/lib/pm-utils/sleep.d/55wicd suspend suspend: success.
/usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
/usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/98smart-kernel-video suspend suspend: success.
/usr/lib/pm-utils/sleep.d/99video suspend suspend: kernel.acpi_video_flags = 3
success.
Fri Aug  7 13:08:54 CDT 2009: performing suspend

3. How do I bring the system back from suspended state? I've tried everything but I only see screen flashes and nothing seems to happen. Only choice I have is to press the power button which restarts the system (since rc.acpid is running).

BTW, I'm using x86-Current on Toshiba L305-S5946. I haven't tried suspend to disk yet but I have my swap partition set to twice the ram size (which I found from one of Robby's post).

Here's some more info from the system.

Code:

raghu@sisrana:[/tmp]$ cat /proc/acpi/sleep
S0 S3 S4 S5

Code:

raghu@sisrana:[/proc]$ cat /sys/power/state 
mem disk

Thanks in advance, I look forward to interesting answers.

manwichmakesameal 08-07-2009 05:34 PM

Usually what I do, is just use the rc.acpi script and add
Code:

#!/bin/sh
# Default acpi script that takes an entry for all actions

IFS=${IFS}/
set $@

case "$1" in
  button)
    case "$2" in
      power) /sbin/init 0
        ;;
        lid) pm-suspend
        ;;

      *) logger "ACPI action $2 is not defined"
        ;;
    esac
    ;;
  *)
    logger "ACPI group $1 / action $2 is not defined"
    ;;
esac

the bold part to /etc/acpi_handler.sh. I usually have to run pm-suspend once after reboot to suspend it, but after that, I can just close the lid and it suspends it. To bring it back up, just open the lid. You also want to make sure that your user is in the power group.

tuxrules 08-07-2009 06:12 PM

Quote:

Originally Posted by manwichmakesameal (Post 3635218)
Usually what I do, is just use the rc.acpi script and add
the bold part to /etc/acpi_handler.sh. I usually have to run pm-suspend once after reboot to suspend it, but after that, I can just close the lid and it suspends it. To bring it back up, just open the lid. You also want to make sure that your user is in the power group.

Thanks for the code snippet. I tried but unfortunately it didn't work. I added the relevant part and restarted acpid daemon. Closed the lid but the laptop is still running. I'm part of the power group. Here's the relevant groups info

Code:

raghu@sisrana:[/proc]$ groups
users wheel floppy audio video cdrom games plugdev power netdev scanner


manwichmakesameal 08-07-2009 06:28 PM

After you edit the file, restart acpi then run pm-suspend. I'm not sure if it has to create a pid lock in var or something, but I always have to do that after I reboot. I have it working on -current64 and 12.2. 12.2 is on a laptop probably just like yours. It's a Toshiba L305D-S5934. The laptop is a full vanilla install and all I edited was the /etc/acpi_handler.sh script. -Current is also on it, same file edited.

tuxrules 08-07-2009 09:52 PM

Thanks for the follow-up. I restarted acpid after I edited acpi_handler.sh and ran pm-suspend and it sure works fine. System goes into suspend mode but I can't bring it out of suspend...all I get is a blank screen...I've punched all keys on the keyboard but nothing seems to help. I simply have to hit power button and laptop restarts.

Even after reboot, I still can't suspend just by closing the lid.

rworkman 08-07-2009 11:07 PM

Quote:

Originally Posted by tuxrules (Post 3635188)
1. Should I use rc.acpid or xfce power manager or both. Currently I have rc.acpid running and also xfce power manager.

In general, you use one or the other. If you have acpi hooks *and* a power manager catching events, then you *will* get a "double suspend" -- in other words, the first one to get the event will initiate a suspend, then when you wake up, the other one will catch the other event, and you suspend again.

This is a bit aggravating, at least for me, because I like to suspend via my laptop's sleep key from the gdm/kdm/xdm/whateverdm screen, and that requires me to have acpid catch the sleep event, so I have to tell xfce-power-manager to ignore the sleep key. [1]

[1] I'm going to put the footnote here instead of at the bottom so that the context isn't forgotten by the time you get there. I can't figure out a way to tell kdm to suspend unless I edit the command that's run when I invoke the "Reboot" or "Shutdown" buttons, and that's an ugly workaround IMHO - it should also offer "Sleep" and/or "Suspend" and "Hibernate" or at least the ability to configure custom functions. The good news is that gdm *does* offer that ability (both the suspend *and* custom functions), so I just use gdm and leave acpid out of the equation. Once 13.0 is out, you can get a gdm that "just works" from SlackBuilds.org - I've tweaked it quite a bit compared to the 12.2 version we have.

Quote:

2. I've set xfce power manager to suspend when I close the laptop lid but it never suspends. However, the laptop successfully suspends after specified inactivity timeout. I've provided the /var/log/pm-suspend.log which shows success.
** snipped logs **
Okay, this is at least partially good news. It sounds as if the problem isn't that the laptop *cannot* or *will not* suspend -- it's that it doesn't suspend when the lid is closed? Am I correct on that? (ignore whether it will wake up correctly - that's another topic).

If I'm correct, then I'm not sure exactly what's going on, and I may have to talk with upstream about it, but at least we'll have some idea of how to proceed.

Quote:

3. How do I bring the system back from suspended state? I've tried everything but I only see screen flashes and nothing seems to happen. Only choice I have is to press the power button which restarts the system (since rc.acpid is running).
Have you tried ssh'ing into the machine after those "screen flashes and nothing" happen? :-) It sounds like video is the only thing that isn't coming back, and if that's the case, we can almost surely figure out how to work around that.

Try logging in as root from a console (in runlevel 3 - no X running at all anywhere) and do "pm-suspend" - then close the lid, wait a few minutes, and open the lid.

tuxrules 08-08-2009 11:04 PM

Quote:

Originally Posted by rworkman (Post 3635372)
In general, you use one or the other. If you have acpi hooks *and* a power manager catching events, then you *will* get a "double suspend" -- in other words, the first one to get the event will initiate a suspend, then when you wake up, the other one will catch the other event, and you suspend again.

This is a bit aggravating, at least for me, because I like to suspend via my laptop's sleep key from the gdm/kdm/xdm/whateverdm screen, and that requires me to have acpid catch the sleep event, so I have to tell xfce-power-manager to ignore the sleep key. [1]

[1] I'm going to put the footnote here instead of at the bottom so that the context isn't forgotten by the time you get there. I can't figure out a way to tell kdm to suspend unless I edit the command that's run when I invoke the "Reboot" or "Shutdown" buttons, and that's an ugly workaround IMHO - it should also offer "Sleep" and/or "Suspend" and "Hibernate" or at least the ability to configure custom functions. The good news is that gdm *does* offer that ability (both the suspend *and* custom functions), so I just use gdm and leave acpid out of the equation. Once 13.0 is out, you can get a gdm that "just works" from SlackBuilds.org - I've tweaked it quite a bit compared to the 12.2 version we have.

Robby, Thanks for a detailed answer on this one. Sorry I couldn't respond quickly...was travelling with family. I'm looking forward to new gdm when 13 comes out. In the meantime, I'll not use acpid daemon and only use xfce power manager.

Quote:

Originally Posted by rworkman (Post 3635372)
Okay, this is at least partially good news. It sounds as if the problem isn't that the laptop *cannot* or *will not* suspend -- it's that it doesn't suspend when the lid is closed? Am I correct on that? (ignore whether it will wake up correctly - that's another topic).

If I'm correct, then I'm not sure exactly what's going on, and I may have to talk with upstream about it, but at least we'll have some idea of how to proceed.

You are correct. pm-suspend when run as root works but the laptop won't suspend when I simply close the lid.

Quote:

Originally Posted by rworkman (Post 3635372)
Have you tried ssh'ing into the machine after those "screen flashes and nothing" happen? :-) It sounds like video is the only thing that isn't coming back, and if that's the case, we can almost surely figure out how to work around that.

Try logging in as root from a console (in runlevel 3 - no X running at all anywhere) and do "pm-suspend" - then close the lid, wait a few minutes, and open the lid.

No I haven't had to chance to try this. Let me switch back to the stock kernel and try these steps. I forgot to mention that I'm using 2.6.30.4 custom kernel with kernel mode setting enabled by default. My kernel config is based on stock config file but I've removed some unwanted drivers and enabled fscache.

One more question, pm-utils writes log when machine goes into suspend (/var/log/pm-suspend.log) so is there a way to log events when machine comes out of suspend mode?

rworkman 08-10-2009 10:36 PM

Quote:

Originally Posted by tuxrules (Post 3636272)
You are correct. pm-suspend when run as root works but the laptop won't suspend when I simply close the lid.

In that case, consider opening a bug against xfce4-power-manager or mailing Ali directly. Whichever way you go, CC me using rw AT rlworkman.net -- that's my registered mail in xfce's bugzilla too.

Quote:

Let me switch back to the stock kernel and try these steps. I forgot to mention that I'm using 2.6.30.4 custom kernel with kernel mode setting enabled by default. My kernel config is based on stock config file but I've removed some unwanted drivers and enabled fscache.
KMS throws some extra kinks in this, as it disables all of the quirks that would otherwise be used (ideally, they're not needed any more). In my experiences here, KMS is far from what it promises to be - fwiw.

Quote:

One more question, pm-utils writes log when machine goes into suspend (/var/log/pm-suspend.log) so is there a way to log events when machine comes out of suspend mode?
Wakeup events are also written to that same file.

tuxrules 08-10-2009 11:11 PM

Quote:

Originally Posted by rworkman (Post 3635372)
Have you tried ssh'ing into the machine after those "screen flashes and nothing" happen? :-) It sounds like video is the only thing that isn't coming back, and if that's the case, we can almost surely figure out how to work around that.

After machine suspends via pm-suspend (power led turns flashing amber), opening the lid doesn't wake it up. The only button that seems to work is a small media key...kinda brings the led (power, hdd) to green but nothing on the screen. Screen seems as it is turned off.

Can't ssh from another machine...I've tried it with both wired and wireless connection.

BTW, the machine can suspend both via console (pm-suspend command) or via xfce power manager.

Quote:

Originally Posted by rworkman (Post 3635372)
Try logging in as root from a console (in runlevel 3 - no X running at all anywhere) and do "pm-suspend" - then close the lid, wait a few minutes, and open the lid.

From runlevel 3, machine goes into suspend mode but doesn't come back. opening/closing lid has no effect. Screen seems completely turned off...only resort is to reboot.

Quote:

Originally Posted by rworkman (Post 3635372)
Wakeup events are also written to that same file.

I guess in that case, my machine doesn't wake up because there are no entries for wakeup in /var/log/pm-suspend.log. All it reports is success for pm-suspend.

BTW, I've tried all this via both stock kernel and custom kernel with same results.

Quote:

Originally Posted by rworkman (Post 3635372)
In that case, consider opening a bug against xfce4-power-manager or mailing Ali directly. Whichever way you go, CC me using rw AT rlworkman.net -- that's my registered mail in xfce's bugzilla too.

Thanks will do...hopefully soon :D

tuxrules 08-12-2009 10:49 PM

I think I have found a potential solution. I had to add kernel boot parameter and add hal entries for correct pm-suspend command. Here's what I did. After a lot of googling, I used acpi_osi=Linux boot parameter mentioned on this blog which I found after trudging in archives of toshiba_acpi dev site here.

Later today I found this ubuntu bug list which pretty much confirmed a similar situation I was facing. Someone suggest adding hal video entry which I tried and voila!!! my laptop not only suspends (which it did earlier) but resumes successfully. Here's relevant entry from /var/log/pm-suspend.log

Code:

Initial commandline parameters: --quirk-s3-mode
--quirk-vbe-post
Wed Aug 12 22:08:19 CDT 2009: Running hooks for suspend.
/usr/lib/pm-utils/sleep.d/00auto-quirk suspend suspend: success.
/usr/lib/pm-utils/sleep.d/00logging suspend suspend: Linux sisrana 2.6.30.4-sis$
Module                  Size  Used by
aes_i586                7916  2
aes_generic            26924  1 aes_i586
snd_seq_dummy          2544  0
snd_seq_oss            28288  0
snd_seq_midi_event      6188  1 snd_seq_oss
snd_seq                49296  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device          6328  3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            39040  1
snd_mixer_oss          16588  1 snd_pcm_oss
ipv6                  252756  18
pcmcia                34220  0
pcmcia_core            33056  1 pcmcia
cachefiles            63936  1
fscache                72192  1 cachefiles
coretemp                5932  0
cpufreq_ondemand        7168  2
peedstep_lib          3824  0
acpi_cpufreq            8376  0
freq_table              3436  2 cpufreq_ondemand,acpi_cpufreq
lp                      9540  0
ppdev                  7376  0
parport_pc            24708  0
parport                32364  3 lp,ppdev,parport_pc
fuse                  54472  1
uvcvideo              59640  0
arc4                    1580  2
videodev              35840  1 uvcvideo
usb_storage            49824  0
snd_hda_codec_realtek  194768  1
ecb                    2476  2
v4l1_compat            14512  2 uvcvideo,videodev
snd_hda_intel          24456  2
iwlagn                92240  0
snd_hda_codec          58060  2 snd_hda_codec_realtek,snd_hda_intel
iwlcore                90988  1 iwlagn
snd_hwdep              7056  1 snd_hda_codec
snd_pcm                69008  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
rfkill                  9552  2 iwlcore
led_class              3632  1 iwlcore
snd_timer              20020  2 snd_seq,snd_pcm
mac80211              170312  2 iwlagn,iwlcore
snd                    54052  13 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss$
fan                    4016  0
uhci_hcd              22268  0
rtc_cmos              10220  0
processor              39424  3 acpi_cpufreq
psmouse                42876  0
rtc_core              16392  1 rtc_cmos
soundcore              6336  2 snd
r8169                  32432  0
thermal                13864  0
ehci_hcd              35128  0
ac                      4144  0
battery                10224  0
rtc_lib                2348  1 rtc_core
cfg80211              62988  3 iwlagn,iwlcore,mac80211
button                  5372  0
serio_raw              5360  0
snd_page_alloc          8212  2 snd_hda_intel,snd_pcm
evdev                  9568  10
mii                    4396  1 r8169
i915                  174024  2
drm                  145216  3 i915
i2c_algo_bit            5424  1 i915
video                  19360  1 i915
thermal_sys            14932  4 fan,processor,thermal,video
hwmon                  2152  2 coretemp,thermal_sys
output                  2604  1 video
iTCO_wdt              10704  0
iTCO_vendor_support    2864  1 iTCO_wdt
i2c_i801                9344  0
i2c_core              20864  4 i915,drm,i2c_algo_bit,i2c_i801
intel_agp              26044  1
agpgart                30700  3 drm,intel_agp
shpchp                32448  0
sg                    26016  0
            total      used      free    shared    buffers    cached
Mem:      2980404    918604    2061800          0    103028    345344
-/+ buffers/cache:    470232    2510172
Swap:      6291448          0    6291448
success.
/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
/usr/lib/pm-utils/sleep.d/01grub suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.
/usr/lib/pm-utils/sleep.d/55wicd suspend suspend: success.
/usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
/usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/98smart-kernel-video suspend suspend: success.
/usr/lib/pm-utils/sleep.d/99video suspend suspend: kernel.acpi_video_flags = 2
success.
Wed Aug 12 22:08:22 CDT 2009: performing suspend
Wed Aug 12 22:08:46 CDT 2009: Awake.
Wed Aug 12 22:08:46 CDT 2009: Running hooks for resume
/usr/lib/pm-utils/sleep.d/99video resume suspend: success.
/usr/lib/pm-utils/sleep.d/98smart-kernel-video resume suspend: success.
/usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success.
/usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/75modules resume suspend: success.
/usr/lib/pm-utils/sleep.d/55wicd resume suspend: success.
/usr/lib/pm-utils/sleep.d/55NetworkManager resume suspend: success.
/usr/lib/pm-utils/sleep.d/49bluetooth resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/01grub resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/00powersave resume suspend: success.
/usr/lib/pm-utils/sleep.d/00logging resume suspend: success.
/usr/lib/pm-utils/sleep.d/00auto-quirk resume suspend: success.
Wed Aug 12 22:08:48 CDT 2009: Finished.

For people interested in the
solution, here's my grub entry with the acpi_osi kernel parameter

Code:

title Slackware Linux
root (hd0,4)
kernel /vmlinuz ro root=/dev/slacklvm/root vga=773 acpi_osi=Linux
initrd /initrd.img

Here's the hal entry for /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-toshiba.fdi. I've added the entry below 2nd entry for Satellite Laptops
Code:

<match key="system.hardware.product" contains_outof="L305">
  <merge key="power_management.quirk.vbe_post" type="bool">true</merge>
  <merge key="power_management.quirk.s3_bios" type="bool">false</merge>
</match>

I would like to thank everyone who replied. A special thank you goes to Robby Workman for patience and long explanatory posts. Thanks Robby!!!

EDIT: Just wanted to document that hibernate works perfectly...only suspend had problem which is now solved.

rworkman 08-12-2009 11:09 PM

Quote:

Originally Posted by tuxrules (Post 3641332)
I think I have found a potential solution. I had to add kernel boot parameter and add hal entries for correct pm-suspend command. Here's what I did. After a lot of googling, I used acpi_osi=Linux boot parameter mentioned on this blog which I found after trudging in archives of toshiba_acpi dev site here.

Later today I found this ubuntu bug list which pretty much confirmed a similar situation I was facing. Someone suggest adding hal video entry which I tried and voila!!! my laptop not only suspends (which it did earlier) but resumes successfully. Here's relevant entry from /var/log/pm-suspend.log

Code:

Initial commandline parameters: --quirk-s3-mode
--quirk-vbe-post
Wed Aug 12 22:08:19 CDT 2009: Running hooks for suspend.
... blahblahblah log noise ...  :-)
Wed Aug 12 22:08:48 CDT 2009: Finished.


Okay, I'm with you, I think, but there's a bit of a problem...

Quote:

Here's the hal entry for /usr/share/hal/fdi/information/10freedesktop/20-video-quirk-pm-toshiba.fdi. I've added the entry below 2nd entry for Satellite Laptops
Code:

<match key="system.hardware.product" contains_outof="L305">
  <merge key="power_management.quirk.vbe_post" type="bool">true</merge>
  <merge key="power_management.quirk.s3_bios" type="bool">false</merge>
</match>


That ^^^ tells me you are trying to remove the s3_bios quirk because you only need the vbe_post one.
However, the "Initial commandline parameters:" of the pm-suspend command clearly show that the s3_bios quirk is still being passed along.


Quote:

For people interested in the
solution, here's my grub entry with the acpi_osi kernel parameter

Code:

title Slackware Linux
root (hd0,4)
kernel /vmlinuz ro root=/dev/slacklvm/root vga=773 acpi_osi=Linux
initrd /initrd.img


For lilo.conf, that's just a line like this in your kernel stanza:
Code:

append = "acpi_osi=Linux"
However, that doesn't make sense to me at all that you would need to do this - it seems like a kernel bug to me.

Quote:

I would like to thank everyone who replied. A special thank you goes to Robby Workman for patience and long explanatory posts. Thanks Robby!!!
You're welcome - I like a good mystery :-)

Quote:

EDIT: Just wanted to document that hibernate works perfectly...only suspend had problem which is now solved.
See, that just further confuses me. If hibernate is working, then the message I get is that reinitializing the bios is playing a key role in making everything work again, so I would expect you to NEED the s3_bios quirk :/

tuxrules 08-13-2009 12:16 AM

Quote:

Originally Posted by rworkman (Post 3641347)
That ^^^ tells me you are trying to remove the s3_bios quirk because you only need the vbe_post one.
However, the "Initial commandline parameters:" of the pm-suspend command clearly show that the s3_bios quirk is still being passed along.

May be I'm not knowledgeable enough to dispute what you're saying but I read that as originally --quirk-s3-mode is the initial command line option for pm-suspend which is later replaced by --quirk-vbe-post.


Thanks for relevant line for lilo config. I just did a little test of possible scenarios. Let me know if this is flawed.

I tested suspend/resume with and without acpi_osi boot parameter:

I restarted rc.hald after each change to the hal fdi files.

Without acpi_osi boot parameter
with power_management.quirk.s3_bios set to true

laptop doesn't suspend when lid is closed

with power_management.quirk.s3_bios set to false

laptop doesn't suspend when lid is closed

With acpi_osi boot parameter
with power_management.quirk.s3_bios set to true

laptop goes into suspend on lid closing but screen is completely off when I open the lid

with power_management.quirk.s3_bios set to false

laptop goes into suspend on lid closing and wakes up correctly (with video).


Clearly, only with acpi_osi boot parameter and power_management.quirk.s3_bios set to false I get a working suspend/resume system.

Don't know if this is a kernel bug but seems to work in my case. This may well be a hack so I'm completely open to any straightforward/logical solution.

Astarath 09-16-2009 09:33 PM

I am not sure if this is the same issue as you were having but I was able to suspend to ram without a problem, then when i resumed by opening the laptop lid, all i had was a flashing cursor in the top left hand corner of the screen. Other than rebooting, to get back functionality I would have to alt-f2 to switch the tty i was on - and when i went back to the original tty, naturally xwindows crashed.

This is an excerpt from pm-suspend.log
Code:

/usr/lib/pm-utils/sleep.d/00auto-quirk suspend suspend: success.
/usr/lib/pm-utils/sleep.d/00logging suspend suspend: Linux thanatos 2.6.29.6-smp #2 SMP Mon Aug 17 00:52:54 CDT 2009 i686 Intel(R) Pentium(R) Dual  CPU  T2330  @ 1.60GHz GenuineIntel GNU/Linux
Module                  Size  Used by
snd_seq_dummy          2464  0
snd_seq_oss            29792  0
snd_seq_midi_event      5980  1 snd_seq_oss
snd_seq                47984  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device          6088  3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            37728  0
snd_mixer_oss          14300  1 snd_pcm_oss
ipv6                  243508  18
cpufreq_ondemand        6632  2
speedstep_lib          3840  0
acpi_cpufreq            7500  0
freq_table              3420  2 cpufreq_ondemand,acpi_cpufreq
lp                      9316  0
ppdev                  7200  0
parport_pc            24036  0
parport                30700  3 lp,ppdev,parport_pc
fuse                  54008  1
snd_hda_codec_si3054    4444  1
snd_hda_codec_realtek  188544  1
nvidia              9585672  39
snd_hda_intel          23624  1
snd_hda_codec          53788  3 snd_hda_codec_si3054,snd_hda_codec_realtek,snd_hda_intel
snd_hwdep              6816  1 snd_hda_codec
snd_pcm                68128  4 snd_pcm_oss,snd_hda_codec_si3054,snd_hda_intel,snd_hda_codec
snd_timer              19108  2 snd_seq,snd_pcm
snd                    50820  14 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_si3054,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
tg3                  109024  0
soundcore              5824  1 snd
snd_page_alloc          7972  2 snd_hda_intel,snd_pcm
libphy                17756  1 tg3
thermal                15096  1
sdhci_pci              6844  0
processor              38600  4 acpi_cpufreq,thermal
sdhci                  15520  1 sdhci_pci
video                  16492  5
mmc_core              45304  1 sdhci
thermal_sys            10756  3 thermal,processor,video
rtc_cmos              10124  0
hwmon                  2104  1 thermal_sys
led_class              3392  1 sdhci
rtc_core              15992  1 rtc_cmos
psmouse                41676  0
button                  5708  0
ac                      3840  0
battery                9856  0
output                  2396  1 video
intel_agp              25628  0
sg                    24912  0
uvcvideo              58184  0
serio_raw              5024  0
wmi                    6280  0
rtc_lib                2332  1 rtc_core
agpgart                29256  2 nvidia,intel_agp
videodev              38688  1 uvcvideo
compal_laptop          3912  0
v4l1_compat            13184  2 uvcvideo,videodev
i2c_i801                8784  0
evdev                  9152  10
            total      used      free    shared    buffers    cached
Mem:      2068156    1964628    103528          0    169060    1410672
-/+ buffers/cache:    384896    1683260
Swap:            0          0          0
success.
/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
/usr/lib/pm-utils/sleep.d/01grub suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: success.
/usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/90chvt suspend suspend: success.
/usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
/usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/98smart-kernel-video suspend suspend: success.
/usr/lib/pm-utils/sleep.d/99video suspend suspend: kernel.acpi_video_flags = 0
success.
Thu Sep 17 12:39:16 EST 2009: performing suspend
Thu Sep 17 12:39:48 EST 2009: Awake.
Thu Sep 17 12:39:48 EST 2009: Running hooks for resume
/usr/lib/pm-utils/sleep.d/99video resume suspend: success.
/usr/lib/pm-utils/sleep.d/98smart-kernel-video resume suspend: success.
/usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success.
/usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/90chvt resume suspend: VT_DISALLOCATE: Device or resource busy
deallocvt: could not deallocate console 63
Returned exit code 1.
/usr/lib/pm-utils/sleep.d/75modules resume suspend: success.
/usr/lib/pm-utils/sleep.d/55NetworkManager resume suspend: success.
/usr/lib/pm-utils/sleep.d/49bluetooth resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/01grub resume suspend: not applicable.
/usr/lib/pm-utils/sleep.d/00powersave resume suspend: success.
/usr/lib/pm-utils/sleep.d/00logging resume suspend: success.
/usr/lib/pm-utils/sleep.d/00auto-quirk resume suspend: success.

So, the solution was as follows:

pm-suspend --quirk-no-chvt

and it resumes now without a hitch. I have not tried hibernate.


All times are GMT -5. The time now is 12:54 AM.