It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Hi there,
I just tried this game.
I was confused because it showed the xbox buttons instead of keyboard keys even though I had no gamepad plugged in. I then plugged in the gamepad and restarted the game, yet the game does not recognize any button presses.

I think I figured out what is going on, but it is really odd. Here is part of the console output:

Controller 0, SynPS/2 Synaptics TouchPad, will use generic MonoGameJoystick support.
Controller 1, Xbox Gamepad (userspace driver), will use generic MonoGameJoystick support.

Yep, it looks like the game recognizes my touchpad as controller, which is really stupid. And indeed, the game reacts to the touchpad, but it's obviously unplayable this way.

Does someone know a fix or workaround?
avatar
hollunder: Hi there,
I just tried this game.
I was confused because it showed the xbox buttons instead of keyboard keys even though I had no gamepad plugged in. I then plugged in the gamepad and restarted the game, yet the game does not recognize any button presses.

I think I figured out what is going on, but it is really odd. Here is part of the console output:

Controller 0, SynPS/2 Synaptics TouchPad, will use generic MonoGameJoystick support.
Controller 1, Xbox Gamepad (userspace driver), will use generic MonoGameJoystick support.

Yep, it looks like the game recognizes my touchpad as controller, which is really stupid. And indeed, the game reacts to the touchpad, but it's obviously unplayable this way.

Does someone know a fix or workaround?
Hello hollunder,

It seems like the issue with random devices being detected as joypads is quite common:
http://askubuntu.com/questions/173376/how-do-i-disable-joystick-input/624151#624151

A programmer from Brazil came up with a solution and shared it on GitHub:
https://github.com/denilsonsa/udev-joystick-blacklist

It blacklists udev devices from being wrongly detected as joysticks. You should be able to add the problematic touchpad using it's vendor and product hexadecimal IDs. You can obtain them by running the following command:

cat /proc/bus/input/devices

Let me know what you think about using this workaround!
Thanks for your help, but this is not my problem.
Without any gamepad plugged in there is no /dev/js*.

On startup the game writes:
$ GOG\ Games/Rogue\ Legacy/start.sh
Running Rogue Legacy
AL lib: (WW) alc_initconfig: Failed to initialize backend "pulse"
EXT_swap_control_tear unsupported. Fall back to standard VSync.
Adding language dictionary for language: English
Controller 0, SynPS/2 Synaptics TouchPad, will use generic MonoGameJoystick support.
Loading Config file
...

Why it thinks that the touchpad is a joystick I do not know. Here is what evtest says about the touchpad:
Input driver version is 1.0.1
Input device ID: bus 0x11 vendor 0x2 product 0x7 version 0x1b1
Input device name: "SynPS/2 Synaptics TouchPad"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 272 (BTN_LEFT)
Event code 273 (BTN_RIGHT)
Event code 325 (BTN_TOOL_FINGER)
Event code 330 (BTN_TOUCH)
Event code 333 (BTN_TOOL_DOUBLETAP)
Event code 334 (BTN_TOOL_TRIPLETAP)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 2155
Min 1472
Max 5888
Resolution 75
Event code 1 (ABS_Y)
Value 4420
Min 1408
Max 4820
Resolution 105
Event code 24 (ABS_PRESSURE)
Value 0
Min 0
Max 255
Event code 28 (ABS_TOOL_WIDTH)
Value 0
Min 0
Max 15
Event code 47 (ABS_MT_SLOT)
Value 1
Min 0
Max 1
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 1472
Max 5888
Resolution 75
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 1408
Max 4820
Resolution 105
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Properties:
Property type 0 (INPUT_PROP_POINTER)
Property type 3 (INPUT_PROP_SEMI_MT)

Comparing that to my mice I guess the game or mono or FNA may look for events like ABS_X and assume that devices that support those events are joypads. A failing heuristic. It is just a guess though.

Other things I have tried that correctly do not find a joystick:
jstest-gtk
sdl2-jstest --list
wine control.exe joy.cpl
Post edited January 30, 2017 by hollunder
avatar
hollunder: Thanks for your help, but this is not my problem.
Without any gamepad plugged in there is no /dev/js*.

<snip>
From ArchLinux wiki:
"Linux has 2 different input systems for Joysticks. The original 'Joystick' interface and the newer 'evdev' based one. (...) SDL2 supports only the new 'evdev' interface."
Rogue Legacy uses SDL2, which means it looks for joystick in /dev/input/event* devices instead of /dev/input/js* (which are deprecated).

And to quote the udev-joystick-blacklist README file:
"This repository contains rules that will prevent the non-functional /dev/input/js* and /dev/input/event* devices from being recognized as joysticks."

So I still think that blacklisting your touchpad using udev-joystick-blacklist (or manually if you know how to do so) would solve your issue :)

Sources:
https://wiki.archlinux.org/index.php/Gamepad#Joystick_input_systems
https://github.com/denilsonsa/udev-joystick-blacklist
Post edited January 30, 2017 by linuxvangog
No cigar, and I remember why I hate writing udev rules.

I could not get the vendor or product id the usual way:
$ udevadm info -a -n /dev/input/event18

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device '/devices/platform/i8042/serio4/input/input25/event18':
KERNEL=="event18"
SUBSYSTEM=="input"
DRIVER==""

looking at parent device '/devices/platform/i8042/serio4/input/input25':
KERNELS=="input25"
SUBSYSTEMS=="input"
DRIVERS==""
ATTRS{name}=="SynPS/2 Synaptics TouchPad"
ATTRS{phys}=="isa0060/serio4/input0"
ATTRS{properties}=="9"
ATTRS{uniq}==""

looking at parent device '/devices/platform/i8042/serio4':
KERNELS=="serio4"
SUBSYSTEMS=="serio"
DRIVERS=="psmouse"
ATTRS{bind_mode}=="auto"
ATTRS{description}=="i8042 AUX3 port"
ATTRS{firmware_id}=="PNP: LEN0017 PNP0f13"
ATTRS{protocol}=="SynPS/2"
ATTRS{rate}=="80"
ATTRS{resetafter}=="5"
ATTRS{resolution}=="200"
ATTRS{resync_time}=="0"

looking at parent device '/devices/platform/i8042':
KERNELS=="i8042"
SUBSYSTEMS=="platform"
DRIVERS=="i8042"
ATTRS{driver_override}=="(null)"

looking at parent device '/devices/platform':
KERNELS=="platform"
SUBSYSTEMS==""
DRIVERS==""


Evtest however says: Input device ID: bus 0x11 vendor 0x2 product 0x7 version 0x1b1

I installed the variant of udev-joystick-blacklist that should remove the device and added this line to /usr/lib/udev/rules.d/51-these-are-not-joysticks-rm.rules

SUBSYSTEM=="input", ATTRS{idVendor}=="0002", ATTRS{idProduct}=="0007", ENV{ID_INPUT_JOYSTICK}=="?*", ENV{ID_INPUT_JOYSTICK}=""
SUBSYSTEM=="input", ATTRS{idVendor}=="0002", ATTRS{idProduct}=="0007", KERNEL=="js[0-9]*", RUN+="/bin/rm %E{DEVNAME}", ENV{ID_INPUT_JOYSTICK}=""

Yet the touchpad still works and is recognized by Rogue Legacy.

However, because there are no additional or wrong js or event devices present and no other program recognizes the touchpad as joypad I am of the opinion that the game is at fault.


I found one way to work around this issue: remove the kernel module responsible for the touchpad. In my case: rmmod i8042

However, I do not think that should be necessary.
Post edited January 30, 2017 by hollunder
avatar
hollunder: (...)
However, because there are no additional or wrong js or event devices present and no other program recognizes the touchpad as joypad I am of the opinion that the game is at fault.

I found one way to work around this issue: remove the kernel module responsible for the touchpad. In my case: rmmod i8042

However, I do not think that should be necessary.
I completely agree, that should not be necessary. However, since such issue affects a variety of devices and Linux 4.9 kernel brings a patch fixing it for some of them, I believe it is a kernel bug, thus using a workaround is justified.

If you believe that this issue could be solved by changes in the game code, you are free to contact the programmer behind the Linux port of the game: http://www.flibitijibibo.com/
I actually am running linux 4.9.6.

Thanks, I will contact the developers.