Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
evdev/mouse drivers, HAL, and xorg-server-1.5
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
incripshin
n00b
n00b


Joined: 07 Oct 2005
Posts: 53
Location: Seattle, WA, US

PostPosted: Sat Sep 06, 2008 6:17 pm    Post subject: evdev/mouse drivers, HAL, and xorg-server-1.5 Reply with quote

I'm trying to get my mouse working with HAL and the new xorg-server-1.5. I could just put my configuration into /etc/X11/xorg.conf, but I'm trying to achieve the holy grail of hot-plugging my mouse. This is the closest thing I have to being usable with HAL:

/etc/hal/fdi/policy/10-razer.fdi:[/code]
Code:
<?xml version='1.0' encoding='UTF-8'?>
<!-- vim: set sw=2 sts=2 et: -->
<deviceinfo version='0.2'>
  <device>
    <match key='info.capabilities' contains='input.mouse'>
      <match key='info.product' string='Razer Razer 1600dpi Mouse'>
        <merge key='input.x11_driver'                 type='string'>evdev</merge>
        <merge key='input.x11_options.Resolution'     type='string'>1600</merge>
        <merge key='input.x11_options.Buttons'        type='string'>9</merge>
        <merge key='input.x11_options.Protocol'       type='string'>ExplorerPS/2</merge>
        <merge key='input.x11_options.ZAxisMapping'   type='string'>4 5</merge>
        <merge key='input.x11_options.ButtonMapping'  type='string'>1 2 3 6 7 4 5 8 9</merge>
        <merge key='input.x11_options.Sensitivity'    type='string'>0.5</merge>
      </match>
    </match>
  </device>
</deviceinfo>


$ lshal
Code:
...

udi = '/org/freedesktop/Hal/devices/usb_device_1532_1_noserial_if0_logicaldev_input'
  info.capabilities = {'input', 'input.mouse'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_1532_1_noserial_if0'  (string)
  info.product = 'Razer Razer 1600dpi Mouse'  (string)
  info.subsystem = 'input'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_1532_1_noserial_if0_logicaldev_input'  (string)
  input.device = '/dev/input/event11'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/usb_device_1532_1_noserial_if0'  (string)
  input.product = 'Razer Razer 1600dpi Mouse'  (string)
  input.x11_driver = 'evdev'  (string)
  input.x11_options.ButtonMapping = '1 2 3 6 7 4 5 8 9'  (string)
  input.x11_options.Buttons = '9'  (string)
  input.x11_options.Protocol = 'ExplorerPS/2'  (string)
  input.x11_options.Resolution = '1600'  (string)
  input.x11_options.Sensitivity = '0.5'  (string)
  input.x11_options.ZAxisMapping = '4 5'  (string)
  linux.device_file = '/dev/input/event11'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input14/event11'  (string)

...


Unfortunately, evdev does not support (hardly) any of the features of the 'mouse' driver. According to evdev(4), it supports only 'Emulate3Buttons' and 'Emulate3Timeout'. Yet, evdev does support keyboard options like 'XkbModel', but this isn't indicated anywhere in the manual. So this leads me to the question: is there any way to pass options like 'ZAxisMapping' to the evdev driver?

Assuming there's no way to get evdev to do what I want, I tried changing the driver for my mouse to 'mouse'. This is even worse, because starting X, the mouse jumps around the screen and clicks randomly. It's as if it is using the wrong device. Does the 'mouse' driver require a /dev/input/mouseX device, and not a /dev/input/eventX device? I seem to remember seeing examples of using the 'mouse' driver with HAL

Since all else has failed, I resorted to setting the HAL device to 'bogus' and re-enabling my old mouse configuration in /etc/X11/xorg.conf with the 'mouse' driver. So in summary:

1) Can I pass advanced mouse options to evdev somehow?
2) Will the 'mouse' driver not work with HAL?
3) Any other ideas?

Also, here are the versions I am running:
sys-apps/hal-0.5.11-r1 (-r2 available and unstable, but shouldn't fix anything according to its ChangeLog)
x11-base/xorg-server-1.5.0
x11-drivers/xf86-input-evdev-2.0.4
x11-drivers/xf86-input-mouse-1.3.0
Back to top
View user's profile Send private message
incripshin
n00b
n00b


Joined: 07 Oct 2005
Posts: 53
Location: Seattle, WA, US

PostPosted: Sat Sep 06, 2008 8:25 pm    Post subject: Reply with quote

I don't think this is advised, but I have a solution. I set the driver to 'mouse' and the value of 'input.device' to '/dev/input/by-id/usb-Razer_Razer_1600dpi_Mouse-mouse', which is a symlink to one of the /dev/input/mouseX devices. I hope I have been good entertainment for somebody.
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Tue Dec 16, 2008 9:03 am    Post subject: Reply with quote

incripshin wrote:
I don't think this is advised, but I have a solution. I set the driver to 'mouse' and the value of 'input.device' to '/dev/input/by-id/usb-Razer_Razer_1600dpi_Mouse-mouse', which is a symlink to one of the /dev/input/mouseX devices. I hope I have been good entertainment for somebody.


Hello,
Did you set value of 'input.device' in the /etc//hal/policy/bla.fdi file or in some other place ? :roll:
Thank you !
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
incripshin
n00b
n00b


Joined: 07 Oct 2005
Posts: 53
Location: Seattle, WA, US

PostPosted: Tue Dec 16, 2008 4:47 pm    Post subject: Reply with quote

It looks like I even wrote myself a very helpful comment :).

/etc/hal/fdi/policy/10-razer.fdi
Code:
<?xml version='1.0' encoding='UTF-8'?>
<!-- vim: set sw=2 sts=2 et: -->
<deviceinfo version='0.2'>
  <device>
    <match key='info.capabilities' contains='input.mouse'>
      <match key='info.product' string='Razer Razer 1600dpi Mouse'>
        <!--
          This must remain set to 'mouse' and not 'evdev' until evdev starts
          supporting the higher-order options like 'Sensitivity' and
          'ButtonMapping'.  When evdev comes around to this, the
          'input.device' value should not be set anymore.
        -->
        <merge key='input.x11_driver' type='string'>mouse</merge>
        <merge key='input.device' type='string'>/dev/input/by-id/usb-Razer_Razer_1600dpi_Mouse-mouse</merge>
        <merge key='input.x11_options.Resolution' type='string'>1600</merge>
        <merge key='input.x11_options.Buttons' type='string'>9</merge>
        <merge key='input.x11_options.Protocol' type='string'>ExplorerPS/2</merge>
        <merge key='input.x11_options.ZAxisMapping' type='string'>4 5</merge>
        <merge key='input.x11_options.ButtonMapping' type='string'>1 2 3 6 7 4 5 8 9</merge>
        <merge key='input.x11_options.Sensitivity' type='string'>0.5</merge>
      </match>
    </match>
  </device>
</deviceinfo>
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1139
Location: Sofia/Bulgaria

PostPosted: Tue Dec 16, 2008 6:38 pm    Post subject: Reply with quote

Thank you :mrgreen:

EDIT: I got my mouse working again as it should *HUGS* incripshin
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum