site  contact  subhomenews

(SP1) Improving shutdown

November 01, 2008 — BarryK
This is interesting, for the first time, the inbuilt wireless interface in my laptop is working. Using the ath_pci driver and I'm testing 4.1.1 "rc2".

However, I did a test install to a USB Flash drive, and without doing any network setup I get blinky with "wifi0" interface in the tray -- but not actually connected to the internet unless I run the Wizard.
Anyway, when I poweroff, about 50% of the time the laptop does not completely power-off. Now, I do recall some discussion about this -- both the ALSA modules have to be unloaded and the network interfaces brought down, to properly power-off -- I think that discussion was about the Aspire One.

I'm wondering if this power-off problem is specific to the 'ath_pci' driver (I don't recall what the Aspire One uses).

Anyway, 4.1.1rc has the ALSA module unloading in /etc/rc.d/rc.shutdown, and I have now added this:

#v411 run rc.alsa as it also unloads modules (if not done, prevents shutdown some systems)...

/etc/rc.d/rc.alsa stop

#v411 bring down network interfaces (prevents shutdown sometimes)...
for ONENETIF in `ifconfig | grep -E '^wifi[0-9]|^wlan[0-9]|^eth[0-9]' | cut -f 1 -d ' ' | tr '\n' ' '`
do
ifconfig $ONENETIF down 2> /dev/null
done


I have done 5 -6 shutdowns to test it, seems to work. But, anyone with more network config experience than me, do you think the above code can be improved?

Note, there was a suggestion to add the '-f' option to 'exec busybox poweroff -f' in /sbin/poweroff script, but that did not work, I still got failures to power-off completely.

Comments

Shutdown failure
Username: BarryK
Curses, I tested a couple more times, on the last test the laptop power led stayed on. So, the problem is not yet solved.

ath_pci
Username: RickRandom
"My NEC i-select uses an Atheros AR50055G wireless card with the ath_pci driver and shuts down fine with lots of Puppies, 2.x, 3.x, 4.x. Sorry if not helpful...

unload both modules
Username: tempestuous
"The topic originally started in regard to the ASUS Eee. Both the ALSA module and wifi module appear to cause shutdown problems if they remain loaded. Quote BarryK: ... and the network interfaces brought down, to properly power-off Taking down the interface is a good idea, but the critical requirement is to go one step further and unload the wifi module. Whether this relates only to the ath_pci module is uncertain, because there is the complicating factor of the ALSA module also being a problem.

eee shutdown
Username: downsouth
"EEE only shutdown every 2nd or so time, so put this at end of rc.shutdown - now eee always shuts down. sleep 2 killall dhcpcd sleep 2 rmmod snd-hda-intel sleep 2

Stopping Networking
Username: Dougal
"/etc/rc.d/rc.network stop That only does the "cleaning up" (killing dhcpcd etc) and putting the interfce down, but I guess I can make it unload the modules, too (like rc.alsa does).

/root/Shutdown directory
Username: Leon
"It would be useful to have a /root/Shutdown directory similar to /root/Startup to save and execute user defined scripts. I have this one: rxvt -e pppoe-stop sync rxvt -e /opt/lampp/lampp stop sync /usr/X11R7/bin/wmpoweroff &


Tags: puppy