Retropie Installation on Ubuntu Server x64 18.04.1
-
I tested the install on fresh Ubuntu 20.04.1 LTS on old Lenovo x200 laptop with latest script from MisterB. And it works. I don't think it makes a difference but after I install Ubuntu, I do
apt -y update && apt -y upgrade && reboot
before launching the setup script.That said, I think you're running stock kernel for 20.04.1 - did you try updating to newer kernel (see discussion here)?
-
On a hunch I installed Ubuntu 18.04 server and got the same results (well, the black screen). I would see a mouse if I moved it around. I could not get to the cli with
alt + f2
I follow the instructions on MrBs repo exactly. User/Password is pi/raspberry. I am a long time linux user, so also have a really good grasp on what I am doing.
I run (after downloading with wget)
sudo bash ./bootstrap.sh
and thensudo ./RetroPie-Setup-Ubuntu/retropie_setup_ubuntu.sh
I'll boot the laptop up again to get the log file.
-
So, starangest thing. On the second boot after setting up with Ubuntu 18.04 it worked. I am copying over my roms now and will test. I am even getting hui sounds. If games play, I'll move on to fighting with the hdmi audio (had to do this with every thing I install on this laptop)
unfortunatly, I won't have a log file from the failed installs of all the 20.04 tries.
UPDATE:
So the games mostly work, PSX is crap, but there is only one emulator installed. I need the "fast" emulators for this old laptop. NES worked great, no suprise there. N64 worked better than I expected, but I got an "error" in Hot Wheels turbo racing saying the rumble pack/memmory card changed and it wouldn't save the game. I'll add more emulators and do my usual tweeks and post in new threads if I need as this would be related to RetroPie ands not specifically this install method.
-
I updated my Wine installation script that sets up RetroPie so that I can launch GOGcom Windows games [and other Windows apps via] RetroPie ports and made it compatible with post_install mechanism used by MisterBs script (PR sent). It is now also compatible with running under both KMS/DRM (in which case game is launched as X session) and X.
Script will on high level:
- Add i386 architecture to Ubuntu (will install 32bit versions of many libraries)
- Install wine32 and wine64 and winetricks
- Create new wineHQ root /home/pi/winehq under which 32bit and 64bit wineprefixes
and shared data are stored (to avoid cluttering /home/pi) - Use winetricks to install xact, d3dx9, d3dx10, d3dx11_43
- Set OS versions to Win7 (32bit prefix), Win10 (64 bit prefix)
- Create new .xsession that will launch openbox or if
/dev/shm/portruncommand.sh
exists launch that as X session instead.
For Gog games best strategy seems to be to install them on Windows, and then move installed files to Linux/RetroPie (I am putting them to /opt/gog.com/....). This appears to work for most of my games where e.g. Fallout New Vegas is a notable exception. To check if a given game/program is supposed to run under wine - use Wine compatibility DB.
To support launching games under both KMS/DRM and X the port launch scripts in
/home/pi/RetroPie/roms/ports
look as follows (e.g. it creates/dev/shm/portruncommand.sh
, and then determines how to launch it, and then cleans up):pi@retropie ~ $ cat /home/pi/RetroPie/roms/ports/SotMI1\ Secret\ of\ the\ Monkey\ Island\ Remastered.sh #!/bin/bash PORTRUNCOMMAND=/dev/shm/portruncommand.sh PORT_DIR="/opt/games.gog/Monkey Island 1 SE/" PORT_CMD='MISE.exe' PORT_ENV="WINEPREFIX=/home/pi/winehq/win32 WINEARCH=win32 HOME=/home/pi/winehq/shared" cat << EOF > "$PORTRUNCOMMAND" #!/bin/bash cd "$PORT_DIR" $PORT_ENV wine ./$PORT_CMD > /dev/shm/portruncommand_winehq.log 2>&1 EOF chmod +x $PORTRUNCOMMAND if [[ -z "${DISPLAY}" ]]; then # DISPLAY not set; assume we're on console startx > /dev/shm/portruncommand_x.log 2>&1 else $PORTRUNCOMMAND fi # .xession checks if portruncommand.sh exists mv -v $PORTRUNCOMMAND $PORTRUNCOMMAND.previous >> /dev/shm/portruncommand_x.log 2>&1
E.g. if we're running under X, just run the /dev/shm/portruncommand.sh it creates, otherwise startx and modified /home/pi/.xsession will launch /dev/shm/portruncommand.sh as X session (.xsession created by install script and original is renamed to .xsession.orig - note if 1080p resolution is not supported, consider adjusting PREFERRED_RESOLUTION in .xsession):
pi@retropie ~ $ cat /home/pi/.xsession ## ## Start /dev/shm/portruncommand.sh as X session if it exists. Otherwise ## start openbox normally. Debug logs are in /dev/shm/... ## give X time to start (shouldn't be needed) #sleep 1 ## document xrandr output $XRANDR_LOG XRANDR_LOG=/dev/shm/xrand_modes.log xrandr --version >> $XRANDR_LOG 2>&1 xrandr >> $XRANDR_LOG 2>&1 # Update the next line to customize the display resolution # If will fall back to the display's preferred resolution, if the custom value is invalid PREFERRED_RESOLUTION=1920x1080 PREFERRED_RATE=60 if [[ ! -z $PREFERRED_RESOLUTION ]]; then current_resolution=$(xrandr --display :0 | awk 'FNR==1{split($0,a,", "); print a[2]}' | awk '{gsub("current ","");gsub(" x ", "x");print}') connected_display=$(xrandr --display :0 | grep " connected " | awk '{ print $1 }') echo "DEBUG: current_resolution: $current_resolution, connected_display: $connected_display" >> $XRANDR_LOG echo "DEBUG: preferred_resolution: $PREFERRED_RESOLUTION @ $PREFERRED_RATE Hz" if $(xrandr --display :0 | grep -q $PREFERRED_RESOLUTION); then xrandr --display :0 --output $connected_display --mode $PREFERRED_RESOLUTION --rate $PREFERRED_RATE & else echo "$PREFERRED_RESOLUTION is not available on $connected_display. Remaining at default resolution of $current_resolution." fi fi # Disable screen blanking (only happens outside of EmulationStation) # This prevents the display from doing any ‘screen blanking’ due to inactivity xset s off && xset -dpms if [ ! -f /dev/shm/portruncommand.sh ] ; then exec openbox-session else ## don't exec; we want to return & exit /dev/shm/portruncommand.sh fi
And lastly here is link to the install script gist (can be dropped to optional_scripts/post_install to be run automatically by MisterBs script, or be run independently (use sudo) to install Wine and setup .xsession):
URL: https://gist.github.com/etheling/359ff231514122b1beeefebd6e99db14
-
FYI, I just ssh'ed into the laptop and got the message,
(process:9106): dconf-WARNING **: 13:28:30.389: failed to commit changes to dconf: Cannot autolaunch D-Bus without X11 $DISPLAY
Is there a special way I should be ssh'ing in or should I just ignor this. I asume it's all part of the auto login auto start stuff.
-
@nobodyfamous Safe to ignore; I think that message is caused by these changes to your .bash_profile: https://github.com/MizterB/RetroPie-Setup-Ubuntu/blob/master/retropie_setup_ubuntu.sh#L258-L275
-
I have a question, and I think it relates to this particular setup.
I want to install a web browser, so I added zerojay/RetroPie-Extras, have re-booted many times but the "extras" never show up in the RetroPie setup -> Manage packages -> Manage experimental packages (or any of them)
Do I need to do something extra? Am I looking in the wrong place?
-
@nobodyfamous The 'extras' don't appear as a separate section in RetroPie-Setup, it just adds new packages in the existing section of the packages ('experimental' should have the most additions).
-
@mitu Thats where I am looking, they don't show up.
-
@etheling So I made a discovery about the black screen. I can not say for sure for Ubuntu 20.04, but for sure on my current Ubuntu 18.04 installation, if I have any USB dongles attached, I get the black screen. If I move the mouse around it showes up, but any mouse clicks does nothing. I think it is an empty openbox desktop.
This happens with a logitec k400 keyboard dongle plugged in and my EasySMX ESM-9101 controllers.
If a leave then unplugged, boot fully to the "no gamepad detected" screen, then plug them in it works.
-
@nobodyfamous said in Retropie Installation on Ubuntu Server x64 18.04.1:
On a hunch I installed Ubuntu 18.04 server and got the same results (well, the black screen). I would see a mouse if I moved it around. I could not get to the cli with
alt + f2
I follow the instructions on MrBs repo exactly. User/Password is pi/raspberry. I am a long time linux user, so also have a really good grasp on what I am doing.
I run (after downloading with wget)
sudo bash ./bootstrap.sh
and thensudo ./RetroPie-Setup-Ubuntu/retropie_setup_ubuntu.sh
I'll boot the laptop up again to get the log file.
Apologies for the long delay.
After trying the below:
Updating grub bootloader > Didn't change anything :(
Upgrading Ubuntu kernel (tried upgrading and downgrading) > Didn't work (Sorry @etheling )I eventually went with installing the 18.04 version of Ubuntu server and it worked!!!!
Thank you guys so much for your help. Still curious why the 20.04 results in a black screen, but as this Retropie build is for a friend, 18.04 should be just fine.
I can also confirm with @Nobodyfamous that the 18.04 build only booted properly on the second boot onwards.
-
if I have any USB dongles attached, I get the black screen
Thanks a lot for figuring this out! Hopefully this will help others who maybe stuck with same problem.
I'm curious what might be causing this though. I plugged into x200 laptop that I setup with 20.04.1 USB hardware I had lying around, but couldn't reproduce this. :(
@elliot123 @Nobodyfamous Do you mind sharing what laptop/hw you're using (or at least if it has non-Intel graphics chipset)?
I am personally on Ubuntu 20.10 with KMS/DRM setup (e.g. no X) and that has been working well for me on NUC8i5BEK (and x200 and pixelbook laptops; but then again, so did 20.04.1 mostly).
If you're on intel GPU/graphics chipset, maybe you can try Ubuntu 20.10 and my KMS/DRM setup during xmas - I'd be curious to hear if it works any better for you (discussion, Ubuntu 20.10 server iso, forked 20.10/kms compatible install script, optional_scripts/post_install/00_kmsdrm.sh to setup for kms/drm)? Word of warning though - KMS/DRM script [probably] only works for Intel graphics chipsets ; if you have nVidia or AMD, probably not worth the time to test how it breaks the KMS/DRM modifications. :)
-
@etheling The laptop I am using is an HP Compaq 8510p
I just did a fresh install of Ubuntu server 20.04.1 and rather than using MrB script, I just did the first 7 steps of this thread and installed RetroPie and it is working pretty good. At least it boots with USB dngles plugged in. I am just running my test games (Hot Wheels Turbo racing, and Gran Turismo, Tony Hawk pro skater)
UPDATE: game play is alright. I need to add some emulators. Out of the box, recalbox works so well with both N64 and PSX.
I still can not get
Retropie-Extras
to show up in the package lists. I just sshed in and installed google-chrome, and then added chrome launcher to kodi. It works okay. I had to remove-nocursor
from the.bash_profile
so I could see the mouse in chrome. -
One last thing I am trying to do is have Kodi auto start on boot. The autostart option in RetrePie-Setup only lists enable/disable for ES autostart.
I edited
.config/openbox/autostart
and putgnome-terminal --full-screen --hide-menubar -- kodi-standalone #auto\nemulationstation #auto
which I gleaned from https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/supplementary/autostart.shKodi will start, but when I exit, ES is not running or started.
Any ideas?
UPDATE: with help I figured it out
/home/pi/.config/openbox/autostart
gnome-terminal --full-screen --hide-menubar -- bash /home/pi/autostart.sh
and
/home/pi/autostart.sh
(chmod +x)#!/usr/bin/env bash kodi-standalone sleep 2 emulationstation
-
@johnodon Hey there, before anything, thanks for sharing this awesome stuff :D. I am going to try it on my server (20.04), i would like to avoid running retropie on startup, considering i have plenty other stuff on the server. Is there an easy way to avoid it by editing the provided bootstrap.sh ? thanks in advance !
-
Can't wait to try this out.....
-
@etheling said in Retropie Installation on Ubuntu Server x64 18.04.1:
And lastly, while not completely unexpected, still somewhat disappointing: it looks like nVidia or Radeon based systems don't trivially support this approach. They might still, but... I got KMS/DRM working under Nouveau nVidia driver (used 'nouveau.modeset=1 i915.modeset=0' boot options), but performance was subjectively substandard to running emulators under X with nVidia binary drivers, so unless one is open source purist, I don't know why would you want to do that.
@etheling Wasn't sure if you saw this or not:
https://wiki.archlinux.org/index.php/NVIDIA#DRM_kernel_mode_settingI have KMS/DRM working nicely on my Asus CN65 (Intel HD 5500) but would LOVE to get my GTX1650 purring. Does any of the above help to get us closer to Nvidia support?
TIA!
John
-
https://wiki.archlinux.org/index.php/NVIDIA#DRM_kernel_mode_setting
I think version 364.16 that they mention in Arch wiki is from around 2016. I tried to get KMS/DRM working on 1080Ti equipped workstation with Nouveau and NVidia proprietary drivers around new years but gave up. With Nouveau the KMS/DRM perf was sub par (e.g. about the same as what I get from Intel Iris 655 that I have in NUC). Proprietary driver wouldn't co-operate at all. I was more curious than determined, so maybe there is some way to get it running. These changes coming to 5.11/5.12 kernels might change something for the better on the Noveau side. I may try again after Ubuntu 21.04 is released later this month as I think it'll ship with 5.11.
I got my hands on a new 'toy' couple of weeks back with AMD Ryzen 5 / Vega 11 inside, complete with FreeSync enabled 144Hz gaming display. And I absolutely wanted to try to see how RetroPie/RetroArch runs with FreeSync enabled and generally see how it compares to my NUC.
TL;Dr: KMS/DRM doesn't appear to support Variable Refresh Rate (VRR) at all yet (although some work seems to be in progress to make it supported), and in general KMS/DRM perf wasn't as good as expected on Razen/Vega 11 (tried with both open source and AMD proprietary driver). Perf was as expected and VRR/FreeSync worked great under both X and Wayland/Sway. Working combination I have now is Ubuntu 20.04, with latest AMDGPU 20.50 driver and Wayland using Sway compositor.
And let me go on record saying that I absolutely love the RetroPie experience with FreeSync enabled. Now modesetting can be completely skipped in runcommand as RetroArch (with
vrr_runloop_enable = "true"
) cores are able to sync monitor to actual refresh rate the content runs on (like NTSC or PAL refresh rates or to more exotic ones like NeoGeo at 59.1856060Hz, StarWars at 40Hz or Mortal Kombat at 54Hz etc.). It is probably placebo effect, but some titles just feel more smooth and responsive with FreeSync running.I'll see if I can package what I did to an install 'recipe' for MisterBs core install script so that if someone else wants to try Linux / FreeSync / VRR /w RetroPie on AMDGPU, they can skip right to the good part. :)
-
@etheling Honestly, I stopped using mini/server as the base OS and now just use 20.04 Desktop and make Openbox the default DE. There is very little tweaking that needs to be done after the fact (i.e. set gnome terminal background to black, hide the scrollbar, etc.) and I can always get back to a true desktop if needed. My HP Prodesk 600 G2 does an excellent job of hiding boot test so no tweaking needed there. On a 240GB SSD that is dedicated to the OS and a 1TB SSD for ROMS/media, I'm not exactly hurting for space and boot times really aren't that much slower. So far it has been an absolute joy.
That being said...from what I have seen on my Chromebox, KMS/DRM is the way to go as far as giving a true appliance look/feel.
John
-
As mentioned few days a go I've been playing around with RetroPie and FreeSync, and I really like how it works / feels.
Below is a link to install script to configure Ubuntu 20.04LTS and RetroPie to work with AMD FreeSync when amdgpu and compatible display are present. Script probably looks more complicated than it really was to get everything going, but at the same time, it took me a while to get all the right configs/pieces together - and now they are codified here to hopefully save anyone else who wants to try this from the trouble.
URL: https://gist.github.com/etheling/a0978b54c8989002fbd913d179cc1543
It overwrites and modifies current Wayland and X. org configurations and generally expects to be ran as part of post install portion of RetroPie Ubuntu setup script by MisterB.
If ran independently, results may vary, because current configuration may differ from expected starting point.
To produce a working FreeSync VRR configuration on Linux, script needs following (these are likely to change over time as driver situation improves/changes):
- Modern AMD GPU and Display that support FreeSync
- DisplayPort cable (VRR only supported over DP on Linux currently, but some work appears to be underway to also support VRR over HDMI)
- Ubuntu 20.04 LTS (newest Ubuntu that is supported by AMD GPU drivers from amd.com)
- AMD GPU proprietary driver 20.50 (open source stock linux driver introduced stutter etc. where smooth motion was expected; I am using e.g. Atari 2600 Seaquest to test this. 20.50 is first version to support Ubuntu 20.04.2)
- Sway 1.5.x Wayland compositor (VRR is supported starting v1.5 of Sway, but Ubuntu 20.04 ships with 1.4)
- RetroPie emulationstation-dev (because current default version does not work with AMD proprietary driver)
- RetroArch 1.7.4 or newer for FreeSync/G-Sync support (vrr_runloop_enable)
In addition to above, Mesa will be upgraded to latest stable Mesa from ppa:kisak/kisak-mesa
This script has only been tested on 1920x1080@144Hz Viewsonic XG2405 display. It assumes that everything will be ran at 1080p resolution. It will also roll back certain changes made by core install script (remove plymouth theme/splash and switch to i3 as a default X window manager) in order to harmonize setup between Wayland and X. Please note that Wayland/Sway is started with XWayland disabled.
Once the script successfully completes, it has created working configurations for Wayland/Sway and X. org/i3, and has modified/replaced [roughly] following configuration files:
- /etc/X11/xorg.conf - enable TearFree, DRI3, VRR and set Modeline for VRR mode
- /home/<user>/.bash_profile - set environment, start Sway or i3
- /home/<user>/.config/i3/config
- /home/<user>/.config/sway/config
- /home/<user>/.xsession - set freesync propert
- /opt/retropie/suplementary/runcommand/runcommand.sh - allow showing launching images under Wayland
- /opt/retropie/configs/all/retroarch.cfg - enable G/FreeSync, set display driver to Vulkan
- /etc/default/grub - set kernel / GRUB modes
Wayland configuration is used as a default as xorg. conf needs a modeline created, which is not very well tested nor does it feel robust.
After reboot, the system will at startup launch Sway/Wayland and load emulation station (F4, Win+Enter to get shell). To change to running under X. org/i3 (or KMS/DRM?), see /home/<user>/.bashprofile.
NeoGeo at 59.19fps, Mortal kombat at ~56Hz and Star Wars at 80Hz (core runs at 40Hz, but because display can only go down to 48Hz, it is running at double the Hz).
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.