I will be using Lakka on a Raspberry Pi with a battery, and I would like if it was possible to disable WiFi from RetroArch’s interface, to preserve battery life ?
Try systemctl disable connman
maybe
Yeah, connman can be enabled or disabled to enable or disable WiFi (or even connmanctl disable wifi
?), but is there a way to do it directly from Lakka without using a command prompt ? I couldn’t find anything in the code related to that but I may be wrong.
I can try to implement it myself to add a Disable WiFi
(or enable if it’s disabled) option in Lakka’s WiFi menu. I see that the wifi driver in RetroArch has a driver_wifi_stop
method but it doesn’t seem to be implemented in the connmanctl
driver, and it’s not called anywhere anyway. Is the driver_wifi_stop
function supposed to start and stop the WiFi, or start and stop the driver (is it the same ?) ?
IIRC, when you never access the Wi-Fi menu in RetroArch, it stays disabled.
If you access it once, it enabled Wi-Fi.
We could add a disable Wi-Fi somewhere yes.
I will try to implement it, can I use driver_wifi_start
and driver_wifi_stop
or should I create two more functions like driver_wifi_enable
and driver_wifi_disable
?
First we need to check if disabling connman does save battery life. Or if we have to do something at a lower layer.
Isn’t there a connman disable wifi
command ?
Nearly all of the power usage of the wifi radio is in transmission. If you’re not connected then you’re not transmitting. Yes, it would still use some power but very little. You probably wouldn’t notice a difference between it being not connected and it being totally off.
I don’t think it’s very useful to bother then. RetroArch doesn’t doesn’t do any background scanning of WiFi when we’re not in the settings tab, right ? So when we are away from known networks, will it repeteadly try to connect and/or scan ?
The scan and the connect task are one-shot. If you never touch it, nothing should happen. However, the connman daemon does poll wifi all the time as it is able to reconnect after a disconnect. So maybe connmanctl disable wifi would help for power.
I’ll wait to receive my battery, and do some tests to see if it improves its life significantly to disable wifi in connman then.
Resurrecting an old post… beyond just saving battery life, disabling WiFi would also help minimize heat. This is especially important now that Lakka is supported on the GPI Case. The GPI Case is powered by a Raspberry Pi Zero and since it is enclosed in a very small Gameboy-like “cartridge” within the GPI Case, it heats up very quickly with WiFi (and Bluetooth) enabled. I’ve run various RetroPie builds on my GPI Case and they all allow disabling WiFi through the UI but I much prefer Lakka!! Hopefully this functionality can be added to the Lakka UI in a future release.
Interesting… I will test the heat reduction myself since I am not using wifi.
From what I gathered, on the Pi’s it should be done via config.txt
:
dtoverlay=disable-wifi
I found this on the raspberry pi firmware overlays README.
@metchebe just curious are you running Lakka on a GPI Case? Heat is much more obvious because of the tiny Gameboy-like case the Raspberry Pi Zero is enclosed in. I don’t know that you would notice heat difference as much in a regular enclosure. You can see pics here, in case you weren’t already aware: http://retroflag.com/GPi-CASE.html
@shar33f No, I’m using a Pi 3B in an official case but also without any cooling.
I tested on Raspbian Buster, and the disable-wifi
overlay works.