Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 423513 - net-wireless/bluez-4.101 does not install udev daemon activation rule anymore
Summary: net-wireless/bluez-4.101 does not install udev daemon activation rule anymore
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Tiziano Müller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-25 18:40 UTC by Nikolay S. Rybaloff
Modified: 2012-07-06 18:41 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay S. Rybaloff 2012-06-25 18:40:43 UTC
This commit removes what Gentoo is relying on with bluetooth subsystem:
http://git.kernel.org/?p=bluetooth/bluez.git;a=commit;h=2ea98a6a043710ad4958355b62c682b4767f292e

So bluetoothd is not started anymore

Reproducible: Always
Comment 1 adr 2012-06-26 19:50:47 UTC
Bug title typo =net-wireless/bluez-4.101
Comment 2 Marcin Deranek 2012-06-27 14:52:57 UTC
As far as I was able to see in git repo this was delibarately removed as long running processes (as bluetoothd) should not be started by udev.
Should it be started by /etc/init.d/bluetooth instead ?
Looks like Arch Linux is already doing that: https://projects.archlinux.org/svntogit/packages.git/tree/trunk/rc.bluetooth?h=packages/bluez
Comment 3 Robert Cabrera 2012-06-28 14:00:50 UTC
Man I'm glad I came across this report! 

I've been struggling for days trying to get my previously working bluetooth adapter working on my ~amd64 laptop, thinking it was a permission / ownership issue caused by the recent polkit update. Everything I tried to do was failing.

Then I read this and realized that the polkit update appeared around the same time as the bluez update did. Damn I wish I could get back the hours I've spent trying to resolve this before reading this thread!

Anyhow, I just downgraded to the previous version of bluez and viola! My bluetooth was working again!

I hope this gets resolved soon, but in the meantime I've masked 4.101 because I need a functioning bluetooth dongle to interact with my phone.
Comment 4 Albert W. Hopkins 2012-06-28 14:21:51 UTC
(In reply to comment #2)
> As far as I was able to see in git repo this was delibarately removed as
> long running processes (as bluetoothd) should not be started by udev.
> Should it be started by /etc/init.d/bluetooth instead ?
> Looks like Arch Linux is already doing that:
> https://projects.archlinux.org/svntogit/packages.git/tree/trunk/rc.
> bluetooth?h=packages/bluez

I could be wrong, but I believe at least Gnome (3.x)'s bluetooth system uses the .service file to start the udev daemon.   Without the file, it seems that you cannot access bluetooth devices within Gnome.  I believe I even tried starting the  openrc servce manually, but Gnome doesn't recognize it unless it's started via udev.

What I've done is just copied the file from the previous version on top of the bluez-4.101 install and things seem to work fine.

So either Gnome needs to update their dependence on the udev service file, or bluez needs to keep that file.
Comment 5 Robert Cabrera 2012-07-01 00:04:59 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > As far as I was able to see in git repo this was delibarately removed as
> > long running processes (as bluetoothd) should not be started by udev.
> > Should it be started by /etc/init.d/bluetooth instead ?
> > Looks like Arch Linux is already doing that:
> > https://projects.archlinux.org/svntogit/packages.git/tree/trunk/rc.
> > bluetooth?h=packages/bluez
> 
> I could be wrong, but I believe at least Gnome (3.x)'s bluetooth system uses
> the .service file to start the udev daemon.   Without the file, it seems
> that you cannot access bluetooth devices within Gnome.  I believe I even
> tried starting the  openrc servce manually, but Gnome doesn't recognize it
> unless it's started via udev.
> 
> What I've done is just copied the file from the previous version on top of
> the bluez-4.101 install and things seem to work fine.
> 
> So either Gnome needs to update their dependence on the udev service file,
> or bluez needs to keep that file.

Its not just a Gnome issue. As I run KDE. The devs need to first recognize this issue as they have yet to even marked this thread as "confirmed". Then they need to figure out the approach they want to take. It seems as though the easiest method would be to patch bluez like Arch did.

As an aside, what file did you copy from the previous version to make this work?

TIA
Comment 6 Roman 2012-07-01 11:32:43 UTC
Problem is actual for me. 'wireless/bluez-4.101' package does not work with my bluetooth. I have HP ProBook 6450b(WD779EA) and use gentoo 3.4.4, gnome desktop environment.
All works on wireless/bluez-4.99.
Please fix problem.
Comment 7 adr 2012-07-01 16:59:04 UTC
(In reply to comment #6)
> Problem is actual for me. 'wireless/bluez-4.101' package does not work with

The package work fine. Until the bug is fixed, just enter "bluetoothd  -n" in a terminal. Ctrl-C to stop.
Comment 8 Marcin Deranek 2012-07-01 20:47:21 UTC
In my case I have replaced the whole start section in /etc/init.d/bluetooth with:

start() {
        ebegin "Starting ${SVCNAME}"
        start-stop-daemon --start --exec "/usr/sbin/bluetoothd"
        eend $?
}

and

# rc-update add bluetooth default
Comment 9 Robert Cabrera 2012-07-01 20:55:33 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Problem is actual for me. 'wireless/bluez-4.101' package does not work with
> 
> The package work fine. Until the bug is fixed, just enter "bluetoothd  -n"
> in a terminal. Ctrl-C to stop.

The package isn't working fine if none of the tools, especially the graphical interfaces aren't working with it!

Having to open a terminal and evoking the bluetooth daemon manually isn't the solution or a very good work around when you can just mask this version until it's fixed and not have any issues IMHO!

There have now been several posts in the forums about this bug and I'm sure more will be forthcoming as users begin upgrading and getting hit with it.

Like I said in my previous post, this upgrade came around the same time that the new polkit hit the tree. Many are probably still dealing with that one and haven't realized that this issue is unrelated. However once they do catch on there will be more posts about this here.

I'm still interested in hearing which file needs to be copied from 4.99 in order to make 4.101 work as expected. That would be a better workaround IMHO, than manually starting and stopping the daemon in a terminal.

Any help would be appreciated TIA
Comment 10 Albert W. Hopkins 2012-07-01 21:07:31 UTC
(In reply to comment #9)

> I'm still interested in hearing which file needs to be copied from 4.99 in
> order to make 4.101 work as expected. That would be a better workaround
> IMHO, than manually starting and stopping the daemon in a terminal.
>

/lib/udev/rules.d/97-bluetooth.rules
Comment 11 Bruce Hill 2012-07-04 10:41:17 UTC
This was the reply on linux-bluetooth ml asking why udev rule was removed:

"Udev rules are not supposed to spawn daemons. It never was. And now if
you do that udev will kill your daemon after a certain timeout. You'd
need to a) maintain that rule by yourself and b) patch udev to not do
that."



What will Gentoo do to start bluetoothd now?
Comment 12 Robert Cabrera 2012-07-05 21:49:29 UTC
(In reply to comment #10)
> (In reply to comment #9)
> 
> > I'm still interested in hearing which file needs to be copied from 4.99 in
> > order to make 4.101 work as expected. That would be a better workaround
> > IMHO, than manually starting and stopping the daemon in a terminal.
> >
> 
> /lib/udev/rules.d/97-bluetooth.rules

Albert thanks for the heads-up! I copied /lib/udev/rules.d/97-bluetooth.rules
into my home directory prior to updating, then copied it back over after the upgrade and it worked like a charm! My bluetooth is now working as expected so this is a viable workaround.

Thanks again!!!!
Comment 13 Rafał Mużyło 2012-07-06 13:56:25 UTC
If you note the comment in the bluez commit, the workaround from comment 8 seems more long term (even if the whole systemd/udev business is likely to get more broken with each release).
Comment 14 Pacho Ramos gentoo-dev 2012-07-06 18:41:27 UTC
+*bluez-4.101-r1 (06 Jul 2012)
+
+  06 Jul 2012; Pacho Ramos <pacho@gentoo.org> +bluez-4.101-r1.ebuild,
+  +files/bluetooth-init.d-r2, -bluez-4.101.ebuild:
+  Recover bluetoothd init.d script to start it now that upstream has decided to
+  drop udev rule (bug #423513 by Nikolay S. Rybaloff, Marcin Deranek and
+  others).
+