Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-04-16 22:33:13

layr
Member
Registered: 2012-02-13
Posts: 5

Power button not working / power manager event handling in general

I've been running Debian/XFCE combo alongside with another DE-less setup.
In the latter, the power button successfully triggered /etc/acpi/powerbtn-acpi-support.sh and everything worked fine.
Now, installed only xfce4-power-manager to this setup (ie not the whole DE) and power button ceased to work.
If the manager is closed, the situation remains the same. So, how exactly does xfce power manager handle these triggers/events? It must've overwritten some kind of config file, but can't find it.
Yes,

acpi_listen

detects button press.


Contents of powerbtn-acpi-support.sh:

#!/bin/sh

# This script initiates a shutdown when the power putton has been
# pressed. Loosely based on the sample that ships with the acpid package.
# If the acpid sample is present as a real config file (as it was in earlier
# versions of acpid), we skip this script. (Purging and reinstalling acpid
# resolves this situation, or simply deleting /etc/acpi/events/powerbtn.)

if [ -f /etc/acpi/events/powerbtn -o -f /etc/acpi/events/powerbtn.dpkg-bak ] ; then 
	logger Acpi-support not handling power button, acpid handler exists at /etc/acpi/events/powerbtn or /etc/acpi/events/powerbtn.dpkg-bak.
	exit 0
fi

# Commented out following section to prevent exiting of this script if there is a power manager present:
	#[ -e /usr/share/acpi-support/policy-funcs ] || exit 0
	#
	#. /usr/share/acpi-support/policy-funcs
	#
	#if CheckPolicy; then
	#	exit 0
	#fi

#if [ -x /etc/acpi/powerbtn.sh ] ; then
if [ -x /etc/acpi/powerbtn.py ] ; then
	# Compatibility with old config script from acpid package
	python /etc/acpi/powerbtn.py
elif [ -x /etc/acpi/powerbtn.sh.dpkg-bak ] ; then
        # Compatibility with old config script from acpid package
	# which is still around because it was changed by the admin
        /etc/acpi/powerbtn.sh.dpkg-bak
else
	# Normal handling.
	/sbin/shutdown -h -P now "Power button pressed"
fi

Note the script worked flawlessly and powerbtn.py got executed prior to installing xfce4-power-manager.
If manager is closed, then other events continue functioning as they were (e.g. lid closing, sleep button), except for the power button.

EDIT: copied python execution to the top of powerbtn-acpi-support.sh - still didn't work, meaning the script won't get even executed.

Debian Wheezy
xfce4-power-manager 1.0.11

Last edited by layr (2013-04-17 08:53:50)

Offline

Board footer

Powered by FluxBB