In my previous post I tried to summarize all the quirks and issues I hit while trying to make RetroArch (and partially Higan) work in Orange PI OS 3.0.0 and Armbian. The long story short - I failed and stopped trying. The reason for that is lack of my own experience at that time and misunderstanding, of what was actually wrong.
But I discovered a much more straightforward way to do that, thanks to a youtube channel I found which lead me to this website - ReARM.it and this discord channel. In a short, the wonderful guy, Arnaldo Valente is keeping a number of github repos, from which he builds images of batocera and retropie for a large number of ARM SBC boards, like the one I have.
I downloaded the fresh image of RetroPie for my Orange Pi 4 LTS board, flashed it to a SD card with Balena Etcher and off we go - everything went smoothly from there. Many retroarch cores are there and working.
Given I needed not only the gaming distro but also something I could use for more generic purposes I went few steps further and installed a number of packages on a top of it (also had my chance to play with nala):
# install nala, so we could potentially easily "undo" all the additional packages I'm about to install
nala install task-kde-desktop neofetch kde-full systemsettings /echo "deb https://deb.volian.org/volian/ scar main" | sudo tee /etc/apt/sources.list.d/volian-archive-scar-unstable.listwget -qO - https://deb.volian.org/volian/scar.key | sudo tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/nullsudo apt updatesudo install nala-legacy# install KDE + few extra packages I want to play with
kwin-x11 kscreen plasma-nm kitty chromium mesa-utils plasma-discover /
locate konq-plugins libkf5khtml-bin ksysguard bluedevil /
kde-config-sddm kde-config-systemd kde-config-screenlocker
I realized It actually makes a lot of sense, as it allows to install just bare minimum amount of packages, and whatever you find is missing - you just install that and only that
bluedevil is a KDE frontend for bluez (Bluetooth)
Making X to start after EmulationStation quits
- by default it should boot into EmulationStation, as most of the time it will be hooked to TV and I'll be only using bluethooth gamepads
- if I quit EmulationStation it should start X.Org with KDE (if I need to do something bigger than gaming)
sudo systemctl set-default multi-user.target
$ cat /etc/profile.d/10-retropie.sh
# launch our autostart apps (if we are on the correct tty and not in X)
if [ "`tty`" = "/dev/tty1" ] && [ -z "$DISPLAY" ] && [ "$USER" = "pi" ]; then
bash "/opt/retropie/configs/all/autostart.sh"
sudo systemctl isolate graphical.target
fi
Fixing some small bugs
Removing splash
There was just one thing which worried, me - is that the idiotic orangepi splash screen was showing up occasionally (when ES was launching RetroArch), so I disabled it at all in /boot/orangepiEnv.txtverbosity=1
bootlogo=false
overlay_prefix=rockchip
fdtfile=rockchip/rk3399-orangepi-4-lts.dtb
rootdev=UUID=30ae6b8c-ad3f-46b2-b323-4b9a05653ba9
rootfstype=ext4
extraargs="video=HDMI-A-1:1920x1080@60e"
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u
QT_QUICK_BACKEND DEFAULT=software
Reinstall SDL2
apt list libsdl2-2.0-0 -a
cp /lib/aarch64-linux-gnu/libSDL2-2.0.so.0.18.2 /lib/aarch64-linux-gnu/libSDL2-2.0.so.0.18.2.bak apt-get download libsdl2-2.0-0=2.0.14+dfsg2-3+deb11u1 dpkg -i ./libsdl2-2.0-0_2.0.14+dfsg2-3+deb11u1_arm64.deb cd /lib/aarch64-linux-gnu/ unlink libSDL2-2.0.so.0 ln -s libSDL2-2.0.so.0.14.0 libSDL2-2.0.so.0
getting rid of connect-bluetooth.service
After installing the bluez from repo, apt created a proper bluetooth.serivce fo systemd. In the same time we have a connect-bluetooth.service which was coming as a part of retropie. In order for these two guys to not clash one into another and complaining about that to dmesg and journald
So it's better to disable the service which was coming with RetroPi:
systemctl disable connect-bluetooth.service
Tweaking KDE to debloat it a bit
[Debug]
Tracer=null
[%General]
Driver=QMYSQL
[QMYSQL]
Host=
Name=akonadi
Options="UNIX_SOCKET=/run/user/1000/akonadi/mysql.socket"
ServerPath=/usr/sbin/mysqld
StartServer=false
apt remove akonadiconsole akonadi-server
- ColorCorrect Geolocation Updater (and these ppl are telling me Windows is full of bloatware?)
- Free Space Notifier (I'm able to watch after free space myself)
- KScreen2 (for this I just didn't find any reasonable description at all)
- KSysguard (I don't need a fucking deamon to lunch KSysguard! I can lunch it myself)
- Remote URL change notifier
- Search Folder Updater (I'm an oldfag still using locate)
- Touchpad (I don't have it).
If you're alike me and hate this modern trend of all operation systems (iOS, Android, Windows, Linux) to splash a whole bulk of alerts / notifications on you, then go to System Settings -> Startup and shutdown -> Autostart and disable KAlert
I also went to System Settings -> File Search and disabled it, as I'm more love to decide it myself when I want to run updatedb to reindex all files for my occasional uses of locate.
It's kind of strange that the same file indexing option is appearing in two places on System Settings. Might be a UX bug. Will raise it
Go to System Settings -> Workspace behaviour -> Desktop effects and turn as much effects as you can.
Go to System Settings -> Windows management -> Kwin scripts and disable all scripts
System Settings ->Display and monitor -> Compositor select XRender until we fix OpenGL drivers
How to debloat your system even further
Like in my case, when I brought the KDE I knew what kind of contract with devil I'm signing, with all it's zillion of modules, binaries an apps. But really I don't want to spend hours understanding them all and carefully select only the ones I need and remove the rest ones. My favorite approach is - bring the default, and then fine tune it. So what you can do is to make periodical manual system monitoring lookups to see what is running on your machine and what is consuming resources.
I'll give you this simple example: I saw some odd cnf-update-db process was spinning on CPU a lot. I decided to see what package brought it to my system. For that it's better to have to update the locate' internal database first and then to find that file in our filesystem:
$ updatedb
$ locate cnf-update-db
/usr/lib/cnf-update-db
/usr/share/command-not-found/cnf-update-db
$ ls -la /usr/lib/cnf-update-db
lrwxrwxrwx 1 root root 40 Jan 6 2021 /usr/lib/cnf-update-db -> ../share/command-not-found/cnf-update-db
$ ls -la /usr/share/command-not-found/cnf-update-db
-rwxr-xr-x 1 root root 683 Jan 6 2021 /usr/share/command-not-found/cnf-update-db
$ dpkg -S /usr/share/command-not-found/cnf-update-db
command-not-found: /usr/share/command-not-found/cnf-update-db
What other files this package brought?$ dpkg -L command-not-found
/.
/etc
/etc/apt
/etc/apt/apt.conf.d
/etc/apt/apt.conf.d/50command-not-found
/etc/zsh_command_not_found
/usr
/usr/bin
/usr/lib
/usr/sbin
/usr/share
/usr/share/command-not-found
/usr/share/command-not-found/CommandNotFound
/usr/share/command-not-found/CommandNotFound/CommandNotFound.py
/usr/share/command-not-found/CommandNotFound/__init__.py
/usr/share/command-not-found/CommandNotFound/db
/usr/share/command-not-found/CommandNotFound/db/__init__.py
/usr/share/command-not-found/CommandNotFound/db/creator.py
/usr/share/command-not-found/CommandNotFound/db/db.py
/usr/share/command-not-found/CommandNotFound/util.py
/usr/share/command-not-found/cnf-update-db
/usr/share/command-not-found/command-not-found
/usr/share/command-not-found/command_not_found-0.3.egg-info
/usr/share/doc
/usr/share/doc/command-not-found
/usr/share/doc/command-not-found/README.Debian
/usr/share/doc/command-not-found/README.md
/usr/share/doc/command-not-found/changelog.Debian.gz
/usr/share/doc/command-not-found/copyright
/usr/share/locale
/usr/share/locale/de
/usr/share/locale/de/LC_MESSAGES
/usr/share/locale/de/LC_MESSAGES/command-not-found.mo
/usr/share/locale/fr
/usr/share/locale/fr/LC_MESSAGES
/usr/share/locale/fr/LC_MESSAGES/command-not-found.mo
/usr/share/locale/pl
/usr/share/locale/pl/LC_MESSAGES
/usr/share/locale/pl/LC_MESSAGES/command-not-found.mo
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/update-command-not-found.8.gz
/usr/share/python3
/usr/share/python3/runtime.d
/usr/share/python3/runtime.d/command-not-found.rtupdate
/var
/var/lib
/var/lib/command-not-found
/usr/bin/command-not-found
/usr/lib/cnf-update-db
/usr/lib/command-not-found
/usr/sbin/update-command-not-found
$ apt show command-not-found
Package: command-not-found
Version: 20.10.1-1
Priority: optional
Section: admin
Maintainer: Julian Andres Klode <jak@debian.org>
Installed-Size: 105 kB
Depends: apt-file (>= 3.0~exp1~), lsb-release, python3-apt, python3:any
Suggests: snapd
Tag: implemented-in::python, interface::shell, role::program, scope::utility
Download-Size: 26.2 kB
APT-Manual-Installed: yes
APT-Sources: http://deb.debian.org/debian bullseye/main arm64 Packages
Description: Suggest installation of packages in interactive bash sessions
In some cases you might want to investigate it bit deeper, like some packages might be just buggy and overconsuming resources when they should not. Every case is unique, but the common approach is above.
Debloat it all!
Read a continuation of this story in another post - https://orange-pi-4-lts.blogspot.com/2022/08/debloating-your-linux-even-further.html
From it, you'll learn what important things you need to do, so the SD card you put into your SBC won't die in next year or so.
No comments:
Post a Comment