Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Set Device Index for User 1 Input #6724

Closed
ZAdamMac opened this issue May 5, 2018 · 20 comments
Closed

Unable to Set Device Index for User 1 Input #6724

ZAdamMac opened this issue May 5, 2018 · 20 comments

Comments

@ZAdamMac
Copy link

ZAdamMac commented May 5, 2018

Description

Latest Stable Snap on Ubuntu 18.04 LTS
When attempting to configure retroarch to make use of the WiiU Gamepad Pro as the player 1 input, the input device options do not allow this (or any other) device to be indexed, and retroarch accepts inputs only from the keyboard itself. (As you'll see from the logs below this behaviour is observed using the hid input driver, but it also occurs using x as the input driver.)

Expected behavior

The device index should be able to be set to the corresponding device, and Bind All should then bind correctly.

Actual behavior

No devices can be set through the device index menu option. Further, no keys are detected in binding.

In order to eliminate the possibility the device itself is not playing nice, I first used xwiishow from the xwiitools package to display the device outputs. After that I further confirmed it with jstest-gtk. The gamepad Pro successfully maps to the /dev/input/js0 device.

Below are the runtime logs. Note that neither the hid joystick driver (which actually has a gamepad pro retropad autoconfig associated with) nor the linuxraw driver (which supposedly calls the joystick directly) works. Setting the input driver to any value to the most-modern udev breaks input until the config file is manually reverted to the old value - even the keyboard is ignored.

[INFO] RetroArch 1.7.2 (Git d9995c2)
[INFO] === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 SSE4 SSE4.2 AVX AES 
Built: Apr 25 2018
[INFO] Version: 1.7.2
[INFO] Git: d9995c2
[INFO] =================================================
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ 640x480
[ERROR] [Wayland]: Failed to connect to Wayland server.
/usr/share/libdrm/amdgpu.ids: No such file or directory
amdgpu_device_initialize: Cannot parse ASIC IDs, 0xffffffea.[INFO] [GLX]: GLX_OML_sync_control and GLX_MESA_swap_control supported, using better swap control method...
[INFO] [GL]: Found GL context: x
[INFO] [GL]: Detecting screen resolution 2646x768.
[INFO] [GLX]: Window manager is GNOME Shell.
[INFO] [GLX]: X = 0, Y = 0, W = 640, H = 480.
[INFO] [GLX]: Found swap function: glXSwapIntervalMESA.
[INFO] [GLX]: glXSwapInterval(0)
[INFO] [GL]: Vendor: X.Org, Renderer: AMD CARRIZO (DRM 3.23.0 / 4.15.0-20-generic, LLVM 5.0.0).
[INFO] [GL]: Version: 3.0 Mesa 17.2.8.
[INFO] [GL]: Using resolution 640x480
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] Setting up menu pipeline shaders for XMB ... 
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] Resetting shader to defaults ... 
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] Found HID driver: "libusb".
[INFO] [Joypad]: Found joypad driver: "hid".
[INFO] [Font]: Using font rendering backend: bitmap.
[INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
sh: 1: xdg-screensaver: not found
[WARN] Could not suspend screen saver.
[INFO] [Video]: Found display server: x11
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Menu]: Found menu display driver: "menu_display_gl".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [LED]: LED driver = 'null' 0x608e20
[INFO] SRAM will not be saved.
[INFO] Loading history file: [/home/patches/snap/retroarch/110/.config/retroarch/content_history.lpl].
[INFO] Loading history file: [/home/patches/snap/retroarch/110/.config/retroarch/content_favorites.lpl].
[INFO] Loading history file: [/home/patches/snap/retroarch/110/.config/retroarch/content_music_history.lpl].
[INFO] Loading history file: [/home/patches/snap/retroarch/110/.config/retroarch/content_video_history.lpl].
[INFO] Loading history file: [/home/patches/snap/retroarch/110/.config/retroarch/content_image_history.lpl].
[INFO] [GL]: VSync => off
[INFO] [GLX]: glXSwapInterval(0)
[INFO] [PulseAudio]: Unpausing.
[INFO] [GL]: VSync => on
[INFO] [GLX]: glXSwapInterval(1)
[INFO] [PulseAudio]: Pausing.
[INFO] [PulseAudio]: Unpausing.
[INFO] [PulseAudio]: Unpausing.
[INFO] [Config]: Saved new config to "/home/patches/snap/retroarch/110/.config/retroarch/retroarch.cfg".
[INFO] [PulseAudio]: Pausing.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.

Steps to reproduce the bug

  1. Pair a gamepad Pro using bluetooth.
  2. Install xwiitools and use the integrated xwiishow to confirm the controller is working.
  3. Fire retroarch -v for a logged session
  4. Use the keyboard to navigate to the binding menu for any user.
  5. Attempt to set the device index - no changes are possible.
  6. Attempt to bind keys - nothing happens.
  7. You have duplicated my experience.

Bisect Results

Immediately from a fresh install of the latest snap. Previously a few games had been tested using the gambatte core, but after play testing it became clear I was going to need a controller, and here we are.

Version/Commit

You can find this information under Information/System Information

  • RetroArch: RetroArch 1.7.2 (Git d9995c2)

Environment information

  • OS: Ubuntu 18.04 LTS
  • Compiler: N/A
@orbea
Copy link
Contributor

orbea commented May 5, 2018

Is it possible to test other gamepads or does RetroArch only have an issue with the WiiU Gamepad Pro?

@ZAdamMac
Copy link
Author

ZAdamMac commented May 5, 2018

I also tested with a Saitek USB gamepad and had the same issue.

@orbea
Copy link
Contributor

orbea commented May 5, 2018

Can you also test the current master? Here are some directions to build and run RetroArch without snap.

# clone the RetroArch repo to the current directory
git clone https://github.com/libretro/RetroArch

cd RetroArch

#now configure RetroArch
./configure

# build it
make

# and run it
./retroarch

Does the issue persist?

Maybe not related, but one issue I see in your log is.

[ERROR] [Wayland]: Failed to connect to Wayland server.
/usr/share/libdrm/amdgpu.ids: No such file or directory

@ZAdamMac
Copy link
Author

ZAdamMac commented May 5, 2018

In true "me" fashion, I've attempted to follow your instructions and created a new issue in the process. I cloned the latest master and did ./configure && make as instructed, and the make process actually does complete - so the code does compile. However, when calling ./retroarch, nothing happens - the terminal gives me a new prompt immediately and no other effect is observed.

I've included the cofig/compile logs just in case there's something useful there.

As far as Wayland goes, Ubuntu moved back to XOrg in 18.04.
config.log
retroArchMakeLog.log

@orbea
Copy link
Contributor

orbea commented May 5, 2018

Can you try this then.

# run the built retroarch binary with verbose output.
./retroarch --verbose

After that sharing the log here could help understand why its not starting.

@ZAdamMac
Copy link
Author

ZAdamMac commented May 5, 2018

The log is here. I'm uncertain how to fix this issue, as I can confirm the graphics driver is indeed present, since the snap works fine.

Also, in this instance's retroarch.config, I set the video driver to xvideo, not the "ext" value offered.

patches@mir:~$ ./RetroArch/retroarch -v
[INFO] RetroArch 1.7.3 (Git 2771f8cc41)
[INFO] === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 SSE4 SSE4.2 AVX AES 
Built: May  5 2018
[INFO] Version: 1.7.3
[INFO] Git: 2771f8cc41
[INFO] =================================================
[ERROR] Couldn't find any video driver named "ext"
[INFO] Available video drivers are:
[INFO] 	null
[WARN] Going to default to first video driver...
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ 960x720
[ERROR] Couldn't find any video driver named "ext"
[INFO] Available video drivers are:
[INFO] 	null
[WARN] Going to default to first video driver...
[ERROR] Using the null video driver. RetroArch will not be visible.[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[ERROR] [Video]: Cannot initialize input driver. Exiting ...
[ERROR] Fatal error received in: "video_driver_init_input()"
[ERROR] This core requires a content file, could not load content.

@orbea
Copy link
Contributor

orbea commented May 5, 2018

I would suggest moving the your configuration file out of the way so the next time RetroArch starts it will generate a fresh configuration file with hopefully good defaults. You can later use diff to compare the old config with the new one if you want to preserve any settings.

@i30817
Copy link
Contributor

i30817 commented May 6, 2018

In diff it's difficult to see the changes. Something like diffuse, diffmerge or vimdiff or even the git diff (though i don't know how to use that without a repository) where both files show side by side and the changes are color highlighted is better for humans.

@ZAdamMac
Copy link
Author

ZAdamMac commented May 6, 2018

Same problem, essentially:

patches@mir:~/RetroArch$ rm retroarch.cfg
patches@mir:~/RetroArch$ ./retroarch -v
[INFO] RetroArch 1.7.3 (Git 2771f8cc41)
[INFO] === Build =======================================
Capabilities: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 SSE4 SSE4.2 AVX AES 
Built: May  5 2018
[INFO] Version: 1.7.3
[INFO] Git: 2771f8cc41
[INFO] =================================================
[ERROR] Couldn't find any video driver named "ext"
[INFO] Available video drivers are:
[INFO] 	null
[WARN] Going to default to first video driver...
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ 960x720
[ERROR] Couldn't find any video driver named "ext"
[INFO] Available video drivers are:
[INFO] 	null
[WARN] Going to default to first video driver...
[ERROR] Using the null video driver. RetroArch will not be visible.[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[ERROR] [Video]: Cannot initialize input driver. Exiting ...
[ERROR] Fatal error received in: "video_driver_init_input()"
[ERROR] This core requires a content file, could not load content.

@orbea
Copy link
Contributor

orbea commented May 6, 2018

That is the wrong config file.

Try.

mv $HOME/.config/retroarch $HOME/.config/retroarch.bak

@ZAdamMac
Copy link
Author

ZAdamMac commented May 6, 2018 via email

@orbea
Copy link
Contributor

orbea commented May 6, 2018

Alright, how about if you edit .config/retroartch/retroarch.cfg with any text editor and change the video_driver line to "gl"?

It should look like this.

video_driver = "gl"

@ZAdamMac
Copy link
Author

ZAdamMac commented May 6, 2018 via email

@orbea
Copy link
Contributor

orbea commented May 6, 2018

Seems like something has completely screwed with the default RetroArch paths. Is there an /etc/retroarch.cfg file?

@orbea
Copy link
Contributor

orbea commented May 6, 2018

I asked in the #retroarch irc channel and was told this may help your initial issue.

13:38:27 hunterk orbea: i think he needs to hook up some 'plugs' with the snap package
13:38:52 hunterk I think he needs these:
13:38:55 hunterk     sudo snap connect retroarch:raw-usb
13:38:55 hunterk     sudo snap connect retroarch:joystick

And I guess your real config file is in ~/snap/retroarch/current/.config/retroarch/...

@ZAdamMac
Copy link
Author

Yes, that is the location of the config file for the snap version of Retroarch. Just to be on the safe side I did mv it off for a backup. The latest master build you had me testing still does not boot. Not entirely sure what the issue is there.

Connecting the snap plugs also did not resolve the issue. Is it possible there's another plug necessary when the controller in question is connected via bluetooth?

@estefan3112
Copy link

I had exactly the same issue in Ubuntu 18.04 on my Mac. In the Ubuntu Software Store, I today switched from 'Stable' to 'Edge', and my PS4 controller was finally recognized via USB. I cannot tell although since when this has been fixed, but now it works - many thanks :-).

@gouchi
Copy link
Member

gouchi commented Nov 14, 2018

@ZAdamMac do you still reproduce with the issue with latest snap ?

Can you try this ?

Thank you.

P.S = It would have been better to open the issue to the dedicated repository.

@ZAdamMac
Copy link
Author

I can confirm that this is now mostly working. I'm still having an issue with axis passthrough (that is, my joystick inputs are getting eaten somewhere), but since that's a global problem with ALL apps at the moment I'm quite sure the fault is not in Retroarch.

Thanks.

@orbea
Copy link
Contributor

orbea commented Dec 24, 2018

Reported as fixed in the above comment so I am going to close this, please let us know if there are any other issues!

@orbea orbea closed this as completed Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants