Retropie setup menu/Runcommand crashing in ES on Ubuntu
-
Lol... founded another workaround..... right now my
.local/share/application/retropie.desktop
:[Desktop Entry] Type=Application Exec=gnome-terminal --full-screen --hide-menubar -- /usr/bin/retropie.sh Hidden=false NoDisplay=false X-GNOME-Autostart-enabled=true Name[de_DE]=RetroPie Name=RetroPie Comment[de_DE]=RetroPie Comment=retropie Icon=/usr/local/share/icons/retropie.svg Categories=Game
And this
/usr/bin/retropie.sh
:#!/bin/bash sudo sysctl -w dev.tty.legacy_tiocsti=1 file=/tmp/file.$PPID if ! [ -f $file ]; then echo 1 >$file && sleep 1 && rm $file else sleep 10 && exit 0 fi _isRunning() { ps -o comm= -C "$1" 2>/dev/null | grep -x "$1" >/dev/null 2>&1 } if ! _isRunning emulationstatio; then emulationstation #sudo sysctl -w dev.tty.legacy_tiocsti=1 #gnome-terminal --full-screen --hide-menubar -- emulationstation #sudo sysctl -w dev.tty.legacy_tiocsti=0 #sudo gedit fi sudo sysctl -w dev.tty.legacy_tiocsti=0 exit 0
This apparently it's a good workaround.
basically run the retropie.sh directly in a windows terminal, the tiocsti it's setted correctly to 1. And after that emulationstation it's launched.
Since it is launched in a terminal window runcommand is now properly accessible also from my arcade stick..
So when i choose to exit from emulationstation tiocsti it's setted again to 0 as default and terminal windows it's closed himself.I thinks it's a good solution.
Thanks in advance for support and and for future fixes that will give back the possibility to use the retropie setup script directly from emulationstation.
-- EDIT --
Little TWEAK Operation on retropie.sh... now it's :
#!/bin/bash file=/tmp/file.$PPID if ! [ -f $file ]; then echo 1 >$file && sleep 1 && rm $file else sleep 10 && exit 0 fi _isRunning() { ps -o comm= -C "$1" 2>/dev/null | grep -x "$1" >/dev/null 2>&1 } if ! _isRunning emulationstatio; then sudo sysctl -w dev.tty.legacy_tiocsti=1 emulationstation sudo sysctl -w dev.tty.legacy_tiocsti=0 #gnome-terminal --full-screen --hide-menubar -- emulationstation #sudo gedit else wmctrl -a emulationstation fi exit 0
I have to install wmctrl to set focus to emulationstation if it's already runned.
All this it's to prevent a double istance if you made a erroneous double on retropie icon on left dock :)
-
The latest RetroPie-Setup version updares
joy2key
to a new version that's no longer dependant ondev.tty.legacy_tiocsti
being modified from the default. You can give it a try by updating RetroPiet-Setup,joy2key
will be automatically updated in the process. -
Yes I have seen the recent and latest commits.
Now I do all the updates... I edit everything and remove the "sysctl" entries from my retropie.sh and update you.Should this also fix the 'retropie setup script' thing that crashes when launched from emulationstation?
-
@mitu no friends.... apparently the new joy2key it's not resolve the issue.
I have try to run a games and press a button during runcommand windows and there's happen this:
Open the detail it's appear this:
If you thinks it's usefull i can also try to run joy2key from terminal........ i try to edit this same post in a minute.
-
In a terminal it's happen this:
Try to lauch 'Retropie setup script' and other tools from emulationstation all goes in crash after you press a key or touch somethings on my arcade stick.
Look at here... for works good from terminal apparently i need to launch joy2key on sudo right now:
diabolik@NUC-Ubuntu:~$ sudo /opt/retropie/admin/joy2key/joy2key_sdl.py kcub1 kcuf1 kcuu1 kcud1 0x0a 0x20 0x1b 0x00 kpp knp -d 2024-10-16 03:21:20,549 DEBUG Debugging enabled, running in foreground 2024-10-16 03:21:20,549 DEBUG Cannot determine input code for "0x00", value ignored 2024-10-16 03:21:20,549 DEBUG Cannot determine input code for "0x00", value ignored 2024-10-16 03:21:20,549 DEBUG Joy map: {'left': 105, 'right': 106, 'up': 103, 'down': 108, 'a': 28, 'b': 57, 'x': 1, 'y': 0, 'pageup': 104, 'pagedown': 109} 2024-10-16 03:21:23,482 DEBUG Using SDL Version 2.30.0, PySDL2 version 0.9.16 2024-10-16 03:21:23,483 DEBUG Creating uinput keyboard devices with events: [(1, 105), (1, 106), (1, 103), (1, 108), (1, 28), (1, 57), (1, 1), (1, 0), (1, 104), (1, 109)] 2024-10-16 03:21:23,536 DEBUG Joystick #0 DragonRise Inc. Generic USB Joystick added 2024-10-16 03:21:23,536 DEBUG Added configuration for known device DragonRise Inc. Generic USB Joystick, hats: {}, buttons: {6: 'pagedown', 4: 'pageup', 0: 'y', 2: 'x', 1: 'b', 3: 'a'}, axis: {0: [(-1, 'left'), (1, 'right')], 1: [(1, 'down'), (-1, 'up')]} 2024-10-16 03:21:32,167 DEBUG Events to emit: ['down'] 2024-10-16 03:21:32,168 DEBUG Emitting input code 108 ^[[B2024-10-16 03:21:41,959 DEBUG Events to emit: ['up'] 2024-10-16 03:21:41,959 DEBUG Emitting input code 103 ^[[A2024-10-16 03:21:43,827 DEBUG Events to emit: ['left'] 2024-10-16 03:21:43,828 DEBUG Emitting input code 105 ^[[D2024-10-16 03:21:45,544 DEBUG Events to emit: ['right'] 2024-10-16 03:21:45,544 DEBUG Emitting input code 106 ^[[C^C2024-10-16 03:21:47,829 DEBUG /opt/retropie/admin/joy2key/joy2key_sdl.py exiting cleanly diabolik@NUC-Ubuntu:~$
Emulationstation how use current joy2key ? By sudo or not ?
-
@DjDiabolik said in Retropie setup menu/Runcommand crashing in ES on Ubuntu:
Emulationstation how use current joy2key ? By sudo or not ?
The RetroPie setup (or the other dialog based configuration tools) is using
sudo
to launch, but notruncommand
. Your user needs to be part of theinput
group, which apparently is not done by default on Ubuntu ?I'll modify the installation routine to make sure the user is part of the
input
group, so the 1st error (forruncommand
) does not happen anymore.
EDIT: ok, update RetroPie-Setup and then re-login/reboot, the next run ofruncommand
(starting a game) should not give you an error. -
@mitu ok... i have unpdate 'retropie setup script' to last recent commit.... and reboot my ubuntu 24.04.1 LTS
Apparently from terminal nothings it's changed :
diabolik@NUC-Ubuntu:~$ /opt/retropie/admin/joy2key/joy2key_sdl.py kcub1 kcuf1 kcuu1 kcud1 0x0a 0x20 0x1b 0x00 kpp knp -d 2024-10-16 12:07:25,089 DEBUG Debugging enabled, running in foreground 2024-10-16 12:07:25,089 DEBUG Cannot determine input code for "0x00", value ignored 2024-10-16 12:07:25,089 DEBUG Cannot determine input code for "0x00", value ignored 2024-10-16 12:07:25,090 DEBUG Joy map: {'left': 105, 'right': 106, 'up': 103, 'down': 108, 'a': 28, 'b': 57, 'x': 1, 'y': 0, 'pageup': 104, 'pagedown': 109} 2024-10-16 12:07:27,766 DEBUG Using SDL Version 2.30.0, PySDL2 version 0.9.16 2024-10-16 12:07:27,766 DEBUG Creating uinput keyboard devices with events: [(1, 105), (1, 106), (1, 103), (1, 108), (1, 28), (1, 57), (1, 1), (1, 0), (1, 104), (1, 109)] Traceback (most recent call last): File "/opt/retropie/admin/joy2key/joy2key_sdl.py", line 608, in <module> sys.exit(main()) ^^^^^^ File "/opt/retropie/admin/joy2key/joy2key_sdl.py", line 600, in main event_loop(configs, joy_map) File "/opt/retropie/admin/joy2key/joy2key_sdl.py", line 334, in event_loop kbd = uinput.Device(events=keyboard_events, name="Joy2Key Keyboard") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 178, in __init__ self.__uinput_fd = fd or fdopen() ^^^^^^^^ File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 84, in fdopen return _libsuinput.suinput_open() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 70, in _open_error_handler raise OSError(code, msg) PermissionError: [Errno 13] Failed to open the uinput device: Permission denied diabolik@NUC-Ubuntu:~$
From emulationstation i need to test to run one games..... edit in a moment.
-
From emulationstation no works.... it's impossibile to open the "runcommand" option and i have tryed to press many times my controller buttons but not working.
The "runcommand" option it's not open also if i click some keyboard buttons.... -
@DjDiabolik Is your user in the
input
group` ? -
@mitu said in Retropie setup menu/Runcommand crashing in ES on Ubuntu:
@DjDiabolik Is your user in the
input
group` ?How do I find out?
-
@DjDiabolik You can run the
id
command and it should print the list of groups. However, it seems it's not enough on Ubuntu to enable write-access. I'll take a look again to see what options are available.
Thanks for testing. -
Run the following command:
echo 'KERNEL=="uinput", GROUP="input", MODE=0660' | sudo tee /etc/udev/rules.d/80-uinput.rules
and then reboot, afterwards see if the thee permission error still shows up when running as user
joy2key_sdl
or ifruncommand
menu works. -
So id output it's this:
diabolik@NUC-Ubuntu:~$ id uid=1000(diabolik) gid=1000(diabolik) gruppi=1000(diabolik),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),107(input),122(lpadmin),135(lxd),136(sambashare) diabolik@NUC-Ubuntu:~$
Before to run the seconds command i have tryed to look on /etc/udev/rules.d
and currently there's no file whit this name:
diabolik@NUC-Ubuntu:/etc/udev/rules.d$ ls 70-snap.canonical-livepatch.rules 70-snap.snapd-desktop-integration.rules 70-snap.snap-store.rules 99-input.rules 70-snap.firefox.rules 70-snap.snapd.rules 70-snap.thunderbird.rules diabolik@NUC-Ubuntu:/etc/udev/rules.d$
The echo commands paste this text and create this file.... it's correct ?
-
apparently it's continue to crash... after reboot:
diabolik@NUC-Ubuntu:~$ id uid=1000(diabolik) gid=1000(diabolik) gruppi=1000(diabolik),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),107(input),122(lpadmin),135(lxd),136(sambashare) diabolik@NUC-Ubuntu:~$ /opt/retropie/admin/joy2key/joy2key_sdl.py kcub1 kcuf1 kcuu1 kcud1 0x0a 0x20 0x1b 0x00 kpp knp -d 2024-10-16 13:43:19,919 DEBUG Debugging enabled, running in foreground 2024-10-16 13:43:19,919 DEBUG Cannot determine input code for "0x00", value ignored 2024-10-16 13:43:19,919 DEBUG Cannot determine input code for "0x00", value ignored 2024-10-16 13:43:19,919 DEBUG Joy map: {'left': 105, 'right': 106, 'up': 103, 'down': 108, 'a': 28, 'b': 57, 'x': 1, 'y': 0, 'pageup': 104, 'pagedown': 109} 2024-10-16 13:43:22,642 DEBUG Using SDL Version 2.30.0, PySDL2 version 0.9.16 2024-10-16 13:43:22,643 DEBUG Creating uinput keyboard devices with events: [(1, 105), (1, 106), (1, 103), (1, 108), (1, 28), (1, 57), (1, 1), (1, 0), (1, 104), (1, 109)] Traceback (most recent call last): File "/opt/retropie/admin/joy2key/joy2key_sdl.py", line 608, in <module> sys.exit(main()) ^^^^^^ File "/opt/retropie/admin/joy2key/joy2key_sdl.py", line 600, in main event_loop(configs, joy_map) File "/opt/retropie/admin/joy2key/joy2key_sdl.py", line 334, in event_loop kbd = uinput.Device(events=keyboard_events, name="Joy2Key Keyboard") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 178, in __init__ self.__uinput_fd = fd or fdopen() ^^^^^^^^ File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 84, in fdopen return _libsuinput.suinput_open() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 70, in _open_error_handler raise OSError(code, msg) PermissionError: [Errno 13] Failed to open the uinput device: Permission denied diabolik@NUC-Ubuntu:~$
or also this info can be usefull ??
diabolik@NUC-Ubuntu:~$ cd /etc/udev/rules.d diabolik@NUC-Ubuntu:/etc/udev/rules.d$ ls 70-snap.canonical-livepatch.rules 70-snap.snapd-desktop-integration.rules 70-snap.snap-store.rules 80-uinput.rules 70-snap.firefox.rules 70-snap.snapd.rules 70-snap.thunderbird.rules 99-input.rules diabolik@NUC-Ubuntu:/etc/udev/rules.d$ cat 80-uinput.rules KERNEL=="uinput", GROUP="input", MODE=0660 diabolik@NUC-Ubuntu:/etc/udev/rules.d$
@mitu in about 30 minutes i need to move from my home to my brothers....
if need i can continue test from here but it's a different hardware.. different username but same os.. also on my brother it's present ubuntu 24.04.1 LTS.
-
anyway... right now "runcommands" option work.... but only if i press button on keyboard.
I can press so many times button on my arcade stick and it's not work.
@mitu -
@mitu directly from my brother house. different hardware... same distro ubuntu 24.04.1 LTS and same crash also after last 'retropie setup' commit and reboot system:
[url=https://ibb.co/yknQxzS][img]https://i.ibb.co/7pJ1034/image.png[/img][/url]Also from terminal:
mrocco86@mrocco86-VM40B:~$ /opt/retropie/admin/joy2key/joy2key_sdl.py kcub1 kcuf1 kcuu1 kcud1 0x0a 0x20 0x1b 0x00 kpp knp -d 2024-10-16 21:17:09,584 DEBUG Debugging enabled, running in foreground 2024-10-16 21:17:09,584 DEBUG Cannot determine input code for "0x00", value ignored 2024-10-16 21:17:09,585 DEBUG Cannot determine input code for "0x00", value ignored 2024-10-16 21:17:09,585 DEBUG Joy map: {'left': 105, 'right': 106, 'up': 103, 'down': 108, 'a': 28, 'b': 57, 'x': 1, 'y': 0, 'pageup': 104, 'pagedown': 109} 2024-10-16 21:17:09,994 DEBUG Using SDL Version 2.30.0, PySDL2 version 0.9.16 2024-10-16 21:17:09,994 DEBUG Creating uinput keyboard devices with events: [(1, 105), (1, 106), (1, 103), (1, 108), (1, 28), (1, 57), (1, 1), (1, 0), (1, 104), (1, 109)] Traceback (most recent call last): File "/opt/retropie/admin/joy2key/joy2key_sdl.py", line 608, in <module> sys.exit(main()) ^^^^^^ File "/opt/retropie/admin/joy2key/joy2key_sdl.py", line 600, in main event_loop(configs, joy_map) File "/opt/retropie/admin/joy2key/joy2key_sdl.py", line 334, in event_loop kbd = uinput.Device(events=keyboard_events, name="Joy2Key Keyboard") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 178, in __init__ self.__uinput_fd = fd or fdopen() ^^^^^^^^ File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 84, in fdopen return _libsuinput.suinput_open() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/uinput/__init__.py", line 70, in _open_error_handler raise OSError(code, msg) PermissionError: [Errno 13] Failed to open the uinput device: Permission denied mrocco86@mrocco86-VM40B:~$
-
The latest update should fix the permissions error. If you still have an error with permissions, check if the
/dev/uinput
file is writable by theinput
group by runningls -l /dev/uinput
. It should output something like:pi@retropie$ ls -l /dev/uinput crw-rw---- 1 root input 10, 223 Oct 16 16:18 /dev/uinput
Also, please don't re-post the same picture/screenshot, it's enough to mention the actual error in your post.
-
@mitu said in Retropie setup menu/Runcommand crashing in ES on Ubuntu:
Also, please don't re-post the same picture/screenshot, it's enough to mention the actual error in your post.
it's not the same screenshot.... that's same exact issue in a totally different hardware. it was also to verify that the exact same problem was present in a different system than the one I use daily at my home.
So... right now i have installed the recent commit on my pc:
It's need to reboot my PC to apply current the new changes?
Simply because the write permission it's different right now:
diabolik@NUC-Ubuntu:~$ ls -l /dev/uinput crw------- 1 root root 10, 223 ott 17 12:00 /dev/uinput diabolik@NUC-Ubuntu:~$
if that doesn't work how do I fix the permissions on that file?
Now in that folder i have this file:
diabolik@NUC-Ubuntu:/etc/udev/rules.d$ ls 70-snap.canonical-livepatch.rules 70-snap.snapd-desktop-integration.rules 70-snap.snap-store.rules 80-rpi-uinput.rules 99-input.rules 70-snap.firefox.rules 70-snap.snapd.rules 70-snap.thunderbird.rules 80-uinput.rules diabolik@NUC-Ubuntu:/etc/udev/rules.d$
80-uinput.rules it's the file we have created yesterday using echo command.
80-rpi-uinput.rules it's problably created right now from recent commit.The files are essentially identical in content:
diabolik@NUC-Ubuntu:/etc/udev/rules.d$ cat 80-rpi-uinput.rules KERNEL=="uinput", MODE="0660", GROUP="input" diabolik@NUC-Ubuntu:/etc/udev/rules.d$ cat 80-uinput.rules KERNEL=="uinput", GROUP="input", MODE=0660 diabolik@NUC-Ubuntu:/etc/udev/rules.d$
if i can remove one of the two let me know and possibly i can do it simply with the rm command?
-
It's need to reboot my PC to apply current the new changes?
For Ubuntu, it might be needed since
uinput
is not a module, but a kernel built-in and a reboot may be required for theudev
rule to applied.if i can remove one of the two let me know and possibly i can do it simply with the rm command?
You can remove the
80-uinput.rules
file, it's identical to80-rpi-uinput.rules
, which is created by RetroPie-Setup. -
@mitu said in Retropie setup menu/Runcommand crashing in ES on Ubuntu:
It's need to reboot my PC to apply current the new changes?
For Ubuntu, it might be needed since
uinput
is not a module, but a kernel built-in and a reboot may be required for theudev
rule to applied.if i can remove one of the two let me know and possibly i can do it simply with the rm command?
You can remove the
80-uinput.rules
file, it's identical to80-rpi-uinput.rules
, which is created by RetroPie-Setup.ok... now i am watching a movie and i am using pc with kodi...
as soon as I'm done I think I can delete that file with:
sudo rm /etc/udev/rules.d/80-uinput.rulesif I remember it's the file we created yesterday with the command 'echo' exactly?
then I try to restart ubuntu and I rewrite the result of the ls command for uinput in /dev.
thanks in advance for support them.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.