You are not logged in.

#1 2014-07-27 10:30:34

Mitio
Member
Registered: 2010-02-22
Posts: 8

Disabling a wireless usb adapter's power management

Hello everyone,

I have a Raspberry Pi running Arch, and I use an old WUSB54GC wifi adapter to connect it to my network. The problem is that whenever I left it alone for a while, it would disconnect. After messing with every wicd property, netctl profiles and so on, I researched the problem and I realized the issue is that the adapter goes to sleep after a while, never to be heard from again - until I manually reconnect from wicd-curses. So I simply turned off the power management for the interface with:

iwconfig wlan0 power off

But this doesn't persist on reboot, so I set off to make the change permanent. After failing to locate configuration files for the interface, I decided I will add the command to startup. I tried to make a systemd oneshot service for it, but despite the fact that I read about every parameter that can be used and looked at various examples, I couldn't do it - the starting failed with "Invalid parameter" every time - and that is all that "systemctl status <service>" would tell me.
So, what I am asking: is there an alternative method to make the change permanent, or a more systemd-noob friendly resource about making your own systemd service?

Thanks in advance!

Offline

#2 2014-07-31 14:24:30

mar04
Member
From: Poland
Registered: 2010-02-08
Posts: 117

Re: Disabling a wireless usb adapter's power management

udev rule could work. I have a file containing following in /etc/udev/rules.d/:
ACTION=="add", SUBSYSTEM=="net", KERNEL=="wlp2s0", RUN+="/usr/bin/iw dev %k set power_save on"

Offline

Board footer

Powered by FluxBB