wireless will not connect on battery

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
65duke

wireless will not connect on battery

Post by 65duke »

Installed Mint Maya on HP dv7. Connected to wired and wireless just fine, but when I unplug and run on battery wireless quits. If I'm unplugged it will never connect to wireless (stuck on "requesting ip address"), and if I'm plugged in and then unplug all connections stop (firefox will display (cannot connect to server").

I found the Configuration Editor and mate-power-manager under apps, but I don't know enough about editing existing keys or creating a new key to allow wireless to operate while on battery.

Or should this be edited elsewhere?

Suggestions?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Relative
Level 3
Level 3
Posts: 131
Joined: Fri Jul 30, 2010 9:43 pm
Location: Garden Grove, CA

Re: wireless will not connect on battery

Post by Relative »

Same problem on my Dell laptop - 64-bit Maya. So far, haven't found anywhere to set on/off for the wireless if battery powered. Gotta be around here somewhere.

Mike Cebula
Mate 21.3 - MacBookPro2,1, MacBook2,1
Mate 21.3 - ThinkPad L430, ThinkPad T430, Dell N7110, iMac8.1, Toshiba A215
Mate 19.3 - (32-bit version) Old home-built P4 desktop.
Raspbian - Pi3 & Pi4.
All except P4 machine run cancer research 24/7.
Relative
Level 3
Level 3
Posts: 131
Joined: Fri Jul 30, 2010 9:43 pm
Location: Garden Grove, CA

Re: wireless will not connect on battery

Post by Relative »

OK. Works now. Changed two entries in the following, lo.ok for the two comments near the bottom of what I extracted

sudo gedit /usr/lib/pm-utils/power.d/wireless

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 off"
#changed the above--------------------------------------
fi;;
*) iwconfig_ac="power off"
iwconfig_batt="power off";;
#changed the above--------------------------------------


Mike Cebula
Mate 21.3 - MacBookPro2,1, MacBook2,1
Mate 21.3 - ThinkPad L430, ThinkPad T430, Dell N7110, iMac8.1, Toshiba A215
Mate 19.3 - (32-bit version) Old home-built P4 desktop.
Raspbian - Pi3 & Pi4.
All except P4 machine run cancer research 24/7.
Relative
Level 3
Level 3
Posts: 131
Joined: Fri Jul 30, 2010 9:43 pm
Location: Garden Grove, CA

Re: wireless will not connect on battery

Post by Relative »

UPDATE: Last night I updated from Mint 13 64-bit to Mint 14.1 64-bit and the problem does not exist on this version.

Mike Cebula
Mate 21.3 - MacBookPro2,1, MacBook2,1
Mate 21.3 - ThinkPad L430, ThinkPad T430, Dell N7110, iMac8.1, Toshiba A215
Mate 19.3 - (32-bit version) Old home-built P4 desktop.
Raspbian - Pi3 & Pi4.
All except P4 machine run cancer research 24/7.
Locked

Return to “Networking”