Bug 319403 - Bluetooth icon disappears from systray when selecting "Turn Bluetooth Off"
Summary: Bluetooth icon disappears from systray when selecting "Turn Bluetooth Off"
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: bluetooth-systray (show other bugs)
Version: 4.12.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Fiestas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-06 08:03 UTC by Uros
Modified: 2014-11-02 19:36 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to fix the bug (648 bytes, patch)
2014-01-19 23:59 UTC, Alex Fiestas
Details
Second attempt (2.23 KB, patch)
2014-01-20 01:08 UTC, Alex Fiestas
Details
Third attempt (3.68 KB, patch)
2014-01-20 01:24 UTC, Alex Fiestas
Details
4th attempt (3.68 KB, patch)
2014-01-20 02:02 UTC, Alex Fiestas
Details
4th attempt (3.68 KB, patch)
2014-01-20 02:03 UTC, Alex Fiestas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uros 2013-05-06 08:03:21 UTC
It seems that bluetooth systray behavior changed from last version (can't really be sure which one, but I upgraded to libbluedevil 1.9.3 and bluedevil 1.3.1 on 21.4.2013) . Once I select "Turn Bluetooth Off" from systray, there's no way (that I know of) to re-enable bluetooth adapter from within KDE. My current workaround is to issue "hciconfig hci0 reset" in terminal - bluetooth systray icon re-appears after that.

Reproducible: Always

Steps to Reproduce:
1. Select "Turn Bluetooth Off" from bluetooth systray icon
Actual Results:  
Bluetooth adapter state is set to "DOWN", Bluetooth icon disappears from systray.

Expected Results:  
Bluetooth adapter state is set to "DOWN", Bluetooth icon should stay in systray and allow to re-enable bluetooth adapter as it did in previous version via "Turn Bluetooth On" option.

Versions used:
ksystraycmd 4.10.2
solid 4.10.2
solid-runtime 4.10.2
libbluedevil 1.9.3
bluedevil 1.3.1
Comment 1 Dave Flogeras 2013-07-11 23:12:27 UTC
See https://bugs.gentoo.org/show_bug.cgi?id=473008 for some info on how to workaround
Comment 2 Uros 2013-07-12 12:09:51 UTC
Thanks for info, but it's still a workaround.

Updated related packages to 4.10.5 and the problem persists.

ksystraycmd 4.10.5
solid 4.10.5
solid-runtime 4.10.5
libbluedevil 1.9.3
bluedevil 1.3.1

From the looks of it, It might actually be related to libbluedevil and bluedevil upgrades. Unfortunately older (lib)bluedevil versions are no longer in portage tree.
Comment 3 Alex Fiestas 2013-08-01 20:23:24 UTC
Will try to fix for 1.3.2, thanks for reporting !
Comment 4 Uros 2013-09-10 19:43:13 UTC
Updated related packages to bluedevil-1.3.2 and libbluedevil-1.9.4, but the problem persists.

Some similar problems based on bug report @ https://bugs.gentoo.org/show_bug.cgi?id=473008 seem to be gone with this latest version.
Comment 5 Uros 2013-09-11 10:20:13 UTC
Based on some additional info, I can confirm that enabling adapter (ticking "powered" checkbox) from System Settings -> Bluetooth -> Adapters works and BT icon re-appears in systray. This is way more convenient than issuing command in console as root, but still.. bluetooth icon disappearing from systray when disabling adapter is not something that was happening before bluedevil-1.3.1 update.
Comment 6 Diego 2013-09-19 13:55:43 UTC
(In reply to comment #5)
> Based on some additional info, I can confirm that enabling adapter (ticking
> "powered" checkbox) from System Settings -> Bluetooth -> Adapters works and
> BT icon re-appears in systray. This is way more convenient than issuing
> command in console as root, but still.. bluetooth icon disappearing from
> systray when disabling adapter is not something that was happening before
> bluedevil-1.3.1 update.

I have the same problem, but the icon still doesn't appear for me after ticking "powered".

Fedora 19 with bluedevil:
$ rpm -q bluedevil
bluedevil-1.3.2-1.fc19.x86_64
Comment 7 Diego 2013-09-23 11:07:20 UTC
(In reply to comment #6)
> I have the same problem, but the icon still doesn't appear for me after
> ticking "powered".
> 
> Fedora 19 with bluedevil:
> $ rpm -q bluedevil
> bluedevil-1.3.2-1.fc19.x86_64

Fedora 19 updates provided KDE Workspaces 4.11.1 (over previous 4.10.5) and now the icon seems to appear / disappear correctly.
Comment 8 Uros 2013-11-03 10:43:58 UTC
I've just recently upgraded kde to 4.11.2 with bluedevil-1.3.2 and libbluedevil-1.9.4, but the problem still persists here.

Alex, if you need some additional info, please let me know.
Comment 9 Alex Fiestas 2014-01-19 23:11:29 UTC
I can't test 1.3.X code anymore since my distribution only offers BlueZ5, I tried to reproduce it with bluedevil2.0 and I can't :/

I guess that this is still happening? can you:
-Check Turn Off bluetooth in the systemtray
-Go to a terminal and write qdbus --system org.bluez
-Paste the output from the terminal.

Thanks !
Comment 10 Alex Fiestas 2014-01-19 23:59:24 UTC
Created attachment 84735 [details]
Patch to fix the bug
Comment 11 Alex Fiestas 2014-01-20 01:08:51 UTC
Created attachment 84736 [details]
Second attempt
Comment 12 Alex Fiestas 2014-01-20 01:24:47 UTC
Created attachment 84738 [details]
Third attempt
Comment 13 Alex Fiestas 2014-01-20 02:02:26 UTC
Created attachment 84739 [details]
4th attempt
Comment 14 Alex Fiestas 2014-01-20 02:03:01 UTC
Created attachment 84740 [details]
4th attempt
Comment 15 Uros 2014-01-20 02:11:17 UTC
Tried provided mono2 and mono3 patches against bluedevil-1.3.2.
In both cases, BT icon now stays in systray when adapter is disabled.
I consider this issue fixed (at least on my system) .
Thank you!
Comment 16 Alex Fiestas 2014-01-20 02:16:42 UTC
Can you try with mono4? specially starting bluedevil-monolithic with bluetooth turned off.

Thanks !
(In reply to comment #15)
> Tried provided mono2 and mono3 patches against bluedevil-1.3.2.
> In both cases, BT icon now stays in systray when adapter is disabled.
> I consider this issue fixed (at least on my system) .
> Thank you!
Comment 17 Uros 2014-01-20 02:39:35 UTC
I've tried mono4 with bluetooth turned off but systray icon is set as "active".
I guess that's not just right..
Comment 18 Uros 2014-01-20 03:07:50 UTC
... also, cannot "turn bluetooth off" from systray until I re-enable adapter from console / system settings.

Some additional info from qdbus --system org.bluez as you've requested.

When adapter is "up" :
/
/org
/org/bluez
/org/bluez/32055
/org/bluez/32055/any
/org/bluez/32055/hci0
/org/bluez/32055/hci0/dev_XX_XX_XX_XX_XX_XX
/org/bluez/test

When adapter is "down" :
/
/org
/org/bluez
/org/bluez/32055
/org/bluez/32055/any
/org/bluez/32055/hci0
/org/bluez/32055/hci0/dev_XX_XX_XX_XX_XX_XX
Comment 19 Heinz Wiesinger 2014-01-20 11:23:34 UTC
I still have the opposite behavior with mono4. When starting with bluetooth disabled, clicking "Turn Bluetooth On" does not update the systray icon and it never reflects it actually being powered. If started with bluetooth enabled, everthing works as expected.
Comment 20 Edward 2014-02-12 23:18:25 UTC
I have the same problem as originally reported in KDE 4.12.1:
Bluetooth icon disappears from systray when selecting "Turn Bluetooth Off"
Comment 21 Edward 2014-02-12 23:21:06 UTC
> qdbus --system org.bluez
/
/org
/org/bluez
/org/bluez/764
/org/bluez/764/any
/org/bluez/764/hci0
/org/bluez/test
Comment 22 Uros 2014-02-26 10:41:16 UTC
Upgrading to bluedevil-2.0_rc1 seems to fix all the issues I experienced with bluedevil-1.3.2 when built without your latest patch.
Comment 23 Alex Fiestas 2014-03-09 01:57:21 UTC
Git commit 806c978929cf27ea91b51e05b3e7d770c6fb8adb by Àlex Fiestas.
Committed on 09/03/2014 at 01:35.
Pushed by afiestas into branch 'master'.

Show always the KStatusNotifier (Status == Active)

The KDED will kill the monolithic in case there are no
adapters so in that case we won't polute the systemtray
with the Bluetooth icon.

In the case there there are Adapters but they are not
powered we want to show the systemtray so it can be
powered on again.

M  +2    -2    src/monolithic/monolithic.cpp

http://commits.kde.org/bluedevil/806c978929cf27ea91b51e05b3e7d770c6fb8adb
Comment 24 Alex Fiestas 2014-03-09 01:57:26 UTC
Git commit 806c978929cf27ea91b51e05b3e7d770c6fb8adb by Àlex Fiestas.
Committed on 09/03/2014 at 01:35.
Pushed by afiestas into branch 'master'.

Show always the KStatusNotifier (Status == Active)

The KDED will kill the monolithic in case there are no
adapters so in that case we won't polute the systemtray
with the Bluetooth icon.

In the case there there are Adapters but they are not
powered we want to show the systemtray so it can be
powered on again.

M  +2    -2    src/monolithic/monolithic.cpp

http://commits.kde.org/bluedevil/806c978929cf27ea91b51e05b3e7d770c6fb8adb
Comment 25 Dave Flogeras 2014-03-09 17:04:48 UTC
Works perfectly here one bluez 5.15 and (lib)bluedevil-2.0_rc1.  Thanks!
Comment 26 hrvooje 2014-11-02 19:22:27 UTC
I use Kubuntu 14.10 and KDE Plasma 4.14.1 on HP Probook 4520s. When I click on bluetooth icon and than try to turn it off, nothing happens. And than I go on configure and the message appears "Your default Bluetooth adapter is not visible for remote devices. Fix it."
Comment 27 hrvooje 2014-11-02 19:36:06 UTC
And after I do "sudo /etc/init.d/bluetooth restart", the icon dissappears after "turn off bluetooth" and it comes back after I check box "Powered" in system settings