SUMMARY When Bluetooth is set to remember previous state it only saves the state on reboot, but not on shutdown STEPS TO REPRODUCE 1. Bluetooth is set to Remember previous state 2. Boot system with Bluetooth on 3. Turn off Bluetooth 4. Shutdown 5. Boot system and login OBSERVED RESULT Bluetooth is on again EXPECTED RESULT Bluetooth should be off SOFTWARE/OS VERSIONS Linux/KDE Plasma: Fedora Linux 36 KDE KDE Plasma Version: 5.23.3 KDE Frameworks Version: 5.96 Qt Version: 5.15.3 ADDITIONAL INFORMATION This actually works if instead of shutdown the system reboots, then it saves and restores the state
> KDE Plasma Version: 5.23.3 Are you sure? Did yo mean 5.25.3? I ask because this was supposed to be fixed in Plasma 5.25.
(In reply to Nate Graham from comment #1) > > KDE Plasma Version: 5.23.3 > > Are you sure? Did yo mean 5.25.3? I ask because this was supposed to be > fixed in Plasma 5.25. Yes, sorry, I mean 5.25.3 and I just checked to be sure and it's not working as expected.
Thanks. Will check.
I can confirm the defective behaviour for KDE 5.25.4 (Wayland) on Fedora 36 (up-to-date). I observe the following behaviour: * have KDE desktop running as user "myself", Bluetooth is enabled, Bluetooth mouse, keyboard work * shutdown * cold boot * SDDM comes up - Bluetooth works (mouse and keyboard work) * log into user "myself" * Bluetooth is actively being turned off by KDE * enable Bluetooh Repeat, rinse, lather ... My Bluetooth is built into my notebook, "Bus 003 Device 004: ID 8087:0026 Intel Corp. AX201 Bluetooth", addressed by "BlueZ 5.65"
Elsewhere it was mentioned that Microsoft Windows fast start-up could play a role; this is definintely not the case for me. a) While I do have an installation of Microsoft Windows, my reproducing scenario is strictly the loop "cold boot Fedora 36; clean shutdown from KDE menu" b) Note that SDDM does have working Bluetooth, it's just that KDE turns it off ...
Confirmed with KDE 5.25.5 (which just came via Fedora 36 updates). The contents of `~/.config/bluedevilglobalrc ` are ``` [Adapters] xx:xx:xx:xx:xx:xx_powered=false [Devices] connectedDevices= ``` The contents of this file do change if I change the configuration via system settings, e.g. adding: ``` [Global] launchState=enable ```
From casual browsing of master of https://invent.kde.org/plasma/bluedevil/-/tree/master/src (i.e. upcoming 5.26) it would seem as if up to https://invent.kde.org/plasma/bluedevil/-/blob/18f444a67f91b0bfeef6ddbbcc9938b2d9c0a971/src/kded/devicemonitor.cpp#L174 all the right things take place (with "bluetoothBlocked", "launchState" not being persisted), which may point towards BluezQt::setBluetoothBlocked doing things it should not be doing?
I would think so, yeah. :( Feel free to file an upstream bug report, link it here, and we'll see what happens.
My plan of action is to sprinkle log statements into bluedevil - at least on the restore path -, to add some observability. I am trying to set up a reasonably complete KDE build environment (master) and figure out how to run this (on an isolated account) without putting my system at large at risk. May take a while. Additional data point: Just this night I cold booted into KDE/X11 - and Bluetooth stayed on after logging in from SDDM (i.e. it "remembered").