#!/bin/bash # pm-script to work around suspend issues with the Dell Studio 15 under Ubuntu 8.04 # Save this as /etc/pm/sleep.d/studio15 and `sudo chmod +x /etc/pm/sleep.d/studio15` # Author: Kevin Mehall # I hereby release this file into the public domain # See also: http://blog.kevinmehall.net/2009/dell-studio-15n-review case "$1" in hibernate|suspend) echo 0 > /sys/devices/system/cpu/cpu1/online modprobe -r wl ;; thaw|resume) modprobe wl /etc/init.d/bluetooth stop sleep 1 /etc/init.d/bluetooth start echo 1 > /sys/devices/system/cpu/cpu1/online ;; *) ;; esac