How to stop WiFi from auto enabling on startup?

I primarily connect to the internet via Ethernet and would like to keep my WiFi connections disabled for the most part but it always auto turns on on startup. How can I stop WiFi from auto turning on when the computer turns on?

1 Like

One immediate way is to remove the service in the qube that has it. Without it, it won’t ever launch, until you want it to. That’s what I would do. Simple, easy.

2 Likes

If your sys-net is not disposable, just right-click on the Network Manager icon on the panel and uncheck “Enable Wi-Fi”. It will stay disabled over reboots… unless you enable it and reboot while it is enabled.

Alternatively, adding a line “nmcli radio wifi off” to your sys-net:/rw/config/rc.local, will turn off the WiFi at every start. If you want to enable it, open a (root) console and run “nmcli radio wifi on”.

If you have a disposable sys-net, it has to be done in the qube on which the disposable is based on. But this is an advanced topic and if you use this setup, you probably already figured out how to pass the “secrets” to the disposable sys-net to establish Wi-Fi/VPN connectivity :smile:

2 Likes

Unfortunately right clicking the Network Manager and unchecking “Enable Wi-Fi” does not seem to persist upon reboot.

Entering the command nmcli radio wifi off or sudo nmcli radio wifi off did not seem to do anything. Am I missing a step?

1 Like

Hmmm… it does work for me… what release of Qubes are you running? :thinking:
And, more importantly: is your sys-net disposable?

EDIT: it does NOT work, indeed.

1 Like

I’m running Qubes 4.2.3 and my sys-net is not disposable.

1 Like

This works if you add the line to the /rw/config/rc.local file.

  1. Click on the blue Qube Manager icon on the panel
  2. Scroll down to sys-net, then from the new menu choose “Run Terminal”
  3. In the terminal, type “sudo vi /rw/config/rc.local” (or use nano if you are not familiar with vi)
  4. Add a line “nmcli radio wifi off” and save the file.
    On every subsequent sys-net start, the rc.local will be run by root and will disable the Wi-Fi.

The other method is indeed not surviving a reboot.

3 Likes

If you are using a desktop, remove the Wi-Fi/Bluetooth module/dongle beforehand. Otherwise, use a laptop with the ability to remove the Wi-Fi/Bluetooth module and/or has a dedicated hardware kill switch for the respective component, such as the Librem 14:

1 Like

I’m looking for a way to be able to easily re enable it. Unfortunately, the Librem devices are way out of my budget range at the moment.

2 Likes

To re-enable, run in dom0:
[user@dom0 ~]$ qvm-run --user root sys-net nmcli radio wifi on

This can be scripted, i.e. added to a file called “wifion.sh”:

[user@dom0 ~]$ cat bin/wifion.sh 
#!/bin/bash
qvm-run --user root sys-net nmcli radio wifi on

Then right click on the desktop, Create Launcher…, Name: WiFi ON, for “Command” search for your script (or write directly the path), select a nice Icon (like the green :heavy_check_mark: ) and press “Create”.

Similarly you can create another script for WiFi Off and add that launcher too.

1 Like