Skip to contentSkip to conversation

iwl3945 and power saving

DISCUSSION Stefan Monnier 2 participants 7 messages Mar 17, 2010 – Mar 20, 2010

lore
Share & tools
lore
#0 lore raw

I finally upgraded from 2.6.30 to 2.6.33 (mostly for TRIM support) on my laptop and find that power saving doesn't seem to work any more on its iwl3945 card.

The extra power consumption is quite significant, so I'm considering compiling my own driver, manually re-enabling the power-saving code.

But before I do that, I'd like to know what is the risk involved (it seems pretty serious since it warranted removing the feature altogether, even tho it was runtime-disabled by default anyway).

Stefan

#1 lore raw

Stefan,

Quoted 2 lines · Stefan Monnier

The extra power consumption is quite significant, so I'm considering compiling my own driver, manually re-enabling the power-saving code.

You will need to revert "iwl3945: disable power save" and then also enable power savings using "iwconfig wlanX power on"

Quoted 4 lines

But before I do that, I'd like to know what is the risk involved (it seems pretty serious since it warranted removing the feature altogether, even tho it was runtime-disabled by default anyway).

You should find all the details in
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2125

Reinette

#2 lore raw
Quoted 4 lines
Quoted 2 lines

The extra power consumption is quite significant, so I'm considering compiling my own driver, manually re-enabling the power-saving code.

You will need to revert "iwl3945: disable power save" and then also enable power savings using "iwconfig wlanX power on"

Yes, thank you.

Quoted 5 lines
Quoted 3 lines

But before I do that, I'd like to know what is the risk involved (it seems pretty serious since it warranted removing the feature altogether, even tho it was runtime-disabled by default anyway).

You should find all the details in
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2125

Hmm... it seems odd to completely kill the feature rather than to flag it as "beware, it's brittle" (e.g. only allow to turn it on with "iwconfig wlanX power on-and-I-promise-I-wont-report-a-bug-if-its-buggy").

Also, it puzzles me: my 3945 has been working fine with power-saving for more than 2 years (and earlier with ipw3945 as well) and I haven't noticed any unreliability. Have I just been lucky or did the problem only start to manifest in more "recent" versions of the driver, for reasons we don't understand?

Stefan

#3 lore raw
Quoted 3 lines · Stefan Monnier

Hmm... it seems odd to completely kill the feature rather than to flag it as "beware, it's brittle" (e.g. only allow to turn it on with "iwconfig wlanX power on-and-I-promise-I-wont-report-a-bug-if-its-buggy").

I do not see a way to communicate this to users.

Quoted 6 lines

Also, it puzzles me: my 3945 has been working fine with power-saving for more than 2 years (and earlier with ipw3945 as well) and I haven't noticed any unreliability. Have I just been lucky or did the problem only start to manifest in more "recent" versions of the driver, for reasons we don't understand?

The previous power saving implementation was very simple. Nothing was directed from upper layers and user had to manually choose a power index, which is communicated to device once and device remained in that power saving state from then on. Recent advances in power saving meant that more was asked from devices as they were asked to enter and exit power saving frequently. This new behavior is what is causing issues in 3945 and 4965.

Reinette

#4 lore raw
Quoted 4 lines
Quoted 3 lines

Hmm... it seems odd to completely kill the feature rather than to flag it as "beware, it's brittle" (e.g. only allow to turn it on with "iwconfig wlanX power on-and-I-promise-I-wont-report-a-bug-if-its-buggy").

I do not see a way to communicate this to users.

No, indeed ;-)

Quoted 7 lines

The previous power saving implementation was very simple. Nothing was directed from upper layers and user had to manually choose a power index, which is communicated to device once and device remained in that power saving state from then on. Recent advances in power saving meant that more was asked from devices as they were asked to enter and exit power saving frequently. This new behavior is what is causing issues in 3945 and 4965.

Aha! That's very interesting, then. So, given that the previous naive power-saving implementation worked well for me (and I presume other users as well), would it be possible to use/provide that old naive technique for 3945 and 4965?

Or does the new technique change too much of the structure of the code that the naive technique can't be used any more?
Could someone kindly point me to the most relevant commits that changed the power management technique, if it all possible?

Would reverting "iwlwifi: unify iwlagn and 3945 power save management" be a possible starting point (probably not for a patch that I intend to submit back for inclusion, but I'm thinking more for a patch for my own personal use, or more likely just to start trying to understand what's going on)?

Stefan

#5 lore raw
Quoted 4 lines · Stefan Monnier

Aha! That's very interesting, then. So, given that the previous naive power-saving implementation worked well for me (and I presume other users as well), would it be possible to use/provide that old naive technique for 3945 and 4965?

We could look into this. Could you please submit a request for this change to http://bugzilla.intellinuxwireless.org/ ?

Quoted 4 lines

Or does the new technique change too much of the structure of the code that the naive technique can't be used any more?
Could someone kindly point me to the most relevant commits that changed the power management technique, if it all possible?

A lot has changed in this area in the last few kernel versions.

Quoted 5 lines

Would reverting "iwlwifi: unify iwlagn and 3945 power save management" be a possible starting point (probably not for a patch that I intend to submit back for inclusion, but I'm thinking more for a patch for my own personal use, or more likely just to start trying to understand what's going on)?

If I remember correctly the patch you refer to only removed duplicated code.

If there is a need for this then I think what can be done here is either use the current debugfs "sleep_level_override" or maybe some new one to get to the old behavior. Currently modifying this value will be ignored if power saving is marked as broken, as is done for 3945. I wonder if we can modify it such that user can change this setting even if power saving is marked as broken. This is maybe something you can try out.

Reinette

#6 lore raw
Quoted 6 lines
Quoted 4 lines

Aha! That's very interesting, then. So, given that the previous naive power-saving implementation worked well for me (and I presume other users as well), would it be possible to use/provide that old naive technique for 3945 and 4965?

We could look into this. Could you please submit a request for this change to http://bugzilla.intellinuxwireless.org/ ?

Done.

Quoted 6 lines

If there is a need for this then I think what can be done here is either use the current debugfs "sleep_level_override" or maybe some new one to get to the old behavior. Currently modifying this value will be ignored if power saving is marked as broken, as is done for 3945. I wonder if we can modify it such that user can change this setting even if power saving is marked as broken. This is maybe something you can try out.

Thanks, I'm going to take a look at it,

Stefan