Project

General

Profile

Actions

Emulator Issues #6768

closed

Linux - Gamepads not detected - SDL2 related

Added by oangelo about 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
Controls
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What went wrong?
Gamepad is not detected

What did you expect to happen instead?
To use the game pad

What steps will reproduce the problem?
[Don't assume we have played the game and know its level names. Be as
detailed as possible.]
1.Set up a gamepad
2.Start the emulator
3.Open the GCPad and see that gamepad device is not detected!

Dolphin 3.5 and Dolphin 3.5-367 are old versions of Dolphin that have
known issues and bugs. Have you tested with the latest version from
http://dolphin-emu.org/download ?

Which versions of Dolphin did you test on?
4.0.1
Which version of Dolphin used to work?
4.0.1
What are your PC specifications (example: Operating System, CPU and GPU)?
Archlinux
64 or 32 bit Operating System?
64
64 or 32 bit Dolphin?
64

I am using the lib xwiimote, so I can use a wiimote as a regular gamepad.
The lib is working fine and I can use the controler in other emulators/programs but not with dolphin.


Related issues 2 (0 open2 closed)

Has duplicate Emulator - Emulator Issues #6822: Bluetooth Dualshock 3 Controller no longer works in Linux with sixadDuplicate

Actions
Has duplicate Emulator - Emulator Issues #7082: Controller detected with SDL1, not with SDL2.Duplicate

Actions
Actions #1

Updated by klkblake about 11 years ago

I had the same problem recently. It turned out I had a dodgy build of SDL2 -- updating fixed it.

Actions #2

Updated by JMC4789 about 11 years ago

  • Status changed from New to Questionable
  • Category set to controls
  • Operating system N/A added
Actions #3

Updated by oangelo about 11 years ago

I have recompiled the sdl2 with "--disable-input-events" as described here: http://superuser.com/questions/17959/linux-joystick-seems-mis-calibrated-in-an-sdl-game-freespace-2-open
And I also recompiled the emulator, and the gamepad still not been recognized!
I can see it on /dev/input/js0, I can use it on pcsx2, but dolphin still does not detect the gamepad!
As a workaround I am simulating a xbox gamepad as described here: https://wiki.archlinux.org/index.php/joystick#Mimic_Xbox_360_controller
And with this dolphin is working well.
This is very odd!

Actions #4

Updated by Billiard26 almost 11 years ago

Issue 6822 has been merged into this issue.

Actions #5

Updated by Billiard26 almost 11 years ago

Works for me.

Actions #6

Updated by saniukeokusainaya almost 11 years ago

Not working here either (Arch Linux, too). I have a xbox 360 gamepad.

It does work on other games and emulators.

Just in case it's a distro-specifc issue I'd try asking on the Arch forums.

Actions #7

Updated by saniukeokusainaya almost 11 years ago

Actually, scrap that. I have verified that Arch's SDL2 is compiled with joystick support.

Actions #8

Updated by oangelo almost 11 years ago

Actualy, I think that libs are hardcoded on the dolphin source, and does not use the system libs! This would explain the problem, but I am not sure. Any developer can confirm this?

Actions #9

Updated by oangelo almost 11 years ago

I can confirm, the problem is indeed related to SDL2. Removing SDL2 and compiling dolphin-emu with just SDL, my joystick was recognized!
However, I don't know if this is a SDL2 problem or a problem on how archlinux builded the lib. Maybe this is related to this: http://superuser.com/questions/17959/linux-joystick-seems-mis-calibrated-in-an-sdl-game-freespace-2-open
Nevertheless, I tried these suggestions and none seems to work.

Actions #10

Updated by JMC4789 almost 11 years ago

SDL2 is also having problems on Windows. Stuff like buttons permanently pressed, L/R analog starting at half, controllers perpetually not found. This is a serious issue for all platforms imo.

Actions #11

Updated by ne.tetewi almost 11 years ago

Can reproduce on linux with dolphin 4.0.2 and latest git master. Recompiling with an SDL2 build which I'm certain has joystick support did not resolve it. Compiling dolphin against SDL 1.2 does.

Actions #12

Updated by ne.tetewi over 10 years ago

SDL2 requires the /dev/input/event* file for the gamepad to be readable, while SDL 1.2 can use /dev/input/js*. js* is automatically set readable in a udev rule while event* is not.
If you chmod +r the event* file for the gamepad it should show up in dolphin.

Actions #13

Updated by oangelo over 10 years ago

I think the problem is in the way that SDL2 recognizes an /dev/input/event* as joystick or not. Because on my box, it recognizes a xbox controler with the xboxdrv module, but it cannot recognize my wiimote with the hid-wiimote module. I tried everything, searched on many forums, tried many configurations on the xinput, tried different configurations on xorg... and nothing! I can't make my wiimote work as a joystick on dolphin with SDL2. I am convinced that this is a problem with X, since it is very old and there is no good standards for joysticks. I hope wayland will solve the problem.

Actions #14

Updated by saniukeokusainaya over 10 years ago

It's a problem on udev's side, I guess. I'll see if I can write a rule to make my gamepad's event file readable (only the "js" ones are)

Actions #15

Updated by saniukeokusainaya over 10 years ago

Rumble doesn't seem to work, though.

Actions #16

Updated by saniukeokusainaya over 10 years ago

Nevermind, the device file needs write access for that. I guess this issue can be closed <.<

Actions #17

Updated by Billiard26 over 10 years ago

Issue 7082 has been merged into this issue.

Actions #18

Updated by Anonymous over 10 years ago

Hi! I have been working on a bug with the Linux version of things here recently.
For one, in certain cases (which isn't too uncommon), you will segfault whenever you refresh the list of devices with a haptic capable device.

I have submitted a fix for this here: https://bugzilla.libsdl.org/show_bug.cgi?id=2562

However, I'm not able to reproduce the problem where the device isn't found. With what device drivers does this happen and with what specific devices?

Actions #19

Updated by oangelo over 10 years ago

I had problems with the wiimote, the linux kernel has native modules for it.
I can use the wiimote on Dolphin to play wii games, this works fine.
However, Dolphin does not let one to play Gamecube games with wiimote!
As a workaround, I have connected the wiimote to the linux as a regular joystick, so I can use Dolphin to play Gamecube games.
With SDL1, Dolphin recognizes the joystick connected to linux, with SDL2, I could never make Dolphin find it.
Finaly, I can do a very ugly hack to accomplish what I want. I am using xboxdrv to pretend that my wiimote is an xbox joystick, in this way I can use my wiimote on Dolphin with Gamecube games.

Actions #20

Updated by Anonymous over 10 years ago

Can you tell me which files in /dev/input correspond to your wiimote? In particular, there's probably more than two.

Actions #21

Updated by Anonymous about 10 years ago

If this can help you with hiw-wiimote & SDL2, as I got a similar problem : https://github.com/dvdhrm/xwiimote/issues/51 (check the README-linux file ;) )

Actions #22

Updated by nicolaspanti almost 10 years ago

On Debian GNU/Linux x86-64 8/jessie/testing, my USB Xbox360 is not recognized anymore by dolphin-meu.
This problem appears some months ago and is still with the last commit (f00ad2e65c9136d16a93aeec7c225a271d5adf95). I have tested: plug before OS boot, plug after OS boot and the refresh button.
My controller was recognized by dolhin-emu as "SDL/0/Microsoft X-Box 360 pad".
The same controller on the same OS works with DeSmuME (0.9.10).

Actions #23

Updated by RMABuanno almost 10 years ago

Having this issue on Ubuntu 14.04
jstest shows that the remote works fine,
in dolpin-emu this gamepad shows up : SDL/0/Wireless Controller
I am connected via bluetooth to my Dual Shock 4 controller.
It works in steam big picture.

How to make this work with Dolphin?

Actions #24

Updated by AHeinerm almost 10 years ago

I am also having this problem. I'm using some generic USB gamepad and it was previously configurable (on the same machine) as "SDL/0/SAITEK P880" (old configuration still visible). I've tried other gamepads with no luck. The devices are visible with lsusb.

I am using Ubuntu 14.04 (64-bit).

Actions #25

Updated by RollRoundInTheToilet almost 10 years ago

I was having this issue with 4.0-5293 compiled from source on Debian Jessie x64 with libsdl1.2. Installing libsdl2dev 2.0.2 and recompiling fixed it.

Actions #26

Updated by nicolaspanti almost 10 years ago

Installing libsdl2.0-dev and compiling version 4.0-5323 fixed also the problem for me on Debian GNU/Linux 8/jessie/testing x86-64.

Actions #27

Updated by skidau over 9 years ago

  • Status changed from Questionable to Fixed

Any issues that remain can be solved by installing libsdl2.0-dev

Actions

Also available in: Atom PDF