There is a workaround that is working in my case and avoids hanged
shutdowns that could damage the filesystems.

I modified /etc/acpi/events/powerbtn so when the power button is pressed
it launches a custom script to do the shutdown that basically stops
lightdm, kills processes from users, waits 30 seconds and then does the
shutdown.

Now to shutdown I just close the session and then I press the power
button, using this procedure I have avoided the kernel panics during the
last month.

In case this can be useful to others experiencing the same problem here
are the contents of both files:


#### Contents of /etc/acpi/events/powerbtn
event=button[ /]power
action=/etc/acpi/powerbtn_custom.sh

#### Contents of /etc/acpi/powerbtn_custom.sh
#!/bin/sh
# /etc/acpi/powerbtn.sh
# Initiates a shutdown when the power putton has been
# pressed.

# Stop lightdm
service lightdm stop
# Stop vmware
service vmware stop

# Kill all user processes that could be left behind by the desktop environment
USERS=`awk -F: '{if ($3>=1000) {print $1} }' /etc/passwd`
for user in $USERS; do
        killall -u $user
done

# Safely unmount /mnt mount points (just in case something goes wrong)
FILESYSTEMS=`mount -t ext3,ext4,xfs,btrfs|awk '{print $3}'|grep "^/mnt"`
for fs in $FILESYSTEMS; do
        umount $fs
done

# Sleep 30 seconds just in case: it seems to help avoiding hangups
sleep 30

# Shutdown
/sbin/shutdown -h now "Power button pressed"

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/750437

Title:
  fglrx hard lockup on shutdown

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/fglrx-installer/+bug/750437/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to