Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Power Management - Power Button
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ekra
n00b
n00b


Joined: 05 Jul 2007
Posts: 55
Location: France

PostPosted: Tue Dec 25, 2007 11:33 pm    Post subject: [SOLVED] Power Management - Power Button Reply with quote

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
View user's profile Send private message
Wormo
Retired Dev
Retired Dev


Joined: 29 Nov 2004
Posts: 526
Location: SB County California

PostPosted: Wed Dec 26, 2007 2:53 am    Post subject: Reply with quote

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
View user's profile Send private message
ekra
n00b
n00b


Joined: 05 Jul 2007
Posts: 55
Location: France

PostPosted: Wed Dec 26, 2007 11:21 am    Post subject: Reply with quote

Thank you.

So is there a configuration in Linux to stop shutting down when I press halt button ?
_________________
:)
Back to top
View user's profile Send private message
Wormo
Retired Dev
Retired Dev


Joined: 29 Nov 2004
Posts: 526
Location: SB County California

PostPosted: Wed Dec 26, 2007 9:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
ekra
n00b
n00b


Joined: 05 Jul 2007
Posts: 55
Location: France

PostPosted: Fri Dec 28, 2007 2:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
ekra
n00b
n00b


Joined: 05 Jul 2007
Posts: 55
Location: France

PostPosted: Fri Dec 28, 2007 2:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
bandreabis
Advocate
Advocate


Joined: 18 Feb 2005
Posts: 2495
Location: イタリアのロディで

PostPosted: Sun Jan 06, 2008 8:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum