You are not logged in.

#1 2009-04-21 15:08:25

ssjlegendx
Member
Registered: 2008-01-01
Posts: 94
Website

[SOLVED] HAL/evdev: Bluetooth mouse device not being removed properly?

Last week, I found that my (Logitech) Bluetooth mouse would fail to control my computer after "falling asleep" or being turned off and turned back on.

The first time that the mouse is connected to my computer after boot, everything works fine; however, as I mentioned, problems arise when the connection is lost and I attempt to reconnect it (which happens automatically when the mouse "wakes up" or is turned on).

Upon the initial (successful) connection, the following appears in my X.org log:

(II) config/hal: Adding input device Bluetooth Travel Mouse
(**) Bluetooth Travel Mouse: always reports core events
(**) Bluetooth Travel Mouse: Device: "/dev/input/event11"
(II) Bluetooth Travel Mouse: Found 8 mouse buttons
(II) Bluetooth Travel Mouse: Found x and y relative axes
(II) Bluetooth Travel Mouse: Found scroll wheel(s)
(II) Bluetooth Travel Mouse: Configuring as mouse
(**) Bluetooth Travel Mouse: YAxisMapping: buttons 4 and 5
(**) Bluetooth Travel Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200                                  
(II) XINPUT: Adding extended input device "Bluetooth Travel Mouse" (type: MOUSE)
(**) Bluetooth Travel Mouse: (accel) keeping acceleration scheme 1
(**) Bluetooth Travel Mouse: (accel) filter chain progression: 2.00
(**) Bluetooth Travel Mouse: (accel) filter stage 0: 20.00 ms             
(**) Bluetooth Travel Mouse: (accel) set acceleration profile 0

When the mouse loses the connection, the following line appears in the log (periodically... amounting for the majority of a 42,522-line-long logfile from which I'm pulling these messages):

(EE) Bluetooth Travel Mouse: Read error: No such device

Then, when I attempt to reconnect the mouse, the following is logged:

(II) config/hal: Adding input device Bluetooth Travel Mouse
(**) Bluetooth Travel Mouse: always reports core events
(**) Bluetooth Travel Mouse: Device: "/dev/input/event11"
(WW) Bluetooth Travel Mouse: device file already in use. Ignoring.
(II) UnloadModule: "evdev"
(EE) PreInit returned NULL for "Bluetooth Travel Mouse"
(EE) config/hal: NewInputDeviceRequest failed (8)

I have found at least one other report of this problem occuring. There's a bug over at Red Hat that deals with this exact issue (though -- in my case, at least -- X doesn't lock up). There, David Woodhouse sums up the problem nicely:

David Woodhouse wrote:

When I turn off a Bluetooth mouse, X starts to get -ENODEV from the open
filedescriptor before the HAL DeviceRemoved notification arrives.

The device file that is "given" to the Bluetooth mouse when it first connects is never released, and so it cannot be given back to the mouse when it reconnects.

According to that bug report,  this issue was fixed with their third (-3) packaging of evdev 2.2.1. Arch is also up to evdev 2.2.1, and so I'm left to believe that the Red Hat developers made some modification on their own (unless they have packaged a minor "sub-version" of 2.2.1).

I don't know the technical details of their fix, but if others are experiencing this issue and it is, indeed, something done downstream, then I can submit a bug report for this issue.

Has anyone else had this (or a similar) problem as of late? Any feedback is welcome. smile

Last edited by ssjlegendx (2009-04-22 21:51:17)


#!/vim/rocks

Offline

#2 2009-04-22 00:17:39

ssjlegendx
Member
Registered: 2008-01-01
Posts: 94
Website

Re: [SOLVED] HAL/evdev: Bluetooth mouse device not being removed properly?

I just grabbed the PKGBUILD for evdev 2.2.0 and temporarily downgraded; unfortunately, I experienced the error with that version, as well. It seems, then, that my problem is due either to a different package or to some other issue with my system.

Here is an excerpt from /var/log/pacman.log from the day I first noticed the problem:

[2009-04-16 14:54] synchronizing package lists
[2009-04-16 14:54] starting full system upgrade
[2009-04-16 14:55] upgraded cracklib (2.8.13-1 -> 2.8.13-2)
[2009-04-16 14:55] upgraded hal (0.5.12git20090406.46dc48-1 -> 0.5.12git20090406.46dc48-2)
[2009-04-16 14:55] upgraded libcdio (0.81-1 -> 0.81-2)
[2009-04-16 14:55] upgraded libmysqlclient (5.1.33-1 -> 5.1.33-2)
[2009-04-16 14:55] upgraded man-pages (3.20-1 -> 3.20-2)
[2009-04-16 14:55] upgraded medit (0.9.4-5 -> 0.9.4-6)
[2009-04-16 14:55] upgraded sqlite3 (3.6.12-1 -> 3.6.13-1)
[2009-04-16 14:55] upgraded tzdata (2009e-1 -> 2009f-1)
[2009-04-16 14:55] upgraded xorg-server (1.6.0-3 -> 1.6.1-1)

It seems I did upgrade HAL that day! I am left to believe it is a problem with HAL.

I'd like to test this in some way. I'm not sure how easy it will be to retrieve the older git package. If I have time, I'll see what I can do. In the meantime, I'm open to suggestions. smile


Edit:

Aha! It seems that HAL is, indeed, the problem.

I just downgraded to hal 0.5.11-7, and my Bluetooth mouse works as expected. Here's the (correct) relevant portion of my X.Org log:

(II) config/hal: Adding input device Bluetooth Travel Mouse
(**) Bluetooth Travel Mouse: always reports core events
(**) Bluetooth Travel Mouse: Device: "/dev/input/event11"
(II) Bluetooth Travel Mouse: Found 8 mouse buttons
(II) Bluetooth Travel Mouse: Found x and y relative axes
(II) Bluetooth Travel Mouse: Found scroll wheel(s)
(II) Bluetooth Travel Mouse: Configuring as mouse
(**) Bluetooth Travel Mouse: YAxisMapping: buttons 4 and 5
(**) Bluetooth Travel Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "Bluetooth Travel Mouse" (type: MOUSE)
(**) Bluetooth Travel Mouse: (accel) keeping acceleration scheme 1
(**) Bluetooth Travel Mouse: (accel) filter chain progression: 2.00
(**) Bluetooth Travel Mouse: (accel) filter stage 0: 20.00 ms
(**) Bluetooth Travel Mouse: (accel) set acceleration profile 0
(II) config/hal: removing device Bluetooth Travel Mouse
(II) Bluetooth Travel Mouse: Close
(II) UnloadModule: "evdev"
(II) config/hal: Adding input device Bluetooth Travel Mouse
(**) Bluetooth Travel Mouse: always reports core events
(**) Bluetooth Travel Mouse: Device: "/dev/input/event11"
(II) Bluetooth Travel Mouse: Found 8 mouse buttons
(II) Bluetooth Travel Mouse: Found x and y relative axes
(II) Bluetooth Travel Mouse: Found scroll wheel(s)
(II) Bluetooth Travel Mouse: Configuring as mouse
(**) Bluetooth Travel Mouse: YAxisMapping: buttons 4 and 5
(**) Bluetooth Travel Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "Bluetooth Travel Mouse" (type: MOUSE)
(**) Bluetooth Travel Mouse: (accel) keeping acceleration scheme 1
(**) Bluetooth Travel Mouse: (accel) filter chain progression: 2.00
(**) Bluetooth Travel Mouse: (accel) filter stage 0: 20.00 ms
(**) Bluetooth Travel Mouse: (accel) set acceleration profile 0

As one can see, when the Bluetooth mouse is no longer connected, HAL "[removes the] device" -- as it should. No "No such device" errors, and the mouse reconnects properly.

Someone else, certainly, has experienced this issue. I trust that it will be corrected in a future release of HAL (perhaps the next non-git 0.5.12 to hit the Arch repos). The current hal package (0.5.12git20090406.46dc48-2) is already flagged out-of-date. smile

Last edited by ssjlegendx (2009-04-22 21:49:48)


#!/vim/rocks

Offline

#3 2009-06-07 01:51:16

ssjlegendx
Member
Registered: 2008-01-01
Posts: 94
Website

Re: [SOLVED] HAL/evdev: Bluetooth mouse device not being removed properly?

It seems that this issue has been fixed with hal 0.5.12git20090421.4fc367-2. smile


#!/vim/rocks

Offline

Board footer

Powered by FluxBB