2009/10/11 Alan Jenkins <[email protected]>:

> But there is only one init method to run :-/.

You're right, I was still thinking about the rfkill delay, but that
shall go away.

> That way, we
>  - load eeepc-laptop as normal when udev starts, but avoid blocking
> the rest of the boot process on it
>  - avoid a confusing "blacklist" entry which isn't really a blacklist
>  -  allow the user to add "blacklist eeepc-laptop" and have it work as normal

Ok, I made this try:

Add to /etc/modprobe.d/eeepc.conf:
install eeepc_laptop modprobe --ignore-install eeepc_laptop $CMDLINE_OPTS &

Applied the attached patch the /etc/init.d/eee-acpi-scripts:
it makes the change you suggested (I only added --ignore-install to
the modprobe call, otherwise it forks to background), plus it makes
SHEngine calls fork to background, as they're awfully slow (up to 4s
on my 901).
These two changes together make a whole lot of difference on my system.

> Then we should also change the eeepc-laptop driver to initialise
> asynchronously when it is built in to the kernel.  Otherwise building
> it into the kernel will slow down the boot process, which is
> unpleasantly counter-intuitive.

You mean making the whole module init an async call?

> Does that make sense?  Do you want to work on this yourself, or should
> I add it to my TODO list?

I think the kernel stuff could be a bit hard to merge upstream...
For the debian scritps, is any maintainer reading this thread?
What do they think?

Cheers,
Luca
--- a/debian/eeepc-acpi-scripts.init	2009-08-10 10:04:32.000000000 +0200
+++ b/debian/eeepc-acpi-scripts.init	2009-10-11 19:06:57.779159444 +0200
@@ -11,9 +11,6 @@
 # exit if package not installed
 test -f /usr/share/eeepc-acpi-scripts/functions.sh || exit 0
 
-# exit if eeepc-laptop isn't loaded (should be loaded by udev)
-test -d /sys/bus/platform/devices/eeepc || exit 0
-
 PATH="/sbin:/bin"
 
 . /lib/lsb/init-functions
@@ -36,6 +33,12 @@
 case "$1" in
   start|restart|reload|force-reload)
 
+    # the module could be loading in background, wait for it.
+    modprobe --use-blacklist --ignore-install eeepc_laptop || exit 0
+
+    # exit if eeepc-laptop still isn't loaded (could be blacklisted)
+    test -d /sys/bus/platform/devices/eeepc || exit 0
+
     # First, get the kernel version.
 
     KERNEL="`uname -r`"
@@ -98,10 +101,10 @@
 	    log_action_cont_msg '(manual)'
 	elif [ "$(cat /sys/class/power_supply/AC0/online 2>/dev/null)" = 0 ]; then
 	    log_action_cont_msg '(battery)'
-	    set_shengine "${PWR_CLOCK_BATTERY:-$(($SHENGINE_LIMIT - 1))}" || :
+	    set_shengine "${PWR_CLOCK_BATTERY:-$(($SHENGINE_LIMIT - 1))}" &
 	else
 	    log_action_cont_msg '(AC)'
-	    set_shengine "${PWR_CLOCK_AC:-0}" || :
+	    set_shengine "${PWR_CLOCK_AC:-0}" &
 	fi
 	log_action_end_msg $?
     fi
_______________________________________________
Debian-eeepc-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel

Reply via email to