View previous topic :: View next topic |
Author |
Message |
Xywa Veteran
Joined: 23 Jul 2005 Posts: 1631 Location: /mnt/Gentoo/Europe
|
Posted: Mon Jan 05, 2015 5:28 pm Post subject: [SOLVED] Gentoo & joystick with modern games (2015) |
|
|
Hi,
I just bought a new joystick GEMBIRD JSK-420. I could not find any manual for Gentoo, only this one (7 years old):
http://www.gentoo-wiki.info/Joystick
I have (I think) everything in kernel + analog module.
I have:
Code: | * games-util/joystick
Latest version available: 1.4.7
Latest version installed: 1.4.7
Size of files: 42 KiB
Homepage: http://sourceforge.net/projects/linuxconsole/ http://atrey.karlin.mff.cuni.cz/~vojtech/input/
Description: joystick testing utilities
License: GPL-2
|
Code: | * x11-drivers/xf86-input-joystick
Latest version available: 1.6.2
Latest version installed: 1.6.2
Size of files: 320 KiB
Homepage: http://xorg.freedesktop.org/
Description: X.Org driver for joystick input devices
License: MIT
|
Code: | # lsusb
Bus 003 Device 004: ID 12bd:a02f |
Code: | # lsmod
Module Size Used by
nvidia 8376010 68
bbswitch 4544 0
analog 7646 0
gameport 7377 1 analog
ath9k_htc 52259 0
ath9k_common 13106 1 ath9k_htc
ath9k_hw 386939 2 ath9k_common,ath9k_htc
ath 18875 3 ath9k_common,ath9k_htc,ath9k_hw
iwldvm 120468 0
r8169 68268 0
rtsx_pci 26663 0
x86_pkg_temp_thermal 4567 0
mfd_core 3193 1 rtsx_pci
iwlwifi 81003 1 iwldvm
mii 3875 1 r8169 |
But, when I start joystick software I have similar message like here:
http://i.stack.imgur.com/ClR8e.png
Thanks for any ideas how to run joystick with Gentoo.
Last edited by Xywa on Fri Jan 09, 2015 5:19 am; edited 2 times in total |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Mon Jan 05, 2015 8:14 pm Post subject: |
|
|
Did you compile in the input layer kernel options for the joystick CONFIG_INPUT_JOYDEV, CONFIG_INPUT_JOYSTICK, and appropriate input driver? _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Xywa Veteran
Joined: 23 Jul 2005 Posts: 1631 Location: /mnt/Gentoo/Europe
|
Posted: Mon Jan 05, 2015 9:59 pm Post subject: |
|
|
eccerr0r wrote: | Did you compile in the input layer kernel options for the joystick CONFIG_INPUT_JOYDEV, CONFIG_INPUT_JOYSTICK, and appropriate input driver? |
I forgot abut joydev - everything works fine now, so nearly [SOLVED]
My last question - should I use x11-drivers/xf86-input-joystick or maybe x11-drivers/xf86-input-evdev?
After installing I had some strange issues - I couldn't start X, so after some probes reinstalling driver for Intel and then reinstalling x11-drivers/xf86-input-evdev for keyboard and mouse to work helped.
I did install x11-drivers/xf86-input-joystick, as I thought is important, but it was about joydev. |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Mon Jan 05, 2015 10:35 pm Post subject: |
|
|
You should only need evdev. Joystick is if you don't use the INPUT layer and make it access the hardware directly. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Xywa Veteran
Joined: 23 Jul 2005 Posts: 1631 Location: /mnt/Gentoo/Europe
|
Posted: Tue Jan 06, 2015 9:26 am Post subject: |
|
|
eccerr0r wrote: | You should only need evdev. Joystick is if you don't use the INPUT layer and make it access the hardware directly. |
Many thanks. It works.
The next question - why it doesn't work in War Thunder (is not recognized, even if I would like to try manually set any buttons to any function, pressing any buttons gives me nothing).
I have found 2 topics about joysticks and linux on War Thunder forum, so maybe it will give you a clue, what is going on with my one:
[1] Linux Joystick evdev calibration
http://forum.warthunder.com/index.php?/topic/190391-linux-joystick-evdev-calibration/?hl=%2Bjoystick#entry3663810
[2] Second joystick not recognized
http://forum.warthunder.com/index.php?/topic/192100-second-joystick-not-recognized/?hl=%2Bjoystick#entry3859375
... I am asking as this manual (joystick + Xorg) says
http://www.x.org/archive/X11R7.5/doc/man/man4/joystick.4.html
Quote: | joystick is an Xorg input driver for Joysticks. There are 3 backends available that are used in the following order, if support was found:
- Linux's evdev interface
- Linux's joystick interface
- BSD's usbhid interface
The driver reports cursor movement as well as raw axis values through valuators. |
So maybe I should use other than evdev interfrance?
Code: | # dmesg | grep -i Joystick
[15574.956754] hid-generic 0003:12BD:A02F.0004: input,hidraw1: USB HID v1.10 Joystick [5-Axis,12-Button with POV ] on usb-0000:00:1a.0-1.2/input0
|
I did try this game and joystick works:
Code: | # emerge -s searchandrescue
Searching...
[ Results for search key : searchandrescue ]
[ Applications found : 1 ]
* games-simulation/searchandrescue
Latest version available: 1.5.0
Latest version installed: 1.5.0
Size of files: 52,370 KiB
Homepage: http://searchandrescue.sourceforge.net/
Description: Helicopter based air rescue flight simulator
License: GPL-2
|
|
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Tue Jan 06, 2015 2:43 pm Post subject: |
|
|
I have never played that game so I don't know. You may have to use the other interface if it does not use X11, but I thought most games now use X11 but maybe not evdev input...
What's funny is that the same problem existed long ago with input layer /dev/input/mice and old programs requiring /dev/psaux, so now they have the emulation layer for psaux. I suppose joysticks weren't popular enough to need this back emulation.
I've only got an analog joystick hooked up to a computer I don't use at all via the soundcard analog port. After I verified the test program works printing out numbers that correlated to the joystick position I called it a day and it has been sitting there ever since... :( _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Xywa Veteran
Joined: 23 Jul 2005 Posts: 1631 Location: /mnt/Gentoo/Europe
|
Posted: Tue Jan 06, 2015 2:56 pm Post subject: |
|
|
eccerr0r wrote: | I have never played that game so I don't know. You may have to use the other interface if it does not use X11, but I thought most games now use X11 but maybe not evdev input...
What's funny is that the same problem existed long ago with input layer /dev/input/mice and old programs requiring /dev/psaux, so now they have the emulation layer for psaux. I suppose joysticks weren't popular enough to need this back emulation.
I've only got an analog joystick hooked up to a computer I don't use at all via the soundcard analog port. After I verified the test program works printing out numbers that correlated to the joystick position I called it a day and it has been sitting there ever since... |
So I have 2 options:
[1] Easy one - to buy a new one which is in the game on the supported list - but I have no guarantee it will works if there is another problem or...
[2] Richard Stallman way - to find the driver which works or what is the problem (like with the mouse you said above, I remember old times) Richard Stalman could not use time ago a printer in University, as they did not have a driver (as producer said is out contract). So they have equipment like me, but they couldnot use it (without driver). So he wrote a driver, a made it open under first in the world GNU licence |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3137
|
Posted: Tue Jan 06, 2015 3:00 pm Post subject: |
|
|
You can run qjoypad to see if your system recognizes your joystic and it's buttons. |
|
Back to top |
|
|
Xywa Veteran
Joined: 23 Jul 2005 Posts: 1631 Location: /mnt/Gentoo/Europe
|
Posted: Wed Jan 07, 2015 7:55 pm Post subject: |
|
|
szatox wrote: | You can run qjoypad to see if your system recognizes your joystic and it's buttons. |
It recognizes - the problem might be here - input device (like in my post above):
Quote: | Looks like WT is using X input device instead of pure /dev/input/eventX, so you can configure X to use joystick drivers for X and tell it to use /dev/input/jsX, which can be calibrated thru jscal. Should work fine. |
but qjoypad can siumulate keyboard and mouse - so maybe instead of pure joystick I will have keyboard&mouse replaced as a... joystick
UPDATE 6am:
I was trying jscal and I have this:
Code: | $ jscal-store /dev/input/js0
Storing joystick configuration requires udev! |
so looks like I have to connect joyystick by udev - but how to check how connection looks like now? Is there any command to check if I have Linux's evdev interface or Linux's joystick interface?
Re: Joystick still acts as mouse after xserver-xorg-input-evdev update
http://ubuntuforums.org/showthread.php?t=982591
Quote: | the input.x11_driver type is 'evdev' rather than 'joystick' which the other joysticks in the file have. |
|
|
Back to top |
|
|
Xywa Veteran
Joined: 23 Jul 2005 Posts: 1631 Location: /mnt/Gentoo/Europe
|
Posted: Thu Jan 08, 2015 10:37 am Post subject: |
|
|
DAY 2
OK, in the shop I have changed a joystick for a new one Logitech Extreme 3D Pro. I did everything like with the first joystick, but this time I do not have this /dev/input/js0 or similair. Looks like everything is OK, but...
dmesg
Code: | [ 590.430776] usb 1-1.2: new low-speed USB device number 6 using ehci-pci
[ 590.547613] usb 1-1.2: New USB device found, idVendor=046d, idProduct=c215
[ 590.547623] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 590.547629] usb 1-1.2: Product: Logitech Extreme 3D
[ 590.547633] usb 1-1.2: Manufacturer: Logitech
|
Code: | # lsusb
Bus 001 Device 006: ID 046d:c215 Logitech, Inc. Extreme 3D Pro
|
Code: | # lsmod
Module Size Used by
joydev 9351 0
ath9k_htc 51843 0
ath9k_common 13074 1 ath9k_htc
ath9k_hw 384948 2 ath9k_common,ath9k_htc
ath 18779 3 ath9k_common,ath9k_htc,ath9k_hw
iwldvm 119988 0
rtsx_pci 26471 0
r8169 57702 0
nvidia 8375434 0
x86_pkg_temp_thermal 4535 0
mfd_core 3033 1 rtsx_pci
mii 3779 1 r8169
iwlwifi 80139 1 iwldvm
|
UPDATE 11:13am
OK - I did manage with linux (see bellow), the joystick still doesnt work in the game
Quote: | Device Drivers ->
Input Device support ->
<*> Event interface
HID support ->
Special HID drivers ->
<M> Logitech devices |
UPDATE 3:52pm
I found it, so the question how to switch form one input system to another?
Quote: | Linux actually has 2 different input systems for Joysticks. The original 'Joystick' interface and the newer 'evdev' based one.
'/dev/input/jsX' maps to the 'Joystick' API interface and /dev/input/eventX maps to the 'evdev' ones (this also includes other input devices such as mice and keyboards).
Most new games will default to the 'evdev' ones. However many of the ones mentioned here (such as jscal, jstest and jstest-gtk) only work with the older 'Joystick' interface making calibration/mapping with those tools mostly useless. 'evdev' doesn't support any remapping or calibration leaving it up to the applications to support it. |
https://wiki.archlinux.org/index.php/Gamepad |
|
Back to top |
|
|
Xywa Veteran
Joined: 23 Jul 2005 Posts: 1631 Location: /mnt/Gentoo/Europe
|
Posted: Fri Jan 09, 2015 5:18 am Post subject: |
|
|
OK. It works!
I will summarize everything, as there no such information in our Gentoo Wiki and the problem - the modern game cannot see your joystick - is popular, so...
[1] Make sure, you read this:
http://www.gentoo-wiki.info/Joystick (Gentoo Wiki Joystick)
[2] If you have usb joystick make sure you have HID support in your kernel - generic or for your producer (like mine bellow)
Code: | Device Drivers ->
Input Device support ->
<*> Event interface
HID support ->
Special HID drivers ->
<M> Logitech devices |
[3] Read this
Quote: | Linux actually has 2 different input systems for Joysticks. The original 'Joystick' interface and the newer 'evdev' based one.
'/dev/input/jsX' maps to the 'Joystick' API interface and /dev/input/eventX maps to the 'evdev' ones (this also includes other input devices such as mice and keyboards).
Most new games will default to the 'evdev' ones. However many of the ones mentioned here (such as jscal, jstest and jstest-gtk) only work with the older 'Joystick' interface making calibration/mapping with those tools mostly useless. 'evdev' doesn't support any remapping or calibration leaving it up to the applications to support it. |
https://forums.gentoo.org/viewtopic-t-1007898.html
[4] In step 3 above you can see - most new games will default to the 'evdev' ones - so if your joystick works in linux and you have /dev/input/jsX - so you will have to check if (and what) 'evdev' joystick use. You need command lsinput from sys-apps/input-utils.
Code: | * sys-apps/input-utils
Latest version available: 1.1
Latest version installed: 1.1
Size of files: 22 KiB
Homepage: https://www.kraxel.org/blog/linux/input/
Description: Small collection of linux input layer utils
License: GPL-2
|
[5] Use lsinput and check your joystick:
Code: | # lsinput -v
/dev/input/event9
id : 046d:c215, USB, v272
phys : "usb-0000:00:1a.0-1.2/input0"
name : "Logitech Logitech Extreme 3D"
KEY : [ 12 codes ]
ABS : X Y RZ THROTTLE HAT0X HAT0Y
MSC : SCAN
|
[6] I have done this from this website
http://forums.x-plane.org/index.php?s=dd1ab83a4809125918dc66f9a95c16f7&showtopic=60462&page=1
Check your joystick details by lsusb
Code: | # lsusb
Bus 003 Device 014: ID 046d:c215 Logitech, Inc. Extreme 3D Pro
|
In /etc/udev/rules.d/ I have made this file 99-input-joystick.rules (idProduct and idVendor I took from lsusb)
Code: | KERNEL=="event*", ATTRS{idProduct}=="c215", ATTRS{idVendor}=="046d", MODE="0666"
|
[7]
- Unplug and replug your USB joystick
- Start the game
???
- Enjoy!!! |
|
Back to top |
|
|
gentoorockerfr Apprentice
Joined: 25 May 2012 Posts: 203
|
Posted: Wed Feb 25, 2015 10:04 pm Post subject: |
|
|
i have a problem i put these rules but still my controllers are as js and as event so there are conflicting...
lsinput -v
Quote: | /dev/input/event5
bustype : BUS_USB
vendor : 0x810
product : 0x1
version : 272
name : "Twin USB Joystick"
phys : "usb-0000:00:12.0-5/input0"
uniq : ""
bits ev : EV_SYN EV_KEY EV_ABS EV_MSC EV_FF
/dev/input/event6
bustype : BUS_USB
vendor : 0x810
product : 0x1
version : 272
name : "Twin USB Joystick"
phys : "usb-0000:00:12.0-5/input0"
uniq : ""
bits ev : EV_SYN EV_KEY EV_ABS EV_MSC EV_FF
|
lsusb
Bus 006 Device 003: ID 0810:0001 Personal Communication Systems, Inc. Dual PSX Adaptor
how i can disable js recognize? |
|
Back to top |
|
|
gentoorockerfr Apprentice
Joined: 25 May 2012 Posts: 203
|
Posted: Wed Feb 25, 2015 10:15 pm Post subject: |
|
|
i think that i solved the problem..first i uncheck joystick from kernel (make menuconfig) options
and 2nd perhaps 0X1 and 0X810 was wrong
the right choices in rules was 0001 and 0810 |
|
Back to top |
|
|
Xywa Veteran
Joined: 23 Jul 2005 Posts: 1631 Location: /mnt/Gentoo/Europe
|
Posted: Mon Jun 13, 2016 5:22 pm Post subject: |
|
|
Hi,
I just tested through the same rules like above a new joystick: Thrustmaster T.16000m. Everything works fine. Generic driver from kernel: hid_generic.
Very useful program to test modern joystick (evdev API):
Code: | * app-misc/evtest
Latest version available: 1.30
Latest version installed: 1.30
Size of files: 28 KiB
Homepage: https://cgit.freedesktop.org/evtest/
Description: test program for capturing input device events
License: GPL-2
|
BTW: http://www.gentoo-wiki.info/Joystick (Gentoo Wiki Joystick) doesn't work. So useful info on Arch: https://wiki.archlinux.org/index.php?title=Gamepad&redirect=no |
|
Back to top |
|
|
|