Instructables sucks and my github’s a mess, so I’m just going to post this here, so Lemmy exclusive I guess…
Before starting you will need an rpi 4b, after monitoring over ssh I’m pretty sure a 2gb model will be enough, the RAM usage didn’t really get much past 1.7gb, I used an old 4gb that used to be my projects centre. Cooling is advised, you can overclock and get the performance boost that way too which helps a lot with 1080p, although still don’t expect to get near that with youtube, go with piped instead. Ethernet and an overclock will get the best performance, although 720p on most sites seems to run okay over wifi. You will want to run from USB storage too, I’m using the M.2 SSD base with the argon ONE case, but I tested on a USB 3.0 thumbdrive and results were pretty similar.
Start by flashing the latest 64-bit raspi lite OS to a usb device. You may need to update the EEPROM if you haven’t already in order to boot from USB. Take advantage of the rpi imager settings here to enable SSH and change the hostname so you can tell it apart from the 6 other pi’s you have running around your house, if using a different imager then don’t forget to include the SSH file you may need it on the next step.
After initial boot, the screen may black out, using the same image I had this happen with the USB SSD, but not the USB thumb drive. If it blacks out then ssh in and vi or nano into /boot/firmware/config.txt
and comment out and add the following lines:
#dtoverlay=vc4-kms-v3d
dtoverlay=vc4-fkms-v3d
Now that the screen is working you can log into the session, and make the usual prayer sudo apt update && sudo apt upgrade -y
followed by a sudo reboot
for luck. And next install KDE Plasma; I originally went for kde-plasma-desktop
as its the lighter install, but it kept hanging at boot, you might have more luck, but expect to start again if it fails.
sudo apt install kde-standard
After that another reboot for luck. Then we need to activate the sddm login manager service, and tell raspi OS that we want it to boot into GUI on the next boot:
sudo systemctl enable sddm
sudo systemctl set-default graphical.target
And reboot again. It should now boot into plasma, and the first thing you should do is disable all the desktop effects; older KDE plasma guides suggest to disable compositor, but the session defaults to wayland unless you tell it not to, and wayland can’t run without the compositor - I’ve noticed no major differences between X11 and wayland myself in this use case (don’t believe the hype). [edit: have found that disabling compositor in X causes screen tearing on video, so just disable desktop effects but leave compositor on]
Now the effects are disabled, and if you have your cooling set up, now is a good time to overclock, so back into /boot/firmware/config.txt
. I just went with the following:
# Overclock
over_voltage=6
arm_freq=2000
gpu_freq=700
Next we can install the other bits we need:
sudo apt install chromium-browser rpi-chromium-mods plasma-bigscreen
If you want to watch DRM services like netflix you will need another package thats not included in lite:
sudo apt install libwidevinecdm0
KDE connect and an android phone make the perfect remote control, connect should already be included in the KDE install. But firewall suggested, with connect and ssh rules:
sudo apt install ufw
sudo ufw allow 1714:1764/udp
sudo ufw allow 1714:1764/tcp
sudo ufw allow 22/tcp
sudo ufw enable
Next open chromium, add the extensions you want, and “install” your “web apps”.
Now open up KDE settings again, select Startup and Shutdown > Login Screen (SDDM), and then click the behaviour button at the bottom and set plasma to log in automatically and change the session to bigscreen, password to confirm, and it should prompt you to set a password for the keychain, I set a blank password because I want other people to be able to use the tv. Also disable power saving, or at least getting sent back to the login screen after sleep.
Done! Reboot and enjoy!
Some optional polish:
plasma bigscreen is designed to work one window at a time, so if you minus a window without a keyboard you’ve essentially lost it, so in settings you can remove the titlebar buttons for max/min and hide and just leave the one to close the window with.
Xscreensaver has a pretty cool analog tv effect screensaver that will cycle through images in a folder and display them with various tv static effects:
sudo apt install xscreensaver xscreensaver-data-extra
[edit: it looks like this version of bigscreen doesn’t suport KDE login scripts so xscreensaver for now is a non-starter. Hopefully debian gets plasma 5.26 soon and this will then work]
[added:] Not quite full screen: KDE’s window management isn’t quite perfect, and full screen often falls short by 1 pixel on the right and bottom borders (despite any window rules you might add), this can be an irritant when a bright wallpaper sits behind whatever you’re watching. Easiest fix is to set a dark-edged wallpaper. The newer bigscreen lets you use the kde settings which is nice as you can set the wallpaper to plain colour black, but the debian version you have to use the built in wallpaper settings app found in the settings menu on the home screen. It will only show you the wallpapers that are installed, so download your dark wallpaper, then move it to the wallpaper folder and it will show up in the wallpaper changer application:
sudo mv ~/Downloads/<wallpaper> /usr/share/wallpaper/