After resume bluedevil doesn't find bluetooth adapter

Bug #1466347 reported by Luca Olivetti
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
KDE Bluetooth Framework
Fix Released
Medium
bluedevil (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

After a suspend/resume the bluetooth icon is greyed out and clicking on it the message is (localized) "cannot find adapter".
Killing the "bluedevil-monolithic" process and launching BlueDevil from the K menu restores its functionality.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: bluedevil 2.0~rc1really1.3.2-0ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-21.21-generic 3.19.8
Uname: Linux 3.19.0-21-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
CurrentDesktop: KDE
Date: Thu Jun 18 08:49:05 2015
SourcePackage: bluedevil
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , Ilya Basin (basinilya) wrote :

After I suspend and wake my PC, the bluetooth tray icon vanishes and I'm unable to browse devices/send files over bluetooth.
Programs that use BT directly, like smartcam and obexfs are not affected.

Reproducible: Always

* package version(s)
bluedevil 1.3-1
libbluedevil 1.9.2-1
bluez 4.101-1
KDE 4.9.5-1

$ lsusb
Bus 003 Device 002: ID 0a5c:2121 Broadcom Corp. BCM2210 Bluetooth

Revision history for this message
In , Ilya Basin (basinilya) wrote :

please help

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

does it help restarting bluetooth service?

Can you give me the output of qdbus --system org.bluez ?

Thanks and sorry for the delay on answering

Revision history for this message
In , Ilya Basin (basinilya) wrote :

> does it help restarting bluetooth service?
Yes

> Can you give me the output of qdbus --system org.bluez ?
$ qdbus --system org.bluez
/
/org
/org/bluez
/org/bluez/404
/org/bluez/404/any
/org/bluez/404/hci0
/org/bluez/404/hci0/dev_A8_7E_33_D7_29_DB
/org/bluez/test

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

In Archlinux I can reproduce this, will investigate and fix.

thanks for the report !

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Can you reproduce this all the time? I have been trying to reproduce this today and so far no luck.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Yes.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Can you attach the following information?

Go into a termnial and do:
killall -9 kded4; sleep 5; kded4 --nofork > /tmp/kded4.txt

Then wait a few seconds, suspend, resume (to reproduce the problem) and attach the kded4.txt

Thanks !

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 77916
x

actually, it prints to stderr

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Oh indeed, can you add stderr too please?

Revision history for this message
In , Ilya Basin (basinilya) wrote :

it is stderr ^

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Oh then, open "debugdialog", enable everything with the word "KDED" on it, and try again.

You are missing a lot of debug info, for example KDED saying "loading module bluedevil".

Revision history for this message
In , Ilya Basin (basinilya) wrote :

What debugdialog ? Don't find this command in $PATH or in Desktop search

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 77917
kded4-5.txt

never mind, found it. See the attached file

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Created attachment 77921
Usa usableAdapter instead of default

Sometimes BlueZ won't emit "defaultAdapterChange", it never worked 100% perfect and it has been removed in BlueZ5...

So instead of it use "usableAdapter", which do not relay on BlueZ and should work just fine.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Haven't test the patch, but should fix the issue, can you test it please?

Revision history for this message
In , Ilya Basin (basinilya) wrote :

The bluetooth icon now reappears after suspend, but "browse files" doesn't work as before, until I restart the bluetooth service or relogin.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 77922
kded4-9.txt: browse files, suspend, then try browse again

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Same patch could be almost applied to browse files, will do some testing and push the patch.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Git commit 61e35f00d7f571166ff9a5139a74b510af279c5e by Àlex Fiestas.
Committed on 10/03/2013 at 23:07.
Pushed by afiestas into branch 'master'.

Added missing emit defaultChanged

M +1 -0 bluedevil/bluedevilmanager.cpp

http://commits.kde.org/libbluedevil/61e35f00d7f571166ff9a5139a74b510af279c5e

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

That should fix this, anyway I will switch to usableAdapter in most of the places.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Git commit 52bd6afb50e70171d99f792f70dd4542ac0a056f by Àlex Fiestas.
Committed on 10/03/2013 at 23:36.
Pushed by afiestas into branch 'master'.

Use usableAdapter instead of defaultAdapter

defaultAdapter has been removed from BlueZ5 because it was problematic,
we had our share of problems with it so we implemented usableAdapter
which basically does what defaultAdapter does but additionally checks
isPowered.

M +2 -2 src/actionplugins/audio/helper/audiohelper.cpp
M +2 -2 src/actionplugins/input/helper/inputhelper.cpp
M +2 -2 src/actionplugins/networkdun/helper/networkdunhelper.cpp
M +2 -2 src/actionplugins/networkpanu/helper/networkpanuhelper.cpp
M +7 -7 src/actionplugins/sendfile/helper/discoverwidget.cpp
M +1 -1 src/actionplugins/sendfile/helper/pages/connectingpage.cpp
M +3 -3 src/actionplugins/sendfile/helper/sendfilewizard.cpp
M +1 -1 src/daemon/helpers/authorize/authorize.cpp
M +1 -1 src/daemon/helpers/filereceiver/openobex/serversession.cpp
M +3 -3 src/daemon/helpers/filereceiver/service.cpp
M +10 -10 src/daemon/kded/BlueDevilDaemon.cpp
M +1 -1 src/daemon/kded/BlueDevilDaemon.h
M +4 -4 src/daemon/kded/bluezagent.cpp
M +4 -4 src/daemon/obexftpkded/ObexFtpDaemon.cpp
M +1 -1 src/daemon/obexftpkded/ObexFtpDaemon.h
M +2 -2 src/fileitemactionplugin/sendfileitemaction.cpp
M +8 -8 src/kcmodule/bluedeviladapters.cpp
M +1 -1 src/kcmodule/bluedeviladapters.h
M +14 -14 src/kcmodule/bluedevildevices.cpp
M +1 -1 src/kcmodule/bluedevildevices.h
M +6 -6 src/kcmodule/bluedeviltransfer.cpp
M +1 -1 src/kcmodule/bluedeviltransfer.h
M +5 -5 src/kcmodule/systemcheck.cpp
M +2 -2 src/kio/bluetooth/kiobluetooth.cpp
M +0 -2 src/kio/bluetooth/kiobluetooth.h
M +16 -16 src/monolithic/monolithic.cpp
M +1 -1 src/wizard/bluewizard.cpp
M +7 -7 src/wizard/pages/discoverpage.cpp
M +1 -1 src/wizard/pages/fail.cpp
M +1 -1 src/wizard/pages/keyboardpairing.cpp
M +1 -1 src/wizard/pages/legacypairing.cpp
M +1 -1 src/wizard/pages/legacypairingdatabase.cpp
M +2 -2 src/wizard/pages/nopairing.cpp
M +1 -1 src/wizard/pages/servicespage.cpp
M +3 -3 src/wizard/pages/ssppairing.cpp

http://commits.kde.org/bluedevil/52bd6afb50e70171d99f792f70dd4542ac0a056f

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 77937
kded4-12.txt: suspend multiple times

Applied your patches. The icon now vanishes after ~3 suspends. See attached file.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Same problem with git head

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Damn it... I can see another problem in your log, I kind of know how to fix it, working on it.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Created attachment 77940
Clean the object on unregistered, emit changed on initialize and added some debug

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

This patch cleans the object and emits defaultChanged and usableChanged when initialize is called again, we where missing both things though the later I suspect is the one causing the problems.

Please, test again and let's see if we fixed it for good this time !

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 77945
kded4-17.txt

Applied your patch to libbluetooth. It didn't help. I don't see the new messages in kded4 output.
See the attached file.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Ok, so at least the Daemon seems to be working fine and the double "Added" or "Removed" events we were getting before are gone (the patch works).

Now the problem seems to be only in monolithic (the thing that appears in the systray), you can check in the log "it probably crashed".

Going to try to reproduce and cook a patch.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Git commit 8559a0d2436da9792611a6bf9446b8a58fe55917 by Àlex Fiestas.
Committed on 11/03/2013 at 12:03.
Pushed by afiestas into branch 'master'.

Emit defaultAdapterChanged and usableAdapterChanged on initialize

After all this is the first time they change, from 0 to *

M +3 -0 bluedevil/bluedevilmanager.cpp

http://commits.kde.org/libbluedevil/8559a0d2436da9792611a6bf9446b8a58fe55917

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Git commit 19792c0085ed11c877e34d268b51c576b80215ef by Àlex Fiestas.
Committed on 11/03/2013 at 12:02.
Pushed by afiestas into branch 'master'.

Properly clean the object when the service is unregistered

M +21 -17 bluedevil/bluedevilmanager.cpp

http://commits.kde.org/libbluedevil/19792c0085ed11c877e34d268b51c576b80215ef

Revision history for this message
In , Ilya Basin (basinilya) wrote :

should I try yet?

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Try updating both, bluedevil and libbluedevil.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 77947
kded4-21.txt

> bluedevilmonolithic(19846): Communication problem with "bluedevilmonolithic" , it probably crashed.
It's still there

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Created attachment 77955
output process info

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Same deal, compile (bluedevil this time) with the applied patch, restart kded, reproduce add info.

This time the patch only adds some more debug.

I have an idea of how to fix this, but provide the info just to be sure.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Additionally you can try to reproduce this with the branch: betterMonolithicHandling let's se if we are lucky :p

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 77960
kded4-25.txt: with the process.txt patch

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Should kded4 now print anything if I kill bluedevil-monolithic ? Well it doesn't.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Ups, forgot to push some debugs, can you try again?

Thanks for all the testing btw.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 77964
kded4-29.txt

Switched to betterMonolithicHandling.
No problem with the icon after 7 suspends.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 77965
kded4-30.txt icon vanish again

Nope, the problem's still there

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Update libbluedevil and try again (314c139e701d5619d8990638202f9593cbe9a6fb).

Thanks for all the feedback.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 78053
kded4-32.txt

Revision history for this message
In , Ilya Basin (basinilya) wrote :

It could be a bug in or misuse of KUniqueApplication. What do you think?

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Is bluedevil-monolithic supposed to restart on resume?

Revision history for this message
In , Ilya Basin (basinilya) wrote :

> Is bluedevil-monolithic supposed to restart on resume?
OK, I see where it's killed.

Now, although bluedevil-monolithic is started, BlueDevilDaemon::monolithicStarted() is not called. I added kDebug() there and also set breakpoints with gdb.
The flag m_monolithicStarted is never set.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

I'm not a QT fan, but my tests show that:
- the started() and finished(int) events only work with QProcess::start(), not startDetached()
- For in-stack QProcess variables the finished(int) event is called on function return, not when the subprocess really dies

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Hehe you are completely right, gonna push the change.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Git commit af6b207ab400c713d5b33ce3a35d9684f7c98d64 by Àlex Fiestas.
Committed on 15/03/2013 at 01:52.
Pushed by afiestas into branch 'betterMonolithicHandling'.

Proper usage of QProcess if we intend to use the signals

Use QProcess:start instead of detached, also move to QProcess instead
of KProcess since we do not need any of the things provided by the later

M +9 -6 src/daemon/kded/BlueDevilDaemon.cpp
M +1 -1 src/daemon/kded/BlueDevilDaemon.h

http://commits.kde.org/bluedevil/af6b207ab400c713d5b33ce3a35d9684f7c98d64

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Because bluedevil-monolithic goes to background, BlueDevilDaemon::finished triggers immediately.

Both BlueDevilDaemon::finished() and BlueDevilDaemon::monolithicQuit() were added in the same commit. monolithicQuit() is triggered on d-bus reply.
I suspect that after processing the "quit" message bluedevil-monolithic is still registered in dbus for some time and will prevent another instance. So this watcher is probably not needed.

If it's true, bluedevil-monolithic needs a flag to run in foreground.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Wait for my patch

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 78090
0001-more-fixes-in-BlueDevilDaemon-monolithic.patch

This is for branch betterMonolithicHandling.
But don't push it yet: I got an advice to use QDBusServiceWatcher. This way we can wait for the monolithic process launched elsewhere and probably the implementation will be simpler

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Oks, if not probably next week I will have time to look into this and fix it for once, as you can see in the timestamps I'm doing it late at night before sleep so I'm not putting any thought on it :p

Thanks for all the feedback, really appreciated.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 78093
0001-BlueDevilDaemon-monolithic-fix-race-condition-use-QD.patch

This patch applies to master. It uses QDBusServiceWatcher to launch monolithik when the service is unregistered. It's simpler than using QProcess signals, I reverted to startDetached().

The new branch called betterMonolithicHandling2. Compare:

$ git diff --stat master betterMonolithicHandling
 src/daemon/kded/BlueDevilDaemon.cpp | 94
 src/daemon/kded/BlueDevilDaemon.h | 9
 2 files changed, 92 insertions(+), 11 deletions(-)
$ git diff --stat master betterMonolithicHandling2
 src/daemon/kded/BlueDevilDaemon.cpp | 64
 src/daemon/kded/BlueDevilDaemon.h | 5
 2 files changed, 58 insertions(+), 11 deletions(-)

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 78094
kded4-41-QDBusServiceWatcher.txt

The "it probably crashed" message is there, but now it's not fatal. We could avoid it with some flag variables, but it would make it complex.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 78124
kded4-50.txt

Today BlueDevilDaemon didn't return to online mode after suspend, see the attached log.
I guess bluedevilmanager found it not usable

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Git commit 8d771c35f2b4f0e0f3ee7ebcf156d461a2dd5eb3 by Àlex Fiestas, on behalf of Ilya Basin.
Committed on 15/03/2013 at 10:51.
Pushed by afiestas into branch 'master'.

BlueDevilDaemon/monolithic fix race condition, use QDBusServiceWatcher

M +53 -11 src/daemon/kded/BlueDevilDaemon.cpp
M +5 -0 src/daemon/kded/BlueDevilDaemon.h

http://commits.kde.org/bluedevil/8d771c35f2b4f0e0f3ee7ebcf156d461a2dd5eb3

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Last mode change in the log is to online, can't it be again monolithic not getting executed ?

This week I will have time to deep test this and try to fix it once for all.

Thanks for everything, really appreciated !

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 78213
kded4-52.txt

> can't it be again monolithic not getting executed ?
It's bluedevilmanager.
I added more logging there. Today it happened again.
According to the log, after wake _k_adapterRemoved() was called twice with "/org/bluez/426/hci0", then _k_adapterAdded() was called with the parameter "/org/bluez/426/hci0", then it called findUsableAdapter() and it returned NULL, so the server remained in offline mode.
grep -i "monolith\|bluedevil\|powerdevil" /tmp/kded4-51.txt > /tmp/kded4-52.txt

Revision history for this message
In , Ilya Basin (basinilya) wrote :

m_adaptersHash could not be empty. So the only reason is it wasn't powered.
But plain obex programs work now, so it is powered.

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Created attachment 78220
adding some debug

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

The other explanation will be that the service is still detected as offline so Manager::Adapters will return an empty list.

Add the debug in the last attached patch, if this is confirmed and our logic is correct then we'll have to workaround this in deviceAdded.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 78254
bluedevil-monolithic-20130321-095003.kcrash

Today monolithic crashed in Monolithic::onlineMode(), because Manager::self()->usableAdapter() returned NULL

Revision history for this message
In , Ilya Basin (basinilya) wrote :

service.patch> "qDebug()"
It's hard to grep for it. Do you know how to workaround the lack of kDebug ? I added this:
    #define myDebug() qDebug() << Q_FUNC_INFO << ": "
but I don't know how to add the process name and pid, like "kded(586) ..."

Revision history for this message
In , Ilya Basin (basinilya) wrote :

I got the proof.
At first _k_adapterAdded() called, only then the property "Powered" is set to true:

void BlueDevil::Manager::Private::_k_adapterAdded(const QDBusObjectPath&) : Added: "/org/bluez/412/hci0"
void BlueDevil::Manager::Private::_k_adapterAdded(const QDBusObjectPath&) : !m_usableAdapter
BlueDevil::Adapter* BlueDevil::Manager::Private::findUsableAdapter() :
BlueDevil::Adapter* BlueDevil::Manager::Private::findUsableAdapter() : defAdapter = 0x2724110
void BlueDevil::Adapter::Private::fetchProperties() : this = 0x2839bf0 m_powered = false
BlueDevil::Adapter* BlueDevil::Manager::Private::findUsableAdapter() : defAdapter->isPowered = false
QList<BlueDevil::Adapter*> BlueDevil::Manager::adapters() const :
QList<BlueDevil::Adapter*> BlueDevil::Manager::adapters() const : return d->m_adaptersHash.values()
BlueDevil::Adapter* BlueDevil::Manager::Private::findUsableAdapter() : adapter = 0x2724110
BlueDevil::Adapter* BlueDevil::Manager::Private::findUsableAdapter() : adapter->isPowered() = false
BlueDevil::Adapter* BlueDevil::Manager::Private::findUsableAdapter() : return 0
void BlueDevil::Manager::Private::_k_adapterAdded(const QDBusObjectPath&) : m_usableAdapter = 0x0
void BlueDevil::Manager::Private::_k_adapterAdded(const QDBusObjectPath&) : m_oldUsableAdapter = 0x0
void BlueDevil::Adapter::Private::_k_propertyChanged(const QString&, const QDBusVariant&) : this = 0x2839bf0 "UUIDs" = ""
void BlueDevil::Adapter::Private::_k_propertyChanged(const QString&, const QDBusVariant&) : this = 0x2839bf0 "Pairable" = "true"
void BlueDevil::Adapter::Private::_k_propertyChanged(const QString&, const QDBusVariant&) : this = 0x2839bf0 "Powered" = "true"
void BlueDevil::Adapter::Private::_k_propertyChanged(const QString&, const QDBusVariant&) : this = 0x2839bf0 m_powered = true
void BlueDevil::Adapter::Private::_k_propertyChanged(const QString&, const QDBusVariant&) : this = 0x2839bf0 "Pairable" = "true"
void BlueDevil::Adapter::Private::_k_propertyChanged(const QString&, const QDBusVariant&) : this = 0x2839bf0 "Discoverable" = "true"

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Git commit 0fa1e2bebe56c0409e8911537da0502b671b6ff2 by Àlex Fiestas.
Committed on 24/03/2013 at 18:12.
Pushed by afiestas into branch 'master'.

On Adapter::poweredChanged, check if we need to modify usableAdapter

One of the things we do in usableAdapter is check if the adapter is
powered, if it is not then we consider the adapter not usable.

It happens that an adaptor is added but it is not powered so we discaard
it as an usableAdapter. When that happens we have to make sure that we
are listening to "poweredChanged" and check if usableAdapter should be
changed when that happens (an adapter has become powered, use it in case
we do not have any usableAdapter).

this whole usableAdapter thing is a mess we have to revise for 2.0

M +30 -0 bluedevil/bluedevilmanager.cpp
M +1 -0 bluedevil/bluedevilmanager.h

http://commits.kde.org/libbluedevil/0fa1e2bebe56c0409e8911537da0502b671b6ff2

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Git commit 014cc0b890a8232f44fc6f231bb01b86cbaafb62 by Àlex Fiestas.
Committed on 24/03/2013 at 17:32.
Pushed by afiestas into branch 'master'.

Check if there is an usable adapter before going to onlineMode

An adapter can be added but it might no be usable (not powered) so we
have to be certain that there is an usableAdapter before going into
onlineMode.

In the future We should connect only to usableAdapterChanged to make
the code waay simpler, but since we are close to release let's not
modify too much code.

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

http://commits.kde.org/bluedevil/014cc0b890a8232f44fc6f231bb01b86cbaafb62

Revision history for this message
In , Ilya Basin (basinilya) wrote :

I think there's a leak of Adapter objects. I put qDebug into its constructor and destructor and after several suspends the constructor was called 10 times and the destructor only 4 times.
Of course, some objects wasn't destroyed at monolithic termination; it's normal.
But according to logs there was this case inside one monolithic instance:
Adapter 1 is created in Manager::Private::initialize(). It has powered = true
Later is called _k_adapterPoweredChanged(false) and sets m_defaultAdapter = 0
Later findUsableAdapter() calls defaultAdapter() that creates Adapter 2, because m_defaultAdapter == 0; Adapter 1 still exists, but not in the list anymore
_k_adapterRemoved() is called and destroys Adapter 2
Then findUsableAdapter() calls defaultAdapter() that creates Adapter 3
Then _k_adapterAdded() is called and creates Adapter 4
Then Adapter 1 _k_propertyChanged() is called with "Powered" = "true"

In the end we have Adapter 4 in the list and Adaper 1 and 3 lost. One question: why set m_defaultAdapter = 0 in _k_adapterPoweredChanged?

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Git commit 47bc8b9bce111e901aae6aba23a32d9828a4988e by Àlex Fiestas.
Committed on 05/04/2013 at 18:39.
Pushed by afiestas into branch 'master'.

Avoid creating Adapter objects for dbusPath that we already have

M +6 -1 bluedevil/bluedevilmanager.cpp

http://commits.kde.org/libbluedevil/47bc8b9bce111e901aae6aba23a32d9828a4988e

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Indeed we were not checking if we already had an adapter for that dbusPath.

is the bug gone with the latest patch (014cc0b890a82) ?

Revision history for this message
In , Ilya Basin (basinilya) wrote :

I think m_bluezManagerInterface->DefaultAdapter() should be used only during init and after that manager should rely only on events. This way after _k_adapterRemoved() the call to Manager::defaultAdapter() will return NULL which is correct.

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Created attachment 78671
0001-don-t-touch-m_defaultAdapter-on-adapterPoweredChange.patch

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Sorry for the huge delay replying to the bug :/

Going to check if the patch make sense and if it should be applied in 2.0 branch as well.

Will release new point releases if needed, thanks !

Revision history for this message
In , Alex Fiestas (afiestas) wrote :

Can you check this patch as well?
http://bugsfiles.kde.org/attachment.cgi?id=84736

Revision history for this message
In , Ilya Basin (basinilya) wrote :

Please give me some time to remember. I haven't used that PC for a while.

Revision history for this message
In , Peter (auxsvr-gmail) wrote :

Bluetooth on KDE 4.14.2 is always on after suspend, even though I set it to off beforehand.

Revision history for this message
In , David Rosca (nowrep) wrote :

Git commit 38f78cae2e67562bb40640a87d9f34f8e1a4f200 by David Rosca.
Committed on 15/11/2014 at 09:58.
Pushed by drosca into branch 'master'.

Restore adapter powered state after wakeup from suspend

M +45 -1 src/daemon/kded/BlueDevilDaemon.cpp
M +2 -0 src/daemon/kded/BlueDevilDaemon.h

http://commits.kde.org/bluedevil/38f78cae2e67562bb40640a87d9f34f8e1a4f200

Revision history for this message
Luca Olivetti (olivluca) wrote :
Revision history for this message
Luca Olivetti (olivluca) wrote :

I was going to report it upstream but looking at kde bug
https://bugs.kde.org/show_bug.cgi?id=348895
the version of bluedevil released in kubuntu is unmaintained.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bluedevil (Ubuntu):
status: New → Confirmed
Changed in bluedevil (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Ian Turner (vectro) wrote :

There is a patch available in this other KDE bug report: https://bugs.kde.org/show_bug.cgi?id=314356

I think all we need to do is apply this patch to the Kubuntu version:
https://quickgit.kde.org/?p=bluedevil.git&a=commit&h=38f78cae2e67562bb40640a87d9f34f8e1a4f200

As a workaround, you can restore the adapter power after suspend with these commands:
sudo rfkill unblock bluetooth
sudo hciconfig hci0 up

Changed in kde-bluetooth:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in bluedevil (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.