Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Xbox 360 controls mouse in KDE
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Tatsh
Apprentice
Apprentice


Joined: 22 Jul 2007
Posts: 187

PostPosted: Sat Nov 28, 2009 8:05 pm    Post subject: Xbox 360 controls mouse in KDE Reply with quote

I plugged in my Xbox 360 controller, happy to find out that KDE 4 sees it in /dev/input/js0 and that all buttons work, except for one problem is that the left analog stick controls the mouse. I googled around, found 'solutions' here and on Ubuntu forums, etc.

lshal Info:
Code:
udi = '/org/freedesktop/Hal/devices/usb_device_45e_28e_03A3E53'
  info.linux.driver = 'usb'  (string)                         
  info.parent = '/org/freedesktop/Hal/devices/usb_device_1d6b_1_0000_00_04_0'  (string)
  info.product = 'Xbox360 Controller'  (string)
--
  input.x11_driver = 'joystick'  (string)
  input.x11_options.SendCoreEvents = 'false'  (string)
  linux.device_file = '/dev/bus/usb/004/004'  (string)
  linux.hotplug_type = 2  (0x2)  (int)               
  linux.subsystem = 'usb'  (string)                   
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.0/usb4/4-3'  (string)
  usb_device.bus_number = 4  (0x4)  (int)                                     
  usb_device.can_wake_up = true  (bool)                                       
  usb_device.configuration_value = 1  (0x1)  (int)                           
  usb_device.device_class = 255  (0xff)  (int)                               
  usb_device.device_protocol = 255  (0xff)  (int)                             
  usb_device.device_revision_bcd = 276  (0x114)  (int)                       
  usb_device.device_subclass = 255  (0xff)  (int)                             
  usb_device.is_self_powered = false  (bool)                                 
  usb_device.linux.device_number = 4  (0x4)  (int)
  usb_device.linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.0/usb4/4-3'  (string)
  usb_device.max_power = 500  (0x1f4)  (int)
  usb_device.num_configurations = 1  (0x1)  (int)
  usb_device.num_interfaces = 4  (0x4)  (int)
  usb_device.num_ports = 0  (0x0)  (int)
  usb_device.product = 'Xbox360 Controller'  (string)
--
  usb.vendor = 'Microsoft Corp.'  (string)
  usb.vendor_id = 1118  (0x45e)  (int)
  usb.version = 2.0 (2) (double)

udi = '/org/freedesktop/Hal/devices/usb_device_45e_28e_03A3E53_if3'
  info.parent = '/org/freedesktop/Hal/devices/usb_device_45e_28e_03A3E53'  (string)
  info.product = 'USB Vendor Specific Interface'  (string)
  info.subsystem = 'usb'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_45e_28e_03A3E53_if3'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'usb'  (string)
  linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:04.0/usb4/4-3/4-3:1.3'  (string)
  usb.bus_number = 4  (0x4)  (int)
  usb.can_wake_up = true  (bool)
  usb.configuration_value = 1  (0x1)  (int)
  usb.device_class = 255  (0xff)  (int)
  usb.device_protocol = 255  (0xff)  (int)
  usb.device_revision_bcd = 276  (0x114)  (int)
  usb.device_subclass = 255  (0xff)  (int)
  usb.interface.class = 255  (0xff)  (int)
  usb.interface.description = 'Xbox Security Method 3, Version 1.00, ? 2005 Microsoft Corporation. All rights reserved.'  (string)


Hacking away, I made a 99-xbox360-controller.fdi in /etc/hal/fdi/policy in order to achieve the 'joystick' driver above:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
 <device>
   <match key="usb_device.product" contains="Xbox360">
     <remove key="input.x11_driver" />
     <merge key="input.x11_driver" type="string">joystick</merge>
     <merge key="input.x11_options.SendCoreEvents" type="string">false</merge>
   </match>
 </device>
</deviceinfo>


Of course I restarted HAL and X afterwords.

I have it to set to contains because I'd like to use my guitar controller sometime too. The joystick still works, even rumble and all. Still seen in KDE settings, and etc (and it only blinks for about a minute). It still controls the mouse.

I have xpad compiled in the kernel, not as a module. I would not mind setting it to module if I can find the xpad module configuration settings (I have googled for these as well). Nothing relevant it seems. There MUST be an option to disable mouse support in xpad. Comments in the code went back and forth between whether or not it should be kept but I don't know enough about the kernel code to modify it, nor do I really want to because I try to stay up to date with arch (x86_64). Right now using 2.6.30-r5.

To me, disabling auto-detection of devices in xorg.conf does not sound like a good idea at all (this is one of the prevalent solutions). And the other solution is xboxdrv, a user-space driver that works with libusb (some propose writing an init script that launches that at boot, as it requires to root to work properly). I have tried it before and it works pretty well but I'd rather use native drivers.

I have read all of the following prior to posting:
http://gentoo-wiki.com/HOWTO_Xbox_360_controller_on_Linux
https://forums.gentoo.org/viewtopic-t-689273-highlight-xbox+360.html
https://forums.gentoo.org/viewtopic-t-791014-highlight-xbox+360.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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