Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    PSA - Disable RPi WiFi Power Save

    Scheduled Pinned Locked Moved
    General Discussion
    4
    7
    875
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • oozeBotundefined
      oozeBot
      last edited by oozeBot

      A few months ago, our machines began experiencing random failures where the SBC (we use the Raspberry Pi 4b) would become unresponsive. It was worrisome, to say the least, as it began randomly happening to all our printers. After considerable effort in diagnosing the issue, we believe the issue to be WiFi Power Save mode. After disabling, we have not experienced any further failures for several weeks.

      If/when the WiFi module 'hiccups' due to Power Save being enabled (and it's enabled by default) the SD Card will timeout as it shares the same interface as WiFi and the RPi becomes unresponsive.

      If anyone reading this disagrees, or has better insight, please feel free to correct us.

      There are several ways to disable WiFi power save mode. We chose to create a service to handle it based on information found here: https://raspberrypi.stackexchange.com/questions/96606/make-iw-wlan0-set-power-save-off-permanent

      Create a new service file:

      sudo systemctl --full --force edit wifi_powersave@.service
      

      Insert the following code and save:

      [Unit]
      Description=Set WiFi power save %i
      After=sys-subsystem-net-devices-wlan0.device
      
      [Service]
      Type=oneshot
      RemainAfterExit=yes
      ExecStart=/sbin/iw dev wlan0 set power_save %i
      
      [Install]
      WantedBy=sys-subsystem-net-devices-wlan0.device
      

      Run the following two commands and then reboot:

      sudo systemctl disable wifi_powersave@on.service
      sudo systemctl enable wifi_powersave@off.service
      

      After reboot, you can verify it is now disabled by running the following:

      iwconfig | grep "Power Management"
      

      The output should now include something like the following:

      lo        no wireless extensions.
      
      eth0      no wireless extensions.
      
                Power Management:off
      
      o_lampeundefined 1 Reply Last reply Reply Quote 4
      • o_lampeundefined
        o_lampe @oozeBot
        last edited by

        @oozebot
        You explicitly mention 5GHz networks. Do you have evidence it only happens at 5GHz or does it also apply (or not) at 2.4GHz?

        oozeBotundefined 1 Reply Last reply Reply Quote 0
        • oozeBotundefined
          oozeBot @o_lampe
          last edited by oozeBot

          @o_lampe This is where our knowledge abruptly stops. I can only say that we started experiencing this a few months ago when we added a more powerful mesh networking node which switched them all to 5ghz. It could be our network which causes the issue when power save is enabled. I would think that this would help for both 2.4 and 5ghz - we just never experienced it on 2.4ghz.

          edit - I changed my original post to remove reference to 5ghz as I spent some time analyzing the network and see machines connected to both 2.4ghz and 5ghz.. so I can only assume this was the case prior to disabling power save.

          chrishammundefined Dizzwoldundefined 2 Replies Last reply Reply Quote 0
          • chrishammundefined
            chrishamm administrators @oozeBot
            last edited by

            @oozebot Thanks for sharing this. I did have some problems with unstable WiFi on another Pi, but it turned out to be related to the WiFi country code. Once I set that up correctly, the connection was stable again. Btw, DuetPi lets you set the country code using M587 C, too.

            Duet software engineer

            1 Reply Last reply Reply Quote 0
            • oozeBotundefined oozeBot referenced this topic
            • oozeBotundefined oozeBot referenced this topic
            • Dizzwoldundefined
              Dizzwold @oozeBot
              last edited by

              @oozeBot @chrishamm

              Hi Guys,

              Is this anything to do with my Pi4 have the same problem?
              Screen Shot 2022-10-14 at 16.43.43.png

              If I run G29, quite often I get a spining Blue Send button in DWC. the last time I ran G29 it went through the mesh compensation 3 time before it would complete?

              https://forum.duet3d.com/topic/30143/m140-p0-s55-error-invalid-password

              chrishammundefined 1 Reply Last reply Reply Quote 0
              • chrishammundefined
                chrishamm administrators @Dizzwold
                last edited by

                @Dizzwold No, the problem in this thread dealt with connection problems between browser and SBC. Your problem is quite likely related to a configuration issue, so please open a new thread and post your config.g and bed.g there.

                Duet software engineer

                Dizzwoldundefined 1 Reply Last reply Reply Quote 0
                • Dizzwoldundefined
                  Dizzwold @chrishamm
                  last edited by

                  @chrishamm Hi chrishamm,

                  Thank you for your reply. I already did open a thread.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA