Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 405903 - net-wireless/bluez > 4.96 enables hid2hci by default on boot - Logitech BT receiver stops to work
Summary: net-wireless/bluez > 4.96 enables hid2hci by default on boot - Logitech BT re...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tiziano Müller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-26 14:26 UTC by Vincent Lachenal
Modified: 2013-12-02 23:45 UTC (History)
4 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 Vincent Lachenal 2012-02-26 14:26:36 UTC
Since bluez 4.98-r1 update, udev always runs hid2hci for Logitech BT receiver at startup.
This problem has been posted on Gentoo forum : http://forums.gentoo.org/viewtopic-t-908028-highlight-.html 
My keyboard and mouse (MX5500) do not work anymore in HCI mode. Moreover hid2hci seems not to work to revert to HID mode for Logitech BT receiver (it does nothing with option --mode=hid). So I could not add udev rules to activate in HID on boot.

Bluez package install this file in udev rules :
/lib/udev/rules.d/97-bluetooth-hid2hci.rules

I have to comment these lines to my keyboard and mouse work correctly :
# Logitech devices
KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \
  RUN+="hid2hci --method=logitech-hid --devpath=%p"

But it will be overwritten on next bluez update.

Is it possible to remove the hid2hci rules from default udev rules ?

Reproducible: Always

Steps to Reproduce:
If you have Logitech bluetooth keyboard/mouse :
1. Update bluez to last version
2. Reboot
Actual Results:  
Keyboard and mouse do not work because Logitech BT receiver is in HCI mode.

Expected Results:  
Logitech BT receiver should be in HID mode by default.

winz@kakita ~ $ emerge --info
Portage 2.1.10.44 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.13-r4, 3.2.1-gentoo-r2 x86_64)
=================================================================
System uname: Linux-3.2.1-gentoo-r2-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.0.3
Timestamp of tree: Sat, 25 Feb 2012 16:15:01 +0000
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://mirror.ovh.net/gentoo-distfiles/ "
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="fr fr_FR"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="64bit X a52 aac acl acpi akonadi alsa amd64 arts avahi bash-completion bazaar berkdb bluetooth bluray branding bzip2 cairo cdr cli consolekit cracklib crypt cups curl cxx daap dbus device-mapper divx dri dvb dvd dvdr emacs exif faac faad fam fbcondecor ffmpeg flac fontconfig fortran fuse gdbm gdu gif glade gnome gnutls gphoto2 gpm gstreamer gtk gtk3 hal hwdb iconv icu id3tag idn int64 introspection ipv6 jpeg jpeg2k kde kerberos lame libkms libnotify lirc logrotate lua lzma mad matroska midi mikmod mmx mng modules mono mp3 mpeg mplayer mtp mudflap mule multilib musepack mysql nautilus ncurses nls nptl nptlonly nsplugin ogg openal openexr opengl openmp oss pam pcre perl pg-intdatetime png policykit postgres pppd python qt3 qt4 quicktime readline realmedia reports rtsp samba scanner schroedinger semantic-desktop session spell sse sse2 ssl ssse3 startup-notification svg sysfs syslog tcpd theora threads tiff truetype udev unicode upnp urandom utempter v4l v4l2 vaapi vdpau vim-syntax vorbis wicd wifi wmp x264 xcb xcomposite xinerama xml xorg xscreensaver xvid xvmc zeroconf zip zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="casio_qv" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="tda1004x tda10046" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr fr_FR" LIRC_DEVICES="devinput" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv nvidia v4l dummy vesa vga fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Pacho Ramos gentoo-dev 2012-02-28 20:50:36 UTC
Please report your problem to upstream:
http://www.bluez.org/development/lists/

As I don't know why hid2hci is breaking your hardware (if it's known to break, maybe there is some way to make that udev rule skip devices like yours)
Comment 2 Alexander Holler 2013-12-01 16:42:35 UTC
Please reopen that bug as it isn't a problem of upstream but a packaging failure.

The solution is simple: create a useflag hid2hci which is by default turned off.


Please see those two Fedora bugs for explanations and discussions on that topic:

https://bugzilla.redhat.com/show_bug.cgi?id=635244

https://bugzilla.redhat.com/show_bug.cgi?id=836881

Thanks,

Alexander Holler
Comment 3 Alexander Holler 2013-12-01 16:55:23 UTC
Besides turning it of by default, a warning might be a good idea when it is turned on.

E.g. something like:

"You might need to pair your Bluetooth keyboard and/or mouse in order to still use it when hid2hci is installed."
Comment 4 Alexander Holler 2013-12-01 17:10:42 UTC
Another option to solve this problem would be to install an additional empty udev-rule in /etc/udev/rules.d named 97-bluetooth-hid2hci.rules which overwrites the default rule and therefor disables it.

The contents should just be

----
# Delete this rule in order to activate hid2hci
----

Besides that rule, a warning would be necessary:

"hid2hci is disabled by default. Please delete 97-bluetooth-hid2hci.rules in /etc/udev/rules.d in order to activate it.
Comment 5 Pacho Ramos gentoo-dev 2013-12-01 21:22:02 UTC
+*bluez-4.101-r8 (01 Dec 2013)
+
+  01 Dec 2013; Pacho Ramos <pacho@gentoo.org> +bluez-4.101-r8.ebuild,
+  -bluez-4.101-r5.ebuild, metadata.xml:
+  Make hid2hci optional and disabled by default (#405903#c2 by Alexander Holler)
+
Comment 6 Alexander Holler 2013-12-02 23:45:20 UTC
Thanks a lot.