DEV Community

Sharafat
Sharafat

Posted on

disable Bluetooth at startup in TLP

TLP

From the project page:

TLP is a feature-rich command line utility for Linux, saving laptop battery power without the need to delve deeper into technical details.
TLP’s default settings are already optimized for battery life and implement Powertop’s recommendations out of the box. So you may just install and forget it.
Nevertheless TLP is highly customizable to fulfil your specific requirements.

Read more from,

Steps

To disable Bluetooth at startup, open the following file in your preferred text editor (root privilege will be required),

/etc/tlp.conf
Enter fullscreen mode Exit fullscreen mode

For example to use nano text editor, your command will be, sudo nanao /etc/tlp.conf.

Then change,

RESTORE_DEVICE_STATE_ON_STARTUP=0
Enter fullscreen mode Exit fullscreen mode

to

RESTORE_DEVICE_STATE_ON_STARTUP=1
Enter fullscreen mode Exit fullscreen mode

And, also use the following line,

DEVICES_TO_DISABLE_ON_STARTUP="bluetooth"
Enter fullscreen mode Exit fullscreen mode

Don't forget to remove the '#' from the beginning of a line (removing comments).

Example layout

Here is a basic example of my config,

# Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
# on system startup: 0=disable, 1=enable.
# Note: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
# are ignored when this is enabled.
# Default: 0

RESTORE_DEVICE_STATE_ON_STARTUP=1

# Radio devices to disable on startup: bluetooth, nfc, wifi, wwan.
# Separate multiple devices with spaces.
# Default: <none>

#DEVICES_TO_DISABLE_ON_STARTUP="bluetooth nfc wifi wwan"
DEVICES_TO_DISABLE_ON_STARTUP="bluetooth nfc wwan"
Enter fullscreen mode Exit fullscreen mode

Here besides bluetooth, I've also disabled nfc and wwan.

References

Top comments (0)