Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1256  / 1 Year ago, fri, march 3, 2023, 10:08:53

When I turn off wifi on ubuntu 20.04, the airplane mode turns on, and when I turn it off, the bluetooth turns on, is this a bug or what? I also had same behaviour in 18.04


I want to have the behaviour of turning on/off only the corresponding option which I have selected, how can I fix this? (I can accept a method that programmatically turns on/off any of these three and prevents the other two from toggling)


for example the command nmcli radio wifi off turns off wifi, but this will cause airplane mode to turn on, I am thinking of a solution where I create a script and place these commands in order, and then add this script to the classpath to call it from the terminal:


    nmcli radio wifi on

turn off airplane mode command (how to do this?)

turn off bluetooth command (how to do this?)

More From » 18.04

 Answers
2

Please run the command:


rfkill list all

You will see something like this:


0: tpacpi_bluetooth_sw: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
48: hci0: Bluetooth
Soft blocked: no
Hard blocked: no

Take note of the device identifier values; in this case, 0, 1 and 48.


Toggle the bluetooth off:


sudo rfkill block 48

And on:


sudo rfkill unblock 48

Toggle the wireless off:


sudo rfkill block 1

Check:


rfkill list all

You will see something like this, depending on the make and model of your laptop:


 0: tpacpi_bluetooth_sw: Bluetooth
soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: yes
Hard blocked: no
48: hci0: Bluetooth
Soft blocked: no
Hard blocked: no

The wireless is soft(ware) blocked. It will be hard(ware) blocked by the wireless switch or key combination on your laptop. The rfkill command cannot move the switch!


Toggle the wireless on:


sudo rfkill unblock 1 

[#1207] Saturday, March 4, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
olfdit

Total Points: 118
Total Questions: 98
Total Answers: 97

Location: Honduras
Member since Fri, Nov 25, 2022
1 Year ago
;