Ubuntu 22.04 fails to modprobe btusb on reboot

Asked by Karl Hallin

the Bluetooth interface to USB bluetooth is not modprobed on reboot.

kjh@z600-Mate:~$ sudo dmesg | grep -i btusb
1 kjh@z600-Mate:~$ sudo dmesg | grep -i blue
1 kjh@z600-Mate:~$ sudo dmesg | grep -i rtl

Thus I cannot connect my headphones until I manually execute as follows:

sudo modprobe btusb, after which the above 3 commands show everything is up and running. How do I fix this? How does one register the btusb interface driver such that the reboot does modprobe each time?

sudo dmesg | grep -i btusb
[ 287.825261] usbcore: registered new interface driver btusb
sudo dmesg | grep -i blue
[ 287.766406] Bluetooth: Core ver 2.22
[ 287.766456] NET: Registered PF_BLUETOOTH protocol family
[ 287.766458] Bluetooth: HCI device and connection manager initialized
[ 287.766466] Bluetooth: HCI socket layer initialized
[ 287.766469] Bluetooth: L2CAP socket layer initialized
[ 287.766474] Bluetooth: SCO socket layer initialized
[ 287.828165] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761
[ 287.831176] Bluetooth: hci0: RTL: rom_version status=0 version=1
[ 287.831181] Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_fw.bin
[ 287.865275] Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_config.bin
[ 287.865569] Bluetooth: hci0: RTL: cfg_sz 6, total sz 30210
[ 288.130712] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 288.130717] Bluetooth: BNEP filters: protocol multicast
[ 288.130721] Bluetooth: BNEP socket layer initialized
[ 288.298187] Bluetooth: hci0: RTL: fw version 0xdfc6d922
[ 288.428508] Bluetooth: MGMT ver 1.22
[ 288.589989] Bluetooth: RFCOMM TTY layer initialized
[ 288.590002] Bluetooth: RFCOMM socket layer initialized
[ 288.590010] Bluetooth: RFCOMM ver 1.11

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Karl Hallin
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1
Revision history for this message
Karl Hallin (kjhallin) said :
#2

Not my issue: the btusb instruction is already in place. All the software is in place.
That is why all I need to do after a boot is '"sudo modprobe btusb", and the entire stack loads without issue.

/etc/modules-load.d$ cat modules.conf
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
btusb

something else is missing.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Could add the command in /etc/rc.local (above the "exit 0" line) and it'll run at boot automatically.

Revision history for this message
Karl Hallin (kjhallin) said :
#4

The suggestion pointed me in the right direction; however, systemd DISABLES rc.local by default. /etc/rc.local did not exist on my Ubuntu 22.04 system. But in researching what happened I found the solution here:

https://www.cyberciti.biz/faq/how-to-enable-rc-local-shell-script-on-systemd-while-booting-linux-system/

sudo vim /etc/rc.local
--------------------------------------
cat /etc/rc.local
#!/bin/sh -e
# add your commands
# call your scripts here

# beg for btusb to come up enabled on reboot:
modprobe btusb

# last line must be exit 0
exit 0
----------------------------------------
Make sure you set executable permission using the chmod command:
sudo chmod -v +x /etc/rc.local

sudo systemctl is-enabled rc-local.service
showed that it was static.

sudo systemctl enable rc-local.service
turned it on for the first time.

sudo systemctl status rc-local.service
● rc-local.service - /etc/rc.local Compatibility
     Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled)
    Drop-In: /usr/lib/systemd/system/rc-local.service.d
             └─debian.conf
     Active: active (exited) since Sat 2023-12-30 12:27:59 CST; 9min ago
       Docs: man:systemd-rc-local-generator(8)
    Process: 2182 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)
        CPU: 113ms

Dec 30 12:27:58 z600-Mate systemd[1]: Starting /etc/rc.local Compatibility...
Dec 30 12:27:59 z600-Mate systemd[1]: Started /etc/rc.local Compatibility.

and after a reboot, btusb is active, and bluetooth is installed.

This is what was missing on my system. Problem is solved with my solution