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 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 Code:
raghu@sisrana:[/proc]$ cat /sys/power/state |
Usually what I do, is just use the rc.acpi script and add
Code:
#!/bin/sh |
Quote:
Code:
raghu@sisrana:[/proc]$ groups |
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.
|
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. |
Quote:
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:
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:
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. |
Quote:
Quote:
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? |
Quote:
Quote:
Quote:
|
Quote:
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:
Quote:
BTW, I've tried all this via both stock kernel and custom kernel with same results. Quote:
|
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 solution, here's my grub entry with the acpi_osi kernel parameter Code:
title Slackware Linux Code:
<match key="system.hardware.product" contains_outof="L305"> EDIT: Just wanted to document that hibernate works perfectly...only suspend had problem which is now solved. |
Quote:
Quote:
However, the "Initial commandline parameters:" of the pm-suspend command clearly show that the s3_bios quirk is still being passed along. Quote:
Code:
append = "acpi_osi=Linux" Quote:
Quote:
|
Quote:
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. |
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. 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. |