You are not logged in.

#1 2008-02-22 04:47:48

onesandzeros
Member
Registered: 2005-09-16
Posts: 41

xorg.conf, evdev, logitech g5

I'm having trouble combining my logitech g5 (2nd version with 2 thumb buttons) and evdev.

Based on some things I've read around the net, I'm under the impression that I can get the buttons (total of 9) to work using evdev as the driver.  I have the kernel module loaded and the package (version 1.2.0) is installed.  If anyone could take a look at my xorg.conf, I'd appreciate.

Section "Module"
    Load    "dbe"
    Load    "speedo"
    Load    "freetype"
    #Load    "xtt"
    Load    "glx"
    Load    "record"
    Load    "extmod"
    Load    "xtrap"
    Load    "wfb"
    Load    "bitmap"
EndSection
# **********************************************************************
Section "Files"
    RgbPath        "/usr/share/X11/rgb"
    ModulePath    "/usr/lib/xorg/modules"
    FontPath    "/usr/share/fonts/misc:unscaled"
    FontPath    "/usr/share/fonts/Type1"
    FontPath    "/usr/share/fonts/TTF"
    FontPath    "/usr/share/fonts/75dpi:unscaled"
    FontPath    "/usr/share/fonts/100dpi:unscaled"
    FontPath    "/usr/share/fonts/util"
    FontPath    "/usr/share/fonts/local"
    FontPath    "/usr/local/share/fonts"
EndSection
# **********************************************************************
Section "InputDevice"
    Identifier    "Keyboard0"
    Driver        "evdev"
#    Option        "evBits"    "+1"
#    Option        "keyBits"    "~1-255 ~352-511"
#    Option        "Pass"        "3"
    Option        "Device"    "/dev/input/event2"
    Option        "CoreKeyboard"
EndSection
# **********************************************************************
Section "InputDevice"
    Identifier    "Keyboard1"
    Driver        "evdev"
#    Option        "evBits"    "+1"
#    Option        "keyBits"    "~1-255 ~352-511"
#    Option        "Pass"        "3"
    Option        "Device"    "/dev/input/event3"
#    Option        "CoreKeyboard"
EndSection
# **********************************************************************
Section "InputDevice"
    Identifier    "Mouse0"
    Driver        "evdev"
#    Option        "HWHEELRelativeAxisButtons"    "7 6"
#    Option        "HWHEELRelativeAxisButtons"    "9 8"
#    Option        "evBits"    "+1-2"
#    Option        "keyBits"    "~272-287"
#    Option        "relBits"    "~0-2 ~6 ~8"
#    Option        "Pass"        "3"
#    Option        "Name"        "Logitech USB Gaming Mouse"
    Option        "Device"    "/dev/input/event1"
    Option        "CorePointer"
    Option        "Buttons"    "9"
EndSection
# **********************************************************************
Section "Monitor"
    Identifier    "CPD-G410"
    HorizSync    30-107
    VertRefresh    48-120
EndSection
# **********************************************************************
Section "Device"
    Identifier    "Standard VGA"
    VendorName    "Unknown"
    BoardName    "Unknown"
    Driver        "vga"
EndSection
# **********************************************************************
Section "Device"
    #Option        "FlatPanel"    # [<bool>]
    #Option        "FPDither"    # [<bool>]
    #Option        "CrtcNumber"    # <i>
    #Option        "FPScale"    # [<bool>]
    #Option        "FPTweak"    # <i>
    Identifier    "Card0"
    Driver        "nvidia"
    VendorName    "nVidia Corporation"
    BoardName    "GeForce 7600GS"
    Card        "NVIDIA GeForce"
    BusID        "PCI:1:0:0"
    VideoRam    262144
    Option        "RenderAccel"        "true"
    Option         "AllowGLXWithComposite"    "true"
    Option        "AddARGBGLXVisuals"    "true"
    Option        "NvAGP"        "1"
    Option        "NoLogo"    "1"
    #Option        "ConnectedMonitor"    "DFP"
    Option        "UseEdidDpi"    "true"
    #Option        "DPI"        "96 x 96"
    #Option        "DPMS"        "false"
    #Option        "UseEvents"    "false"
EndSection
# **********************************************************************
Section "Screen"
    Identifier    "Screen0"
    Device        "Card0"
    Monitor        "CPD-G410"
    DefaultDepth 24

    Subsection "Display"
        Depth    24
        Modes    "1600x1200" "1024x768" "800x600"
        ViewPort    0 0
    EndSubsection
EndSection
# **********************************************************************
Section "ServerLayout"
    Identifier    "Simple Layout"
    Screen        "Screen0"
    InputDevice    "Mouse0"
    InputDevice    "Keyboard0"
    InputDevice    "Keyboard1"
EndSection
# **********************************************************************

Keyboard0 is my full keyboard, Keyboard1 is a CyberSnipa gaming keyboard, and Mouse0 is the g5.  In all 3 cases, I believe the Option/Device lines are necessary (http://wiki.archlinux.org/index.php/Get_All_Mouse_Buttons_Working confirms this).  Based on the evdev manpage and some forum posts (arch and gentoo) I've seen, I expected something very simple to work:

Section "InputDevice"
    Identifier  "G5"
    Driver      "evdev"
    Option      "Name"  "Logitech USB Gaming Mouse"
    Option "HWHEELRelativeAxisButtons" "7 6"
EndSection

It doesn't.  The two thumb buttons and scroll tilt do nothing.  Adding Option/CorePointer makes the mouse completely nonfunctional, and CoreKeyboard makes the keyboard the same, unless the Option/Device line is there, then it works.  But I've still got dead buttons.  Do I need anything beyond the evdev module loaded?  I've also got psmouse, hid, and usbhid.  My goal is to combine this with mousewheel.horizscroll.withnokey.action -> 1 and mousewheel.horizscroll.withnokey.numlines -> 1 in Firefox (courtesy of http://forums.gentoo.org/viewtopic-p-42 … ml#4228484 ) to have scrolling via l/r tilt.  I don't need scrolling in other apps.  I see only one WW line in the X log, related to acpi, and no EE lines.

If any of you have a logitech g5, particularly the newer version, working with your arch install, I'd appreciate hearing about it.

Thanks!

Offline

#2 2008-02-22 05:10:36

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: xorg.conf, evdev, logitech g5

First: I don't have the mouse you do. But my experience is that without the Option Device "..." line, the evdev driver doesn't even load. Check your /var/log/Xorg.0.log for lines containing 'UnloadModule "evdev"'.

Offline

#3 2008-02-22 10:09:49

signor_rossi
Member
Registered: 2007-08-24
Posts: 257

Re: xorg.conf, evdev, logitech g5

Section "InputDevice"
       Identifier  "Mouse0"
       Driver      "evdev"
       Option      "Device" "/dev/input/by-id/usb-PATEN_USB_HID_Device-event-mouse"
       Option      "evBits" "+1-2"
       Option      "keyBits" "~272-287"
       Option      "relBits" "~0-2 ~6 ~8"
       Option      "Pass" "3"
       Option      "SendCoreEvents" "true"
EndSection

Used this for a similiar Labtec mouse for a while and with that I didn't need any further configuration in opera e.g.. The Device option looks as it does because so it doesn't matter in which USB port I plug my mouse, found instructions how to do that on this thread, 23rd post:
http://bbs.archlinux.org/viewtopic.php?id=39981
If you don't want to follow probably there is also the 'by-path' method (not tested y myself). Do 'ls /dev/input/by-path/' and pick the line for your mouse and use that as device.
ATM I even don't use a mouse in my ServerLayout, the mouse does work nevertheless and the extra buttons produce events (tested with xev), but they are not recognized by opera now. Haven't investigated yet how to remedy tat.

Bye, signor_rossi.

EDIT: Probably better use 'SendCoreEvents' instead of 'CorePointer' for mouse and touchpad in the ServerLayout section.

Last edited by signor_rossi (2008-02-22 10:12:39)

Offline

#4 2008-02-23 18:27:40

onesandzeros
Member
Registered: 2005-09-16
Posts: 41

Re: xorg.conf, evdev, logitech g5

Thanks for the help guys.  All button events are being reported.  They're not doing anything in Firefox yet, but through xev, I can see that they're all coming in.  Thanks again!

Offline

Board footer

Powered by FluxBB