Joysticks/joypads/etc information needed for Ubuntu 8.10 Intrepid Ibex and later

Loïc Martin loic.martin3 at gmail.com
Tue Oct 21 11:52:38 UTC 2008


Timo Aaltonen wrote:
> On Mon, 20 Oct 2008, Loïc Martin wrote:
>
>> Hi,
>>
>> Stating with Ubuntu 8.10 Intrepid Ibex and due to changes in Xorg, each
>> model of joystick needs a special file to be recognised properly. For
>> the moment 8.10 doesn't ship with these files, and thus your joystick
>> shouldn't be working anymore (instead, it should move the mouse cursor,
>> sometimes preventing the use of the mouse until you unplug the 
>> joystick).
>
> No, we don't need that. 
I'll quote you:

https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/274203/comments/24
https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/274203/comments/28
https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/274203/comments/44

Now it appears to have changed:
https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/274203/comments/73
https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/274203/comments/78

However, you still advise users 
(https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/274203/comments/78) 

> Like I said, just put a file like this in /etc/hal/fdi/policy and you 
> should be able to use the joystick in games like before:
> ---
> <?xml version="1.0" encoding=
>
> "ISO-8859-1"?>
> <deviceinfo version="0.2">
>   <device>
>     <match key="info.product" contains="PRODUCT ID OF YOUR JOYSTICK">
>       <merge key="input.x11_driver" type="string"></merge>
>     </match>
>   </device>
> </deviceinfo>
> ---
>
> and replace the PRODUCT.. stuff with the name of the device, use lshal 
> or lsinput to find it out. Note that the x11_driver is empty. It means 
> that evdev (or any other driver for that matter) will not use the device.
>
Which means we (the community) still need the lshal information if we 
want to write specific fdi files for users' joysticks (I hope neither 
you nor Martin were expecting normal users to hack their fdi file 
themselves, when most wouldn't be able to do so) so they can just 
download them and copy them in /etc/hal/fdi/policy/

On the contrary, Martin just wrote:
> The current model specific .fdi file in xserver-xorg-input-joystick is
> really just a quick hack, but we shouldn't really go down that route.
>   
Can somebody please explain what we expect Intrepid users to do in order 
to make their joysticks work?

Oh, and by the way simply creating an fdi file according to your advice 
(quoted above) don't work for all 5 joysticks I tested. If I edit the 
custom fdi file for the Dual Shock 3 (a fdi file that worked perfectly 
for this pad) to make it similar to your excerpt, or if I edit the 
-joystick fdi file, none of those will work. More information is needed 
actually ;)

First,       <merge key="input.x11_driver" type="string"></merge> needs 
to be <merge key="input.x11_driver" type="string">joystick</merge> 
(that's in the fdi file provided by the -joystick driver). However, even 
there it wouldn't work. For the Dual Shock 3, you need to add
        <merge key="input.x11_options.MapButton1" 
type="string">button=1</merge>
        <merge key="input.x11_options.MapButton2" 
type="string">button=2</merge>
        <merge key="input.x11_options.MapButton3" 
type="string">button=3</merge>
        <merge key="input.x11_options.MapAxis1" 
type="string">mode=relative axis=+1x deadzone=5000</merge>
        <merge key="input.x11_options.MapAxis2" 
type="string">mode=relative axis=+1y deadzone=5000</merge>
        <merge key="input.x11_options.MapAxis3" 
type="string">mode=relative axis=+1zx deadzone=5000</merge>
        <merge key="input.x11_options.MapAxis4" 
type="string">mode=relative axis=+1zy deadzone=5000</merge>
        <merge key="input.x11_options.MapAxis5" 
type="string">mode=accelerated axis=+1x deadzone=5000</merge>
        <merge key="input.x11_options.MapAxis6" 
type="string">mode=accelerated axis=+1y deadzone=5000</merge>

And for the Logitech DualActionGamepad, according to another user 
(https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-input-evdev/+bug/274203/comments/83), 
you need those:

        <merge key="input.x11_options.MapButton1" 
type="string">button=1</merge>
        <merge key="input.x11_options.MapButton2" 
type="string">button=2</merge>
        <merge key="input.x11_options.MapButton3" 
type="string">button=3</merge>
        <merge key="input.x11_options.MapButton4" 
type="string">button=4</merge>
        <merge key="input.x11_options.MapButton5" 
type="string">button=5</merge>
        <merge key="input.x11_options.MapButton6" 
type="string">button=6</merge>
        <merge key="input.x11_options.MapButton7" 
type="string">button=7</merge>
        <merge key="input.x11_options.MapButton8" 
type="string">button=8</merge>
        <merge key="input.x11_options.MapButton9" 
type="string">button=9</merge>
        <merge key="input.x11_options.MapButton10" 
type="string">button=10</merge>
        <merge key="input.x11_options.MapButton11" 
type="string">button=11</merge>
        <merge key="input.x11_options.MapButton12" 
type="string">button=12</merge>

Even for all-digital gamepads you'd need to add the relevant lines. 
That's not something most users can do. Instead, 
https://help.ubuntu.com/community/Joystick_lshal_outputs_done can list 
the fdi files (unless, heresy! they could ship in a backport or an 
update, or hal be fixed&updated)

However, if somebody can point an easier way to find the lines to add 
than trial and error, please go ahead.

Cheers,
Loïc




More information about the Ubuntu-devel-discuss mailing list