RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

In KMS mode, opening the 'search' menu (on screen keyboard) softlocks the UI

Open i30817 opened this issue 7 years ago • 22 comments

First and foremost consider this:

  • Only RetroArch bugs should be filed here. Not core bugs or game bugs
  • This is not a forum or a help section, this is strictly developer oriented

Description

As per topic. Apparently it can't get focus or something and as a 'bonus' it prevents you from switching from the tty by absorbing all input and delivering it nowhere.

Requires hardware button shutdown

Expected behavior

Either that that screen didn't show if it was known it was going to force a shutdown or that it is fixed.

Actual behavior

Forced to press doom-button.

Steps to reproduce the bug

  1. open a tty
  2. start a retroarch instance with a playlist
  3. press the search button for you (s for me but i may have reassigned it).

(or don't do that last if you can't safely shutdown from your hardware. I'm not to blame by any disk corruption).

Bisect Results

[Try to bisect and tell us when this started happening]

Version/Commit

You can find this information under Information/System Information

  • RetroArch: 2771f8cc415a0615ae7d7c594c0a498595cfb514

Environment information

  • OS: linux ubuntu 17.10 x86-64

i30817 avatar May 07 '18 12:05 i30817

I cant reproduce this, but you may be able to work around the hard shutdowns by sshing in from another device and killing RetroArch. Alternatively you could do something like.

sleep 60 ; killall retroarch
retroarch

After the 60 second timer expires RetroArch will close automatically.

orbea avatar May 07 '18 14:05 orbea

Did you try with linuxraw input driver? I couldn't actually get input in udev - in KMS - and didn't try sdl.

If i want to try the kill solution to trigger a stacktrace how would that look.

sleep 60; killall retroarch dbg ./retroarch

? I'll get i'll try.

i30817 avatar May 07 '18 16:05 i30817

I am using udev. Your user needs to be part of the input user group to use the udev input driver.

usermod -a -G input user_name

You will need a new user login session for it to take effect.

As for linuxraw I have no input at all when using kms, I would suggest using udev instead.

orbea avatar May 07 '18 16:05 orbea

It'd be interesting if the OS itself always caught Ctrl+Alt+Fkey combinations even in case of hanged/broken KMS processes, though i suspect this isn't true since the (not even) hanged retroarch was able to prevent it being passed.

I think RA should have the feature of detecting starting RA without the user in the input group in linux and quit with a obnoxious message (if only quit/show when udev is compiled in / remove linuxraw i leave to your judgment). It would have certainly caused me to not screw myself over like this.

i30817 avatar May 07 '18 18:05 i30817

I am really not fan of obnoxious warning messages. It would be better if make it so that the udev input driver didn't require any special permissions, but I'm not sure how feasible that is.

Also it may be possible to not swallow all keys with kms, but I suspect this might cause new issues. For example with mpv...

mpv -vo=drm foo.mkv

This will allow mpv to run in a tty using Kernel Mode Setting / Direct Rendering Manager, but if I try to go back to my running xorg session while mpv is playing a video my xorg session will immediately close.

orbea avatar May 07 '18 18:05 orbea

Weird about that second issue.

About the input, after a quick apt-get to install members, members input says only i30817 So that certainly seems possible since even gnome3 in wayland since nothing used the input group before i added myself. I don't actually know how that's possible, considering the complexity of input but Wayland was designed to be more secure about such things.

edit: this answer seems to indicate there is a proxygroup plugdev. I don't know how those proxies are more secure, maybe the programs that need permission to read devices are whitelisted? The weird thing is that my user is already added usbmux i30817 and it's on a logged in tty too, so if it's added automatically on login it's not a 'true' proxy because RA had trouble. Maybe if i logout of the gnome-session this changes (edit: nope).

Anyway, if it's impossible to not require lower privileges please consider my idea of quitting retroarch with a message like 'RA needs user added to input group to use udev and linuxraw can softlock your machine in KMS in certain situations' (if you're not going to fix the second situation). At least as a stopgap, because forced shutdowns are serious business.

i30817 avatar May 08 '18 08:05 i30817

I opened an issue about the VT switching here. https://github.com/libretro/RetroArch/issues/7797

orbea avatar Dec 24 '18 05:12 orbea

@i30817 We may consider this issue as duplicate of #5033 ?

gouchi avatar Sep 01 '21 10:09 gouchi

I'm not sure. Linuxraw and x input drivers are different drivers, and this is a bit more serious - if you get locked out in KMS, you have to reset if i'm not mistaken, while if you get locked out in wayland or x, the alt-tab combination still works.

So if it is the same, it should be verified the same when a fix comes in, and not before i think.

edit: not to mention this lockout isn't because of the driver, but because of a focus problem (i think it was supposed to be) so no they different.

I'm going to try to see if it still exists with a test in a tty.

i30817 avatar Sep 01 '21 18:09 i30817

Right, as you'll see see from the second spoiler the new onscreen keyboard fixes work around this soft lock, but it has curious difference between kms and x11. The joypad driver - note not the input driver - udev or linuxraw, appears to make no difference to these behaviors, though i don't have a joypad to test.

I think that the difference might be caused by X focusing the input in the text entry 'widget' behind the scenes and KMS... not and passing the input directly to the OSK as the 'normal' RA 'pseudo controller' as interpreted by a keyboard. It's better than freezing, that's for sure, though i wonder if many people experienced this before - i'm one of those few using the keyboard to play.

With udev

In kms, it locks from the start, no need to get into a playlist search. This is a manifestation of the bug you linked. I think that controllers might work since the udev controller driver actually gets loaded, but i'm using a keyboard and don't have one to test. the kms log:

[INFO] RetroArch 1.9.8 (Git ad01f5d5b6)
[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
[INFO] Capabilities:  MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AES AVX
[INFO] Built: Sep  1 2021
[INFO] Version: 1.9.8
[INFO] Git: ad01f5d5b6
[INFO] =================================================
[INFO] [Input]: Found input driver: "udev".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Video @ fullscreen
[INFO] [DRM]: Found 0 connectors.
[WARN] [DRM]: Couldn't get device connector.
[WARN] [DRM]: Couldn't get device resources.
[INFO] [DRM]: Found 2 connectors.
[INFO] [DRM]: Connector 0 connected: yes
[INFO] [DRM]: Connector 0 has 2 modes.
[INFO] [DRM]: Connector 0 assigned to monitor index: #1.
[INFO] [DRM]: Connector 1 connected: no
[INFO] [DRM]: Connector 1 has 0 modes.
[INFO] [DRM]: Mode 0: (1920x1080) 1920 x 1080, 60.007851 Hz
[INFO] [DRM]: Mode 1: (1920x1080) 1920 x 1080, 40.003925 Hz
[INFO] [GL]: Found GL context: kms
[INFO] [GL]: Detecting screen resolution 1920x1080.
[INFO] [EGL] Found EGL client version >= 1.5, trying eglGetPlatformDisplay
[INFO] [EGL]: EGL version: 1.5
[INFO] [EGL]: Current context: 0x55f1d63a6950.
[INFO] [KMS]: New FB: 1920x1080 (stride: 7680).
[INFO] [GL]: Vendor: Intel, Renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2).
[INFO] [GL]: Version: 4.6 (Compatibility Profile) Mesa 21.0.3.
[INFO] [GL]: Using resolution 1920x1080
[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] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[WARN] [udev]: Couldn't open any keyboard, mouse or touchpad. Are permissions set correctly for /dev/input/event*?
[WARN] [udev]: Full-screen pointer won't be available.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Video]: Found display server: null
[INFO] [PulseAudio]: Requested 24960 bytes buffer, got 18720.
[INFO] [Display]: Found display driver: "gl".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [SRAM]: SRAM will not be saved.
[INFO] [Playlist]: Loading history file: [/home/i3/.config/retroarch/content_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/i3/.config/retroarch/content_music_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/i3/.config/retroarch/content_image_history.lpl].
[INFO] [Playlist]: Loading favorites file: [/home/i3/.config/retroarch/content_favorites.lpl].
[WARN] [udev]: Mouse grab/ungrab feature unavailable.
[INFO] [Input]: Grab mouse state => ON
[INFO] [PulseAudio]: Pausing.
[INFO] [KMS]: New FB: 1920x1080 (stride: 7680).
[INFO] [KMS]: New FB: 1920x1080 (stride: 7680).
[INFO] [PulseAudio]: Unpausing.
[INFO] [Config]: Saved new config to "/home/i3/.config/retroarch/retroarch.cfg".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [PulseAudio]: Pausing.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[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.
with linuxraw (the original report here)

This is interesting, the behavior differs between KMS tty and X11. In both cases the keyboard appears to work with linuxraw, but in X11, you can use the keyboard in a playlist search (without having to use the on screen keyboard - in fact, you actually can't use the onscreen keyboard, only the real one, probably because i have no controller. In KMS it's the other way around, you can't use the keyboard to input the search, but you can use the OSK (with the keyboard serving as a controller). So this was worked around by the new functionality to always have the on screen keyboard open on searches.

the kms log:

[INFO] RetroArch 1.9.8 (Git ad01f5d5b6)
[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
[INFO] Capabilities:  MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AES AVX
[INFO] Built: Sep  1 2021
[INFO] Version: 1.9.8
[INFO] Git: ad01f5d5b6
[INFO] =================================================
[INFO] [Input]: Found input driver: "linuxraw".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] Version of libretro API: 1
[INFO] Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Video @ fullscreen
[INFO] [DRM]: Found 0 connectors.
[WARN] [DRM]: Couldn't get device connector.
[WARN] [DRM]: Couldn't get device resources.
[INFO] [DRM]: Found 2 connectors.
[INFO] [DRM]: Connector 0 connected: yes
[INFO] [DRM]: Connector 0 has 2 modes.
[INFO] [DRM]: Connector 0 assigned to monitor index: #1.
[INFO] [DRM]: Connector 1 connected: no
[INFO] [DRM]: Connector 1 has 0 modes.
[INFO] [DRM]: Mode 0: (1920x1080) 1920 x 1080, 60.007851 Hz
[INFO] [DRM]: Mode 1: (1920x1080) 1920 x 1080, 40.003925 Hz
[INFO] [GL]: Found GL context: kms
[INFO] [GL]: Detecting screen resolution 1920x1080.
[INFO] [EGL] Found EGL client version >= 1.5, trying eglGetPlatformDisplay
[INFO] [EGL]: EGL version: 1.5
[INFO] [EGL]: Current context: 0x5560f95c3930.
[INFO] [KMS]: New FB: 1920x1080 (stride: 7680).
[INFO] [GL]: Vendor: Intel, Renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2).
[INFO] [GL]: Version: 4.6 (Compatibility Profile) Mesa 21.0.3.
[INFO] [GL]: Using resolution 1920x1080
[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] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Video]: Found display server: null
[INFO] [PulseAudio]: Requested 24960 bytes buffer, got 18720.
[INFO] [Display]: Found display driver: "gl".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [SRAM]: SRAM will not be saved.
[INFO] [Playlist]: Loading history file: [/home/i3/.config/retroarch/content_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/i3/.config/retroarch/content_music_history.lpl].
[INFO] [Playlist]: Loading history file: [/home/i3/.config/retroarch/content_image_history.lpl].
[INFO] [Playlist]: Loading favorites file: [/home/i3/.config/retroarch/content_favorites.lpl].
[INFO] [PulseAudio]: Pausing.
[INFO] [KMS]: New FB: 1920x1080 (stride: 7680).
[INFO] [KMS]: New FB: 1920x1080 (stride: 7680).
[INFO] [PulseAudio]: Unpausing.
[INFO] [Config]: Saved new config to "/home/i3/.config/retroarch/retroarch.cfg".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [PulseAudio]: Pausing.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[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.  

i30817 avatar Sep 01 '21 19:09 i30817

I also couldn't use vulkan for kms yet for some reason so i used the gl driver to test this. I didn't test the 'x' input driver for the obvious reason that it doesn't work in kms - but at least it behaves better than udev - it never lets you start retroarch.

i30817 avatar Sep 01 '21 19:09 i30817

You really shouldn't be in wayland or x when using kms it should be tested on the tty environment as intended.

ghost avatar Sep 01 '21 21:09 ghost

I did test on the tty environment. By pressing ctrl + alt + fkey and login. If you think that's not good enough i can do logout and then do the login but that's the same i think.

The logs are from KMS on a tty, the text inside the spoilers also occasionally mentions what happens in x in addition (ie : udev softlocks and linuxraw works ok with that peculiarity that the search can only use the OSK and it's is vice versa in X11).

If you're asking 'how did you do this', i built both executables (with TARGET=differentfilenames), one only for X and another only for KMS and on the tty i used the kms one, and on x i used the x one.

I'm using navi script because i got tired of the sequence of commands to build RA, if you're interested in it. You'd have to install navi, change the paths in the script, clone the repositories the first time manually and then put the script on the navi .local/share/navi/cheats dir. Then start navi and chose and you have a small text gui to chose the branch to build and the debug value. Didn't manage to do simple way to make the config configurable so that is not part of the GUI. Then i put in a bash alias to those two resulting executables. This is my 'solution' to the buildbot being outdated all the time, or when i want to test a branch but i'm feeling lazy. With a bit more work it'd also build PRs but that's a pain to do and the downloads to just get the pr names get silly (i think you have to download it all).

The navi script
% make, build, projects, compile

; variables are initialized by navi BEFORE the commands run so one of these per repository is needed
; this is the reason the fetch origin is here, to fetch the new branches

$ use_debug: echo 'false true' | tr ' ' '\n' --- --prevent-extra --map "[[ $0 == t* ]] && echo -n 1 || echo -n 0"

$ retroarch_branch: git -C /home/i3/Documents/Projects/RetroArch fetch origin &>/dev/null; git -C /home/i3/Documents/Projects/RetroArch branch --no-column --format '%(refname)' -a | sed '/HEAD detached at/d' | sed 's/^refs\/\(heads\|remotes\)\///g' --- --prevent-extra

# retroarch kms
( \
cd /home/i3/Documents/Projects/RetroArch; \
;store both stdout and stderr
OUTPUT=$( { git checkout '<retroarch_branch>' ; } 2>&1 ); \
STATUS=$?; \
; string used at the start of both automergable divergence and fast forward, both of which use pull
[[ "$OUTPUT" == *"Your branch "* ]] && { git pull && git submodule update && make clean; }; \
; integer expressions are inverted in 'truth value' to return values in bash, 0 is false, everything else true
! ((STATUS|=$?)) && ./configure --disable-discord --disable-qt --disable-cdrom --disable-x11 --disable-caca --disable-sdl --disable-sdl2 --disable-opengl1 --disable-ffmpeg --disable-flac --disable-wayland --enable-kms --enable-opengl --enable-vulkan && make -j2 DEBUG=<use_debug> GL_DEBUG=<use_debug> TARGET=retroarch; \
printf "\a"; \
)

# retroarch X11
( \
cd /home/i3/Documents/Projects/RetroArch; \
;store both stdout and stderr
OUTPUT=$( { git checkout '<retroarch_branch>' ; } 2>&1 ); \
STATUS=$?; \
; string used at the start of both automergable divergence and fast forward, both of which use pull
[[ "$OUTPUT" == *"Your branch "* ]] && { git pull && git submodule update && make clean; }; \
! ((STATUS|=$?)) && ./configure --disable-discord --disable-qt --disable-cdrom --enable-x11 --disable-caca --disable-sdl --disable-sdl2 --disable-opengl1 --disable-ffmpeg --disable-flac --disable-wayland --disable-kms --enable-opengl --enable-vulkan && make -j2 DEBUG=<use_debug> GL_DEBUG=<use_debug> TARGET=retroarch_x11; \
printf "\a"; \
)

$ ppsspp_branch: git -C /home/i3/Documents/Projects/ppsspp fetch origin &>/dev/null; git -C /home/i3/Documents/Projects/ppsspp branch --no-column --format '%(refname)' -a | sed '/HEAD detached at/d' | sed 's/^refs\/\(heads\|remotes\)\///g' --- --prevent-extra

# ppsspp gl31 RA core
; to build gles use -DUSING_GLES2 instead of -DHAVE_OPENGL_CORE on DYNAFLAGS (no =1 or =ON at the end)
( \
export CORE="$HOME/.config/retroarch/cores/ppsspp_libretro.so"; \
cd /home/i3/Documents/Projects/ppsspp/libretro; \
OUTPUT=$( { git checkout '<ppsspp_branch>' ; } 2>&1 ); \
STATUS=$?; \
[[ "$OUTPUT" == *"Your branch "* ]] && { git pull && git submodule update && make clean; }; \
! ((STATUS|=$?)) && { make -j2 DEBUG=<use_debug> DYNAFLAGS="-DHAVE_OPENGL_CORE" && gio trash -f "$CORE" && mv -fT ./ppsspp_libretro.so "$CORE" && chmod -x "$CORE"; }; \
printf "\a"; \
)

$ dolphin_branch: git -C /home/i3/Documents/Projects/dolphin fetch origin &>/dev/null; git -C /home/i3/Documents/Projects/dolphin branch --no-column --format '%(refname)' -a | sed '/HEAD detached at/d' | sed 's/^refs\/\(heads\|remotes\)\///g' --- --prevent-extra

# dolphin RA core
( \
export CORE="$HOME/.config/retroarch/cores/dolphin_libretro.so"; \
cd /home/i3/Documents/Projects/dolphin/build; \
OUTPUT=$( { git checkout '<dolphin_branch>' ; } 2>&1 ); \
STATUS=$?; \
[[ "$OUTPUT" == *"Your branch "* ]] && { git pull && git submodule update && make clean; }; \
! ((STATUS|=$?)) && { cmake -DLIBRETRO=ON -DENABLE_HEADLESS=ON -DENABLE_LTO=OFF -DENABLE_EVDEV=OFF -DENABLE_X11=OFF -DENABLE_TESTS=OFF .. && make && gio trash -f "$CORE" && mv -fT ./dolphin_libretro.so "$CORE" && chmod -x "$CORE"; }; \
printf "\a"; \
)

Navi is kind of a terrible scripting language for more complex scripts mixing bash, but i sure like the ability to filter by name and show predetermined options if i want to.

i30817 avatar Sep 02 '21 04:09 i30817

How exactly do I trigger this anytime I get the search box I usually just press enter. Do I have to search within a playlist as I don't have any I usually launch via the command line when I'm testing. I disable the display manager temporarily when messing with kms. From testing the udev mouse changes.

ghost avatar Sep 03 '21 03:09 ghost

Yes, i used a playlist. I tested this right now (with linuxraw) and i did notice that enter is actually working.

But it didn't work before.

And i think - suspect - i know why it's working - it's the retropad 'start' bound to the OSK 'enter' (which as i mentioned works now - this wasn't the case when i posted this bug, it hardlocked).

Seems like there was a fix where the search works differently in KMS. In X it allows the keyboard, in the TTY KMS it only allows the retropad but that works with the keyboard.

CTRL+ALT+FKEYS (both in search and outside) and the 'press twice esc to exit' inside search still don't work and i doubt they will really.

Udev KMS still freezes RA right at the start.

So basically in this particular bug the situation is much better because you can actually exit (although if you want my opinion being forced to use the OSK is a bit of a bummer for searches); but for the udev problem still requires a hard restart.

i30817 avatar Sep 03 '21 04:09 i30817

Can you post a log with debug on your log says couldn't open any keyboard. I added debugging when a udev fails add when messing with the mouse stuff

ghost avatar Sep 04 '21 01:09 ghost

With full loging too, besides the debug mode?

i30817 avatar Sep 04 '21 02:09 i30817

I just tried kms mode and had no issues well a little one with vulkan the screen goes black a few seconds on exit. Also the video driver isint picking up an automatic driver I think I know what's causing that though. Im using linux mint im pretty sure you issue might be permissions related. Are you still using linux ubuntu 17.10 x86-64 ?

I compiled with your configure line

./configure --disable-discord --disable-qt --disable-cdrom --disable-x11 --disable-caca --disable-sdl --disable-sdl2 --disable-opengl1 --disable-ffmpeg --disable-flac --disable-wayland --enable-kms --enable-opengl --enable-vulkan

here is the log I tested with sudo telinit 3 ( press alt f1 to get terminal) to close x telinit 5 to resume x

can you just post a ls -al /dev/input to rule out permissions so we can check your permissions

[INFO] RetroArch 1.9.8 (Git f905012376) [INFO] === Build ======================================= [INFO] CPU Model Name: Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz [INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE4.2 AES AVX AVX2 [INFO] Built: Sep 4 2021 [INFO] Version: 1.9.8 [INFO] Git: f905012376 [INFO] ================================================= [INFO] [Input]: Found input driver: "udev". [INFO] [Environ]: SET_PIXEL_FORMAT: RGB565. [INFO] Version of libretro API: 1 [INFO] Compiled against API: 1 [INFO] [Audio]: Set audio input rate to: 48000.00 Hz. [INFO] [Video]: Video @ 960x720 [INFO] [DRM]: Found 5 connectors. [INFO] [DRM]: Connector 0 connected: no [INFO] [DRM]: Connector 0 has 0 modes. [INFO] [DRM]: Connector 1 connected: no [INFO] [DRM]: Connector 1 has 0 modes. [INFO] [DRM]: Connector 2 connected: no [INFO] [DRM]: Connector 2 has 0 modes. [INFO] [DRM]: Connector 3 connected: yes [INFO] [DRM]: Connector 3 has 26 modes. [INFO] [DRM]: Connector 3 assigned to monitor index: #1. [INFO] [DRM]: Connector 4 connected: no [INFO] [DRM]: Connector 4 has 0 modes. [INFO] [DRM]: Mode 0: (1920x1080) 1920 x 1080, 60.000000 Hz [INFO] [DRM]: Mode 1: (1920x1080) 1920 x 1080, 59.940201 Hz [INFO] [DRM]: Mode 2: (1920x1080) 1920 x 1080, 50.000000 Hz [INFO] [DRM]: Mode 3: (1920x1080) 1920 x 1080, 24.000000 Hz [INFO] [DRM]: Mode 4: (1920x1080) 1920 x 1080, 23.976080 Hz [INFO] [DRM]: Mode 5: (1280x1024) 1280 x 1024, 75.024673 Hz [INFO] [DRM]: Mode 6: (1280x720) 1280 x 720, 60.000000 Hz [INFO] [DRM]: Mode 7: (1280x720) 1280 x 720, 59.940201 Hz [INFO] [DRM]: Mode 8: (1280x720) 1280 x 720, 50.000000 Hz [INFO] [DRM]: Mode 9: (1024x768) 1024 x 768, 75.028580 Hz [INFO] [DRM]: Mode 10: (1024x768) 1024 x 768, 70.069359 Hz [INFO] [DRM]: Mode 11: (1024x768) 1024 x 768, 60.003841 Hz [INFO] [DRM]: Mode 12: (832x624) 832 x 624, 74.551270 Hz [INFO] [DRM]: Mode 13: (800x600) 800 x 600, 75.000000 Hz [INFO] [DRM]: Mode 14: (800x600) 800 x 600, 72.187569 Hz [INFO] [DRM]: Mode 15: (800x600) 800 x 600, 60.316540 Hz [INFO] [DRM]: Mode 16: (800x600) 800 x 600, 56.250000 Hz [INFO] [DRM]: Mode 17: (720x576) 720 x 576, 50.000000 Hz [INFO] [DRM]: Mode 18: (720x480) 720 x 480, 60.000000 Hz [INFO] [DRM]: Mode 19: (720x480) 720 x 480, 59.940060 Hz [INFO] [DRM]: Mode 20: (640x480) 640 x 480, 75.000000 Hz [INFO] [DRM]: Mode 21: (640x480) 640 x 480, 72.808800 Hz [INFO] [DRM]: Mode 22: (640x480) 640 x 480, 66.666664 Hz [INFO] [DRM]: Mode 23: (640x480) 640 x 480, 60.000000 Hz [INFO] [DRM]: Mode 24: (640x480) 640 x 480, 59.940475 Hz [INFO] [DRM]: Mode 25: (720x400) 720 x 400, 70.081665 Hz [INFO] [GL]: Found GL context: kms [INFO] [GL]: Detecting screen resolution 1920x1080. [INFO] [EGL] Found EGL client version >= 1.5, trying eglGetPlatformDisplay [INFO] [EGL]: EGL version: 1.5 [INFO] [EGL]: Current context: 0x60b00001d310. [INFO] [KMS]: New FB: 1920x1080 (stride: 8192). [INFO] [GL]: Vendor: AMD, Renderer: AMD Radeon (TM) RX 480 Graphics (POLARIS10, DRM 3.35.0, 5.4.0-81-generic, LLVM 12.0.1). [INFO] [GL]: Version: 4.6 (Compatibility Profile) Mesa 21.3.0-devel (git-19e2996 2021-08-27 focal-oibaf-ppa). [INFO] [GL]: Using resolution 1920x1080 [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] [GL]: Using 4 textures. [INFO] [GL]: Loaded 1 program(s). [INFO] [GL]: Using GL_RGB565 for texture uploads. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver. [INFO] [udev]: Keyboard #0: "Power Button" (/dev/input/event1). [INFO] [udev]: Keyboard #1: "Power Button" (/dev/input/event0). [INFO] [udev]: Keyboard #2: "Logitech Wireless Keyboard PID:0068" (/dev/input/event2). [INFO] [udev]: Keyboard #3: "Eee PC WMI hotkeys" (/dev/input/event4). [INFO] [udev]: Mouse #0: "Logitech Wireless Mouse PID:0085" (/dev/input/event3). [WARN] [udev]: Full-screen pointer won't be available. [INFO] [Joypad]: Found joypad driver: "udev". [INFO] [Video]: Found display server: null [INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432. [INFO] [Display]: Found display driver: "gl". [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [Font]: Using font rendering backend: freetype. [INFO] [SRAM]: SRAM will not be saved. [INFO] [Playlist]: Loading history file: [/home/grant/.config/retroarch/content_history.lpl]. [INFO] [Playlist]: Loading history file: [/home/grant/.config/retroarch/content_music_history.lpl]. [INFO] [Playlist]: Loading history file: [/home/grant/.config/retroarch/content_image_history.lpl]. [INFO] [Playlist]: Loading favorites file: [/home/grant/.config/retroarch/content_favorites.lpl]. [INFO] [KMS]: New FB: 1920x1080 (stride: 8192). [INFO] [KMS]: New FB: 1920x1080 (stride: 8192). [INFO] [Config]: Saved new config to "/home/grant/.config/retroarch/retroarch.cfg". [INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds. [INFO] [PulseAudio]: Pausing. [INFO] [Core]: Unloading core.. [INFO] [Core]: Unloading core symbols.. [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.

ghost avatar Sep 04 '21 03:09 ghost

No, i'm on focal (Ubuntu 20.04.3 LTS).

Also i'm not adding my user to the audio or plugdev groups manually, if that's the reason it works for you, that's just silly.

Regardless, if you're going to focus on the permission problem this is the wrong place for it.

I could close this issue because it's no longer a fatal one (you can use the OSK on KMS, no longer freezes input), but the behavior isn't great. Using the OSK is slow and the same config file differs between X11 and KMS versions of retroarch with the same drivers in behavior here - X11 allows keyboard input and no retropad OSK input, and vice-versa in KMS.

I'm going to ask again, in KMS, can you use the keyboard to search (not the OSK) after pressing 's' in a playlist?

i30817 avatar Sep 04 '21 08:09 i30817

I never added any groups silly using kms without permissions. Use x or wayland if your using wayland it always uses it driver regardless of what you select. Yes I can search my playlist history with the keyboard in kms

ghost avatar Sep 04 '21 09:09 ghost

@i30817 are you still experiencing this?

hizzlekizzle avatar Oct 05 '24 14:10 hizzlekizzle

I can't test anymore, my "pc" doesn't allow running RetroArch (it's a eeepc from 2008 with 2 gb and a 4 gb ssd, enough said). I'm actually posting in a Android tablet.

i30817 avatar Oct 05 '24 15:10 i30817

Hi @i30817,

I think the issue can be closed.

I could not reproduce the issue. I could make a search on Playlist using the keyboard without being "softlock".

I made a test on Manjaro live KDE Plasma.

id
uid=1000(manjaro) gid=1000(manjaro) groups=1000(manjaro),3(sys),90(network),98(power),991(lp),998(wheel)

I installed game-devices-udev for the gamepad which relies on uaccess tag.

I compile latest RA b73d764 with

git clone https://github.com/libretro/retroarch
cd retroarch
./configure --disable-qt --disable-x11 --disable-wayland --disable-pipewire --enable-kms --enable-egl --enable-vulkan
./retroarch -v 

Of course, I stopped sddm before launching RA using sudo systemctl stop sddm.service in the terminal ;)

retroarch --features
Features:
  LibretroDB      - LibretroDB support: yes
  Command         - Command interface support: yes
  Network Command - Network Command interface support: yes
  SDL2            - SDL2 input/audio/video drivers: yes
  UDEV            - UDEV/EVDEV input driver: yes
  Threads         - Threading support: yes
  Vulkan          - Video driver: yes
  OpenGL          - Video driver: yes
  EGL             - Video context driver: yes
  KMS             - Video context driver: yes
  ALSA            - Audio driver: yes
  OSS             - Audio driver: yes
  Jack            - Audio driver: yes
  PulseAudio      - Audio driver: yes
  7zip            - 7zip extraction support: yes
  zlib            - zip extraction support: yes
  External        - External filter and plugin support: yes
  GLSL            - Fragment/vertex shader driver: yes
  glslang         - Fragment/vertex shader driver: yes
  rpng            - PNG image loading/encoding: yes
  rjpeg           - JPEG image loading: yes
  Dynamic         - Dynamic run-time loading of libretro library: yes
  FFmpeg          - On-the-fly recording of gameplay with libavcodec: yes
  FreeType        - TTF font rendering driver: yes
  Netplay         - Peer-to-peer netplay: yes
  SSL             - SSL Support: yes
  Video4Linux2    - Camera driver: yes
RA log
INFO] [Config] Looking for config in: "/home/manjaro/.config/retroarch/retroarch.cfg".
[INFO] RetroArch 1.21.0 (Git b73d76445f)
[INFO] === Build =======================================
[INFO] CPU Model Name: Intel(R) Core(TM) i7-4771 CPU @ 3.50GHz
[INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 AES AVX AVX2 
[INFO] Version: 1.21.0
[INFO] Git: b73d76445f
[INFO] Built: Sep 21 2025
[INFO] =================================================
[INFO] [Input] Found input driver: "linuxraw".
[INFO] [Environ] SET_PIXEL_FORMAT: RGB565.
[INFO] [Core] Version of libretro API: 1, Compiled against API: 1
[INFO] [Core] Geometry: 320x240, Aspect: 1.333, FPS: 60.00, Sample rate: 48000.00 Hz.
[INFO] [Video] Set video size to: 960x720.
[INFO] [DRM] Found 5 connectors.
[INFO] [DRM] Connector 0 connected: no
[INFO] [DRM] Connector 0 has 0 modes.
[INFO] [DRM] Connector 1 connected: yes
[INFO] [DRM] Connector 1 has 24 modes.
[INFO] [DRM] Connector 1 assigned to monitor index: #1.
[INFO] [DRM] Connector 2 connected: no
[INFO] [DRM] Connector 2 has 0 modes.
[INFO] [DRM] Connector 3 connected: no
[INFO] [DRM] Connector 3 has 0 modes.
[INFO] [DRM] Connector 4 connected: no
[INFO] [DRM] Connector 4 has 0 modes.
[INFO] [DRM] Mode 0: (1920x1080) 1920 x 1080, 60.000000 Hz
[INFO] [DRM] Mode 1: (1920x1080) 1920 x 1080, 74.972504 Hz
[INFO] [DRM] Mode 2: (1920x1080) 1920 x 1080, 59.939392 Hz
[INFO] [DRM] Mode 3: (1920x1080) 1920 x 1080, 50.000000 Hz
[INFO] [DRM] Mode 4: (1600x1200) 1600 x 1200, 60.000000 Hz
[INFO] [DRM] Mode 5: (1680x1050) 1680 x 1050, 59.954250 Hz
[INFO] [DRM] Mode 6: (1280x1024) 1280 x 1024, 75.024673 Hz
[INFO] [DRM] Mode 7: (1280x1024) 1280 x 1024, 60.019741 Hz
[INFO] [DRM] Mode 8: (1440x900) 1440 x 900, 74.984428 Hz
[INFO] [DRM] Mode 9: (1440x900) 1440 x 900, 59.887444 Hz
[INFO] [DRM] Mode 10: (1280x960) 1280 x 960, 60.000000 Hz
[INFO] [DRM] Mode 11: (1280x720) 1280 x 720, 60.000000 Hz
[INFO] [DRM] Mode 12: (1280x720) 1280 x 720, 59.943436 Hz
[INFO] [DRM] Mode 13: (1280x720) 1280 x 720, 50.000000 Hz
[INFO] [DRM] Mode 14: (1152x720) 1152 x 720, 60.000854 Hz
[INFO] [DRM] Mode 15: (1024x768) 1024 x 768, 75.028580 Hz
[INFO] [DRM] Mode 16: (1024x768) 1024 x 768, 60.003841 Hz
[INFO] [DRM] Mode 17: (800x600) 800 x 600, 75.000000 Hz
[INFO] [DRM] Mode 18: (800x600) 800 x 600, 60.316540 Hz
[INFO] [DRM] Mode 19: (720x576) 720 x 576, 50.000000 Hz
[INFO] [DRM] Mode 20: (720x480) 720 x 480, 59.940060 Hz
[INFO] [DRM] Mode 21: (640x480) 640 x 480, 75.000000 Hz
[INFO] [DRM] Mode 22: (640x480) 640 x 480, 59.940475 Hz
[INFO] [DRM] Mode 23: (640x480) 640 x 480, 59.928570 Hz
[INFO] [GL] Found GL context: "kms".
[INFO] [GL] Detecting screen resolution: 1920x1080.
[WARN] [KMS] Falling back to mode 0 (default).
[INFO] [EGL] Found EGL client version >= 1.5, trying eglGetPlatformDisplay.
[INFO] [EGL] EGL version: 1.5.
[INFO] [EGL] Current context: 0x55c5045ed891.
[INFO] [KMS] New FB: 1920x1080 (stride: 7680).
[INFO] [GL] Vendor: NVIDIA Corporation, Renderer: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2.
[INFO] [GL] Version: 4.6.0 NVIDIA 575.64.05.
[INFO] [GL] Using resolution 1920x1080.
[INFO] [GL] Default shader backend found: glsl.
[INFO] [GL] Using GLSL shader backend.
[INFO] [GLSL] Checking GLSL shader support...
[WARN] [GLSL] 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] [GL] Using 4 textures.
[INFO] [GL] Loaded 1 program(s).
[INFO] [GL] Using GL_RGB565 for texture uploads.
[INFO] [Video] Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[INFO] [udev] Pad #0 (/dev/input/event25) supports force feedback.
[INFO] [udev] Pad #0 (/dev/input/event25) supports 16 force feedback effects.
[INFO] [Autoconf] Xbox 360 Controller configured in port 1.
[INFO] [Input] Found joypad driver: "udev".
[INFO] [Video] Found display server: "kms".
[INFO] [Audio] Set audio input rate to: 48000.00 Hz.
[INFO] [PulseAudio] Requested 24576 bytes buffer, got 18432.
[INFO] [Audio] Started synchronous audio driver.
[INFO] [ALSA] Using ALSA version 1.2.14
[INFO] [Microphone] Initialized microphone driver.
[INFO] [Display] Found display driver: "gl".
[INFO] [Playlist] Loading favorites file: "/home/manjaro/.config/retroarch/playlists/builtin/content_favorites.lpl".
[INFO] [Playlist] Loading history file: "/home/manjaro/.config/retroarch/playlists/builtin/content_history.lpl".
[INFO] [Playlist] Loading history file: "/home/manjaro/.config/retroarch/playlists/builtin/content_image_history.lpl".
[INFO] [Playlist] Loading history file: "/home/manjaro/.config/retroarch/playlists/builtin/content_music_history.lpl".
[INFO] [Playlist] Loading history file: "/home/manjaro/.config/retroarch/playlists/builtin/content_video_history.lpl".
[INFO] [KMS] New FB: 1920x1080 (stride: 7680).
[INFO] [KMS] New FB: 1920x1080 (stride: 7680).
[INFO] [Config] Saved config to "/home/manjaro/.config/retroarch/retroarch.cfg".
[INFO] [Core] Unloading core...
[INFO] [Core] Unloading core symbols...

gouchi avatar Sep 21 '25 17:09 gouchi