Skip to content

hyknn/disable-bluetooth-on-suspend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Disable Bluetooth on suspend in Linux

To disable Bluetooth on suspend in Pop!_OS, you can create a script to run the command "rfkill block bluetooth" when the system is going into suspend, and "rfkill unblock bluetooth" when the system is resuming.

You can create the script by running the following command:

sudo nano /etc/pm/sleep.d/disable_bluetooth

Then, paste the following into the script:

#!/bin/sh

case "${1}" in
    hibernate|suspend)
        rfkill block bluetooth
        ;;
    resume|thaw)
        rfkill unblock bluetooth
        ;;
esac

Save the script and make it executable:

sudo chmod +x /etc/pm/sleep.d/disable_bluetooth

This should disable Bluetooth on suspend and re-enable it on resume. To check the current state of the Bluetooth, you can use the command "rfkill list"

Please note that the above method is a general way, Depending on your Linux distribution and version, the steps may vary.

Credit

Generated by ChatGPT

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published