button mappings wrong with logitech marble mouse

Bug #313148 reported by Timo Aaltonen
46
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

from bug 261995:

"I have a Logitech Marble Mouse. Every time I install Linux, I have to modify xorg.conf to tell X all about it.

I use a standard "InputDevice" section that has always worked before for other distributions and even for Ubuntu up until and including Hardy.

For Interpid Ibex, suddenly it no longer works.

When I run xev, it sees the four mouse buttons and reports them as 1 (larger) and 8 (smaller) on the left hand side, and 3 and 9 repsectively on the right-hand side.

I try to configure it so that button 1 is left-click, button 3 is right-click, button 9 is middle-click and while button 8 is held down the trackball acts as a scroll wheel instead of moving the mouse cursor.

======================
From my xorg.conf:

Section "InputDevice"
    Identifier "Marble Mouse"
    Driver "mouse"
    Option "CorePointer"
    Option "Name" "Logitech USB Trackball"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "Buttons" "5"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "9"
    Option "YaxisMapping" "4 5"
    #Option "XaxisMapping" "6 7"
    Option "ButtonMapping" "1 8 3 9 2"
EndSection

and later:

Section "ServerLayout"
        Identifier "Default layout"
        Screen "Default Screen"
        InputDevice "Marble Mouse"
EndSection

=======================

From $ cat /var/log/Xorg.0.log | grep Adding
(II) XINPUT: Adding extended input device "Marble Mouse" (type: MOUSE)
(II) config/hal: Adding input device Logitech USB Trackball
(II) XINPUT: Adding extended input device "Logitech USB Trackball" (type: MOUSE)
(II) config/hal: Adding input device AT Translated Set 2 keyboard
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
(II) config/hal: Adding input device Macintosh mouse button emulation
(II) XINPUT: Adding extended input device "Macintosh mouse button emulation" (type: MOUSE)

=====================

Attached file has more detail.

So what gives?

Why doesn't it work for Interpid Ibex? All I get is left-click on button 1, right-click on button 3, and the normal mouse movement. To get a middle-click, I have to depress buttons 1 and 3 together.

That might be the "Macintosh mouse button emulation" over-riding the "Marble Mouse", might it not? Should I try to blacklist something? Perhaps edev?"

Timo Aaltonen (tjaalton)
description: updated
Revision history for this message
kmoffat (kmoffat) wrote :

Is this bug related to connecting using PS/2 or USB?

Revision history for this message
Ali Afshar (aafshar) wrote :

I can reproduce using USB, and from the bug report linked above, this fix still works:

Section "ServerFlags"
    Option "AutoAddDevices" "false"
EndSection

I would guess it is related to the autodetection procedure that is ?new in Intrepid.

Revision history for this message
Bryce Harrington (bryce) wrote :

[This is an automated message]

Hi tjaalton,

Please attach the output of `lspci -vvnn`, and attach your /var/log/Xorg.0.log file from after reproducing this issue. If you've made any customizations to your /etc/X11/xorg.conf please attach that as well.

Please attach the output of `lspci -vvnn` too.

Changed in xserver-xorg-input-evdev:
status: New → Incomplete
Revision history for this message
hal2k1 (quiet1) wrote :

This bug also affects Jaunty, it is still present.

For Intrepid, there was a work-around that was discovered. One could edit the xorg.conf file, and include the following sections:

======================

Section "InputDevice"
    Identifier "Marble Mouse"
    Driver "mouse"
    Option "CorePointer"
    Option "Name" "Logitech USB Trackball"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "Buttons" "5"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "9"
    Option "YaxisMapping" "4 5"
    #Option "XaxisMapping" "6 7"
    Option "ButtonMapping" "1 8 3 9 2"
EndSection

and later:

Section "ServerFlags"
    Option "AutoAddDevices" "false"
EndSection

Section "ServerLayout"
        Identifier "Default layout"
        Screen "Default Screen"
        InputDevice "Marble Mouse"
EndSection

=======================

This work-around no longer works in Jaunty. What is worse, when one adds the "ServerFlags" section as above, X will not start at all, and one ends up with a blank screen.

Revision history for this message
irregardlessly (irregardlessly) wrote :

This is about to expire and will become a big problem for a lot of people. I am still on Hardy and can't upgrade to a version with this bug. This is a show stopper / distro switcher bug for me. If the workaround doesn't even work in Jaunty I am done for. :(

Revision history for this message
kmoffat (kmoffat) wrote :

I'm using Debian unstable and added marblemouse to the serverlayout section and added the inputdevice section as below. This allows scrolling by pressing the small left button.,

Section "ServerLayout"
        Identifier "Default Layout"
        Screen 0 "aticonfig-Screen[0]-0" 0 0
        InputDevice "Generic Keyboard"
        InputDevice "Marble Mouse"
        InputDevice "Configured Mouse"
EndSection

Section "InputDevice"
        Identifier "Marble Mouse"
        Driver "mouse"
        Option "CorePointer"
        Option "Device" "/dev/input/mice"
        Option "Protocol" "ExplorerPS/2"
        Option "Buttons" "5"
        Option "ButtonMapping" "1 8 3 6 7"
        Option "Emulate3Buttons" "true"
        Option "EmulateWheel" "true"
        Option "EmulateWheelTimeout" "200"
        Option "EmulateWheelButton" "6"
        Option "YAxisMapping" "4 5"
EndSection

Revision history for this message
kmoffat (kmoffat) wrote :

The marblemouse is connected via usb, and the regular mouse also works, since I still have the configured mouse section in xorg.conf.

Revision history for this message
techno-mole (techno-mole) wrote :

I have posted my own bug report, but thought i would post on this one as well.

I have a logitech trackman marble mouse, which up until i upgraded to jaunty worked fine, i didnt have to edit xorg.conf i followed this method - https://help.ubuntu.com/community/Logitech_Marblemouse_USB it tells you how to create a small fdi file which will make the left (small button) button act as a scroll when held done.

this method worked perfectly in intrepid (which i will most likely have to go back to if i cant get it working on jaunty) as i said this worked perfectly for me in intrepid (ubuntu, dont know if it will work in kubuntu) but no longer works in jaunty, which i need as i have carpel tunnel syndrome.

fingers crossed that a method may be found.

Revision history for this message
techno-mole (techno-mole) wrote :

(UPDATE)

i posted on the ubuntu forums regarding my issue (eg - not being able to set a button to act as a scroll button when held down) i was starting to think no one was going to reply, but last night some one did, they have a similar mouse (and issue) they gave me this command - xinput set-button-map "Logitech USB Trackball" 1 8 3 4 5 6 7 2 9

which when run in a terminal works well, but it doesnt stick, meaning when you reboot the command needs to be run again, however ive found if you add it to the start up applications it works every time, although it might not be ideal.

hope it helps.

Bryce Harrington (bryce)
Changed in xserver-xorg-input-evdev (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
kmoffat (kmoffat) wrote :

On Ubuntu 8.10, with marblemouse plugged in to USB port, I added the following file, called "/etc/hal/fdi/policy/mouse-wheel.fdi" and rebooted.

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.product" string="Logitech USB Trackball">
      <merge key="input.x11_options.Buttons" type="string">5</merge>
      <merge key="input.x11_options.ButtonMapping" type="string">1 8 3 2 9</merge>
      <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
      <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge>
      <merge key="input.x11_options.EmulateWheelTimeout" type="string">300</merge>
      <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
      <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
      <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
      <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
    </match>
  </device>
</deviceinfo>

Revision history for this message
Joel Barker (j-cimb-barker) wrote :

I'm seeing this as well. The fix from kmoffat doesn't work. (It was what I was using in Intrepid). The workaround from techno-mole is what I'm using now. (Although I'm trying to work out to set "Emulate3Buttons" from xinput...

Revision history for this message
kmoffat (kmoffat) wrote :

I went to my /etc/hal/fdi/policy/mouse-wheel.fdi file and change the ButtonMapping line to match techno-mole's and it works, at least after one reboot.

<merge key="input.x11_options.ButtonMapping" type="string">1 8 3 4 5 6 7 2 9</merge>

Revision history for this message
kmoffat (kmoffat) wrote :

Can anyone confirm my fix?

Revision history for this message
irregardlessly (irregardlessly) wrote :

I installed Ubuntu 8.10 Intrepid Ibex fresh today and tried kmoffat's amended fix. This worked for me. That is, I just created file /etc/hal/fdi/policy/mouse-wheel.fdi:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.product" string="Logitech USB Trackball">
      <merge key="input.x11_options.Buttons" type="string">5</merge>
      <merge key="input.x11_options.ButtonMapping" type="string">1 8 3 4 5 6 7 2 9</merge>
      <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
      <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge>
      <merge key="input.x11_options.EmulateWheelTimeout" type="string">300</merge>
      <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
      <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
      <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
      <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
    </match>
  </device>
</deviceinfo>

After a reboot I can scroll fine by holding down my left small mouse button.

Thanks!

Revision history for this message
irregardlessly (irregardlessly) wrote :

BTW I was using Marble Mouse via USB port. Also I can't try Jaunty 9.04 because of unrelated hardware compatibility issues I have with that version.

Revision history for this message
kmoffat (kmoffat) wrote :

This file also enables autoscrolling in firefox and thunderbird (if enabled) by clicking the small left button. Nice. Also, I can use both mice, my marble and normal mouse, at the same time.

Revision history for this message
kmoffat (kmoffat) wrote :

The last comment applies to 9.04. Not sure about other versions of Ubuntu.

Revision history for this message
Jing Xue (jingxue) wrote :

I was able to get it working in jaunty with kmoffat's fdi file, _only_ after commenting out the "AutoAddDevices" line in xorg.conf, which was inserted during distro upgrade.

Revision history for this message
irregardlessly (irregardlessly) wrote :

I verified that my xorg.conf does not have the AutoAddDevices line. Not sure why I would not have that on a fresh install of Intrepid. Is that line added automatically depending on hardware configuration or something?

Revision history for this message
kmoffat (kmoffat) wrote :

I have a 8.10 install that I upgraded to 9.04, and do not have the AutoAddDevices line. My xorg is extremely simple. Here it is without the comments at the top. As you can see I have Radeon 3200 integrated video.

Section "Monitor"
        Identifier "Configured Monitor"
EndSection

Section "Screen"
        Identifier "Default Screen"
        Monitor "Configured Monitor"
        Device "Configured Video Device"
        DefaultDepth 24
EndSection

Section "Module"
        Load "glx"
EndSection

Section "Device"
        Identifier "Configured Video Device"
        Driver "fglrx"
EndSection

Revision history for this message
Jing Xue (jingxue) wrote :

My xorg.conf in intrepid had sections to configure the marble mouse, the MS natural keyboard, and the dual-head display. And both the mouse and keyboard were commented out during the upgrade to jaunty. So it's quite possible that the upgrader would insert the AutoAddDevices line only under some hardware conditions.

Revision history for this message
Thomas Perl (thp) wrote :

I have a slightly different problem: I do not get mouse press events for the two small buttons. Did you do anything else to get things working, or do get event data when doing "cat /dev/input/mice" and pressing the small buttons on the marble mouse? I don't.

Revision history for this message
kmoffat (kmoffat) wrote :

I do get input from sudo cat /dev/input/mice. I tried the xinput set-button-map "Logitech USB Trackball" 1 8 3 4 5 6 7 2 9 command, which worked, so I decided to make the change to the mouse-wheel.fdi file to make it stick past reboot. As far as I know, that's it.

Revision history for this message
Adolfo R. Brandes (arbrandes) wrote :

I have a Logitech USB Trackball on Jaunty amd64, and none of the fixes and workarounds above (and in other bug reports) work for me. Scrolling and middle button worked fine in Hardy i386, manually configured in xorg.conf.

I can get the middle button to work, but only with xinput. Scrolling doesn't work at all, now matter what I do.

Revision history for this message
Adolfo R. Brandes (arbrandes) wrote :

Correction, creating the mouse-wheel.fdi as per kmoffat's (and other bug reports') suggestion does work (i.e., middle-button and scrolling), but only in right-handed mode. If i change the mapping as follows (so I can use it on the left), everything works except scrolling:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
        <device>
                <match key="info.product" string="Logitech USB Trackball">
                        <merge key="input.x11_options.Buttons" type="string">9</merge>
                        <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
                        <merge key="input.x11_options.EmulateWheelTimeout" type="string">300</merge>
                        <!-- Left hand -->
                        <merge key="input.x11_options.ButtonMapping" type="string">3 9 1 4 5 6 7 8 2</merge>
                        <merge key="input.x11_options.EmulateWheelButton" type="string">2</merge>
                        <!-- Right hand -->
                        <!-- <merge key="input.x11_options.ButtonMapping" type="string">1 8 3 4 5 6 7 2 9</merge> -->
                        <!-- <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge> -->
                        <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
                        <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
                        <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
                        <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
                </match>
        </device>
</deviceinfo>

Revision history for this message
Adolfo R. Brandes (arbrandes) wrote :

Alright, problem solved (and sorry about flooding the bug report). As it turns out, I was using the wrong EmulateWheelButton in left-hand mode ("2"); the correct one was "9". This was an xorg.conf configuration quirk in Hardy which seems to have been ironed out in Jaunty.

Here's the corrected /etc/hal/fdi/policy/mouse-wheel.fdi for left-handed operation:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.product" string="Logitech USB Trackball">
      <merge key="input.x11_options.Buttons" type="string">9</merge>
      <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
      <merge key="input.x11_options.EmulateWheelTimeout" type="string">300</merge>
      <!-- Left hand -->
      <merge key="input.x11_options.ButtonMapping" type="string">3 9 1 4 5 6 7 8 2</merge>
      <merge key="input.x11_options.EmulateWheelButton" type="string">9</merge>
      <!-- Right hand -->
      <!-- <merge key="input.x11_options.ButtonMapping" type="string">1 8 3 4 5 6 7 2 9</merge> -->
      <!-- <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge> -->
      <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
      <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
      <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
      <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
    </match>
  </device>
</deviceinfo>

(By the way, there's no need to restart the X server after changing this file; unplugging and plugging the device will do.)

Revision history for this message
D351 (crookedgod) wrote :

So, is there a way to make pressing the small buttons emulate rolling a scroll-wheel one notch (down for the left, up for the right), instead of having to hold to scroll?

Revision history for this message
superkiwi (eriflo) wrote :

The mouse-wheel.fdi stuff never worked for me, not with 8.x nor with 9.04. However, what I do to get scrolling with left small button working with the Marble Mouse on Ubuntu 9.04 is:

xinput set-button-map "Logitech USB Trackball" 1 8 3 4 5 6 7 2 9
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation Button" 8 8
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation" 8 1
xinput set-int-prop "Logitech USB Trackball" "Evdev Wheel Emulation X Axis" 8 6

Revision history for this message
hal2k1 (quiet1) wrote :

This one seems to have changed again for Kubuntu Karmic Alpha 4.

First the Logitech USB trackball didn't work ... but then I found one could conigure it via manual editing od xorg.conf (first post in this thread).

Then manual changes to xorg.conf no longer works, but adding a file /etc/hal/fdi/policy/mouse-wheel.fdi as described also in this thread made it work once more.

Now it seems to have broken again after I installed Kubuntu Karmic Alpha 4.

Here are some reports from the console that may shed some light on what is going on (the config/hal stuff seems to be happening BEFORE XINPUT adds the trackball device):

# cat /etc/hal/fdi/policy/mouse-wheel.fdi
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.product" string="Logitech USB Trackball">
      <merge key="input.x11_options.Buttons" type="string">5</merge>
      <merge key="input.x11_options.ButtonMapping" type="string">1 8 3 2 9</merge>
      <merge key="input.x11_options.EmulateWheel" type="string">true</merge>
      <merge key="input.x11_options.EmulateWheelButton" type="string">8</merge>
      <merge key="input.x11_options.EmulateWheelTimeout" type="string">300</merge>
      <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
      <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
      <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
      <merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
    </match>
  </device>
</deviceinfo>
#
# grep Logitech /var/log/Xorg.0.log
(II) config/hal: Adding input device Logitech USB Trackball
(**) Logitech USB Trackball: always reports core events
(**) Logitech USB Trackball: Device: "/dev/input/event4"
(II) Logitech USB Trackball: Found 5 mouse buttons
(II) Logitech USB Trackball: Found x and y relative axes
(II) Logitech USB Trackball: Configuring as mouse
(**) Logitech USB Trackball: YAxisMapping: buttons 4 and 5
(**) Logitech USB Trackball: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "Logitech USB Trackball" (type: MOUSE)
(**) Logitech USB Trackball: (accel) keeping acceleration scheme 1
(**) Logitech USB Trackball: (accel) filter chain progression: 2.00
(**) Logitech USB Trackball: (accel) filter stage 0: 20.00 ms
(**) Logitech USB Trackball: (accel) set acceleration profile 0
#

Bryce Harrington (bryce)
tags: added: hardy
Revision history for this message
Bryce Harrington (bryce) wrote :

I think this really should be handled at the kernel level, especially since we're no longer using hal for maintaining configuration info.

affects: xserver-xorg-input-evdev (Ubuntu) → linux (Ubuntu)
Revision history for this message
penalvch (penalvch) wrote :

Timo Aaltonen, thank you for reporting this and helping make Ubuntu better. Intrepid reached EOL on April 30, 2010.
Please see this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We were wondering if this is still an issue on a supported release? If so, can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command in a supported release from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux <replace-with-bug-number>

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

tags: added: intrepid needs-upstream-testing
removed: hardy
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

i don't know why this bug exists, closing :)

Changed in linux (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.