Bugzilla – Bug 133633
poweroff buton not working by default
Last modified: 2007-06-05 10:01:24 UTC
In previous versions of SL I used to turn off the computer by simply pressing the powerbutton on my case. In SL 10.1 alpha2+ it's not working by default.
Stefan, I assume this is some kind of power management issue. If you're not the right to assign to, please tell me who is.
good guess, Mads :-) Holger (hmacht) is even "more correct", but this is no problem.
I have right now seen an alpha2 shut down on power button press, so it seems not to be generally broken :-) We need some more info: - check if ACPI is used (does /proc/acpi exist) - check if the needed module ("button") is loaded - check if everything needed is running: - acpid - powersaved - hal - check if the button event is recorded ("tail -f /var/log/acpid" while pressing the button)
- check if ACPI is used (does /proc/acpi exist) Yes. - check if the needed module ("button") is loaded Yes. $lsmod |grep but button 6416 0 - check if everything needed is running: - acpid Yes. $ps auwx root 3257 0.0 0.0 1488 472 ? Ss 10:08 0:00 /usr/sbin/acpid - powersaved Yes. root 3586 0.0 0.3 4124 1696 ? S 10:08 0:00 /usr/sbin/powersaved -d -f /var/run/acpid.socket -v 3 - hal Yes. root 3303 0.0 0.5 4220 2828 ? Ss 10:08 0:01 /usr/sbin/hald --daemon=yes --retain-privileges - check if the button event is recorded Yes it is. $tail -f /var/log/acpid [Mon Nov 14 16:41:01 2005] received event "button/power PWRF 00000080 00000002" [Mon Nov 14 16:41:01 2005] notifying client 3419[0:0] [Mon Nov 14 16:41:01 2005] notifying client 3586[0:0] [Mon Nov 14 16:41:01 2005] notifying client 4135[0:0] [Mon Nov 14 16:41:01 2005] completed event "button/power PWRF 00000080 00000002"
ok. So far everything is working fine :-) "[Mon Nov 14 16:41:01 2005] notifying client 3586[0:0]" even tells us, that powersaved was notified. So please set DEBUG=15 in /etc/sysconfig/powersave/common, restart powersaved, press the button and report what powersaved shows us in /var/log/messages.
Nov 14 18:38:19 linux [powersave]: DIAG (handleHWEventRequest:129) Could not read from hwEvent fd 4: Resource temporarily unavailable Nov 14 18:38:19 linux [powersave]: DIAG (handleHWEventRequest:145) ACPI Event: 'button/power PWRF 00000080 00000003' ignore buttons: no Nov 14 18:38:19 linux [powersave]: Info (handleHWEventRequest:203) button.power event occured Nov 14 18:38:19 linux [powersave]: Info (registerEvent:35) registering event no.'2' Nov 14 18:38:19 linux [powersave]: Info (execute_program:186) Going to execute external action wm_shutdown Nov 14 18:38:19 linux [powersave]: Info (execute_program:217) Program /usr/lib/powersave/scripts/wm_shutdown will be executed for event button.power. Param 1: button.power,Param 2: scheme_performance
ok, so it seems to do everything correctly until here. The best way to debug this is probably to instrument /usr/lib/powersave/scripts/wm_shutdown with apropriately sprinkled "logger 'before xxx'" statements and look in syslog how far it is going and why it is not shutting down. AH. Idea. Are you using KDE or Gnome? Any chance you are using KDE but gdm display manager?
I'm using gdb, but my window mannager is Windowmaker. > The best way to debug this is probably to instrument ... That should I try?
Yes, please put lines like "logger 'before xxx'" into /usr/lib/powersave/scripts/wm_shutdown and look into /var/log/messages afterwards to see how far the script advances.
this is fixed after Alpha4. Holger, this was the "additional comment after !/bin/bash" problem.