15 June 2009

Ubuntu Fixed Computer Shutdown Problem

WOOT! Finally got it working after 1 whole night.

I simply edited this file:

/etc/init.d/alsa-utils

and added the lines:

ifconfig wlan0 down
ifconfig eth0 down

after "stop)" in the file (around line 353), so it looks like this:


stop)
ifconfig wlan0 down
ifconfig eth0 down
EXITSTATUS=0

:D

ok. better method which doesn't touch the sound part.

Details:

1. Open a terminal and become super-user (yeah, this is a bad security practice, but I'm too lazy to type sudo before everything).

Code:
su
2. Navigate to the init.d directory.
Code:
cd /etc/init.d
3. Touch and edit your new wireless shutdown script. I use "vi," but feel free to use "gedit" if you like.
Code:
vi killwlan
4. Add line(s) that "modprobe -r" your wireless driver module(s). In MY case, I remove "iwlagn" modules. In YOUR case, you'll need to find out the module names being used by your wireless device.
Code:
modprobe -r iwlagn
5. Save the script and exit the text editor.
Code:
[ESC] :wq [ENTER]
6. Navigate to the rc0.d directory.
Code:
cd /etc/rc0.d
7. Create a link to your killwlan script.
Code:
ln -sT /etc/init.d/killwlan S16killwlan
8. Navigate to the rc6.d directory.
Code:
cd /etc/rc6.d
9. Create a link to your killwlan script.
Code:
ln -sT /etc/init.d/killwlan S16killwlan
10. Now try to shutdown or restart.
Code:
init 6



File permission if needed:

Code:
cd /etc/init.d/
sudo chmod 755 killwlan