Amiberry: SDL 2 | DietPi Autostart | Keyboard input in emulator is sent to underlying console / vt

Created on 9 Apr 2017  ·  13Comments  ·  Source: midwan/amiberry

I set up DietPi to boot into Amiberry, and I exchanged the version that is shipped with the new SDL2 build.

The root console gets started in the background and everything I type in the emulator also gets sent to the underlying console.

Steps to reproduce:

  1. Install DietPi with Amiberry ("The complete distribution" from the Amiberry site)
  2. Build the SDL2 version
  3. Drop the generated executable and the TopazNew font to the appropriate locations under /etc/uae4arm-rpi
  4. Change the symlink that is called by the run script to point to the new binary
  5. Reboot the Pi
  6. Open a shell on the emulated Amiga after booting a Workbench, and enter: echo "Hello"
  7. Quit UAE4ARM

You will now see that echo "Hello" got sent to the console and was executed.

bug

All 13 comments

@rabejens
Thanks for the report 👍
We'll be implementing AmiBerry SDL 2 soon into DietPi, i'll take a look at the reported issues at the same time.
https://github.com/Fourdee/DietPi/issues/850

Duplicate of #71
Need to check if the solution that was tested and worked on Raspbian and RetroPie has any issues with DietPi, otherwise this can be closed.

Relates to fix https://github.com/RetroPie/SDL-mirror/commit/294906558e67f7046b01bb2dc13da6c59a27db44 in RetroPie's SDL2 mirror.

@Fourdee this may be related to the fact that we're switching tty in the boot options to avoid displaying the boot messages?

@Fourdee

Confirmed:

  • DietPi v148 with manual starting of Amiberry-SDL2: no problem
  • DietPi v148 with Amiberry Autostart (either Standard or Quick mode): keyboard input leaks to the console

This must be related to something changing in the autostart function of DietPi. Didn't have time to test more for now, but at least we have something to focus on.

@midwan

DietPi v148 with Amiberry Autostart (either Standard or Quick mode): keyboard input leaks to the console

Thanks 👍

I'll take a look, most likely needs a service tweak for SDL2 version.

This also happens on Arch Linux. It's probably a bug in SDL2.

@solskogen
It seems to be. The RetroPie team solved it by patching their mirror of SDL2 and deploying that, but their patch is only for tty0 - so if the service starts the application from another console you still get the bug.

@midwan

DietPi v148 with Amiberry Autostart (either Standard or Quick mode): keyboard input leaks to the console

Unable to replicate this with our non-retropie SDL2 compiled debs:

Edit: Yes it does

wget http://dietpi.com/downloads/binaries/rpi/sdl2_rpi.7z -O package.7z
7z x -y package.7z -osdl2_rpi
rm package.7z

dpkg -i sdl2_rpi/no_opengl_x11/*.deb
rm -R sdl2_rpi

That package also contains optional SDL2 with OpenGL and X11 enabled.
https://github.com/Fourdee/DietPi/issues/850#issuecomment-294767845


Options/Notes:

  • 🈴 StandardInput=tty StandardOutput=tty no effect
  • 🈯️ Fine under X instance + CAPS/NUM
xinit ./amiberry-sdl2 -f conf/autostart.uae

@Fourdee
I believe the RetroPie team patched SDL2 to get around this: https://github.com/RetroPie/SDL-mirror/commit/294906558e67f7046b01bb2dc13da6c59a27db44

But their patch only handles tty0 from what I could see.

@Fourdee
Good news, it looks like the SDL2 team picked this up!
There's a new commit that should fix the problem: https://hg.libsdl.org/SDL/rev/fe9c7d01a093

We'll have to test with the latest snapshot to make sure: http://www.libsdl.org/tmp/SDL-2.0.zip

Bug report URL: https://bugzilla.libsdl.org/show_bug.cgi?id=3611

@Fourdee
SDL2 stable is now at 2.0.6, which should include the bugfix regarding our problem.
I'll try to test it out on DietPi to see if it's resolved or not... Let me know if you find the time to test it before I do! :)

@Fourdee
SDL2 official release is now up to 2.0.7.
I should be able to give it a try this weekend, if all goes according to plan. Hopefully this can be closed then.

Confirmed fixed with SDL2 v2.0.6 or higher (tested with 2.0.7)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonpatterson picture jonpatterson  ·  8Comments

ransom1122 picture ransom1122  ·  5Comments

henrikstengaard picture henrikstengaard  ·  7Comments

Shawson picture Shawson  ·  7Comments

vretro picture vretro  ·  5Comments