How to turn off wifi pm permanently with wicked

This applies only to wicked.
Is there a file somewhere i can edit to turn off wireless power management for my wlan0 connection?
As of now i am doing it via a cron job at reboot

/sbin/iwconfig wlan0 power off

but that seems like a hack to me.

I have had a look, I can’t find such an option in wicked-config. What about using rfkill? There’s a systemd-service to start it. Have a look at man systemd-rfkill:

DESCRIPTION
       systemd-rfkill.service is a service that restores the RF kill switch state at early boot and saves it on each change. On disk, the RF kill switch state is stored in /var/lib/systemd/rfkill/.

I don’t see how i can use rfkill to disable (only) power management on wlan0
Can you post how to do it?

Ah, sorry. I missed “only” powermanagement. Of course, rfkill would disable the device. I assumed that was what you are looking for.

Some options:

  1. You could create a custom systemd service (eg /etc/systemd/system/wifi-power-management.service) using something like the following unit file…
[Unit]
Description=Disable wifi power management
After=network.target

[Service]
Type=oneshot
ExecStart=/sbin/iwconfig wlan0 power off

[Install]
WantedBy=multi-user.target

Then reload systemd with the new unit file…
systemctl daemon-reload
and enable…
systemctl enable --now wifi-power-management

  1. Load the driver using a custom file in /etc/modprobe.d/ with power management disabled. Let us know the driver details if you need more help with this.

inxi -Na

Sounds like a simple solution, I’ll give it a try. I’ve done few systemd services so your example makes perfect sense.
Thanks

It looks like the systemd service approach is working, even after a reboot
Thanks

Good to read of your success with this. :slight_smile: