#!/bin/bash /sbin/cardctl eject /usr/sbin/alsactl store CPU=/sys/devices/system/cpu/cpu0/cpufreq if test -r $CPU/scaling_max_freq then MAX_FREQ=`cat $CPU/scaling_max_freq` fi sync /bin/echo 4 >/proc/acpi/sleep sleep 4 /sbin/clock --hctosys if test -n "$MAX_FREQ" then echo $MAX_FREQ >$CPU/scaling_max_freq fi /usr/X11R6/bin/X :1 & X_PID=$! # killall gnome-settings-daemon; rmmod snd_atiixp /sbin/cardctl insert /usr/sbin/alsactl restore # Hack to force mixer settings to the device /usr/bin/amixer set Master 1+ /usr/bin/amixer set Master 1- sleep 5 kill $X_PID