building on ubuntu server 16.04
-
Added a few roms and vids play nice...no need for OMX since my laptop has accelerated HW. However, there is no sound. I'm guessing I will need to play with pulseaudio a bit.
Also, RA is having issues. It either launches to a black screen, or, starts to load the rom (ROM checks) and freezes.
I'll continue to play.
-
@johnodon said in building on ubuntu server 16.04:
Also, RA is having issues. It eitehr launches to a black screen, or, starts to load the rom (ROM checks) and freezes.
Use the Configuration Editor and set the
video_threaded
configuration to false for all Libretro cores. This should solve the video issue. -
@mitu said in building on ubuntu server 16.04:
@johnodon said in building on ubuntu server 16.04:
Also, RA is having issues. It eitehr launches to a black screen, or, starts to load the rom (ROM checks) and freezes.
Use the Configuration Editor and set the
video_threaded
configuration to false for all Libretro cores. This should solve the video issue.Thanks @mitu but the choppy vids I was referring to are the video previews in ES. Wouldn't this change only be for gameplay using RA?
-
@johnodon My advice only refers to the problem you mentioned about RA:
Also, RA is having issues. It eitehr launches to a black screen, or, starts to load the rom (ROM checks) and freezes.
You mentioned that the video previews are ok
Added a few roms and vids play nice...no need for OMX since my laptop has accelerated HW
-
@mitu Sorry if I wasn't clear or misunderstood.
OK. So turning off video threading in RA may fix the issue of RA crashing or freezing? I wasn't aware...thank you for that. I'll give it a try.
Yes, vid previews are running much better on x86 (really one of the main reasons I want to get this to work).
-
Sound is now working in ES and RA. I had to install 'alsa-base' so I could launch alsamixer to unmute Master and Speaker.
I have also successfully tested Zaxxon and Battletoads (mame2003) and Metal Slug (fbalpha).
@mitu On this latest attempt I did not set video threading to false. I'm actually wondering if the issue may have been on folder permissions...meaning RA was not able to write to the mame2003 or fba subfolders (I use the arcade folder). I ran 'resetromdirs' in Configuration/Tools and everything is working as expected so far.
The last thing to do is just cleanup...change background color of the terminal window, etc. So far this is running exactly as I wanted.
-
First, I would like to sincerely thank the contributors of this thread for getting me to this point!
As promised, he is MY step-by-step to get this working.
Disclaimer...
- I tested ONLY on Ubuntu Server 17.10.1.
- I tested ONLY lr-mame2003, lr-mame2003-plus and lr-fbalpha.
- I tested ONLY from the 'arcade' folder.
- I did not test HDMI or external controls as my testbed is a laptop.
Now, on to the meat...
- Install Ubuntu Server 17.10.1
a. I performed a VERY vanilla install
b. I used pi/raspberry for user/password so I can transfer settings easily from a Pi install
c. I install only the openssh server package
I perform all steps below in a remote SSH session so I can copy/paste. NOTE: You will need to provide your password for the first command. After reboot it will no longer be required.
2. Add the 'pi' user to sudoerssudo sed -i -e '$a\pi ALL=(ALL) NOPASSWD:ALL' /etc/sudoers
- Update/Upgrade Ubuntu
sudo apt-get update -y && sudo apt-get upgrade -y
- Install dependencies
sudo apt-get install xorg openbox pulseaudio alsa-utils python-xdg at-spi2-core menu dbus-x11 git dialog unzip xmlstarlet --no-install-recommends -y
- Get the Retropie Setup script
git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git
- Configure Openbox
mkdir ~/.config && mkdir ~/.config/openbox && echo 'gnome-terminal --full-screen --hide-menubar -- emulationstation' >> ~/.config/openbox/autostart
- Create a xsession for Openbox
echo 'exec openbox-session' >> ~/.xsession
- Create a bash profile
echo 'if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then' >> ~/.bash_profile && sed -i '$ a\ startx' ~/.bash_profile && sed -i '$ a\fi' ~/.bash_profile
- Enable autologin for 'pi' user
sudo mkdir /etc/systemd/system/getty@tty1.service.d && sudo sh -c 'echo [Service] >> /etc/systemd/system/getty@tty1.service.d/override.conf' && sudo sed -i '$ a\ExecStart=' /etc/systemd/system/getty@tty1.service.d/override.conf && sudo sed -i '$ a\ExecStart=-/sbin/agetty --noissue --autologin pi %I $TERM' /etc/systemd/system/getty@tty1.service.d/override.conf && sudo sed -i '$ a\Type=idle' /etc/systemd/system/getty@tty1.service.d/override.conf
- Start the Retropie Setup script
sudo RetroPie-Setup/retropie_setup.sh
- OK at the Retropie Setup script disclaimer
NOTE: All steps below assume that you are at the main Retropie Setup screen
-
Basic install >> Yes
-
Configuration / Tools >> samba >> Install Retropie Samba shares
-
Configuration / Tools >> resetromdirs
-
Perform reboot
At this point you should be able to test some roms to make sure everything is running as expected.
- If you are having issues with EMUs freezing/hanging or getting a black screen, try running 'resetromdirs' from the Configutation / Tools section of the Retropie Setup script. This has worked for me as I think it was a permissions issue when trying to write to the configuration folders. (just a hunch)
If you are not getting any sound in ES or RA, run alsamixer and unmute channels
alsamixer
- Press F6 to select the correct sound card (if not already selected)
- Use the arrow keys to move left/right
- Press the M key to mute (MM) or unmute (##) the selected channel
- Use the arrow keys to move the volume slider up/down
- Press the ESC key to exit
If you are not getting sound in ES or RA via HDMI, you may need to make HDMI your default device for Pulseaudio:
- Get full list of pulseaudio properties:
pacmd list
- Scroll to bottom and look for Profiles (active profile is shown in blue below):
profiles:
input:analog-stereo: Analog Stereo Input (priority 60, available: no)
output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5460, available: unknown)
output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown)
output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown)
output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown)
off: Off (priority 0, available: unknown)
active profile: output:analog-stereo+input:analog-stereo- Decide which is the proper profile to use (for me it is 'output:hdmi-stereo+input:analog-stereo')
- Run the following command tailored for your profile:
sudo sed -i -e '$ a\set-card-profile 0 output:hdmi-stereo+input:analog-stereo' /etc/pulse/default.pa
- Reboot and test
sudo reboot
Additional tasks...
Make the terminal window "invisible"
- ALT+TAB to the 'Terminal' window.
- Right click anywhere on it and select Profiles >> Profile Preferences.
- Go to the Colors tab and uncheck 'Use colors from system theme'.
- Set the Default color for Text and Background to black for each.
- Go to the Scrolling tab and uncheck 'Show scrollbar'.
- Click the 'Close' button and ALT+TAB back to the ES screen.
- Launch a rom to see how it looks.
Any/all feedback is welcome!
John
-
@praetorian55 said in building on ubuntu server 16.04:
- Once openbox is installed, create and edit ~/.config/openbox/autostart
How are you installing openbox on 18.04? When I try using apt-get, there is no package:
E: Package 'openbox' has no installation candidate
John
-
@johnodon said in building on ubuntu server 16.04:
How are you installing openbox on 18.04?
The previous post mentions 17.10, not 18.04. But it's also available in Bionic - https://packages.ubuntu.com/bionic/openbox.
-
@johnodon either you haven't done
apt-get update
or you are missing some repositories that come with 18.04 -
@mitu said in building on ubuntu server 16.04:
@johnodon said in building on ubuntu server 16.04:
How are you installing openbox on 18.04?
The previous post mentions 17.10, not 18.04. But it's also available in Bionic - https://packages.ubuntu.com/bionic/openbox.
@praetorian55 does mention 18.04 in his testing.
"Anyway, I was successful in building out Ubuntu server 16.04.4 and 18.04 with both Xorg and Wayland."
-
@buzz said in building on ubuntu server 16.04:
@johnodon either you haven't done
apt-get update
or you are missing some repositories that come with 18.04EDIT: I'll admit that this was my first exposure to the new installer. I pretty much just 'continued' through each screen and did not select any of the predefined packages that are available. Could this be the issue?
I have now tried 3 different builds on 2 different pieces of hardware and each has told me that openbox is not available in the repos. I always do an apt-get update prior to trying to install from the repos. I don't know what to make of it.
Following the same exact process listed above, I do not have the issue on 16.04 or 17.10.
FYI...it also tells me that 'menu', 'dbus-x11' and 'dialog' are not available.
-
Updated the steps above:
- Added some additional dependencies to cleanup some errors logged to ~/.xsession-errors
- Changed the switch in the openbox autostart file to launch ES for '-e' to '--' (-e and --command are deprecated)
-
@johnodon do you have the universe repo I'm your list of sources for apt ?
-
UPDATE: I have tested this in both ES and RA (lr-mame2003, lr-mame2003-plus and lr-fbalpha) and sound is working across the board. I'll update the step-by-step above to include.
Like a lot of others, I had a bear of a time getting HDMI audio to work. All sounds were still coming through the analog speaker even though I was connected via HDMI.
'aplay -l' displayed all cards/ports as expected:
pi@m92:~$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: ALC662 rev3 Analog [ALC662 rev3 Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0
Card 0 Device 3 is what I want. However, 'alsamixer' only saw the analog port (card 0 device 0) and I could not switch to HDMI:
After a LOT of trial and error, I found the answer on this page: https://askubuntu.com/questions/294512/setting-the-default-alsa-device-for-pulseaudio
Specifically this answer:
After the update to 13.10 Pulseaudio defaulted to HDMI, probably because I have an extra monitor attached to my laptop (Lenovo T430S) thru my mini-display port. The archlinux website provided a sweet and short answer to reset or set the default:
login and change the default output to analog
Run
$ aplay -l
and find that analog is card 0
Run
$ pacmd list
and find the line:
active profile: output:analog-stereo+input:analog-stereo
"output:analog-stereo+input:analog-stereo" is my profile name, so add
set-card-profile 0 output:analog-stereo+input:analog-stereo
in /etc/pulse/default.pa and save
restart pulseaudio
In short, what I did was run 'pacmd list' and scrolled all the way to the bottom of the output where the profiles are listed:
profiles: input:analog-stereo: Analog Stereo Input (priority 60, available: no) output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown) output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown) output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown) output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5460, available: unknown) output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown) output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown) output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown) output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown) off: Off (priority 0, available: unknown) active profile: <output:analog-stereo+input:analog-stereo>
As you can see above, my active profile is set to 'output:analog-stereo+input:analog-stereo'.
To fix this, edit the default.pa file:
sudo nano /etc/pulse/default.pa
And a new line to the bottom of the file to make the HDMI port the default (I used the Stereo profile for now):
set-card-profile 0 output:hdmi-stereo+input:analog-stereo
I haven't FULLY tested this solution yet (family still sleeping) but I at least have HDMI sound in ES. I'll report full results later. If successful, I'll add this to the step-by-step above as a 'gotcha'.
-
@mitu said in building on ubuntu server 16.04:
@johnodon do you have the universe repo I'm your list of sources for apt ?
I'll need to check this later. I have since installed 16.04 and 17.10 on my test machines.
-
I think I figured out how to undecorate all windows in Openbox. This will prevent the terminal title bar from flashing when launching a rom.
I'll add to the step-by-step once I test a little more.
-
Proof is in the puddin'. :)
Here is a quick video to show the 'almost' final product (no mouse pointer, no terminal windows, etc.). I just need to hide the boot dialog with a splashscreen and she will be done. I plan on creating a new thread that will be dedicated to this build so I can support.
-
@mitu said in building on ubuntu server 16.04:
@johnodon do you have the universe repo I'm your list of sources for apt ?
Just circling back to this...
You guys were right.
For some reason, the Universe repo is not included in a basic install on 18.04. This is the first version I have ever run across this.
John
-
@johnodon said in building on ubuntu server 16.04:
This is the first version I have ever run across this.
Did you configure a network connection during installation or installed from CD without configuring one ? I've done a few desktop installs recently using a minimal/net iso and it was enabled automatically for me.
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.