Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Input doesn't work in Ubuntu 13.10  (Read 2092 times)
0 Members and 1 Guest are viewing this topic.
Offline Conzar

Junior Duke




There is nothing common about common sense


« Posted 2014-01-28 07:57:05 »

Getting inputs from the input devices is working in Ubuntu 12.04.  I recently upgraded to 13.10 and inputs no longer work.  I know of others that have had this problem with other distributions (arch for instance) with the newer kernels.  Ubuntu 13.10 is using kernel 3.11.0-15-generic.  This of course effects Keyboarding Master since it uses jinput. 

I have veried this with net.java.games.input.test.ControllerReadTest which shows all of the inputs but doesn't display any input responses.

Here is the output from running that program.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
Jan 28, 2014 8:55:00 PM net.java.games.input.LinuxNativeTypesMap getAbsAxisID
WARNING: INSTANCE.absAxesIDs is only 63 long, so 63 not contained
Component count = 1
Component count = 1
Component count = 143
Component count = 5
Component count = 8
Component count = 1
Component count = 267
Component count = 163
Component count = 163
Component count = 6
Component count = 163
Component count = 116
Component count = 6
Power Button disabled
Power Button disabled
HID 0a5c:4502 disabled
HID 0a5c:4503 disabled
Razer Razer Taipan disabled
UVC Camera (046d:081d) disabled
Razer Razer Taipan disabled
Razer Razer Taipan disabled
Razer Razer Nostromo disabled
Razer Razer Nostromo disabled
Razer Marauder Razer Marauder disabled
Razer Marauder Razer Marauder disabled
Razer Marauder Razer Marauder disabled


Udev rules that should allow read and write to the games group which my user is apart of

1  
2  
3  
KERNEL=="uinput", MODE="0664", GROUP="games"
KERNEL=="event[0-9]*", SUBSYSTEM=="input", GROUP="games", MODE="0664"
KERNEL=="mouse[0-9]*", SUBSYSTEM=="input", GROUP="games", MODE="0664"


1  
2  
$ groups
mspeth cdrom sudo games sambashare


Any ideas of what might be wrong?

Ubuntu
Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #1 - Posted 2014-01-31 07:19:50 »

I wrote a program that polls a particular device that expresses this problem.  Here is the code.
http://pastebin.java-gaming.org/110ca2b1a8d

When its used on Ubuntu 13.10, there is no response from the device; but it works under 12.04.  Any ideas?

Ubuntu
Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #2 - Posted 2014-01-31 19:57:08 »

So in the above code, the mouse scroll wheel up and down events are recognized.  However, the mouse click and all the rest of the keyboard keys are not.

1  
2  
[Razer Razer Nostromo:Mouse] Name[z] Identifier[z] Analog Relative Class[net.java.games.input.Component$Identifier$Axis]
[Razer Razer Nostromo:Mouse] Name[z] Identifier[z] Analog Relative Class[net.java.games.input.Component$Identifier$Axis][Razer Razer Nostromo:Mouse] null

Ubuntu
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2014-02-05 10:38:45 »

Hi

Does it happen only with this kind of mouse?

Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #4 - Posted 2014-02-05 20:19:45 »

I have only tested it with the Razer Nostromo (Its a gaming keyboard that has a scroll wheel so it has both a keyboard input and a mouse input (for the scroll wheel).

Ubuntu
Offline Slyth2727
« Reply #5 - Posted 2014-02-05 21:49:18 »

Check any drivers you installed. Ubuntu totally screws over stuff like this, that's why I switched to Arch.

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #6 - Posted 2014-02-06 03:45:16 »

The only additional driver I have installed is the nvidia proprietary driver.

Ubuntu
Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #7 - Posted 2014-03-05 08:18:22 »

I am narrowing down the problem.  It seems the EventQueue is not generating any events!!!!  Any ideas of why this might be?

Ubuntu
Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #8 - Posted 2014-03-05 08:31:10 »

controller.getPollData works.  So this is a bug in the EventQueue for sure.

Ubuntu
Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #9 - Posted 2014-03-05 09:00:34 »

The following C program demonstrates using grab and reading events on Linux.  This works on Ubuntu 13.10.
http://pastebin.java-gaming.org/485e342508f

Here is the relevent code in jinput's ...LinuxEventDevice.c
http://pastebin.java-gaming.org/85e32505f80

Anyone notice any differences?

Ubuntu
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #10 - Posted 2014-03-26 14:30:51 »

What does LinuxEventDevice.c display? Maybe add more logs.

Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #11 - Posted 2014-03-27 09:18:15 »

I ran the program against my Razer Nostromo.  The following is the output with 2 key presses.  The first was the 'w' key and the second was the 'q' key.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
./a.out 
opened with fd 3
read 1 17 1
r = 24
write 1 17 1
read 1 17 0
r = 24
write 1 17 0
q key
q key


This tells us:

Case 'w'
where ev is the input_event
ev.type == EV_KEY == 1
ev.code == 17
ev.code == 1 (for press) and == 0 (for release)

Case 'q'
It just prints 'q key' to the screen.

Is this what you were after?

Ubuntu
Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #12 - Posted 2014-03-28 09:18:19 »

Well, one painful solution is to re-write my code to use the normal poll method without events .... sucks though.

Ubuntu
Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #13 - Posted 2014-03-30 07:20:38 »

I have implemented a work-a-round and will be using this going forward instead of the event queue.

Ubuntu
Offline kbickar

Junior Newbie





« Reply #14 - Posted 2014-04-22 22:03:14 »

The problem is a bug in the library in LinuxNativeTypesMap.java:
1  
absAxesIDs = new Component.Identifier[NativeDefinitions.ABS_MAX];

NativeDefinitions.ABS_MAX is defined as 0x3F (63), and 63 should be a valid identifier.  Other programs use "ABS_MAX + 1".  So anytime the last bit is set, there will be an error.
Offline Conzar

Junior Duke




There is nothing common about common sense


« Reply #15 - Posted 2014-04-22 22:13:15 »

The problem is a bug in the library in LinuxNativeTypesMap.java:

Is there a fix?  If so, this repository is the most up2date that I know of for jinput development (I have contributed to it in the past).

Ubuntu
Offline kbickar

Junior Newbie





« Reply #16 - Posted 2014-04-22 22:22:21 »

The fix is to add the + 1 - I've submitted a pull request to the repo.
Offline gouessej
« Reply #17 - Posted 2014-05-22 22:00:07 »

I've submitted a pull request to the repo.
Where is your pull request?

Pages: [1]
  ignore  |  Print  
 
 

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (46 views)
2014-10-17 03:59:02

Norakomi (37 views)
2014-10-16 15:22:06

Norakomi (28 views)
2014-10-16 15:20:20

lcass (32 views)
2014-10-15 16:18:58

TehJavaDev (62 views)
2014-10-14 00:39:48

TehJavaDev (62 views)
2014-10-14 00:35:47

TehJavaDev (52 views)
2014-10-14 00:32:37

BurntPizza (70 views)
2014-10-11 23:24:42

BurntPizza (40 views)
2014-10-11 23:10:45

BurntPizza (82 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!