You are not logged in.
My system is fully up to date. I am using KDE Plasma, pipewire, and pipewire-pulse. The GUI interface to bluetooth indicates that the controller is disabled, but clicking the "enable" button is fruitless.
I've tried using bluetoothctl, but it can't find the controller, and there doesn't seem to be any way to use bluetoothctl to power it up or enable it. Perhaps I missed something here, though I tried many other bluetoothctl commands to no avail.
[bluetooth]# show
No default controller availableThe controller is there, as lsusb reveals:
Bus 002 Device 005: ID 8087:0a2a Intel Corp. Bluetooth wireless interfacesystemctl status bluetooth shows:
● bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2021-12-30 12:47:45 PST; 31min ago
Docs: man:bluetoothd(8)
Main PID: 902 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 19057)
Memory: 2.0M
CPU: 25ms
CGroup: /system.slice/bluetooth.service
└─902 /usr/lib/bluetooth/bluetoothd
Dec 30 12:47:45 random7 systemd[1]: Starting Bluetooth service...
Dec 30 12:47:45 random7 bluetoothd[902]: Bluetooth daemon 5.62
Dec 30 12:47:45 random7 systemd[1]: Started Bluetooth service.
Dec 30 12:47:45 random7 bluetoothd[902]: Starting SDP server
Dec 30 12:47:45 random7 bluetoothd[902]: Bluetooth management interface 1.21 initializedRelated services are present and appear to be working.
$ systemctl list-units | grep -i blue
sys-devices-pci0000:00-0000:00:14.0-usb2-2\x2d7-2\x2d7:1.0-bluetooth-hci0.device loaded active plugged /sys/devices/pci0000:00/0000:00:14.0/usb2/2-7/2-7:1.0/bluetooth/hci0
sys-subsystem-bluetooth-devices-hci0.device loaded active plugged /sys/subsystem/bluetooth/devices/hci0
bluetooth.service loaded active running Bluetooth service
bluetooth.target loaded active active Bluetooth SupportIf I install blueman and reboot the system, the blueman icon indicates that the controller is disabled. Clicking on the blueman icon provides an opportunity to enable the controller, and this actually works.
I would prefer to remove blueman and to be able to enable the controller via the command line, so it could be automated.
Can anyone tell me how that can be done under the current circumstances?
edited for clarity, punctuation, and grammar, as if anyone remembers what the last one is
Last edited by luser (2021-12-31 01:38:02)
luser: an epithet applied by Windows users to linux users
Offline
i have 3 simple scripts, i rarely use bluetooth so i only turn it on when i need it, if bluetooth plays up and doesnt work i just run "btrestart" and usually fixes it.
bton:
#!/bin/bash
sudo rfkill unblock bluetooth
sudo systemctl start bluetooth
sleep 1
bluetoothctl power on
exit 0btoff:
#!/bin/bash
bluetoothctl power off
sudo systemctl stop bluetooth
sudo rfkill block bluetooth
exit 0btrestart:
#!/bin/bash
bluetoothctl power off
sudo systemctl stop bluetooth
sudo rfkill block bluetooth
sudo rfkill unblock bluetooth
sudo systemctl start bluetooth
sleep 1
bluetoothctl power on
exit 0Offline
Hi, Thanks for the reply. Unfortunately, the bluetoothctl command can't find a controller to power on.
$ bluetoothctl power on
or
$ sudo bluetoothctl power on
produce the same result:
No default controller availableAlso, rfkill doesn't seem to be the problem:
$ rfkill
ID TYPE DEVICE SOFT HARD
0 bluetooth tpacpi_bluetooth_sw unblocked unblocked
1 wlan phy0 unblocked unblocked
2 bluetooth hci0 unblocked unblockedluser: an epithet applied by Windows users to linux users
Offline
i understand that but did you try those scripts or try those exact commands in order, for whatever reason it does work disabling and blocking the bt controller and then unblocking and re-enabling bt.
Offline
Very interesting! bton.sh doesn't work, but btrestart.sh actually does get it started.
$ ./btrestart.sh
No default controller available
Changing power on succeededI will play around with the commands to see if I can simplify it.
luser: an epithet applied by Windows users to linux users
Offline
After playing around a bit, I found that this script will turn it on a little more simply. I'm not sure if the sleep command is required, but it's so brief it's hardly worth testing without it.
Why this should be necessary is absolutely opaque as far as I'm concerned. It appears to be unblocked from the start!
#!/bin/bash
sudo rfkill block bluetooth
sudo rfkill unblock bluetooth
sleep 1
bluetoothctl power on
exit 0luser: an epithet applied by Windows users to linux users
Offline
glad it worked, its the old "have you tried turning it off and on again" but it seems to work every time bluetooth plays up for me.
those scripts are for my system and obviously bton will only work if everything is off already. i havent bothered adding checking to the scripts to see if things are off or on cause its never been an issue, maybe one day when im bored.
Offline