Retroarch: Overlay & Touch issues

Created on 15 May 2016  路  30Comments  路  Source: libretro/RetroArch

I'm going to consolidate all the overlay issues here for better visibility

  • First and foremost, some devices like the Moto G2 don't react to touch at all, we haven't had any takers to debug this so we should either come up with a workaround like falling back to overlays in the event that we don't notice any touch events after 10 seconds or so at startup
  • Second, closing content via overlay unbinds the gamepad (normal) but it doesn't get bound again correctly. Closing content with a gamepad unbinds the gamepad but it's re-bound immediately afterwards

https://github.com/libretro/RetroArch/issues/2827

  • Third, the hide overlay on menu option is a hack and I guess we have some issues with it, if you touch to go back to the menu it will cause the option beneath to register most of the time causing issues. Also if you hit start in some options (like the threaded video option) you get stuck in an endless loop of the setting going on/off

https://github.com/libretro/RetroArch/issues/2656
https://github.com/libretro/RetroArch/issues/2658

  • Fourth, after going back to menu using the overlay button gamepad navigation is screwed up, I guess some button state is being held and scrolling up down with the gamepad becomes an excercise of frustration (scrolls more than one line per key-press)
  • Fifth, I haven't been able to confirm/reproduce this but sometimes switching overlays quickly causes the overlays to become corrupted

https://github.com/libretro/RetroArch/issues/2530

  • Sixth: Overlay input doesn't allow uppercase letters
major android

Most helpful comment

I have a moto g2 (thanks to my newer phone bricking and becoming a very fancy paper weight).
Will look into this bug.

All 30 comments

Yay, this problem is finally being addressed. I'm the CM maintainer for the Shield Tablet (well, Shield everything). All custom ROMs for the tablet do not work with Retroarchs touch input system, even though stock works. None of the devs have been able to figure out why yet. The same problem occurred on Kodi as well until 16 beta 2. Still have no idea what they did, but it must use something different now.

All that being said, I'm more than willing to do any testing and debugging you need on a device that currently doesn't work. I want Retroarch to work on my releases, but I don't have the knowhow to go fix it myself.

So you're Steel01?
What problem do you have with the Shields?

The CM devs have been trying to debug this? Do you have any info we can use?

The overlay is completely separate from the menu touch though and I think it should work just fine.
TBH I have only used CM on the Portable and... well I don't need touch on that one

Yes, that's my xda and general forum tag.

The touch problem is specific to the tablet. The portable works great, no touch issues. As far as I could trace it, the touch device is reporting itself as a trackball or something similar. Best theory I've heard is the user space driver blob has an enum from stock that doesn't match aosp causing this. Agrabren (nvidia employee that helps the open source projects when he can) was going to look into that a while back, but other things came up and I never heard back about that. I used to think the problem was unsolvable without rewriting the user space driver, then Kodi somehow fixed it. For all I know, that was an entire rewrite of the input system, though. If the overlay was enabled as a fallback, at least the interface would be usable without plugging in a controller.

Yes, we're planning on having a fallback at startup, if we don't touch see any touch events/scrolling or something like that at startup after a few seconds we may just re-enable the overlay. We haven't really decided yet but devices with this issue are increasing.
I'd like to know if the overlay works though, I don't have CM on my Shield Tablet so it would be interesting if you could confirm if it works.
I have an NVIDIA contact too, I could mention this maybe he has an idea regarding this.

OT: great work on the CM rom for the Shield Portable, I appreciate it a lot even though I still get lockups that cause battery drain and the device getting very hot, I reported that in the penultimate post on the XDA thread. The only way to avoid them is by inducing a wakelock (I use alogrec). Two devices on totally stock unconfigured roms have the same issue since lollipop :(

No, overlay is not working. I loaded up 1.3.4 off fdroid (the nightlies are giving corrupted download errors every try), scrolled through the options using a wired shield controller and flipped off the hide in menus option. The overlay didn't work and the controller stopped working. Lovely. Do you think more recent nightlies would be any different?

OT: Yeah, there's a few minor things that would still be nice to fix on the portable. That isn't one I've encountered lately, though. Maybe I should go rez that thread and get the list of issues back together.

Regarding the download errors, it updates than more once a day, so you have to hit the refresh button and wait for it to refresh just before downloading. Otherwise it might error like that. Just tried to be 100% sure.

Weird that the toggling the overlay causes controller to stop working, there are several oddities in the overlay/touch system (hence the issue).
That sounds similar to this:

Second, closing content via overlay unbinds the gamepad (normal) but it doesn't get bound again correctly. Closing content with a gamepad unbinds the gamepad but it's re-bound immediately afterwards

Since enabling/disable an overlay triggers a context reset, maybe that's the key. I'll try to reproduce what you said on stock firmware.

OT: I have always had this issue, in the used SP I bought and on the one that NV donated for development, ever since updating to lollipop. I assumed it was something on my setup, so I reset both stock and CM to factory defaults and the issue still happened. I think people assume it's just battery drain overnight but I have tested this a lot and it's a sort of lockup that ends up causing battery drain. If you just shut it down right away and back on battery hasn't died.

It's the nightlies in fdroid giving me the issue. Downloads direct from the site have worked no problem. 1.3.4 downloads fine, 1.3.4_GIT is always corrupted, no matter when or how many times I try. But that might be deserving of it's own issue.

So, is there anything you can think of that I can do to help with the touch issue? Logs that would list what retroarch sees as input devices and types or such?

I just tried the GIT release on fdroid and it works.
That's exactly what I mean though, you need to refresh the index just before updating because it builds several times a day (the name nightlies is misleading)

So, nothing touch related works? not even the overlay?
Maybe a logcat could provide some info yeah.

Wow, it worked that time. Special... I've tried updating right after an auto-index update before and it still failed. _shrugs_ Not userfriendly, but I guess it works if you know the trick.

Don't have an easy way to upload a logcat atm, but all I'm seeing atm is 'found joypad driver android'. Is there a higher level of debugging I can enable? Preferably without needing to use the menu since I'm about five hours from being able to use a controller right now.

not really... if you have an OTG cable a keyboard should work tho

Oh higher level of debugging yes but you need to use the menu...

I went and poked through the logging settings section and didn't see anything to turn up. Level is already at debug and the other options look lower. Plus it's worded to only affect the cores. Am I looking in wrong place?

When I run, logcat gives me (filtered on retroarch):
W/RetroArch(23832): SYSTEM DIR is empty, assume CONTENT DIR
I/RetroArch(23832): Config: loading config from: /storage/emulated/0/Android/data/com.retroarch/files/retroarch.cfg.
I/RetroArch(23832): Environ SET_PIXEL_FORMAT: RGB565.
I/RetroArch(23832): Version of libretro API: 1
I/RetroArch(23832): Compiled against API: 1
I/RetroArch(23832): Set audio input rate to: 29975.00 Hz.
I/RetroArch(23832): Video @ 960x720
I/RetroArch(23832): Starting threaded video driver ...
I/RetroArch(23832): Android EGL: GLES version = 2.
I/RetroArch(23832): [EGL]: EGL version: 1.4
I/RetroArch(23832): [EGL]: Current context: 0xb4ae78b0.
I/RetroArch(23832): Found GL context: android
I/RetroArch(23832): Detecting screen resolution 1920x1200.
I/RetroArch(23832): [EGL]: eglSwapInterval(1)
I/RetroArch(23832): [GL]: Vendor: NVIDIA Corporation, Renderer: NVIDIA Tegra.
I/RetroArch(23832): [GL]: Version: OpenGL ES 3.1 NVIDIA 349.00.
I/RetroArch(23832): [GL]: GLES3 or newer detected. Auto-enabling some extensions.
I/RetroArch(23832): Querying GL extension: BGRA8888 => exists
I/RetroArch(23832): [GL]: BGRA8888 extension found for GLES.
I/RetroArch(23832): GL: Using resolution 1920x1200
I/RetroArch(23832): [GL]: Default shader backend found: glsl.
I/RetroArch(23832): [Shader driver]: Using GLSL shader backend.
W/RetroArch(23832): [GL]: Stock GLSL shaders will be used.
I/RetroArch(23832): Found GLSL vertex shader.
I/RetroArch(23832): Found GLSL fragment shader.
I/RetroArch(23832): Linking GLSL program.
I/RetroArch(23832): Found GLSL vertex shader.
I/RetroArch(23832): Found GLSL fragment shader.
I/RetroArch(23832): Linking GLSL program.
I/RetroArch(23832): Found GLSL vertex shader.
I/RetroArch(23832): Found GLSL fragment shader.
I/RetroArch(23832): Linking GLSL program.
I/RetroArch(23832): Found GLSL vertex shader.
I/RetroArch(23832): Found GLSL fragment shader.
I/RetroArch(23832): Linking GLSL program.
I/RetroArch(23832): Found GLSL vertex shader.
I/RetroArch(23832): Found GLSL fragment shader.
I/RetroArch(23832): Linking GLSL program.
I/RetroArch(23832): [GL]: Using 4 textures.
I/RetroArch(23832): [GL]: Loaded 1 program(s).
I/RetroArch(23832): Found joypad driver: "android".
I/RetroArch(23832): sdk version: 22
I/RetroArch(23832): Set engine_handle_dpad to 'Get Axis Value' (for reading extra analog sticks)
I/RetroArch(23832): Using font rendering backend: stb.
I/RetroArch(23832): [SLES]: Requested audio latency: 128 ms.
I/RetroArch(23832): [SLES]: Setting audio latency: Block size = 2048, Blocks = 12, Total = 24576 ...
I/RetroArch(23832): Found menu display driver: "menu_display_gl".
I/RetroArch(23832): Using font rendering backend: stb.
I/RetroArch(23832): Querying GL extension: ARB_framebuffer_object => doesn't exist
I/RetroArch(23832): Using font rendering backend: stb.
E/RetroArch(23832): [image load] Failed to open '': No such file or directory.
I/RetroArch(23832): SRAM will not be saved.
I/RetroArch(23832): null: [/data/data/com.retroarch/content_history.lpl].

Logging verbosity on should be enough, but yeah it looks rather incomplete.
Does anything happen when you try to scroll or tap?

That was already on. And no, nothing logs on taps or scrolls. I get the occasional chatty raydium message saying the driver is doing stuff like it does all the time (see below), but nothing from retroarch.

D/Raydium_ts_main( 228): ## Report rate in 10 seconds =2103

I guess I'll try to add some printfs tomorrow, thanks for taking your time trying to debug this.

The following occurs on Android with the Galaxy S Plus (i9001) and RetroArch version 1.3.4:

The RetroArch application starts correctly, it extracts the assets and the menu appears.

However, in the menu it's impossible to press anything, as glui seems to think that it is a gesture instead of a button press. This makes it impossible to select menu entries and start a game. This never happened with the older versions of the RetroArch Android menu, which had a black background.

I've already tried the latest nightly version too, but unfortunately it didn't solve the problem.

The specs of the phone:

Android: 5.1.1 (Cyanogenmod 12.1, to be specific:[GT-I9001][ROM][ION][5.1.1][LMY49F] CyanogenMod 12.1 by ADC-Team )
Model: Galaxy S Plus (i9001)

A video that shows the problem: https://0x0.st/TVn.mp4

Some entries in logcat that appear when running retroarch and that might be interesting:


W/Adreno-ES20( 3995): <__load_uniform_float:825>: GL_INVALID_OPERATION

Full log with logcat:

https://gist.github.com/rrooij/b13e8865fedb92d3c86876564940710a

I've discovered things that can help in debugging:

When disabling input_overlay_hide on menu I can control the menu. However, every button pressed on the gamepad gets in a loop. For instance, when pressing dpad-right, it's as if I'm pushing the dpad-right the whole time even if I just pressed it once. Pushing another button on the overlay cancels the previous loop but will start a new loop instead with that button. Pressing an unmapped button will cancel the previous loop and start a loop with no events attached (since the button isn't mapped). Touching the screen also cancels this input loop. Only the gamepad-specific buttons seem to loop. The change orientation button doesn't loop for instance. When I tried to run a game, the same problem with the input events seem to happen.

@webgeek1234: @twinaphex said he would try to look up on the issue.
Is the issue present on CM12 nightlies? are there CM13 nightlies avaialble? which should we use?

What recovery do you recommend?

The issue happens on both cm-12.1 and cm-13.0 (and all other custom roms as mentioned before). There are no nightlies for cm-13.0 yet because the cell modem doesn't work. My latest cm-13.0 build is here. Everything is operational except for lte and hdmi audio. If the tablet that will be used for testing/development has already been upgraded to M, use cm-13.0. As for recovery, official TWRP is finally up to par, so that's recommended (and will work on both the L and M bootloaders, so no worries mixing anything up). I can run newer and/or custom builds if y'all need more debugging enabled or anything like that.

I'll be ecstatic to see this problem go away. Haven't been able to use retroarch on my tablets since I got CM running.

cool I'll let you know

Moto G2 problem comes after upgrading Android to Marshmallow. I remember installing RetroArch (1.2.*) in some Moto G2 with Android 5 (or 5.1) and working flawlessly.

Downloaded and installed every apk from http://buildbot.libretro.com/stable in Moto G2 with Android 6.0 and no one worked.

Using CM13 on a Moto G 2014 device (titan). Same issues.
Any way I can provide debug data to help sort the issue out?

Same as above, see here. I also remember it working fine on 1.2.2 on this device. I didn't think it was upgrading to Android 6 that caused it, though, I thought it was upgrading to 1.3. I could be wrong, though.

we need an android developer with a moto g2 to fix this issue, this issue aint fixing itself and none of us have this device.

I have a moto g2 (thanks to my newer phone bricking and becoming a very fancy paper weight).
Will look into this bug.

@batoussai, did you find anything that may help? Yesterday I installed Rayman Classic and the input didn't worked also.

No luck so far. Couldn't get any useful logs so I'm currently trying to wrap my head around the input handling code of Retroarch to (maybe) figure what it does not like about the device. Another option that I have in the pipeline is figuring what Kodi did to fix the similar issue with the Shield Tablet.

Happening on my SM-T700 Galaxy Tab S 8.4. willing to provide any data needed

@gnychis hmmm are you sure? try nightlies the touch issue is already fixed

Working for me now with the latest version. Seems to be fixed.

Good to hear this works now. I will close it then.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

orbea picture orbea  路  3Comments

wrldwzrd89 picture wrldwzrd89  路  3Comments

RobLoach picture RobLoach  路  3Comments

Chocobubba picture Chocobubba  路  3Comments

hyarsan picture hyarsan  路  4Comments