if [ "x$1" != "x1" -a "x$1" != "x0" ] then echo "Usage: ./change_mode.sh [01]" echo "0=user modeset, 1=kernel modeset" exit fi PID=`pgrep Xorg` stop gdm while [ "x$PID" != "x" ]; do sleep 1 PID=`pgrep Xorg` done echo 0 > /sys/class/vtconsole/vtcon1/bind modprobe -rv radeon modprobe -v radeon modeset=$1 agpmode=4 sleep 1 echo 1 > /sys/class/vtconsole/vtcon1/bind if [ "x$2" = "xs" ] then start gdm fi