# How to disable wifi power save to prevent disconnects

**URL:** <https://forum.clockworkpi.com/t/how-to-disable-wifi-power-save-to-prevent-disconnects/933>\
**Category:** Tutorials\
**Tags:** wifi, howto\
**Created:** [July 27, 2018, 10:42pm UTC](https://forum.clockworkpi.com/t/how-to-disable-wifi-power-save-to-prevent-disconnects/933 "2018-07-27T22:42:57Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Petrakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/petrakis/32/256_2.png) [@Petrakis](https://forum.clockworkpi.com/u/Petrakis)\
**Post date:** [July 29, 2018, 4:57pm UTC](https://forum.clockworkpi.com/t/how-to-disable-wifi-power-save-to-prevent-disconnects/933/9 "2018-07-29T16:57:10Z")

</div>

@Kenny_Ken @hal

Figured how to do it on boot, add this script to

> /etc/network/if-up.d/

And don´t forget to set exec permissions:

> chmod +x /etc/network/if-up.d/powersave\_off (or whatever name you put to it)

set -e

```
# Don't bother for loopback
if ["$IFACE" = lo]; then
        exit 0
fi

# Only run from ifup.
if ["$MODE" != start]; then
        exit 0
fi

# Only do it once (skip for inet6).
if ["$ADDRFAM" != inet]; then
        exit 0
fi

/sbin/iw dev wlan0 set power_save off

exit 0

```

I found the solution here: [GitHub - fordsfords/wlan\_pwr: Improve CHIP wireless perf and reliability by turning off power mgt](https://github.com/fordsfords/wlan_pwr)

---

_[View the full topic](https://forum.clockworkpi.com/t/how-to-disable-wifi-power-save-to-prevent-disconnects/933)._
