You are not logged in.

#1 2007-12-08 08:25:37

sven
Member
Registered: 2005-02-01
Posts: 311

SOLVED When using evdev driver, mouse event device swapped on reboot

I am having a problem with Xorǵ - on reboot the device the mouse is on changes from event2 to event4. This happens on almost every reboot. I have to log in as root and manually change the device at xorg.conf.

Last edited by sven (2007-12-08 19:17:14)

Offline

#2 2007-12-08 09:00:29

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: SOLVED When using evdev driver, mouse event device swapped on reboot

Write a udev rule to add a symlink with a meaningful name, and refer to *that* in xorg.conf

udevinfo -a --name /dev/input/event2

E.g. in /etc/udev/rules.d/91-local.rules

SUBSYSTEMS=="input", ATTRS{name}=="Razer Razer Copperhead Laser Mouse", SYMLINK+="input/copperhead"

Offline

#3 2007-12-08 19:16:48

sven
Member
Registered: 2005-02-01
Posts: 311

Re: SOLVED When using evdev driver, mouse event device swapped on reboot

Thanks for the tip! I'll search more information about udev.

Offline

#4 2007-12-08 22:12:06

kanpio
Member
From: Poland/Wrocław
Registered: 2006-01-25
Posts: 49

Re: SOLVED When using evdev driver, mouse event device swapped on reboot

I had the same problem with my A4Tech mouse and I wrote a script that you can move to /etc/rc.d and add it to deamon array in rc.conf. Than you have to change device name in xorg.conf to /dev/input/event10. You can olso use brebs tip.

/etc/rc.d/event:

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Creating Event Input Links"
    if [ -e /dev/input/event10 ]; then
      echo "Event Input already exists in your system."
      stat_fail
    else
        event=`grep -A 5 A4Tech /proc/bus/input/devices |grep -o event.`
        ln /dev/input/$event /dev/input/event10
                if [ -e /dev/input/event10 ]; then
                        stat_done
                else
                        stat_fail
                fi
    fi
    ;;
  stop)
    stat_busy "Removing Event Input Links"
    if [ -e /dev/input/event10 ]; then
        rm /dev/input/event10
        if [ -e /dev/input/event10 ]; then
              stat_fail
      else
         stat_done
        fi
    else
        stat_fail
        echo "Event Input does not exist."
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
    ;;
esac

Offline

#5 2007-12-13 19:43:13

sven
Member
Registered: 2005-02-01
Posts: 311

Re: SOLVED When using evdev driver, mouse event device swapped on reboot

Thanks, kanpio! Your script looks neat, I'll test it.

Offline

#6 2007-12-13 21:07:57

spotman
Member
From: BatCountry, BRC
Registered: 2007-02-17
Posts: 8
Website

Re: SOLVED When using evdev driver, mouse event device swapped on reboot

Fwiw -

I also experienced this problem and solved it by writing my xorg.conf section like this:

Section "InputDevice"
        Identifier     "Evdev Mouse"
        Driver         "evdev"
        Option         "name" "Microsoft Microsoft 5-Button Mouse with IntelliEye(TM)"
        Option     "CorePointer"
        Option      "Device" "/dev/input/by-path/pci-0000:00:1d.3-usb-0:1:1.0-event-mouse"
        Option          "SendCoreEvents" "true"
EndSection

pros of this method:
-works with default archlinux udev rules

cons of this method:
-will survive a reboot, but not a usb port change

Offline

#7 2008-03-08 08:37:05

sven
Member
Registered: 2005-02-01
Posts: 311

Re: SOLVED When using evdev driver, mouse event device swapped on reboot

I am having a new kind of problem, related to this: on reboot, Arch does not recognize the usb mouse at all. I need to unplug the mouse and replug it in in order to make it appear either as event2 or event4. I wonder if something is still missing in udev rules..

Last edited by sven (2008-03-08 08:37:23)

Offline

#8 2008-03-08 16:44:47

BC
Member
Registered: 2008-01-29
Posts: 83

Re: SOLVED When using evdev driver, mouse event device swapped on reboot

Instead of using evdev, you could try btnx (it's in aur).  However, if you insist on using evdev you shouldn't use the Option Device line because the event number changes between boots.  In fact, the evdev man page recommends against using this method.

Check out the Gentoo Wiki and try methods 2 or 3.

Offline

#9 2008-03-12 19:05:23

sven
Member
Registered: 2005-02-01
Posts: 311

Re: SOLVED When using evdev driver, mouse event device swapped on reboot

Thanks for tips!

Offline

Board footer

Powered by FluxBB