xf86-input-evdev: Changes to 'master'

Peter Hutterer peter at cs.unisa.edu.au
Mon May 5 16:45:40 PDT 2008

On 03/05/2008, at 7:51 PM, Daniel Stone wrote:
> On Thu, May 01, 2008 at 06:50:21PM -0700, Peter Hutterer wrote:
>>    Don't allow relative and absolute axes on the same device.
>>    This is a bit of a mess. The MS Optical Desktop 2000 registers  
>> both relative
>>    and absolute axes on the same device (the mouse). The absolute  
>> axes have a
>>    valid min/max range for x/y and thus overwrite the x/y relative  
>> axes in the
>>    server (no, this is not a server bug). And I wouldn't be  
>> surprised if other
>>    devices have similar issues.
>>    Since the device only sends relative events after that, the  
>> mouse is
>>    essentially restricted to the min..max range of 0..255. The  
>> server simply
>>    doesn't do unrestricted relative axis and restricted absolute  
>> axis on the same
>>    device (not for the same axis numbers anyway).
> Er, shouldn't this be a kernel quirk? I can actually see some usecases
> where this would make sense (the SpaceNavigator in particular).

> Cheers,
> Daniel ('kernel quirk, kernel quirk, no, don't put that in evdev')

it's a combination problem of the current evdev code and the server  
logics. evdev simply overwrites the relative axis with the absolute  
ones if they were found (btw. IIRC this is a memory leak).

then, if you tell the server you have an unrestricted axis, you can't  
have a limited axis on the same axis number. you just can't. the  
server will apply the limit to any event on this axis (especially  
since it didn't know which channel it came from in the device).

you could work around that by automatically mapping absolute x/y axes  
to higher axis numbers when relative have been found previously. This  
would be the correct fix, and I'll happily review patches regarding  
this fix.

it opens you up to the whole "where do I map it to?", and you start  
needing user configuration of which axis reflects what. e.g. do I map  
ABS_X (kernel device) to axis 3? does that make sense?
but one step at a time, a suboptimal solution is better than none, so  
everybody start coding and send in patches.

for now, I persist that with the current evdev code, if you find  
relative axis, you must not overwrite them with absolute axes.

   Peter ('make my mouse work again. make my mouse work again. I don't  
care how')

More information about the xorg mailing list