Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-09-2012, 07:07 PM
|
#1
|
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6.2 on my desktop, Ubuntu 12.04 on netbook, Ubuntu 10.04 on server and wife's desktop
Posts: 1,081
Rep:
|
Running on battery throttles wireless connection(?)
Dell Latitude 2100 with Broadcomm wireless card. Ubuntu 12.04.
I just completed an install of Ubuntu 12.04. The netbook previously had been running 12.04 for a couple of years and 9.04 when received from Dell. I just noticed that download speed when running on battery was only about 85KB/sec. Normal download speed is in the range of 340 - 360 as measured by an ftp script. If I connect the Ethernet cable but no charger the speed is fine. Or, if I connect the charger the speed is fine. Copying files to another PC over my network was also effected. The batter is showing full charge.
I do not recall this problem with Ubuntu 10.04. I may restore my last 10.04 backup to verify. Other than that, any ideas why this is happening? Is there a power saving setting which might cause this? It does not seem to make much sense to throttle the network speed on a netbook which is intended to be used on the go.
TIA,
Ken
|
|
|
|
06-10-2012, 10:02 AM
|
#2
|
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6.2 on my desktop, Ubuntu 12.04 on netbook, Ubuntu 10.04 on server and wife's desktop
Posts: 1,081
Original Poster
Rep:
|
Update:
I installed Ubuntu 10.04 on the netbook. The wireless connection works full speed with or without charger connected. I am going to do a minimal install of 12.04 to see if some of my package installs, configurations and tweaks may have caused the issue. I will update when I have more data.
Ken
|
|
|
|
06-10-2012, 10:44 AM
|
#3
|
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6.2 on my desktop, Ubuntu 12.04 on netbook, Ubuntu 10.04 on server and wife's desktop
Posts: 1,081
Original Poster
Rep:
|
Update 2:
A fresh install of Ubuntu 12.04 produces the same effect. With th netbook on battery the download speed is 85 KB/sec. With the charger connected the speed is 346 KB/sec. Wired connection speed is unaffected. The Broadcomm driver is properly installed. netsat -ie shows a few dropped packets on TX but actually less when the netbook is on battery. I see nothing obvious in power management regarding network or wireless NIC.
Ken
p.s. In technical terms this sucks 
|
|
|
|
06-10-2012, 12:05 PM
|
#4
|
|
Guru
Registered: Mar 2008
Posts: 8,526
|
I would think that the cpu is being throttled and that affects wireless since is uses so much processor time especially with encryption.
|
|
|
|
06-10-2012, 01:31 PM
|
#5
|
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6.2 on my desktop, Ubuntu 12.04 on netbook, Ubuntu 10.04 on server and wife's desktop
Posts: 1,081
Original Poster
Rep:
|
Thanks jefro,
I was thinking that it was Canonical that SHOULD have been throttled. However, a kind person over on the Ubuntu forum had the answer http://ubuntuforums.org/showthread.p...1#post12015161. By using iwconfig I was able to turn off power management of the wireless NIC
Quote:
|
sudo iwconfig eth1 power off
|
My wireless network is now back to full speed.
Ken
|
|
|
|
06-11-2012, 09:39 AM
|
#6
|
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6.2 on my desktop, Ubuntu 12.04 on netbook, Ubuntu 10.04 on server and wife's desktop
Posts: 1,081
Original Poster
Rep:
|
But to make it stay at full speed after a reboot... http://askubuntu.com/questions/85214...eing-turned-on
I used the second approach
Quote:
Than to make it permanent run command as follows:
1.cd /etc/pm/power.d
2.sudo gedit wifi_pwr_off
This will open an empty file, copy the code below into it:
#!/bin/sh
/sbin/iwconfig wlan0 power off
3.Save the file, remember to
sudo chmod +x wifi_pwr_off
and restart
|
and now all is well (at least for this issue).
Ken
|
|
|
|
06-11-2012, 03:31 PM
|
#7
|
|
Guru
Registered: Mar 2008
Posts: 8,526
|
Glad you fixed it.
From the man page on iwconfig I'd have thought that that has nothing to do with throttling, just power on or off.
Last edited by jefro; 06-11-2012 at 03:35 PM.
|
|
|
|
06-11-2012, 04:02 PM
|
#8
|
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6.2 on my desktop, Ubuntu 12.04 on netbook, Ubuntu 10.04 on server and wife's desktop
Posts: 1,081
Original Poster
Rep:
|
Well I have worked around it but not I think resolved it. I found this in the Kubuntu Precise release notes
Quote:
|
pm-utils now has two new scripts to power down USB and various PCI devices in battery mode. A number of desktop packages were fixed to wake up less often. Both of these reduce power consumption and thus improve battery lifetime.
|
So I decided to have a look around for pm-utils bits and pieces. I found this script /usr/lib/pm-utils/power.d/wireless which I think is part of the issue.
Code:
#!/bin/sh
. "${PM_FUNCTIONS}"
# See if we have the usual wireless tools.
# Do not just fail because not all cards require these.
which iwpriv >/dev/null 2>&1 && have_iwpriv="true"
which iwconfig >/dev/null 2>&1 && have_iwconfig="true"
# If only all the drivers did The Right Thing with iwconfig power.
# Too bad they do not.
get_wireless_params() {
# $1 = interface
# $2 = on or off
unset iwpriv iwconfig iwlevel
# Don't do anything if we cannot find a driver for this iface.
[ -L "/sys/class/net/$1/device/driver" ] || return 1
# Skip if not a wireless card.
[ -d "/sys/class/net/$1/wireless" ] || return 1
# Also don't do anything if the device is disabled
[ "$(cat /sys/class/net/$1/device/enable)" = "1" ] || return 1
driver="$(readlink "/sys/class/net/$1/device/driver")"
driver=${driver##*/}
case $driver in
ipw2100) iwpriv_ac="set_power 0"
iwpriv_batt="set_power 5"
iwconfig_ac="power on"
iwconfig_batt="power on";;
ipw3945)
iwpriv_ac="set_power 6"
iwpriv_batt="set_power 7";;
iwl*) if [ -f "/sys/class/net/$1/device/power_level" ]; then
iwlevel_ac=0
iwlevel_batt=3
else
iwconfig_ac="power off"
iwconfig_batt="power on"
fi;;
*) iwconfig_ac="power off"
iwconfig_batt="power on";;
esac
case $2 in
off) [ "$iwpriv_ac" ] && iwpriv="$iwpriv_ac"
[ "$iwconfig_ac" ] && iwconfig="$iwconfig_ac"
[ "$iwlevel_ac" ] && iwlevel="$iwlevel_ac";;
on) [ "$iwpriv_batt" ] && iwpriv="$iwpriv_batt"
[ "$iwconfig_batt" ] && iwconfig="$iwconfig_batt"
[ "$iwlevel_batt" ] && iwlevel="$iwlevel_batt";;
esac
return 0
}
wireless_powersave() {
for dev in /sys/class/net/*; do
get_wireless_params "${dev##*/}" "$1" || continue
ret=0
printf "Turning powersave for %s %s..." "${dev##*/}" "$1"
if [ "$have_iwconfig" = true -a "$iwconfig" ]; then
iwconfig "${dev##*/}" $iwconfig || ret=1
fi
if [ "$have_iwpriv" = true -a "$iwpriv" ]; then
iwpriv "${dev##*/}" $iwpriv || ret=1
fi
if [ "$iwlevel" ]; then
echo "$iwlevel" > "$dev/device/power_level" || ret=1
fi
[ "$ret" -eq 0 ] && echo Done. || echo Failed.
done
}
case $1 in
true) wireless_powersave on ;;
false) wireless_powersave off ;;
*) exit $NA ;;
esac
exit 0
I think there is still a bug. If I execute
Quote:
sudo iwconfig eth1 power off
sudo iwconfig eth1
eth1 IEEE 802.11bg ESSID:"Luca$Electric"
Mode:Managed Frequency:2.412 GHz Access Point: 00:26:F2:7D:77:3C
Bit Rate=54 Mb/s Tx-Power:24 dBm
Retry min limit:7 RTS thr : off Fragment thr : off
Power Management : off
Link Quality=5/5 Signal level=-31 dBm Noise level=-57 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
|
I see that power management has been turned off. If I execute
Quote:
sudo iwconfig eth1 power on
sudo iwconfig eth1
eth1 IEEE 802.11bg ESSID:"Luca$Electric"
Mode:Managed Frequency:2.412 GHz Access Point: 00:26:F2:7D:77:3C
Bit Rate=54 Mb/s Tx-Power:24 dBm
Retry min limit:7 RTS thr : off Fragment thr : off
Power Managementmode : All packets received
Link Quality=5/5 Signal level=-30 dBm Noise level=-57 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
|
I see that it is back on. However, if I turn power management off then reboot the computer I find that power management is SHOWN to be off but by the action of the wireless NIC power management is still in effect. I have yet to track down the blame/fix.
Ken
|
|
|
|
06-13-2012, 09:18 AM
|
#9
|
|
Senior Member
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6.2 on my desktop, Ubuntu 12.04 on netbook, Ubuntu 10.04 on server and wife's desktop
Posts: 1,081
Original Poster
Rep:
|
For reasons not related to this thread I reinstalled Ubuntu 12.04 on the netbook. I applied the same fixes as described here. THE PROBLEM IS NOT FIXED. My script in /etc/pm/power.d is NOT running(?) I have also tried building an upstart job and that is not running.
Ken
p.s. How do I mark this thread [UNSOLVED] ?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:20 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|