Librem 5 + Emulators + Bluetooth controllers = a great time.
Nice! Could you tell me wether the Switch Pro Controller will also work?
You should be able to connect joycons and the Switch Pro Controller with the same kernel module.
The original post is quite old, yet I think this is the right thread for my emulator experience.
Currently I’m on vacation, in an apartment with a TV, but with the Librem5 as my only computer around. I used to play some old SNES games with my daughter at home, using zsnes on my 10-year-old AMD64 tower PC. Now I took the SNES controllers, the L5 of course, a usb adapter for the controllers, the games (rom files), a “docking station” for the L5 (baseus), and an HDMI cable with me, to be able to continue playing on vacation - and it is working pretty well!
There were a few challenges to overcome, though:
- emulator program
- sound
- resolution/ scaling
- controls
Obviously zsnes is not available on the L5, since it is partly written in assembler for x86. I tried RetroArch from the repository, but it does not work for me. I got snes9x from git, and I managed to compile snes9x-gtk - but I can’t run that, it fails with some kind of runtime error. The “unix” port of snes9x, from the same repo, does run, though (and it also compiles much faster). Problem 1 solved.
The sound “did not sound good” (skips). My solution to this was simple: https://wiki.debian.org/PulseAudio#Stop_running_the_pulseaudio_daemon_for_a_while
(The sound is good enough now, although I’d prefer if it came from the tv, instead of from the phone - is that possible at all, through hdmi from the L5?)
When I try to run snes9x in full-screen, it picks the aspect ratio of the phone, which is in portrait mode while in the dock! Writing this I’m realizing I might simply turn the phone to solve this. What I did before was turning off the phone’s screen, and reducing the hdmi output to the tv to a very low resolution with a 4:3 aspect ration. The result is pretty good.
Since the L5 is running regular Linux, I thought the controllers would just work out of the box - but it turns out the L5’s kernel is missing the required joydev kernel module! Following forum instructions from Librem 5 kernel hacking I managed to compile and install a kernel with the required module. Cloning the git repo on the phone took about 6 hours though (might have been faster with “–depth 1”), and compilation also took about three hours (with firefox still running, eating away ram and cpu cycles).
How about including that joydev module in the regular kernel, Purism?
Good question. You tell us. Does audio output via video show up as an option? If so, does it work?
It may be confusing to suggest that this is via HDMI though - because it is DisplayPort altmode of USB-C at the Librem 5 end and it is the dock that is converting DisplayPort to HDMI.
Some docks have a direct analog audio output (e.g. 3.5mm jack) and that could be another option if you have speakers / headphones / headset that could plug in there.
I find my headphones (which are not expensive ones) to give good sound when plugged into the analog audio output of the Librem 5 itself.
Well no, I don’t see any devices other than “Librem 5” and “Modem” in alsamixer.
It is indeed somewhat confusing with DisplayPort, DVI, HDMI, and now USB-C on top of these digital video (and audio) interfaces…
My dock is a Baseus model, with three USB ports, SD and MicroSD card readers on the sides. It’s light and compact. But it does not do anything about audio, it seems.
I have been taking a crack at trying to get Retroarch working. Obviously, you can install it via APT or Flathub, but getting cores to load is another story.
I have tried manually loading some ARM cores but they have not worked as of yet.
Have you been able to install Retroarch and get it working? Any tips would be much appreciated.