View previous topic :: View next topic |
Author |
Message |
ekra n00b
Joined: 05 Jul 2007 Posts: 55 Location: France
|
Posted: Tue Dec 25, 2007 11:33 pm Post subject: [SOLVED] Power Management - Power Button |
|
|
Hello
I am again in troubles and I need you if you can help me (this is not so terrible !).
Issue :
When I push the halt button, gnome is asking me what to do (stop, restart, ....) but it shutdown wathever I do within few seconds. It seems that the action "shutdown" with the halt button is not ignored by the power management.
Info :
This is a kernel from gentoo-sources on a HP pavilion ze4900 laptop
Maybe this could help you :
Code: | ekra@Minu ~ $ zcat /proc/config.gz | grep -i power
# Power management options (ACPI, APM)
# ACPI (Advanced Configuration and Power Interface) Support
CONFIG_ACPI_POWER=y
CONFIG_APM_REAL_MODE_POWER_OFF=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
# CONFIG_X86_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not set
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_E_POWERSAVER is not set
CONFIG_SND_AC97_POWER_SAVE=y
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
|
Thanks a lot.
[edit]I am doubting on this line : CONFIG_APM_REAL_MODE_POWER_OFF=y [/edit] _________________
Last edited by ekra on Fri Dec 28, 2007 2:43 pm; edited 1 time in total |
|
Back to top |
|
|
Wormo Retired Dev
Joined: 29 Nov 2004 Posts: 526 Location: SB County California
|
Posted: Wed Dec 26, 2007 2:53 am Post subject: |
|
|
Do turn off CONFIG_APM_REAL_MODE_POWER_OFF,
it should not be on for any modern machines (i.e. with working ACPI) I know of. |
|
Back to top |
|
|
ekra n00b
Joined: 05 Jul 2007 Posts: 55 Location: France
|
Posted: Wed Dec 26, 2007 11:21 am Post subject: |
|
|
Thank you.
So is there a configuration in Linux to stop shutting down when I press halt button ? _________________
|
|
Back to top |
|
|
Wormo Retired Dev
Joined: 29 Nov 2004 Posts: 526 Location: SB County California
|
Posted: Wed Dec 26, 2007 9:16 pm Post subject: |
|
|
Do you have gnome-power-manager installed? (It's installed by gnome ebuild but not gnome-light ebuild)
If it is installed, is it actually running? You should be able to change whether it is running from Gnome session options screen.
See whether having gnome-power-manager on or off makes any difference in how your power button behaves... |
|
Back to top |
|
|
ekra n00b
Joined: 05 Jul 2007 Posts: 55 Location: France
|
Posted: Fri Dec 28, 2007 2:14 pm Post subject: |
|
|
gnome-volume-manager is running :
Code: | ekra@Minu ~ $ ps -edf | grep gnome-volume-manager | grep -v grep
ekra 6544 1 0 15:09 ? 00:00:00 gnome-volume-manager --sm-disable
|
I have gnome-power-manager because I took the ebuild gnome.
When I shut it and I press halt, the computer shut down like with gnome-power-manager on and without the window asking me what action to do. _________________
|
|
Back to top |
|
|
ekra n00b
Joined: 05 Jul 2007 Posts: 55 Location: France
|
Posted: Fri Dec 28, 2007 2:42 pm Post subject: |
|
|
I solved it with :
Code: | ekra@Minu ~ $ cat /etc/acpi/default.sh
#!/bin/sh
# /etc/acpi/default.sh
# Default acpi script that takes an entry for all actions
set $*
group=${1%%/*}
action=${1#*/}
device=$2
id=$3
value=$4
log_unhandled() {
logger "ACPI event unhandled: $*"
}
case "$group" in
button)
case "$action" in
power)
#/sbin/init 0 ########## Comment this line ! #############
;;
# if your laptop doesnt turn on/off the display via hardware
# switch and instead just generates an acpi event, you can force
# X to turn off the display via dpms. note you will have to run
# 'xhost +local:0' so root can access the X DISPLAY.
#lid)
# xset dpms force off
# ;;
*) log_unhandled $* ;;
esac
;;
ac_adapter)
case "$value" in
# Add code here to handle when the system is unplugged
# (maybe change cpu scaling to powersave mode). For
# multicore systems, make sure you set powersave mode
# for each core!
#*0)
# cpufreq-set -g powersave
# ;;
# Add code here to handle when the system is plugged in
# (maybe change cpu scaling to performance mode). For
# multicore systems, make sure you set performance mode
# for each core!
#*1)
# cpufreq-set -g performance
# ;;
*) log_unhandled $* ;;
esac
;;
*) log_unhandled $* ;;
esac
|
Thank you for your help !!! _________________
|
|
Back to top |
|
|
bandreabis Advocate
Joined: 18 Feb 2005 Posts: 2495 Location: イタリアのロディで
|
Posted: Sun Jan 06, 2008 8:56 pm Post subject: |
|
|
Hi, is it possible that also kde asked me what to do after power button is pressed? _________________ Il numero di post non fa di me un esperto! Anzi! |
|
Back to top |
|
|
|