Bug 507836 - Bluetooth re-enables
Summary: Bluetooth re-enables
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Bluetooth widget (other bugs)
Version First Reported In: 6.4.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-04 04:07 UTC by skierpage
Modified: 2025-08-25 10:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skierpage 2025-08-04 04:07:13 UTC
SUMMARY
I don't use Bluetooth with my Thinkpad T460, I don't think it is paired with any devices. So when the bluetooth icon appears in my panel, I click it, click Configure Bluetooth, turn off "Enabled", and in the second Configure... dialog I confirm that "Disable Bluetooth on Login" is set.

And yet, around a day later after my screen locks and I unlock it, I notice the Bluetooth icon has reappeared in my panel and Bluetooth is back to being enabled.
 
STEPS TO REPRODUCE
As above

OBSERVED RESULT
As above. After I disable the bluetooth icon goes away and the Bluetooth system settings says "Bluetooth is disabled".  But hours later, usually after I unlock my screen, I notice the icon is back. However, if I manually lock my screen with Start > Session > Lock and immediately unlock, the Bluetooth icon does not appear, so there's some other timing or timeout thing that happens.

Before and after I disable bluetooth, my process list includes /usr/libexec/bluetooth/bluetoothd and 
/usr/libexec/bluetooth/obexd .

EXPECTED RESULT
Bluetooth stays disabled and the Bluetooth icon in the Plasma panel doesn't appear.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.4.3
KDE Frameworks Version: 6.16.0
Qt Version: 6.8.3
Kernel Version: 6.15.8-100.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6300U CPU @ 2.40GHz
Memory: 8 GiB of RAM (7.6 GiB usable)
Graphics Processor: Intel® HD Graphics 520
Manufacturer: LENOVO
Product Name: 20FN002JUS
System Version: ThinkPad T460

ADDITIONAL INFORMATION
I recall "This Week in KDE" reporting that something similar to this was fixed.

My screen locks but I have disabled Sleep, 

I don't see anything in the journal.

If I manually stop the bluetooth service with `systemctl stop bluetooth`, journalctl reports the service immediately starts up again. (I would need to disable it I think to stop this.) However, this doesn't make the Bluetooth icon reappear and system settings still reports Bluetooth is Disabled.
Comment 1 Bug Janitor Service 2025-08-05 20:44:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/bluedevil/-/merge_requests/219
Comment 2 Nicolas Fella 2025-08-05 20:46:17 UTC
Any chance you could test if https://invent.kde.org/plasma/bluedevil/-/merge_requests/219 fixes it?
Comment 3 skierpage 2025-08-06 07:59:45 UTC
(In reply to Nicolas Fella from comment #2)
> Any chance you could test if
> https://invent.kde.org/plasma/bluedevil/-/merge_requests/219 fixes it?

Not easily. I don't have a KDE build environment set up. I see the MR has two manual build pipelines suse_tumbleweed_qt610 and ..._qt690; if either produces artifacts I could try manually placing them on my Fedora Linux 41 KDE Plasma Version: 6.4.3 / KDE Frameworks Version: 6.16.0 / Qt Version: 6.8.3 system.

Thanks for working on this!

My workaround was to `systemctl disable bluetooth` and then `systemctl stop bluetooth`.
Comment 4 Nicolas Fella 2025-08-25 10:15:16 UTC
Git commit 76da39982850734ede94ae1453eb90e3fd0d0b70 by Nicolas Fella.
Committed on 25/08/2025 at 10:12.
Pushed by nicolasfella into branch 'master'.

Rework adapter state save/restore

Currently we save the adapter power state, but only when rfkill is not blocked.

When the adapter is saved as powered on, and then we block bluetooth, the saved
state is never changed.

On next startup we then power the adapter on. Apparently on some systems that
results in the rfkill being undone and enables bluetooth when it shouldn't be.

To avoid this

1) Clear the adapter state list on save when bluetooth is blocked
2) Only changed the powered state for adapters where we have remembered a
power state, instead of defaulting to powering it on
Related: bug 497353

M  +5    -1    src/kded/devicemonitor.cpp

https://invent.kde.org/plasma/bluedevil/-/commit/76da39982850734ede94ae1453eb90e3fd0d0b70