Bug 304292

Summary: When disabling Bluetooth and reboot / restart daemon, bluedevil cant control enabele / disable Bluetooth anymore
Product: [Plasma] Bluedevil Reporter: kordovan_
Component: daemonAssignee: David Rosca <nowrep>
Status: RESOLVED FIXED    
Severity: major CC: hyslion, mail, marcusfib, nortexoid
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description kordovan_ 2012-07-30 15:55:30 UTC
When i disable BT (either with bluedevil or from terminal) and then reboot or restart the bluetooth daemon,
bluedevil cant control my BT anymore. Neither can it enable / disable it, nor can it scan, pair, etc.

Note:
* I can enable and reenable it, thats no problem. But when its disabled and then this bug comes up
* Removing /var/lib/bluetooth/*****/conf and restart the daemon fixes this bug, but only until I disable BT and restart again.
* When when i restart the daemon and BT was turned off, the icon is displayed, like BT is enabled.
* When i remove the config files and restart the daemon BT works like it is expected.
* I can ALWAYS use 
sudo hciconfig hci0 up
sudo hciconfig hci0 down
to enable / disable bluetooth
* "sudo hciconfig hci0 up" is another way to get bluedevil to work again

Conclusion:
bluedevil seems not to notice that bluetooth is turned off, when it gets started.
It should check the information in /var/lib/bluetooth/aa:bb:cc:dd:ee/config so that it knows weather BT is disabled or enabled!

Workaround:
As a workaround i tried to make an autostart script, with sudo hciconfig hci0 up && sudo hciconfig hci0 down, to save power and also to make BT work again for me!

Reproducible: Always

Steps to Reproduce:
1. Turn off BT via bluedevil
2. reboot or restart the daemon
Comment 1 kordovan_ 2012-08-05 12:41:18 UTC
Right now i kind of fixed my problem by adding
sudo hciconfig hci0 up
sudo hciconfig hci0 down
to my /etc/rc.local
Comment 2 Yu-Shin Huang 2012-08-06 16:17:33 UTC
I got the same problem too.
At first, I made something workarounds like yours.
Now I get it fixed by downgrading bluez to 4.99 and compiling bluedevil 1.3rc2

Here is my system informations:
archlinux x86-64
kde 4.9.00 (from testing)
bluez 4.99-6 (from extra)
bluedevil 1.3rc2
Comment 3 Alex Fiestas 2012-10-08 05:52:41 UTC
We are lacking rfkill support, I lack a hardware compatible with it so I can't really check this out.
I will try to fix this for the next version.

Thanks !
Comment 4 kordovan_ 2013-01-23 13:53:17 UTC
Well,
i thought i'd take a look at this site again, since the problem still exists.
On my Arch system, there has been a new bluedevil and lib package in December.
But still i've got to turn up BT via terminal, if i want to use it.
(Becaus as the Bug-File says it doesn't reenable proberly when it's disabled during
reboot)

Is there anything going on, to fix this bug?
Can I somhow help by giving you some in/output?
Comment 5 Alex Fiestas 2013-02-10 02:01:57 UTC
We haven't fix this yet, but it is high in our priority list.

Hope to have it for 1.4.

sorry for the delay on replying.
Comment 6 Michael D 2013-09-11 07:44:08 UTC
Just registering that this bug affects me, running KDE 4.11.1 (Kubuntu 13.10), bluedevil 1.3.1-1, bluez 4.101.
Comment 7 David Rosca 2015-03-12 18:49:19 UTC
This is now fixed in Bluedevil 2.1 (kdelibs) and master (will be in Plasma 5.3).

Powered state of adapters is saved on shutdown/suspend and restored on startup/resume from suspend.