Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot enable power saving on wireless card
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Sat Dec 27, 2014 12:04 pm    Post subject: cannot enable power saving on wireless card Reply with quote

I'm trying to turn on power saving for my wireless card(realtek8723BE):
localhost ~ # iwconfig wlan0 power off
Error for wireless request "Set Power Management" (8B2C) :
SET failed on device wlan0 ; Operation not supported.
localhost ~ # iwconfig wlan0 power on
Error for wireless request "Set Power Management" (8B2C) :
SET failed on device wlan0 ; Operation not supported.

also I cannot seem to find wlan0 when I build the modules in the kernel, the card works when its modules are modularized.


localhost ~ # lspci -s 04:00.0 -vvv
04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
Subsystem: Lenovo Device b728
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 18
Region 0: I/O ports at 4000 [size=256]
Region 2: Memory at f0100000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us
ClockPM+ Surprise- LLActRep- BwNot-
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR+, OBFF Via message/WAKE#
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis+, LTR+, OBFF Disabled
LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [100 v2] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
Capabilities: [140 v1] Device Serial Number 00-23-b7-fe-ff-4c-e0-00
Capabilities: [150 v1] Latency Tolerance Reporting
Max snoop latency: 3145728ns
Max no snoop latency: 3145728ns
Capabilities: [158 v1] #1e
Kernel driver in use: rtl8723be
Kernel modules: rtl8723be

thanks
Back to top
View user's profile Send private message
apieum
n00b
n00b


Joined: 18 Dec 2014
Posts: 9

PostPosted: Wed Dec 31, 2014 5:21 am    Post subject: Re: cannot enable power saving on wireless card Reply with quote

blakdeath wrote:
I'm trying to turn on power saving for my wireless card(realtek8723BE):
localhost ~ # iwconfig wlan0 power off
Error for wireless request "Set Power Management" (8B2C) :
SET failed on device wlan0 ; Operation not supported.
localhost ~ # iwconfig wlan0 power on
Error for wireless request "Set Power Management" (8B2C) :
SET failed on device wlan0 ; Operation not supported.


try iw:
Code:
iw dev wlan0 set power_save on


blakdeath wrote:

also I cannot seem to find wlan0 when I build the modules in the kernel, the card works when its modules are modularized.

Have you removed predictable network interface names from systemd/udev ? I'm surprised you have wlan0 instead of wlp4s0
May this be the source of this problem ?
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Wed Dec 31, 2014 2:27 pm    Post subject: Reply with quote

localhost ~ # iw dev wlan0 set power_save on
command failed: Operation not supported (-95)


and I cannot find any NICs at all, except for eth0 and lo of course, so I don't think the network name rules are doing anything here

thanks
Back to top
View user's profile Send private message
apieum
n00b
n00b


Joined: 18 Dec 2014
Posts: 9

PostPosted: Thu Jan 01, 2015 2:57 am    Post subject: Reply with quote

Hi and happy new year.

Can you show the result of:
Code:
$ modinfo rtl8723be


and in case informations about your card/network given by dmesg and journalctl.

I can't find if power management is well supported for your card on linux, but I found itt can be buggy (like here https://wiki.archlinux.org/index.php/Wireless_network_configuration#rtl8723be) and sometimes in these cases kernel developpers decide to remove the feature.

The bios of some lenovo is capable to deactivate pcie power management, this cost nothing to check.

Also firmware seems quite buggy, there is a recent update you can try (if not already updated within modinfo output version).
Source file is here:
http://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/commit/?id=be225d6c10d72733a183d8712b89078f4141873f
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Thu Jan 01, 2015 12:38 pm    Post subject: Reply with quote

localhost ~ # modinfo rtl8723be
filename: /lib/modules/3.16.5-gentoo/kernel/drivers/net/wireless/rtlwifi/rtl8723be/rtl8723be.ko
firmware: rtlwifi/rtl8723befw.bin
description: Realtek 8723BE 802.11n PCI wireless
license: GPL
author: Realtek WlanFAE <wlanfae@realtek.com>
author: PageHe <page_he@realsil.com.cn>
alias: pci:v000010ECd0000B723sv*sd*bc*sc*i*
depends: rtlwifi,rtl8723-common,rtl_pci,btcoexist
intree: Y
vermagic: 3.16.5-gentoo SMP preempt mod_unload
parm: swlps:bool
parm: swenc:using hardware crypto (default 0 [hardware])
(bool)
parm: ips:using no link power save (default 1 is open)
(bool)
parm: fwlps:using linked fw control power save (default 1 is open)
(bool)
parm: msi:Set to 1 to use MSI interrupts mode (default 0)
(bool)
parm: debug:Set debug level (0-5) (default 0) (int)

I've tried changing the values in the power saving parameters, same result, same power drain(as reported by powertop
I've also checked the bios, nothing about powersaving

I'd rather update only when I have to, so I'll save that for last

thanks
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Thu Jan 01, 2015 1:49 pm    Post subject: Reply with quote

well, that link solved my other networking problem, no buffer space available(icmp)
disabling fwlps as stated in the link has fixed this problem. thanks alot for that.
Back to top
View user's profile Send private message
apieum
n00b
n00b


Joined: 18 Dec 2014
Posts: 9

PostPosted: Thu Jan 01, 2015 10:06 pm    Post subject: Reply with quote

I guess power management is managed by hardware and you'll not be able to control it.

You need to set ips parameter to 0 and swlps to 1.


Notes:
msi should probably set to 1 too but it's not in power management scope

For icmp, I guess your card support static SM power save.
You can check with "iw phy0 info"
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Thu Jan 01, 2015 11:37 pm    Post subject: Reply with quote

I now have:
Module: rtl8723be
Parameter: debug --> 0
Parameter: fwlps --> N
Parameter: ips --> N
Parameter: msi --> N
Parameter: swenc --> N
Parameter: swlps --> Y

but:
localhost ~ # iw dev wlan0 set power_save on
command failed: Operation not supported (-95)
localhost ~ # iwconfig wlan0 power off
Error for wireless request "Set Power Management" (8B2C) :
SET failed on device wlan0 ; Operation not supported.

the msi bit is interesting, I have been trying to understand this part, how does the NIC interrupt the CPU without MSI, and why is it better to enable msi?

I foudn this under capabilities:
Static SM Power Save, but what do you mean by for icmp?

thanks alot, I really appreciate your assistance
Back to top
View user's profile Send private message
apieum
n00b
n00b


Joined: 18 Dec 2014
Posts: 9

PostPosted: Sat Jan 03, 2015 11:26 pm    Post subject: Reply with quote

Sorry I've not seen you answered (browser cache).

blakdeath wrote:

the msi bit is interesting, I have been trying to understand this part, how does the NIC interrupt the CPU without MSI, and why is it better to enable msi?

I foudn this under capabilities:
Static SM Power Save, but what do you mean by for icmp?


I don't know, it's out of my skills, I've just supposed that. (maybe look at http://www.vocal.com/networking/ieee-802-11n/ about power saving)
I had the same problem on another card, changing some settings like (ips and fwlps) fixed it.

I have no solution, hope you'll find.
In case you don't know, there is also systool from sys-fs/sysfsutils ($ systool -v -m rtl8723be) which can provide informations, and the parameter debug which may help you to figure out what's going on.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Sun Jan 04, 2015 12:42 pm    Post subject: Reply with quote

thanks alot, I appreciate your help
Back to top
View user's profile Send private message
apieum
n00b
n00b


Joined: 18 Dec 2014
Posts: 9

PostPosted: Tue Jan 06, 2015 6:06 am    Post subject: Reply with quote

You're welcome. :)

You should try last firmware. (I suspect icmp errors comes from a firmware bug with power management)

As shown here your card firmware was updated the 09/13 and the last linux-firmware package in gentoo is 20140902.
You can enable linux-firmware 20141009 with accept keywords.


good luck.
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1523

PostPosted: Wed Jan 28, 2015 9:46 am    Post subject: Reply with quote

time to upgrade I guess
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum