Yes sir
And you know I’m going to want this, right?
I have made some instructions for turning an Ubuntu 16.10 installation into my own “Lakka”. I currently need it for my Apollo Lake based box, as it won’t run with the older kernel used in Lakka. The system now boots right into RetroArch, with the performance CPU governor enabled. It also shuts down the system when RetroArch is quit, unless you press a keyboard key within 5 seconds after quitting, in which case you end up at the command line. It all seems to work great so far.
If you’re interested, I could post up the instructions?
Please do! I’d do it to this box.
Okay, here we go! I started with a clean Ubuntu 16.10 desktop installation, but I guess you could just as well use the server variety. The server version is probably preferable, even, as it’s more lean. Anyway, here are the steps you need to perform:
1. Set Ubuntu to start in console mode (you can skip this if using Ubuntu server flavor)
- Find GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and change it to GRUB_CMDLINE_LINUX_DEFAULT=“text”
- Update grub with sudo update-grub
- Tell systemd to not load the desktop:sudo systemctl enable multi-user.target --force [Note: I believe I got an error message here. Just ignore it.] sudo systemctl set-default multi-user.target
2. Auto-login user
- sudo systemctl edit getty@tty1
- Add these lines and exchange “username” with the real user name:[Service] ExecStart= ExecStart=-/sbin/agetty -a username --noclear %I $TERM
3. Make input in RetroArch work by setting correct permissions
- Add to /etc/udev/rules.d/99-evdev.rules (create the file if it doesn’t exist):KERNEL==“event*”, NAME=“input/%k”, MODE=“666”
- Then reload rules with sudo udevadm control --reload-rules.
4. Install cpufrequtils for controlling CPU governor
- sudo apt-get install cpufrequtils
5. Set CPU governor to “performance” at boot
- Run “sudo nano /etc/rc.local”, add the following lines and save the file:#!/bin/sh -e cpufreq-set -g performance
- sudo chmod ugo+x /etc/rc.local
- Run “sudo nano /lib/systemd/system/rc-local.service”, add the following lines at the end:[Install] WantedBy=multi-user.target
- sudo systemctl enable rc-local.service
6. Add RetroArch Ubuntu PPA and install RetroArch and cores
- sudo add-apt-repository ppa:libretro/testing
- sudo apt-get update
- sudo apt-get install retroarch
- Install desired cores like this (snes9x as example): sudo apt-get install libretro-snes9x
7. Autostart RetroArch after auto-login and make the system shut down after exiting RetroArch (with a 5 sec window to press key to abort and go to command line)
- Go to the user’s home directory.
- sudo nano .profile
- Add the following lines at the end of the file:retroarch
if read -r -s -n 1 -t 5 -p “Press any key to abort system shutdown and return to the command line…” then
[INDENT=2]echo " Shutdown aborted."[/INDENT] else
[INDENT=2]shutdown now[/INDENT] fi
I just got back from Thanksgiving at my parents’ house with fam. I’ll be attempting all of this tonight on the Asus Chromebox and update the thread after work.
Ahh, I thought you had already tried it when I read your PM earlier today. Let me know if you run into any issues and I’ll do my best to help out.
OK, I think I got it! A couple of questions though:
- I still see the Ubuntu when boot up, but it does run the script and a bunch of text and then immediately launches me into RA, so I take it this means I can get into the desktop if I need to (hence, the last instructions if I wanted to avert the shutdown and escape to the command line)?
- It’s now not reading my USB drives (where my ROMs/ISOs are stored), it can’t find them. HELP!
What happens if you press Ctrl+Alt+F7 while at the command line? If you get to the desktop this way, you can go back to the terminal with Ctrl+Alt+F1.
EDIT: Also, you can try running this from the command line: sudo service lightdm start
The drives probably need to be mounted and auto mounting isn’t being done by default in command line mode. Check out this page for some info: https://help.ubuntu.com/community/Mount/USB
In particular, that page mentions:
Auto-mounting (Ubuntu Server) By default, disk drives do not auto-mount in Ubuntu Server Edition. If you are looking for a lightweight solution that does not depend on HAL/DBUS, you can install “usbmount”.
I haven’t tried this myself (and can’t at the moment), but I believe this is where you should start looking.
[QUOTE=Brunnis;51559]What happens if you press Ctrl+Alt+F7 while at the command line? If you get to the desktop this way, you can go back to the terminal with Ctrl+Alt+F1.
EDIT: Also, you can try running this from the command line: sudo service lightdm start[/quote] That’s the kicker: I didn’t see a place where I could type any commands! It flew by so fast upon bootup that it launches immediately into Retroarch. I also tried Ctrl+Alt+F7 while in RA, no reaction, and Ctrl+Alt+F1 brings me back out and then halts the script with no option to run any commands. Argh! I knew it wasn’t going to be easy.
I did try the “usbmount” while I was setting it up before I went into the straight-into-Retroarch bootup cycle, and it does bring up ALL of the USB ports in the CN-60, but it does not detect anything plugged into them, which is another strange thing. I’m pretty sure I screwed that one up, but not sure how to fix it. I’ll do some more digging.
I knew that brick wall I’d run into would be around here somewhere.
Can’t mount and unmount the drives because…I have no terminal to put in commands! ta-da! Going to keep digging, because, you know, this is fun in some sick, twisted way.
You know that thing right when you’re on the edge of frustration beyond frustration, you’re at THAT point. You either give up, or you try one more thing and it leads you down to the very thing you were searching for and you ultimately wind up successful?
I DID IT!
Now comes the fun part: I can’t reach the desktop to port the damn BIOS files into the RA program so ALL of my emulators will run (in my hasty frustration from before, I erased it and reinstalled Ubuntu, and RA without making a folder and reinstalling the BIOS files). I might do that all over again just to install the BIOS files.
A big THANK YOU! to all of you. For helping and putting up with me during this time. Bunnis I’m quotiing your help post for posterity!
[QUOTE=Brunnis;51406]Okay, here we go! I started with a clean Ubuntu 16.10 desktop installation, but I guess you could just as well use the server variety. The server version is probably preferable, even, as it’s more lean. Anyway, here are the steps you need to perform:
1. Set Ubuntu to start in console mode (you can skip this if using Ubuntu server flavor)
- Find GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and change it to GRUB_CMDLINE_LINUX_DEFAULT=“text”
- Update grub with sudo update-grub
- Tell systemd to not load the desktop:sudo systemctl enable multi-user.target --force [Note: I believe I got an error message here. Just ignore it.] sudo systemctl set-default multi-user.target
2. Auto-login user
- sudo systemctl edit getty@tty1
- Add these lines and exchange “username” with the real user name:[Service] ExecStart= ExecStart=-/sbin/agetty -a username --noclear %I $TERM
3. Make input in RetroArch work by setting correct permissions
- Add to /etc/udev/rules.d/99-evdev.rules (create the file if it doesn’t exist):KERNEL==“event*”, NAME=“input/%k”, MODE=“666”
- Then reload rules with sudo udevadm control --reload-rules.
4. Install cpufrequtils for controlling CPU governor
- sudo apt-get install cpufrequtils
5. Set CPU governor to “performance” at boot
- Run “sudo nano /etc/rc.local”, add the following lines and save the file:#!/bin/sh -e cpufreq-set -g performance
- sudo chmod ugo+x /etc/rc.local
- Run “sudo nano /lib/systemd/system/rc-local.service”, add the following lines at the end:[Install] WantedBy=multi-user.target
- sudo systemctl enable rc-local.service
6. Add RetroArch Ubuntu PPA and install RetroArch and cores
- sudo add-apt-repository ppa:libretro/testing
- sudo apt-get update
- sudo apt-get install retroarch
- Install desired cores like this (snes9x as example): sudo apt-get install libretro-snes9x
7. Autostart RetroArch after auto-login and make the system shut down after exiting RetroArch (with a 5 sec window to press key to abort and go to command line)
- Go to the user’s home directory.
- sudo nano .profile
- Add the following lines at the end of the file:retroarch
if read -r -s -n 1 -t 5 -p “Press any key to abort system shutdown and return to the command line…” then
[INDENT=2]echo " Shutdown aborted."[/INDENT] else
[INDENT=2]shutdown now[/INDENT] fi [/QUOTE] Quoted for posterity.
With that said, there has to be an easier way to get to the desktop from this mode, isn’t there? If I can do that, the BIOS files are on the external HDD i have attached to the CN-60 right now (with even more ROMs and ISOs than I had on my 256 GB USB 3.0 thumb drive).
Glad to hear it’s working!
Do you really need the desktop, though? When you quit RetroArch you have 5 seconds to press any key on the keyboard to end up at the command line. Then you can just mount the drive as usual and copy what you need to the system drive. That’s what I do on my setup.
[QUOTE=Brunnis;51663]Glad to hear it’s working!
Do you really need the desktop, though? When you quit RetroArch you have 5 seconds to press any key on the keyboard to end up at the command line. Then you can just mount the drive as usual and copy what you need to the system drive. That’s what I do on my setup.[/QUOTE] Truth be told, not really, I just linked the BIOS folder in my USB drive, but I’m also encountering all sorts of bugs and my SSD keeps crashing for some strange reason. It’s locking up at bootup, and that’s without my external HDD attached to cause any confusion with SeaBIOS (which is set to boot USB first, then SSD). It probably would have been a lot easier to run RA through Ubuntu and kept the desktop even but I would have not learned why Lakka was failing if I had done that and now that I know why it’s failing (it’s not KMS/DRM or RA), I know the problem lies elsewhere.
i finally threw my hands in the air, took one usb stick and put ubuntu live on it and used it to install full ubuntu to another usb stick, and installed the x86 version of retropie to it. Games are working now, interface looks great, and I have a full OS I can fall back on/change platforms if needbe/use dolphin and other emulators. Having troubles with the xbox 360 wireless controller, but a ps3 controller is working fine for now.
So an update: after it worked initially, I found out it was all not meant to last: it crashed on me and burned into a fiery heap. Ubuntu wouldn’t boot and then, alas, it was done, it blue-screened on me. I haven’t seen that since XP! (I know I dated myself somewhat on that one) Oh well, for a while, I thought it fried the Chromebox, since it wouldn’t even boot, tried multiple sticks of RAM/SSDs (I kept them around just in case), but managed to resurrect the thing. Isolated it to my Ubuntu install USB stick (it finally ratted itself out upon me trying to install it last night). Finally got everything back to working order but decided that it’s best to give this thing a new home. Especially since I just got a whole bunch of new hardware in: a 2nd Odroid-XU4 (dedicated to Lakka instead of split between Lakka and Recalbox (alpha)), a Gigabyte Brix S i3 model (which did the same thing the Chromebox did, so no go there, and not even bothering to do anything about it since it was a full-on kit with Windows 10, so just run with Retroarch and probably Dolphin after I upgrade the RAM/put an SSD inside), and as an early Christmas gift from my GF…
an Alienware Steam Machine i7 model! Gamespot had it on sale for half price on Black Friday and they’re just sitting there. I didn’t have a gaming PC in any capacity and always wanted one, so I figured what the heck and GF said hey, early Christmas gift for you. Haven’t tried SteamOS yet in any capacity, so look forward to that once I get a new TV stand for my living room along with a new TV, probably in the new year. Will try Lakka via Live USB on it as well after I get my hands on the aforementioned stuff in the new year.
does the vampire cross Retropie. Get that $#!+ away from me! x86 or RPi3, doesn’t matter. Ugh it’s defined new ways of crashing on me. I thought the x86 version would actually help! Give it time, suffering. A short summary of what the x86 version did to my Chromebox: ES wouldn’t boot, RA would hang (after Retropie updated it of course), the “experimental” packages would cause Retropie to crash and not launch (that one is familiar because, well, RPi3), couldn’t find the memory locations of some of the emulators installed from the optional and/or experimental packages (from both Libretro/Retroarch and independent ones, at that, which tells me it’s not Retroarch f***ing it up). I’ve had to rerun the Retropie setup each time and it would take hours for it to do all that. F*** that noise.
Recalbox also makes a LiveUSB version like Lakka, I’ll run with those two for now. Besides they’re my favorites anyway. I also was thinking about installing a dedicated server inside my place anyway, which would take care of that whole SSH thing regarding Lakka with the Chromebox.
[QUOTE=Shockwave;51814]So an update: after it worked initially, I found out it was all not meant to last: it crashed on me and burned into a fiery heap. Ubuntu wouldn’t boot and then, alas, it was done, it blue-screened on me. I haven’t seen that since XP! (I know I dated myself somewhat on that one) Oh well, for a while, I thought it fried the Chromebox, since it wouldn’t even boot, tried multiple sticks of RAM/SSDs (I kept them around just in case), but managed to resurrect the thing. Isolated it to my Ubuntu install USB stick (it finally ratted itself out upon me trying to install it last night). Finally got everything back to working order but decided that it’s best to give this thing a new home. Especially since I just got a whole bunch of new hardware in: a 2nd Odroid-XU4 (dedicated to Lakka instead of split between Lakka and Recalbox (alpha)), a Gigabyte Brix S i3 model (which did the same thing the Chromebox did, so no go there, and not even bothering to do anything about it since it was a full-on kit with Windows 10, so just run with Retroarch and probably Dolphin after I upgrade the RAM/put an SSD inside), and as an early Christmas gift from my GF…
an Alienware Steam Machine i7 model! Gamespot had it on sale for half price on Black Friday and they’re just sitting there. I didn’t have a gaming PC in any capacity and always wanted one, so I figured what the heck and GF said hey, early Christmas gift for you. Haven’t tried SteamOS yet in any capacity, so look forward to that once I get a new TV stand for my living room along with a new TV, probably in the new year. Will try Lakka via Live USB on it as well after I get my hands on the aforementioned stuff in the new year.
does the vampire cross Retropie. Get that $#!+ away from me! x86 or RPi3, doesn’t matter. Ugh it’s defined new ways of crashing on me. I thought the x86 version would actually help! Give it time, suffering. A short summary of what the x86 version did to my Chromebox: ES wouldn’t boot, RA would hang (after Retropie updated it of course), the “experimental” packages would cause Retropie to crash and not launch (that one is familiar because, well, RPi3), couldn’t find the memory locations of some of the emulators installed from the optional and/or experimental packages (from both Libretro/Retroarch and independent ones, at that, which tells me it’s not Retroarch f***ing it up). I’ve had to rerun the Retropie setup each time and it would take hours for it to do all that. F*** that noise.
Recalbox also makes a LiveUSB version like Lakka, I’ll run with those two for now. Besides they’re my favorites anyway. I also was thinking about installing a dedicated server inside my place anyway, which would take care of that whole SSH thing regarding Lakka with the Chromebox. :D[/QUOTE]
eh, so far so good for now with me. dat interface too. really like it over the lakka ui. its not perfect but at least I can get it to play games without having to use a 2nd computer to hold its hand. Maybe Ill check lakka out again in the future, but as long as it continues working ill stick with this. at least until a better alternative comes along lol
Yeah, I like EmulationStation as well, that’s why I would choose Recalbox over Retropie (both are incredibly similar, but Recalbox usually sticks to Retroarch emulators/cores and to me, is FAR more stable and doesn’t crash nowhere near as often as RetroPie does). The former also can be used on x86 architecture via Live USB. However, I started to dive into tweaking Lakka on my Odroid unit (I also have a dedicated Lakka Raspberry Pi 3 unit as well, but the Odroid has better N64/PSP/Saturn emulation, so I use it more often). I found out about the customer wallpapers and backgrounds and boxarts and screenshots. Those are VERY nice and improve the presentation dramatically, and change it so that it doesn’t look like the PS3 front end at all. Heck, my Odroid Lakka background is my favorite console of all time, the SNES. LOL.