Re: Ubuntu 10.04 Lucid 2.6.32-24-generic Agere modem 11c1:0620 hibernate suspend problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2011-03-23 at 02:49 -0400, Marvin Stodolsky wrote: 
> Aliet,
> 
> Even for Open Source drivers, function loss during Suspend/Hibernation
> is common.
> But the "wake up scripts" check for critical functionalities
> (including COMM) and
> quietly do unloads/reloads as necessary.
> 
> You could set up such a script, following study of the several Resume
> relate scripts.
> I haven't bothered with such myself.
> 
> MarvS
> 
Hi there,
following Marvin advice, I set up such a script for unloading/loading
the modules before and after every suspend/hibernate, I give the
solution here:
This is tested in Ubuntu Lucid Lynx 10.04.1 LTS, which uses 'pm-utils'
to suspend and hibernate, as seen in the file:
'/etc/default/acpi-support'
--------------------------------------------------------------------- 
$ cat /etc/default/acpi-support | grep ^SUSPEND_METHODS=
SUSPEND_METHODS="dbus-pm dbus-hal pm-utils"
---------------------------------------------------------------------
To take care of the loading/unloading process, we create a script file
in '/etc/pm/sleep.d/' with name:
'90_unloading-loading-agrmodem-kernel-modules' 
---------------------------------------------------------------------
$ sudo nano /etc/pm/sleep.d/90_unloading-loading-agrmodem-kernel-modules
---------------------------------------------------------------------
Once inside we paste there the following:
---------------------------------------------------------------------
#!/bin/bash
case "$1" in
    hibernate|suspend)
        modprobe -r agrserial && modprobe -r agrmodem
        ;;
    thaw|resume)
        modprobe agrmodem && modprobe agrserial        
        ;;
    *)
        ;;
esac
exit $?
---------------------------------------------------------------------
After we save the script, we set the permissions:
---------------------------------------------------------------------
$ sudo chmod 755 /etc/pm/sleep.d/90_unloading-loading-agrmodem-kernel-modules
---------------------------------------------------------------------
Everything should look like this:
---------------------------------------------------------------------
$ ls -l /etc/pm/sleep.d/90_unloading-loading-agrmodem-kernel-modules
-rwxr-xr-x 1 root root 220 2011-03-23 11:37 /etc/pm/sleep.d/90_unloading-loading-agrmodem-kernel-modules
---------------------------------------------------------------------
You still have to load the modules on a normal boot-up, which I do by adding:
---------------------------------------------------------------------
agrmodem
agrserial
---------------------------------------------------------------------
at the end of '/etc/modules'
in my case it look like this:
---------------------------------------------------------------------
$ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

lp
coretemp
it87
agrmodem
agrserial
---------------------------------------------------------------------
and for automating the process of creating the symlinks, following
'agrsm_howto.txt', adding this line:
---------------------------------------------------------------------
KERNEL=="ttyAGS3", NAME="%k", GROUP=="dialout", SYMLINK+="ttySAGR modem"
---------------------------------------------------------------------
at the end of:
---------------------------------------------------------------------
/etc/udev/rules.d/10-local.rules
---------------------------------------------------------------------
or creating it if doesn't exists, both could be done by:
---------------------------------------------------------------------
$ echo 'KERNEL=="ttyAGS3", NAME="%k", GROUP=="dialout", SYMLINK+="ttySAGR modem"' | sudo tee --append /etc/udev/rules.d/10-local.rules
---------------------------------------------------------------------
and it should look like this:
---------------------------------------------------------------------
$ grep "ttyAGS3" /etc/udev/rules.d/10-local.rules 
KERNEL=="ttyAGS3", NAME="%k", GROUP=="dialout", SYMLINK+="ttySAGR modem"
---------------------------------------------------------------------

I hope someone can find use in this workaround for Agere Modem
drivers ;)

Regards,
Aliet


--

Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas

Infomed: http://www.sld.cu/


[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux