Bug 133633 - poweroff buton not working by default
Summary: poweroff buton not working by default
Status: VERIFIED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Other (show other bugs)
Version: Alpha 2plus
Hardware: i386 Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Holger Macht
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-14 09:44 UTC by Ladislav Michnovic
Modified: 2007-06-05 10:01 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ladislav Michnovic 2005-11-14 09:44:18 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.
Comment 1 Mads Martin Joergensen 2005-11-14 12:49:03 UTC
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.
Comment 2 Forgotten User ZhJd0F0L3x 2005-11-14 15:28:05 UTC
good guess, Mads :-) Holger (hmacht) is even "more correct", but this is no problem.
Comment 3 Forgotten User ZhJd0F0L3x 2005-11-14 15:34:19 UTC
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)
Comment 4 Ladislav Michnovic 2005-11-14 15:46:17 UTC
- 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"
Comment 5 Forgotten User ZhJd0F0L3x 2005-11-14 16:49:24 UTC
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.
Comment 6 Ladislav Michnovic 2005-11-14 17:38:59 UTC
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
Comment 7 Forgotten User ZhJd0F0L3x 2005-11-14 19:00:54 UTC
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?
Comment 8 Ladislav Michnovic 2005-11-14 19:37:49 UTC
I'm using gdb, but my window mannager is Windowmaker. 
> The best way to debug this is probably to instrument ...
That should I try? 
Comment 9 Holger Macht 2005-12-12 13:13:27 UTC
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.
Comment 10 Forgotten User ZhJd0F0L3x 2005-12-23 11:39:54 UTC
this is fixed after Alpha4. Holger, this was the "additional comment after !/bin/bash" problem.