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

Touch input broken on 1.16.0 from F-Droid #15757

Closed
eengnr opened this issue Oct 1, 2023 · 42 comments
Closed

Touch input broken on 1.16.0 from F-Droid #15757

eengnr opened this issue Oct 1, 2023 · 42 comments

Comments

@eengnr
Copy link

eengnr commented Oct 1, 2023

Description

After updating from 1.15.0 to 1.16.0 with F-Droid touch input on Android 13 / Pixel 7 doesn't work anymore. Only a USB controller works.

Expected behavior

Touch input is working

Actual behavior

Touch input is not working

Steps to reproduce the bug

Install 1.16.0 on Pixel 7 with Android 13.
Not reproducible on Pixel 3XL with Android 12

Version/Commit

  • RetroArch: 1.16.0
    Probably related to this change?
    18414cf

Environment information

  • OS: Android 13 on Pixel 7
@sonninnos
Copy link
Collaborator

sonninnos commented Oct 1, 2023

That change can't possibly affect anything like that. It only changes the menu default scale, which will not touch existing configs in any way. And you can easily test it by changing the menu scale manually.

@eengnr
Copy link
Author

eengnr commented Oct 1, 2023

Well it's really strange... if I wipe the app completely and reinstall it, I cannot navigate out of the main menu with touch. The only possibility is to attach the gamepad with USB. Then I can use the d-pad to e.g. switch to the settings menu. But A/B buttons are mapped incorrectly by default, i.e. I also cannot enter any menu with the gamepad. Scrolling however is possible with touch after switching to the settings menu. But it's not possible to select any menu entry... and it feels like scrolling is "absolute". I cannot scroll down completely. No matter where I tap on the screen, the "Playlists" settings menu entry always scrolls to the touch position.
If I switch to another Android app and then back to RetroArch, I can select one menu entry with touch. But only one. Then the weird scrolling continues.

Really weird... 1.15.0 doesn't show this behavior.

@eengnr
Copy link
Author

eengnr commented Oct 2, 2023

I managed to get startup logs from 1.15.0 and 1.16.0 Nightly:

1.15.0 (working)

Using old --libretro behavior. Setting libretro_directory to "/data/user/0/com.retroarch/cores/" instead.
RetroArch 1.15.0 (Git 6616b807ed)
=== Build =======================================
Fähigkeiten: ASIMD
[INFO] Built: Apr 29 2023
[INFO] Version: 1.15.0
[INFO] Git: 6616b807ed
[INFO] =================================================
[Input]: Found input driver: "android".
[Environ]: SET_PIXEL_FORMAT: RGB565.
[Core]: Version der Libretro-API: 1, Kompiliert gegen API: 1
[Audio]: Set audio input rate to: 48000.00 Hz.
[Video]: Set video size to: 960x720.
Android EGL: GLES version = 2.
[EGL] Falling back to eglGetDisplay
[EGL]: EGL version: 1.4
[GL]: Found GL context: "egl_android".
[GL]: Detecting screen resolution: 0x0.
[EGL]: Current context: 0x78c494b990.
[GL]: Vendor: ARM, Renderer: Mali-G710.
[GL]: Version: OpenGL ES 3.2 v1.r38p1-01eac0.55eb2d40cce8f18c0f57f61c686a946f.
[GL]: Using resolution 1080x2264.
[GL]: Default shader backend found: glsl.
[Shader driver]: Using GLSL shader backend.
[GL]: Stock GLSL shaders will be used.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GL]: Using 4 textures.
[GL]: Loaded 1 program(s).
[Joypad]: Found joypad driver: "android".
[Video]: Found display server: "android".
[OpenSL]: Requested audio latency: 128 ms.
[OpenSL]: Setting audio latency: Block size = 512, Blocks = 48, Total = 24576 ...
[Display]: Found display driver: "gl".
[Playlist]: Verlaufs-Datei wird geladen: "/storage/emulated/0/RetroArch/playlists/content_history.lpl".
[Playlist]: Verlaufs-Datei wird geladen: "/storage/emulated/0/Android/data/com.retroarch/files/content_music_history.lpl".
[Playlist]: Verlaufs-Datei wird geladen: "/storage/emulated/0/Android/data/com.retroarch/files/content_image_history.lpl".
[Playlist]: Favoritendatei wird geladen: "/storage/emulated/0/RetroArch/playlists/content_favorites.lpl".

1.16.0 (not working)

Using old --libretro behavior. Setting libretro_directory to "/data/user/0/com.retroarch.aarch64/cores/" instead.
RetroArch 1.16.0 (Git 14cb373)
=== Build =======================================
Fähigkeiten: ASIMD 
[INFO] Version: 1.16.0
[INFO] Git: 14cb373
[INFO] Built: Oct  1 2023
[INFO] =================================================
[Input]: Found input driver: "android".
[Environ]: SET_PIXEL_FORMAT: RGB565.
[Core]: Version der Libretro-API: 1, Kompiliert gegen API: 1
[Core]: Geometry: 320x240, Aspect: 1.333, FPS: 60.00, Sample rate: 48000.00 Hz.
[Audio]: Set audio input rate to: 48000.00 Hz.
[Video]: Set video size to: 960x720.
Android EGL: GLES version = 2.
[EGL] Falling back to eglGetDisplay
[EGL]: EGL version: 1.4
[GL]: Found GL context: "egl_android".
[GL]: Detecting screen resolution: 0x0.
[EGL]: Current context: 0x78c494cf80.
[GL]: Vendor: ARM, Renderer: Mali-G710.
[GL]: Version: OpenGL ES 3.2 v1.r38p1-01eac0.55eb2d40cce8f18c0f57f61c686a946f.
[GL]: Using resolution 1080x2264.
[GL]: Default shader backend found: glsl.
[Shader driver]: Using GLSL shader backend.
[GL]: Stock GLSL shaders will be used.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GLSL]: Found GLSL vertex shader.
[GLSL]: Found GLSL fragment shader.
[GLSL]: Linking GLSL program.
[GL]: Using 4 textures.
[GL]: Loaded 1 program(s).
[Joypad]: Found joypad driver: "android".
[Video]: Found display server: "android".
[OpenSL]: Requested audio latency: 128 ms.
[OpenSL]: Setting audio latency: Block size = 512, Blocks = 48, Total = 24576 ...
[Audio]: Started synchronous audio driver.
[Display]: Found display driver: "gl".
[Playlist]: Verlaufs-Datei wird geladen: "/storage/emulated/0/Android/data/com.retroarch.aarch64/files/content_history.lpl".
[Playlist]: Verlaufs-Datei wird geladen: "/storage/emulated/0/Android/data/com.retroarch.aarch64/files/content_music_history.lpl".
[Playlist]: Verlaufs-Datei wird geladen: "/storage/emulated/0/Android/data/com.retroarch.aarch64/files/content_image_history.lpl".
[Playlist]: Favoritendatei wird geladen: "/storage/emulated/0/Android/data/com.retroarch.aarch64/files/content_favorites.lpl".

Only the additional Geometry line seems to be different.
Is there anything else I should check or provide logs?

@zzedmore
Copy link

zzedmore commented Oct 9, 2023

Sounds similar to this issue I reported #15672

Good luck getting anything fixed !

@ItsRogueRen
Copy link

Just installed for the first time (f-droid) and I have the exact same issue, touch inputs do absolutely nothing making the entire app useless.

@GraithTiger
Copy link

Same issue here on Pixel 7. Both the website apk and the F-Droid version. 1.15.0 works fine.

@eengnr
Copy link
Author

eengnr commented Oct 13, 2023

Note: I'm running Android 14 in the meantime, but the behavior is still the same.

But I have more information.
It seems that touch input stops working as soon as a "physical controller" is recognized.
If I connect the USB gamepad, touch stops working.
And here's the confusing part why touch seems to not work at all: if my smart watch is connected to the phone via Bluetooth, touch also stops working!
It seems that a smart watch is somehow seen as "controller". After disabling bluetooth, touch input works.

Kind of... there are still annoying issues with touch even if all "controllers" are disconnected. If I tap the ingame "menu" button of an overlay to go to the quick menu, the menu button which is directly "below" the "overlay menu button" is tapped as well. Therefore I create a screen shot every time I leave the game to the quick menu. Tapping the overlay "menu", holding it and swiping in the quick menu before releasing the touch is a workaround for this...

All this is new in 1.16 and does not happen in 1.15.

Edit: this leads to a hen/egg issue to configure a controller: if the controller is connected, you cannot enter the config menu, because no touch is available. If you disconnect the controller, you cannot re-map the buttons.
The only way to do this is by modifing the retroarch.cfg manually, which is quite complicated on Android.

Edit 2: if I disable only the "input device" toggle in the Bluetooth options for the connected smart watch, touch input also works.

@hizzlekizzle
Copy link
Contributor

Can you try installing the oldest nightly build available from buildbot.libretro.com? It doesn't go back very far, but it's better than nothing. A true bisect would be optimal, of course.

@eengnr
Copy link
Author

eengnr commented Oct 15, 2023

The oldest nightly is from 02.10., but the 1.16.0 release is from 30.09.
Why should installing the oldest nightly make a difference? The issue is already in it.

@hizzlekizzle
Copy link
Contributor

ah, looks like the older ones already got flushed. bummer. guess someone who can both build and reproduce the issue will need to track it down.

@Lolight2
Copy link

Lolight2 commented Nov 3, 2023

Any news on this? It is still broken for me on the newest nightlies :(

@gamer85
Copy link

gamer85 commented Dec 16, 2023

I can confirm same broken navigation issues on a Samsung Galaxy S23 FE upon updating to Android 14 today on the sideloaded RetroArch_ra32.apk from main website.

@Qwertyto
Copy link

Qwertyto commented Dec 28, 2023

I've got the same issue on Galaxy S23 android 14 using RetroArch 1.16, but I guess I should do a complete form thing just in case:

Description:
When I open the app, I attempt to tap on the options, but the tapping only triggers a scrolling action while still highlighting the option I am attempting to select.

Expected Outcome:
I tap on an option and it registers as selecting the option, taking me to the next corresponding menu.

Actual Outcome:
I tap on a option and it simply scrolls weirdly depending on where I tap on the screen.

I hope this issue gets fixed in the stable fdroid versions, which is what I am currently using.

@bidinou
Copy link

bidinou commented Feb 9, 2024

Hi ! What happens here is that touch input works. Until a USB-C controller is connected. Android 14 here. I opened a new bug about this issue, in more general terms.

@humandib
Copy link

Hi ! What happens here is that touch input works. Until a USB-C controller is connected. Android 14 here. I opened a new bug about this issue, in more general terms.

Hello! New to the Android scene. I have a Nothing Phone 1 and experience this issue for the first time when I upgraded my device to version 14. Retroarch seem to override the touchscreen when input devices are detected; however, I'm not using any external controllers. What I did find was that my bluetooth headphones, SkullCandy Crushe ANC 2, are detected by my Android device as an input device. I went to the settings on the bluetooth, disabled the Input Device option, and Retroarch detected the touchscreen input again.
Screenshot_20240220-155525

@robotics13
Copy link

robotics13 commented Feb 28, 2024

Hi, have the same issue here with Galaxy S21 FE and Galaxy Tab S8, both worked fine until the android 14 and One UI 6 update. I have noticed what I have connected and how it is connected makes a difference in whether or not the touch input is bugged.

Symptoms:

On the menu screens when touch is bugged, it will jump the scroll position of the menu to an absolute position. If I touch near the bottom of the screen, it jumps the screen to the top of the menu. If I touch near the top of the screen it jumps the screen to the bottom of the menu.

In games with the overlay, tapping an on screen button registers and shows the button press but acts like I am holding down the button.

Galaxy S21 FE

Android 14
One UI 6.0
CPU Snapdragon 888 5G
Retroarch version 1.16.0 Google Play

Configuration Touch Behavior
Just the phone, no peripherals Works as expected
Xbox controller over bluetooth Bugged
Xbox controller over USB Works as expected
Keyboard over USB Bugged
Keyboard over USB + Xbox controller over bluetooth Bugged
Keyboard and Xbox controller over USB Bugged
USB to 3.5mm headphone adapter Bugged
Logitech USB gamepad Works as expected
USB Ethernet Adapter Works as expected

Plugging and unplugging USB devices while Retroarch is running seems to change the touch behavior live. I can connect and disconnect the keyboard and break/un-break touch on demand.

Galaxy Tab S8

Android 14
One UI 6.0
CPU Snapdragon 8 Gen 1
Retroarch version 1.17.0 APK from Retroarch website

Configuration Touch Behavior
Just the tablet, no peripherals Works as expected
Xbox controller over bluetooth Bugged
Xbox controller over USB Works as expected
Keyboard over USB Bugged
Keyboard cover over pogo-pins Bugged
Keyboard over USB + Xbox controller over bluetooth Bugged
Keyboard and Xbox controller over USB Bugged
USB to 3.5mm headphone adapter Bugged
Logitech USB gamepad Works as expected
USB Ethernet Adapter Works as expected

Edit: The S Pen works as expected regardless of what is connected to the tablet. You can navigate the menus, click the on screen buttons, interact with the DS emulator's touch screens like normal.

I also tested with a really outdated Pixel 3A with the 1.17.0 version of Retroarch APK from the website and touch works as expected with the Xbox controller over blutetooth. Not a true comparison but more data.

Non-gamepad input devices over USB seem to bug out touch on Retroarch, the keyboard cover, USB keyboard, and 3.5mm headphone adapter (mic input). While USB gamepad devices work as expected.

I looked at the Retroarch logs but even on debug level they are identical whether or not the Xbox controller is connected over Bluetooth or not at all.

@zzedmore
Copy link

I also reported a very similar issue #15672 and even posted a video at the bottom but no reply. I gave up asking. I'm now stuck on a stable build that works but can never update because of this issue. 😢 You can't even assign a pause hotkey to a controller on Android because Retroarch freaks out. That hasn't been fixed ever. Oh well.

@LibretroAdmin
Copy link
Contributor

Probably because we either don't have your specific phone, can't reproduce it, or we simply don't know how to fix the issue and are reliant on PR submitters to help fill the gap.

@LibretroAdmin
Copy link
Contributor

It seems in your case you're using some kind of Android game handheld device? I'm not sure what device that is and you'd prob have to provide more information. Either way, methinks that the actual issue lies with this device and the Android implementation and driver support. On regular Android phones and tablets touch input doesn't seem to be an issue.

@robotics13
Copy link

I agree the android driver implementation probably changed at some point. The Galaxy One UI 6.0 is clunky to be nice and I noticed the issue right after the update, was running Retroarch 1.16.0 from the Play store before and after the update so something in Android itself changed.

I'm trying to build a version with the changes from #15672 removed to see if that makes any difference.

I did download the 1.15.0 version from Buildbot and touch works as expected with an Xbox controller over bluetooth and the Galaxy keyboard connected. The S pen does exhibit the buggy behavior that pull request fixed.

Is there additional information we could provide that would help identify the issue?

@LibretroAdmin
Copy link
Contributor

Wel lfirst of all what hardware are you running this on, what Android OS version, etc?

@zzedmore
Copy link

Wel lfirst of all what hardware are you running this on, what Android OS version, etc?

I'm using a Retroid Pocket 2+ handheld with Android 10. I upgraded to Android 11 and the touch issue is still there. Not sure what the others are using. Also, the pause controller hotkey #9998 has never been fixed on any Android device.

@ThunderDragonRandy
Copy link

ThunderDragonRandy commented Mar 4, 2024

Wel lfirst of all what hardware are you running this on, what Android OS version, etc?

Android 14 here with the Samsung Galaxy S22 Ultra. Among 4 controllers I tested on it so far in RetroArch v1.16 and v1.17—Backbone One, 8bitdo SN30 Pro 2, GameSir G8 Galileo, and Razer Raiju—the touchscreen works fine with the Razer Raiju but not with any other controller. When I use any controller on my Android phone other than the Razer Raiju, the touchscreen is allowed to be touched once but any further taps become unresponsive. Fortunately, you can still scroll through the menus with the touchscreen but that is it while a controller is connected on Android.

Controllers + Touchscreen on Android worked fine in RetroArch v1.15, but the touchscreen issues with controllers happen in v1.16 or v1.17 with certain (or most?) controllers. EDIT (April 2): Still hasn't been fixed by 1.18 too.

Scrolling through the commits between v1.15 and v1.16 and I'll search through the "touch" commits, I wonder if the issue occurred on June 1, 2023 ("touch"-related commits 42c0c73, 516de17, e301ddf ). Hmm...

Yeah, I feel like this controller/touchscreen issue on Android first happened around June or July of 2023. Wish I had reported it back then. Let's see... I got the Backbone One PlayStation Edition on July 11, 2023 and I believe it worked fine for a while so maybe sometime in July or August was when controllers + touchscreens were acting up, but it depends on when I was using v1.15 stable or a nightly build at the time but I don't remember.

@nvitaterna
Copy link

nvitaterna commented Mar 12, 2024

I'm experiencing the same issue on my S22 Ultra with a Gamesir G8. Touch works fine until the controller is plugged in. I can confirm that the Play Store version of retroarch works fine, but that's version 1.9.12.

Android 14, Retroarch 1.17.0

@stefan-girlich
Copy link

Issue confirmed on Nothing Phone 1, Android 14, Razer Kishi V2 as USB controller

@arnaullv
Copy link

arnaullv commented Apr 3, 2024

These are the commits between 1.15 16/03/2023 and 1.16 release 21/09/2023
https://github.com/libretro/RetroArch/commits/master/?since=2023-03-16&until=2023-09-21&before=cdd6aed8ec1607df44fdfb02b96a53dee85ff74d+560

Around here there are commits related to touch drivers...
42c0c7e

Maybe someone can try to compile a version not including these commits to try to track down when the issue was introduced. I'm trying it but I promise nothing...
https://docs.libretro.com/development/retroarch/compilation/android/

@DavidRGriswold
Copy link

DavidRGriswold commented Apr 19, 2024

Just another voice to say that I too have this issue, with 1.17.2 installed today on an up to date Galaxy S21 FE. I am using an 8bitdo micro, and this issue happens if I have the device in keyboard mode or dinput mode but it does NOT happen if I pair it in switch mode.

Samsung definitely treats switch (and probably xbox) controllers "special", because they map the home key to open the home screen no matter what (which I hate) so something is breaking with generic input devices but not these special gamepads.

I will use my controller in switch mode for now as a personal workaround but I don't like that I have lost a button and would love to see this fixed, even if it's actually Samsung's fault.

@starjunn99
Copy link

starjunn99 commented May 31, 2024

I have same issue 1.15.0 works fine but anything higher i cant tap to screen menus only slides up and down (not using any controller just phone)

Latest stable and nightly completely useless right now

@LibretroAdmin please help

Samsung A05S / Android 14 / one ui 6.0 (worked fine before update)

@starjunn99
Copy link

Issue still exist on 1.19.1 still bugged and not usable at all.

@arnaullv
Copy link

arnaullv commented Jun 8, 2024

These are the commits between 1.15 16/03/2023 and 1.16 release 21/09/2023 https://github.com/libretro/RetroArch/commits/master/?since=2023-03-16&until=2023-09-21&before=cdd6aed8ec1607df44fdfb02b96a53dee85ff74d+560

Around here there are commits related to touch drivers... 42c0c7e

Maybe someone can try to compile a version not including these commits to try to track down when the issue was introduced. I'm trying it but I promise nothing... https://docs.libretro.com/development/retroarch/compilation/android/

Ok, Finally I achieve to set up my build environment.

I compiled 1.19 version which doesn't work, and later I compiled a version between 1.15 and 1.16 passed the mentioned touch related commits and it still works.
Current progress, until commit, ae78395 iOS/tvOS: rework JIT availability checks (#15590) (14 August 2023), it still works.
I keep trying to track down when the bug was introduced.

Edit: version with 0a96f95 Explicit typecasts to bools for flags (16 August 2023) doesn't work.
So the bug is introduced between 0a96f95 Explicit typecasts to bools for flags
(16 August 2023) and ae78395 iOS/tvOS: rework JIT availability checks (#15590) (14 August 2023)

@hizzlekizzle
Copy link
Contributor

Awesome, this is exactly what we need.

Based on your findings, I strongly suspect this is the culprit: abcd427

Can you verify whether it works before that one and then breaks after?

@arnaullv
Copy link

arnaullv commented Jun 8, 2024

Yeah that could be it, as it is related with inputs... I will let you know... compiling...

@arnaullv
Copy link

arnaullv commented Jun 8, 2024

I can confirm this is the commit that breaks all touchpads when an USB Controller is connected
With it, no touchpad works on retro consoles (like anbernic, or retroidpockets) or mobiles phones with usb controllers connected. Without it everthing works like charm.

abcd427 refactor: rewrite input handling to better support AINPUT_SOURCE_STYLUS (#15597)

This commit should be reverted and apply S-Pen Samsung stylus fixes when it's properly implemented or the fixes do not break other stuff. Any developer can apply the revert of abcd427 ?

arnaullv referenced this issue Jun 8, 2024
…US (#15597)

Resolves issues with S-Pen on Samsung devices, also adds support for S-Pen button
that is handled as r-mouse click now.
hunterk added a commit to hunterk/RetroArch that referenced this issue Jun 8, 2024
since it appears to be involved with a variety of input issues: libretro#15757
@arnaullv
Copy link

arnaullv commented Jun 9, 2024

If we revert abcd427, probably this [android] fix d-pad regression introduced in abcd427 (#15601) needs to be reverted as well, as it intended to fix some of the mess abcd427 created.

@hizzlekizzle
Copy link
Contributor

Can anyone here try this build? https://github.com/hunterk/RetroArch/actions/runs/9437129093/artifacts/1583131332

@ThunderDragonRandy
Copy link

ThunderDragonRandy commented Jun 9, 2024

Can anyone here try this build? https://github.com/hunterk/RetroArch/actions/runs/9437129093/artifacts/1583131332

Yes. So far, there are no touchscreen issues when I have my Galileo G8 plugged into my Galaxy S21 Ultra (my backup phone for testing) when using this build. 👍 Testing my Backone One: PlayStation Edition controller on my Galaxy S21 next, no issues either. 👍 And testing my Razer Raiju (which was the only one I had that worked fine with no touch issues in the latest main version of RetroArch for Android ), also no issues here. 👍

@arnaullv
Copy link

arnaullv commented Jun 9, 2024

Can anyone here try this build? https://github.com/hunterk/RetroArch/actions/runs/9437129093/artifacts/1583131332

I can also confirm that no touchscreen problems on Anbernic RG405M

@hizzlekizzle
Copy link
Contributor

Awesome. Thanks for testing, gang. I'll put a PR in for it.

LibretroAdmin pushed a commit that referenced this issue Jun 10, 2024
since it appears to be involved with a variety of input issues: #15757
@starjunn99
Copy link

starjunn99 commented Jun 10, 2024

Fixed for Samsung A05S series as well thanks. (tried merged nightly apk everything perfect)

@zzedmore
Copy link

Confirmed fixed. This also closes my issue #15672 Only took 9 months! Thanks to @arnaullv for the extensive testing and @hunterk. I wonder if you Android owners have ever tried to map the 'Pause' key to a controller button ? #14200 This hasn't worked since day 1 of Retroarch. Maybe in a few years time it will get fixed but I doubt it. 😄

@gouchi
Copy link
Member

gouchi commented Jun 11, 2024

@eengnr Please close this issue.

Thank you.

@ghost
Copy link

ghost commented Jun 14, 2024

Nice, finally it's finished 👍. At that time I written, only Nightly version are fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests