samsung-wireless after resume

Discussions about Linux installation and configuration on Samsung laptops
mbdub
Newbie
Newbie
Posts: 6
Joined: 06/05/2010, 22:32

samsung-wireless after resume

Postby mbdub » 08/05/2010, 20:30

Hi
I tried the samsung-wireless package on my N140.
And while everything worked great (so far - touch wood),
I did have problems that wicd (i use wicd instead of NetworkManager)
could not connect after suspend-resume.

After a bit of investigation, I found that the suspend scripts in /usr/lib/pm-utils/sleep.d/ are defined in the following order
54r8192e_pci 55NetworkManager 91wicd
where 54r8192e_pci removes/installs the r8192e_pci module.

I believe, this is the suspend order and the resume order is reverse.
So, at the resume, the r8192e_pci module is installed AFTER wicd or NM has started.

I've reordered scripts by renaming them to
55NetworkManager 91wicd 92r8192e_pci
and everything resumes perfectly now (touch wood again).

I guess, this 54r8192e_pci script came from samsung-wireless.
If so and if the above sounds plausible, could you change the script name in your package please?

User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

Re: samsung-wireless after resume

Postby voRia » 10/05/2010, 11:56

Done. ;)
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

mbdub
Newbie
Newbie
Posts: 6
Joined: 06/05/2010, 22:32

Re: samsung-wireless after resume

Postby mbdub » 10/05/2010, 19:41

Wow, that was fast :)

Actually, I've been going through pm-utils docs and scripts and found out that
the new recommended way to handle this situation (ie suspend-resume kernel modules)
is to create a file in /etc/pm/config.d/ , eg /etc/pm/config.d/r8192e_pci
that contains
SUSPEND_MODULES="r8192e_pci"

This works as follows:
One of the scripts in /usr/lib/pm-utils/sleep.d/ is "75modules". It will load up config files from /etc/pm/config.d/ folder and suspend-resume kernel modules defined in SUSPEND_MODULES list. (Note that this script is smart enough to concatenate all SUSPEND_MODULES as opposed to overwriting them so you don't need to worry about it.)

It should work nicely with NetworkManager because they use script 55NetworkManager, ie in the right place with relation to 75modules. But unfortunately for me, it will not work for wicd out-of-the-box, because their script is 91wicd, ie it will resume too early.

For now, I've renamed 91wicd to 74wicd, tried the above approach and can confirm that it works perfectly.
I'll try to chase up the WICD folks and I hope they are as accommodating as you are :)

User avatar
voRia
Administrator
Administrator
Posts: 1378
Joined: 12/02/2009, 18:08
Location: Italy
Contact:

Re: samsung-wireless after resume

Postby voRia » 11/05/2010, 9:47

Thanks for the info. :)
However, for now I think it's better to keep the current script, because even if it's not the correct way to manage modules at suspend/resume time, it works with both networkmanager and wicd.
Image
Please consider a little donation to keep the 'Linux On My Samsung' project up and running. Thank you!

mikebl71
Newbie
Newbie
Posts: 22
Joined: 03/10/2010, 20:17

Re: samsung-wireless after resume

Postby mikebl71 » 22/11/2010, 23:14

(ex.mbdub)

Hi voRia,
Just wanted to give an update.

I am still trying to push wicd people to fix their package,
but this does not seem to be easy at all.
Basically, as far as I can see, wicd is pretty much dead,
there is hardly anybody left and there was no development there for a year at least.

However,
the good news is that the new version of the Realtek driver (v14) resumes correctly regardless of whether wicd starts before or after it.
(Afaik, wicd keeps retrying until it manages to connect, but there was a bug in v13 version of the driver that prevented this from working).

So, when you have a chance, could you please modify the samsung-wireless package to use the recommended suspend-resume mechanism (ie SUSPEND_MODULE as described above). I verified this on my netbook and it works perfectly.
If you need any help with this, just let me know.

themagni
Newbie
Newbie
Posts: 8
Joined: 07/12/2010, 16:55

Re: samsung-wireless after resume

Postby themagni » 12/12/2010, 0:50

I have an NF-210, and wireless would not resume after sleep or hibernate.

The problem ended up being a bug in the ath9k driver, and a fix is available here:
https://bugs.launchpad.net/ubuntu/+sour ... bug/688702

After installing the RC2 update, I can put the netbook to sleep and it will resume afterwards.

Now on to touchpad edge scrolling...

mikebl71
Newbie
Newbie
Posts: 22
Joined: 03/10/2010, 20:17

Re: samsung-wireless after resume

Postby mikebl71 » 03/02/2011, 13:05

Hi voRia,

I wonder if you could make the changes described in my 3rd post above (mbdub used to be my alias).
Now that this works in all environments.

I kind of feel bad that I pushed you in the wrong direction and it got stuck there.

Also, the "right" way has the advantage that you'll get some more advanced suspend-resume
logic for free.
For example, the 99r8192e_pci script that gets installed with samsung-wireless will load the r8192e_pci_realtek driver on resume regardless of whether I actually want to use it or I've just happened to install the samsung-wireless package but use a different driver.
The 75modules script is much cleverer and resumes a module only if it was _actually_ used before the suspend.

If you need any more details or any help with this, just let me know.


Return to “Linux On My Samsung”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests