[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#606237: linux-kernel: poweroff-button fails on 2.6.32-5-openvz-686



Hello,

I installed the packages (tested after the first command and then after
the second):

apt-get install -t unstable acpi-support-base

apt-get install -t unstable acpi-support

If i try to run the script it complains that /etc/acpi/events/powerbtn
exists. When i remove this file it works when i run the script the way
you discribe it using sh. But the powerbutton does still not work.
Strange, it seems like the powerbutton does not trigger any script.

Thanks,

Richard


Op 17-12-2010 13:48, Bjørn Mork schreef:
> Richard Landsman - Rimote Media <richard@rimote.nl> writes:
>
>> The bug you mentioned looks relevant. I did not use X. But I've tried to
>> install acpi-support from both the testing and unstable repo and it
>> doesn't seem to maken any difference. 
> You currently need acpi-support-base from unstable.  Doesn't look like
> acpi-support will pull that in.  It is satisfied with acpi-support-base
> from testing. 
>
>> Maybe the update is not yet in the
>> repo? It looks like it still needs X and it is installed now so it looks
>> like missing X does not have to do with the broken ACPI support.
> acpi-support-base version 0.138-4  Works For Me (tm)
>
> But the code is still doing a lot of weird stuff to verify that you are
> a console user and to look for a number of power event handlers.
>
> You could verify that you are using the default powerbtn script by
> looking at the acpi config:
>
>  frtest5:~# cat /etc/acpi/events/powerbtn-acpi-support 
>  event=button[ /]power
>  action=/etc/acpi/powerbtn-acpi-support.sh
>
> and then run the script with sh -x to see where (and if it fails).
> Beware:  This will poweroff your host if it doesn't fail....
>
>
> frtest5:~# sh -x /etc/acpi/powerbtn-acpi-support.sh
> + [ -f /etc/acpi/events/powerbtn -o -f /etc/acpi/events/powerbtn.dpkg-bak ]
> + [ -e /usr/share/acpi-support/policy-funcs ]
> + . /usr/share/acpi-support/policy-funcs
> + . /usr/share/acpi-support/power-funcs
> + umask 022
> + PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
> + POWERSTATE=/var/lib/acpi-support/powerstate
> + HDPARM=/sbin/hdparm -q
> + LIDSTATE=/var/lib/acpi-support/lidstate
> + CheckPolicy
> + local PMS
> + getXconsole
> + fgconsole
> + activeVT=serial
> + return
> + PMS=/usr/bin/gnome-power-manager /usr/bin/kpowersave /usr/bin/xfce4-power-manager
> + PMS=/usr/bin/gnome-power-manager /usr/bin/kpowersave /usr/bin/xfce4-power-manager /usr/bin/guidance-power-manager /usr/lib/dalston/dalston-power-applet
> + pidof -x /usr/bin/gnome-power-manager /usr/bin/kpowersave /usr/bin/xfce4-power-manager /usr/bin/guidance-power-manager /usr/lib/dalston/dalston-power-applet
> + test  != 
> + PowerDevilRunning
> + test -x /usr/bin/dbus-send
> + local DBUS_SESS
> + pidof kded4
> + return 1
> + [ -x /etc/acpi/powerbtn.sh ]
> + [ -x /etc/acpi/powerbtn.sh.dpkg-bak ]
> + /sbin/shutdown -h -P now Power button pressed
>
> Broadcast message from root@frtest5 (pts/0) (Fri Dec 17 13:40:32 2010):
>
> Power button pressed 
> The system is going down for system halt NOW!
> frtest5:~# Connection to frtest5.lab closed by remote host.
> Connection to frtest5.lab closed.
>
>
> As you can see, it now works for me because "activeVT=serial" has been
> added as a special case in /usr/share/acpi-support/power-funcs:
>
> # getXconsole gets the foreground (console) X user
> getXconsole() {
>         activeVT=$(fgconsole) || pwf_error "can't get active VT"
>         case $activeVT in
>                 serial)
>                         return
>                         ;;
>                 ''|*[!0-9]*)
>                         pwf_error "invalid active VT '$activeVT'"
>                         ;;
>         esac
>
>
> But I assume this will still fail for any unknown console type.  Run
> "fgconsole" to see what yours is.
>
>
> Bjørn



Reply to: