Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35067 - bluez-utils needs modules.conf aliases
Summary: bluez-utils needs modules.conf aliases
Status: RESOLVED DUPLICATE of bug 66504
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-04 09:19 UTC by Simone Gotti (RETIRED)
Modified: 2005-07-17 13:06 UTC (History)
2 users (show)

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


Attachments
/modules-update-remove-bluez-aliases.patch (modules-update-remove-bluez-aliases.patch,402 bytes, patch)
2005-01-13 02:00 UTC, Simone Gotti (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Gotti (RETIRED) gentoo-dev 2003-12-04 09:19:18 UTC
When I start my system with my usb bluetooth device  connected the bluetooth rc 
script load hcid and sdpd but when the device is not connect hcid and sdpd aren't 
loaded. with the kernel 2.6.textXX they are never loaded (I have to load the manually). 
I don't know if this is a bluez issue or a rc script problem.  

Reproducible: Always
Steps to Reproduce:
1.

2.

3.



Expected Results:  
hcid and sdpd have to be loaded always and not only when a bluetooth device is 
already connect at startup.
Comment 1 Simone Gotti (RETIRED) gentoo-dev 2003-12-08 15:21:27 UTC
I've made a file in /etc/modules.d called bluetooth with inside these lines:

alias net-pf-31         bluez
alias bt-proto-0        l2cap
alias bt-proto-2        sco
alias bt-proto-3        rfcomm
alias bt-proto-4        bnep
alias tty-ldisc-15      hci_uart
alias char-major-10-250 hci_vhci

than I ran modules-update. For kernel 2.6 this file is quite different. Can't it be automatically created when you install bluez-libs ebuild?

Comment 2 Simone Gotti (RETIRED) gentoo-dev 2004-04-23 06:27:41 UTC
This isn't more needed in 2.6 kernel, BUT only if you do what I did in this bug that I reported yesterday! This is the right WAY to use 2.6 kernels!

http://bugs.gentoo.org/show_bug.cgi?id=48736


Bye!
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2004-09-20 02:25:35 UTC
this is done as per the modprobe.conf stuff, so i guess there's no action required here.
Comment 4 Simone Gotti (RETIRED) gentoo-dev 2005-01-13 01:59:19 UTC
I've finally found time to fix the problem with the wrong aliases for bluez provided by the modutils package and propagated to the modprobe.conf file by the generate-modprobe.conf script.

I'll riassume the problem:

modutils-2.4.27/util/alias.h defines some standard aliases.

These aliases are of course not needed for 2.6 kernels as the kernel modules themself export their provided aliases.

The problem with bluez is that in the 2.4 kernel version the modules was called "bluez" while in 2.6 it's called "bluetooth"

The file modutils-2.4.27/util/alias.h then define this alias: 
"net-pf-31 bluez"
that will override the alias defined inside the "bluetooth" module.

So when you startup your machine without a bluetooth dongle inside (I say without because elsewhere with coldplug enabled the bluetooth module will be loaded by the hotplug scripts as a dependency of hci_usb or other) and the "bluetooth" init script tries to start the bluez daemons (hcid, sdpd etc...) they fails because they needs some functions provided by the module "bluetooth" but modprobe tries to load "bluez".

I made a simple fix in the sbin/modules-update script that will sed out this alias from modprobe.conf.
Removing this directly from the file modutils-2.4.27/util/alias.h isn't right as this aliases are needed with 2.4 kernels.

P.S. I think that none of this aliases are needed for 2.6 kernels but more of them don't give any problem. bluez has this problem due to the module name change.
Comment 5 Simone Gotti (RETIRED) gentoo-dev 2005-01-13 02:00:25 UTC
Created attachment 48378 [details, diff]
/modules-update-remove-bluez-aliases.patch
Comment 6 Alastair Tse (RETIRED) gentoo-dev 2005-01-13 09:18:25 UTC
dunno that change seems a little dodgy, is there no way to do it with /etc/modules.d/ or /etc/modules.autoload.d/ without hacking modules-update?
Comment 7 Simone Gotti (RETIRED) gentoo-dev 2005-01-15 01:58:09 UTC
You should be able to set the right alias knowing the current loaded kernel version. I don't know if this is possible.

But the right problem is that I really think that all these aliases introduced byt the alias.h AREN'T useful in 2.6 kernels.

Comment 8 Simone Gotti (RETIRED) gentoo-dev 2005-01-24 02:41:20 UTC
base-system herd: Any thought on this? I think it's a simple patch that won't have any downside and it will finally make the bluetooth stuffs work on kernels 2.6. Please apply it or tell me a better way to do this. But a FIX is needed.
Comment 9 Alastair Tse (RETIRED) gentoo-dev 2005-01-25 09:57:56 UTC
you mean the modules autoloading does not work for 2.4 or 2.6? i was under the impression that it didn't work for 2.4 only?

i'm reassigning because i think it is more appropriate for base-system to handle this.
Comment 10 Simone Gotti (RETIRED) gentoo-dev 2005-01-25 13:41:04 UTC
Please forget comments #1 and #2, the right problem is explained and a sulution is proposed in comment #4.
Comment 11 Simone Gotti (RETIRED) gentoo-dev 2005-01-25 14:34:56 UTC

*** This bug has been marked as a duplicate of 66504 ***