You are not logged in.

#1 2011-02-28 21:34:18

Pechorin
Member
From: Belgrade
Registered: 2004-12-23
Posts: 28
Website

Arch Linux as VirtualBox guest ACPI shutdown

Hello all,

I've installed Arch Linux as a guest in VirtualBox, following: https://wiki.archlinux.org/index.php/Ar … lBox_Guest.

Everything seems fine, but I can't get Arch to respond to ACPI Shutdown signal. This was true both with 3.2 as it is with 4.0 of VirtualBox.  The signal is pretty much being ignored as far as logs tell me (though I'm not even sure where to look), so I don't know how to go about debugging this.

Did anyone get this to work?

Thanks

Offline

#2 2011-02-28 22:09:43

mcsilva
Member
From: Portugal
Registered: 2009-12-16
Posts: 95

Re: Arch Linux as VirtualBox guest ACPI shutdown

Yes. I did!
I have several virtual ArchLinux running as guests in my ArchLinux host (for testing purposes), and they do shutdown when I "Host+H" (shutdown by ACPI).
I'm running virtualbox_bin-4.0.0-2, without GuestAdditions installed.
It works when I'm running in gnome desktop, if I click Host+H, the shutdown window pops in the screen.
Test if your Guest is ACPI aware with this command:

# VBoxManage showvminfo "Guest Name" | grep ACPI
ACPI:            on

(change "Guest Name" accordingly)

I think ACPI is turned on by default in VirtualBox, and can only be turned off in command line.

Offline

#3 2011-03-01 09:21:37

Pechorin
Member
From: Belgrade
Registered: 2004-12-23
Posts: 28
Website

Re: Arch Linux as VirtualBox guest ACPI shutdown

mcsilva wrote:

Yes. I did!
It works when I'm running in gnome desktop, if I click Host+H, the shutdown window pops in the screen.

Does it work only when you are running Gnome? Can that possibly be an issue, e.g. Gnome handling this (I'm running the guest without X).

VBoxManage showvminfo says ACPI is ON.

Thanks

Offline

#4 2011-03-01 13:37:06

mcsilva
Member
From: Portugal
Registered: 2009-12-16
Posts: 95

Re: Arch Linux as VirtualBox guest ACPI shutdown

No.
This has nothing to do with VirtualBox.
I think gnome handles ACPI internally.
If you want to handle ACPI without X (only in text mode) you have to edit /etc/acpi/handler.sh file.
Find those lines:

case "$1" in
    button/power)
        #echo "PowerButton pressed!">/dev/tty5
        case "$2" in
            PWRF)   logger "PowerButton pressed: $2" ;;
            *)      logger "ACPI action undefined: $2" ;;
        esac
        ;;

Change to:

case "$1" in
    button/power)
        #echo "PowerButton pressed!">/dev/tty5
        case "$2" in
            PWRF)   logger "PowerButton pressed: $2"
            halt;;
            *)      logger "ACPI action undefined: $2" ;;
        esac
        ;;

This should work after doing:
# /etc/rc.d/acpid restart

Note: of course you must have acpid installed.

Last edited by mcsilva (2011-03-01 13:42:41)

Offline

#5 2011-03-01 20:33:53

Pechorin
Member
From: Belgrade
Registered: 2004-12-23
Posts: 28
Website

Re: Arch Linux as VirtualBox guest ACPI shutdown

That was it! I really had no idea how these signals are handled (I even didn't know about acpid package to begin with), so this shed much light on it.

Thanks again

Offline

Board footer

Powered by FluxBB