You are not logged in.

#1 2008-06-12 10:54:31

Ikarus
Member
From: Germany
Registered: 2007-07-05
Posts: 41

[SOLVED + HOWTO] xorg without hal support + evdev hotplugging

My post referes to the following bug ---> http://bugs.archlinux.org/task/8691

I configured all devices with evdev except synaptics. If i unplug my usb mouse when X is running it isnt recognized on replugging until i restart X. But as far as i know evdev should exactly handle such situations by polling the input devices. It seems that this stopped working with evdev  1.1.5 and upward. Also this isnt a big problem for desktop users but with a laptop this ?bug? is just annoying.

Has anybody else this problem or maybe a solution to fix this. Thanks in advance.

System info:
sony vaio vgn-c2z
kernel 2.6.25.4
xorg-server 1.4.0.90-13
xf86-input-evdev 1.2.0-1

udev rules for symlinking /dev/inputx nodes for evdev

BUS=="input", ATTRS{name}=="Razer Razer Diamonback Optical Mouse", NAME="input/%k", SYMLINK="razer"
BUS=="input", ATTRS{name}=="AlpsPS/2 ALPS GlidePoint", NAME="input/%k", SYMLINK="alps"
BUS=="input", ATTRS{name}=="AT Translated Set 2 keyboard", NAME="input/%k", SYMLINK="atkb"

xorg.conf

Section "ServerLayout"
    Identifier     "Simple Layout"
    Screen         "Screen 1" 0 0
    InputDevice    "Touchpad0"    "CorePointer"
    InputDevice    "Mouse0"      "SendCoreEvents"
    InputDevice    "Keyboard0"    "CoreKeyboard"
EndSection

Section "Files"
    FontPath        "/usr/share/fonts/misc"
    FontPath        "/usr/share/fonts/100dpi:unscaled"
    FontPath        "/usr/share/fonts/75dpi:unscaled"
    FontPath        "/usr/share/fonts/TTF"
    FontPath        "/usr/share/fonts/Type1"
EndSection

Section "Module"    
    Load    "dbe"
    Load    "bitmap"
    Load    "freetype"
    Load    "type1"
    Load        "glx"
    Load    "evdev"
    Load    "synaptics"    
    SubSection  "extmod"
    Option         "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection
EndSection

Section "InputDevice"
        Identifier  "Touchpad0"
    Driver  "synaptics"
    Option  "Device"   "/dev/alps"
    Option  "Protocol"   "auto-dev"
    Option  "LeftEdge"   "130"
    Option  "RightEdge"   "840"
    Option  "TopEdge"   "130"
    Option  "BottomEdge"   "640"
    Option  "FingerLow"   "30"
    Option  "FingerHigh"   "31"
    Option  "MaxTapTime"   "180"
    Option  "MaxTapMove"   "110"
    Option  "EmulateMidButtonTime"   "75"
    Option  "VertScrollDelta"   "20"
    Option  "HorizScrollDelta"   "20"
    Option  "MinSpeed"   "0.70"
    Option  "MaxSpeed"   "1.10"
    Option  "AccelFactor"   "0.010"
    Option  "EdgeMotionMinSpeed"   "200"
    Option  "EdgeMotionMaxSpeed"   "200"
    Option  "UpDownScrolling"   "1"
    Option  "CircularScrolling"   "1"
    Option  "CircScrollDelta"   "0.1"
    Option  "CircScrollTrigger"   "2"
    Option  "SHMConfig"   "on"
    Option  "Emulate3Buttons"   "on"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
    Driver  "evdev"
    Option  "Device"     "/dev/atkb"
    Option  "XkbLayout"  "de"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
    Driver  "evdev"
        Option      "evBits"        "+1-2"
        Option      "keyBits"       "~272-287"
        Option      "relBits"       "~0-2 ~6 ~8"
        Option      "Pass"          "3"    
    Option  "Device"    "/dev/razer"
EndSection

Section "Monitor"
    Identifier     "TFT"
    HorizSync       31.5 - 64.3
    VertRefresh     50.0 - 70.0
EndSection

Section "Device"
    Identifier     "NV7400GO"
    Driver         "nvidia"
EndSection

Section "Screen"
    Identifier     "Screen 1"
    Device         "NV7400GO"
    Monitor        "TFT"
    DefaultDepth    24
    Option         "NoLogo" "True"
    Option         "AllowGLXWithComposite" "True"
    Option         "AddARGBGLXVisuals" "True"
    SubSection     "Display"
        Viewport    0 0
        Depth       8
        Modes      "1280x800"
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       16
        Modes      "1280x800"
    EndSubSection
    SubSection     "Display"
        Viewport    0 0
        Depth       24
        Modes      "1280x800"
    EndSubSection
EndSection

Section "Extensions"
    Option         "Composite" "Enable"
EndSection

Last edited by Ikarus (2008-06-12 14:16:47)

Offline

#2 2008-06-12 11:13:40

RobbeR49
Member
From: Columbus, OH
Registered: 2006-01-17
Posts: 177

Re: [SOLVED + HOWTO] xorg without hal support + evdev hotplugging

I think the title of your post kind of sums up the problem, evdev is now designed to exclusively use hal for all of it's auto-detection. I'm pretty sure any of the auto-detection that it used to do was taken out of the driver so without hal you're pretty much out of luck at the moment.

Offline

#3 2008-06-12 11:37:36

Ikarus
Member
From: Germany
Registered: 2007-07-05
Posts: 41

Re: [SOLVED + HOWTO] xorg without hal support + evdev hotplugging

RobbeR49 wrote:

I think the title of your post kind of sums up the problem, evdev is now designed to exclusively use hal for all of it's auto-detection. I'm pretty sure any of the auto-detection that it used to do was taken out of the driver so without hal you're pretty much out of luck at the moment.

I'am using HAL, in my system. Just xorg-server is compiled without hal support (as in the standard arch package too) why is described here ---> http://archlinux.org/pipermail/arch-dev … 05248.html. I wrote this in the title because there are many threads about activating hotplugging with ENABLED hal support in X. I already compiled a xorg package with hal support but that freezes my system randomly.

Offline

#4 2008-06-12 14:14:40

Ikarus
Member
From: Germany
Registered: 2007-07-05
Posts: 41

Re: [SOLVED + HOWTO] xorg without hal support + evdev hotplugging

[UPDATE] The last howto was in a very bad state it should now be much easier to understand tongue

At least i got the solution. Just reverte xf86-input-evdev 1.2.0 back to 1.1.5 and input hotplugging just works again without building an xserver with hal enabled like described in
http://wiki.archlinux.org/index.php/Xor … otplugging.

---

Get the PKGBUILD from ABS extra/xf86-input-evdev/PKGBUILD and change the pkgver to 1.1.5 and run makepkg. Remove current evdev package and install the new one.

Now we have to obtain the values for the devices we want to use in our xorg.conf for evdev

$ cat /proc/bus/input/devices

.......

I: Bus=0003 Vendor=1532 Product=0001 Version=0110
N: Name="Razer Razer Diamonback Optical Mouse" # copy this value
P: Phys=usb-0000:00:1d.0-1/input0
S: Sysfs=/class/input/input13
U: Uniq=
H: Handlers=mouse4 event10
B: EV=17
B: KEY=7f0000 0 0 0 0 0 0 0 0
B: REL=103
B: MSC=10

.......

Now we change some values in xorg.conf

Section "InputDevice"
        Identifier  "Mouse0"
    Driver  "evdev"    
    Option  "Name"    "Razer Razer Diamonback Optical Mouse"  # insert the value we just copied
EndSection

If everything went fine you should see something like this in your /var/log/Xorg.0.log file when pluging and unplugging your mouse.

(EE) Read error: No such device (19, -1 != 16)  <---------- unplugged
(II) Mouse0-usb-0000:00:1d.0-1/input0: Off
(II) evdev brain: Rescanning devices (4).
(II) evdev brain: Rescanning devices (5).
(II) Mouse0-usb-0000:00:1d.0-1/input0: On <---------- plugged 
(II) evdev brain: Rescanning devices (6).

Last edited by Ikarus (2008-06-18 14:51:42)

Offline

#5 2009-12-05 01:04:00

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,018
Website

Re: [SOLVED + HOWTO] xorg without hal support + evdev hotplugging

I hate to necro a thread, but this last post just saved my butt and I think it's going to be relevant fairly soon.

Offline

Board footer

Powered by FluxBB