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 Desktop
Packages, which is subscribed to fglrx-installer in Ubuntu.
https://bugs.launchpad.net/bugs/750437

Title:
  fglrx hard lockup on shutdown

Status in “fglrx-installer” package in Ubuntu:
  Confirmed

Bug description:
  First reported here:
  http://ubuntuforums.org/showthread.php?t=1720894

  fglrx is preventing clean shut downs. Hardware is an ASUS E-35M1-I
  Deluxe, ie. the Fusion APU, and I'm running Ubuntu Natty AMD64, linux-
  generic 2.6.38.7.21, fglrx 2:8.840-0ubuntu1, xserver-xorg
  1:7.6+4ubuntu1. Everything else in the driver is working perfectly,
  ie. hardware accelerated video and 3D, etc.

  Executing "service slim stop" or "service gdm stop" while running
  fglrx, the whole system would sometimes hang, needing a hard reset.
  More often I'll just get "slim is not responding to TERM signals".
  slim.log shows "unexpected signal 15", but slim and X are still
  running. No errors in the Xorg.0.log file. Slim no longer responds to
  input when switching to view the login screen, perhaps because it's
  trying to shut down.

  Trying to kill slim manually has no effect, probably because it's
  already trying to shut down, but fglrx and/or X won't let it. This is
  probably what's preventing a clean shut down.

  "kill -9" on slim and X do kill them, but certain kernel resources are
  clearly not reclaimed because switching to the X console, ie. alt-F7,
  produce a black screen and I can't get back to a regular tty console.
  System still responds to ctl-alt-delete reboot though (sometimes).

  Shutdown times out and the disks are forcibly unmounted, forcing a
  disk check on the next boot. No adverse messages in the logs that I
  can see (Xorg.0.log, slim.log, syslog, kern.log, etc.). The open
  source radeon driver does not have these issues.

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

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to