3

I have tried to turn off Bluetooth, but every time I close and re-open the lid of my laptop, the Bluetooth service is up and running again. Having Bluetooth on seems to interfere with my wifi connection when I am far away from the router(OT, but is this normal?).

I have read up on rfkill and even when I run rfkill block bluetooth, the same thing happens after I close and re-open the lid.

Any ideas how to stop this behaviour? To be clear, I do want to be able to use Bluetooth occasionally, but I want it turned off by default.

The machine is an Asus nv56m and the ubuntu version is 19.04

system info for my laptop system info for my laptop

screenshot of rfkill command being run screenshot of rfkill command being run

1
  • 1
    Have you found a solution perhaps? I have the same issue. Jul 15, 2022 at 21:06

1 Answer 1

1

To disable Bluetooth on resume after suspend

  1. Create a script disabling Bluetooth in file /path/to/file/disable-bluetooth.sh

    #!/usr/bin/env bash
    
    rfkill block bluetooth
    
  2. Make it executable

    $ chmod +x /path/to/file/disable-bluetooth.sh
    
  3. Create a file /etc/systemd/system/disable-bluetooth.service

    [Unit]
    Description=Disables Bluetooth
    Before=sleep.target
    StopWhenUnneeded=yes
    
    [Service]
    Type=oneshot
    RemainAfterExit=yes
    ExecStop=/path/to/file/disable-bluetooth.sh
    
    [Install]
    WantedBy=sleep.target
    
  4. Enable the service

    $ sudo systemctl enable disable-bluetooth.service
    

To disable Bluetooth on startup

Create a file ~/.config/autostart/disable-bluetooth.desktop

[Desktop Entry]
Type=Application
Exec=/path/to/file/disable-bluetooth.sh
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=Disable Bluetooth on startup
Name=Disable Bluetooth on startup
Comment[en_US]=
Comment=

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .