RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Retropie Installation on Ubuntu Server x64 18.04.1

    Scheduled Pinned Locked Moved Projects and Themes
    18.04debianubunutux64x86
    223 Posts 34 Posters 65.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • NobodyfamousN
      Nobodyfamous
      last edited by

      I just had to register so I could say, YOU GUYS ROCK! This will be about my 10th Ubuntu/retoropie install trying to get a good working setup on an old laptop. I have a really good feeling about this one!

      1 Reply Last reply Reply Quote 0
      • NobodyfamousN
        Nobodyfamous @elliot123
        last edited by Nobodyfamous

        @elliot123 as per the "error above" (earlier in the thread) What Kernal version are people running? I get

        pi@retropie:~$ uname -r
        5.4.0-58-generic
        

        I am also getting the black screen. I first tried installing via Ubuntu 20.04 live server, then with the link for mini.iso provided by MizterB on GitHub.

        if I hit alt +F2, login and run emulationstation on the laptop, it says

        lvl0: Error initializing SDL!
        No available video device
        lvl0: Renderer failed to initialize!
        Window failed to initalize!

        And somewere I read to look in a log file, but I don't remeber where or what log file, but do recal it said something about "screens found, but none configured correctly"

        ethelingE 2 Replies Last reply Reply Quote 0
        • ethelingE
          etheling @Nobodyfamous
          last edited by etheling

          @nobodyfamous said in Retropie Installation on Ubuntu Server x64 18.04.1:

          No available video device

          Are you using unmodified install script from MisterBs github repo? I'll try to test it out on a laptop this weekend to see what is going on.

          When you run the script, it creates a rather large log file to /home/pi (*retropie_setup_ubuntu.log). Would you mind uploading the install log to some pastebin and post a link so we can take a look. Also, while at it, can you reply with with output of inxi -F -c0 - I am curious of what kind of hardware you're running.

          edit: btw - what is the username you're using to login and run the 'retropie_setup_ubuntu.sh' script under? pi or something else?

          1 Reply Last reply Reply Quote 0
          • ethelingE
            etheling @Nobodyfamous
            last edited by etheling

            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)?

            NobodyfamousN 2 Replies Last reply Reply Quote 0
            • NobodyfamousN
              Nobodyfamous @etheling
              last edited by

              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 then sudo ./RetroPie-Setup-Ubuntu/retropie_setup_ubuntu.sh

              I'll boot the laptop up again to get the log file.

              NobodyfamousN E 2 Replies Last reply Reply Quote 0
              • NobodyfamousN
                Nobodyfamous @Nobodyfamous
                last edited by Nobodyfamous

                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.

                1 Reply Last reply Reply Quote 0
                • ethelingE
                  etheling @etheling
                  last edited by etheling

                  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.

                  alt text

                  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

                  NobodyfamousN 1 Reply Last reply Reply Quote 0
                  • NobodyfamousN
                    Nobodyfamous @etheling
                    last edited by

                    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.

                    ethelingE 1 Reply Last reply Reply Quote 0
                    • ethelingE
                      etheling @Nobodyfamous
                      last edited by etheling

                      @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

                      NobodyfamousN 1 Reply Last reply Reply Quote 0
                      • NobodyfamousN
                        Nobodyfamous @etheling
                        last edited by

                        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?

                        mituM 1 Reply Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator @Nobodyfamous
                          last edited by

                          @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).

                          NobodyfamousN 1 Reply Last reply Reply Quote 0
                          • NobodyfamousN
                            Nobodyfamous @mitu
                            last edited by

                            @mitu Thats where I am looking, they don't show up.

                            1 Reply Last reply Reply Quote 0
                            • NobodyfamousN
                              Nobodyfamous @etheling
                              last edited by

                              @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.

                              ethelingE 1 Reply Last reply Reply Quote 0
                              • E
                                elliot123 @Nobodyfamous
                                last edited by

                                @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 then sudo ./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.

                                1 Reply Last reply Reply Quote 0
                                • ethelingE
                                  etheling @Nobodyfamous
                                  last edited by etheling

                                  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. :)

                                  NobodyfamousN 1 Reply Last reply Reply Quote 0
                                  • NobodyfamousN
                                    Nobodyfamous @etheling
                                    last edited by Nobodyfamous

                                    @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.

                                    1 Reply Last reply Reply Quote 0
                                    • NobodyfamousN
                                      Nobodyfamous
                                      last edited by Nobodyfamous

                                      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 put gnome-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.sh

                                      Kodi 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
                                      
                                      1 Reply Last reply Reply Quote 0
                                      • T
                                        tiago90 @johnodon
                                        last edited by

                                        @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 !

                                        1 Reply Last reply Reply Quote 0
                                        • CyborgbobC
                                          Cyborgbob
                                          last edited by

                                          Can't wait to try this out.....

                                          1 Reply Last reply Reply Quote 0
                                          • johnodonJ
                                            johnodon @etheling
                                            last edited by

                                            @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_setting

                                            I 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

                                            ethelingE 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.