On Mon, 2012-03-26 at 16:44 +1100, fors...@ozonline.com.au wrote: > David > > This message was sent with a gsm dongle on an xo-1 > > modem:Huawei E160E > carrier:Locked to Dodo (an Optus reseller) > XO-1 > OS31 development which is same as os884 signed > > in my settings, enter username, password, leave *99# unaltered, dodolns1, > blank, blank > > turn off power management, because XO looses connection in sleep mode
I have an enhancements to powerd to inhibit suspend for that issue. The attached proof of concept patch is heavy on tracing, should apply, maybe with an offset, and needs /etc/powerd/flags/modules-inhibits created containing usb_wwan. Once usb_wwan is inserted in the kernel, it remains in memory you can have NM dispatcher or pppd remove the module when the connection is torn down to restore normal power management operation. These features are in testable with au210. Sorry 4g images only, with no firmware in the image. http://build.laptop.org.au/xo/os/latest/ Jerry
diff --git a/powerd b/powerd index e849f87..d6af071 100755 --- a/powerd +++ b/powerd @@ -1237,6 +1237,35 @@ inhibited_by_files() inhibit_files_present || filetimes_busy $t1 } +# let the presence of kernel modules inhibit suspend +kmod_inhibit() +{ + kmodconf=$CONFIGFLAGS/modules-inhibits + + loadedmodules=$(lsmod) + + trace kmod looking for $(cat $kmodconf) + wanted=$(cat $kmodconf) + + for module in $wanted + do + trace kmod looking at $module + foundmodule=$(lsmod | grep $module) + if [ x"$foundmodule" = "x" ] + then + foundmodule= + trace kmod not found + else + trace kmod matched $foundmodule + # implicit return value + trace kmod busy: $foundmodule + return 0 + break + fi + done + return 1 +} + usb_inhibit() { @@ -1266,7 +1295,7 @@ general_inhibit() laptop_busy() { - general_inhibit || usb_inhibit || cpu_or_network_busy + general_inhibit || usb_inhibit || cpu_or_network_busy || kmod_inhibit } if [ -e $TPAD_RECAL ] @@ -1794,6 +1823,9 @@ snooze() then inhibited_by_files && break 2 + # check kernel modules against kmod_inhibit + kmod_inhibit && break 2 + # recheck network packets. check_network_activity finish && break fi
_______________________________________________ Devel mailing list Devel@lists.laptop.org http://lists.laptop.org/listinfo/devel