这篇博客也有中文版本,点击这里: (教程)树莓派5安装sunshine实现局域网串流
0. Before We Start
We need to understand first that Raspberry Pi has a ARM64 processor, we need to install the correct version of sunshine.
Install it on Raspberry Pi OS might be a bit complex compare to Windows or Android.
LET’S GOOOOO.
1. Install Sunshine
Link: LizardByte: Sunshine for Linux
As Raspberry Pi OS is a Debian based Linux distro, we need to find sunshine-debian-bookworm-arm64.deb.
Next, sent this deb package to your Raspberry Pi, after that, enter the directory where the package is located, execute this command in the terminal to maunally install sunshine:
dpkg -i sunshine-debian-bookworm-arm64.deb
If there’s problems of lack of dependencies, execute
sudo apt-get install -f
to install missing dependencies. After installing the dependcies, you should reinstall sunshine’s deb package again.
After installation, execute
sunshine
to check whether the installation is succesful.
At this step, sunshine might not run normally since lack of configuration, so here comes the next step.
2. Configure your Raspberry Pi
1️⃣ Upgrad Your System first
sudo apt update && sudo apt full-upgrade -y
Why not?
2️⃣ EnableWayland Support
In newer version of Raspberry Pi OS, wayland is used by default. BUT, if you encounterd this error while sunshine starts:
Error: Environment variable WAYLAND_DISPLAY has not been defined
You should first modify your booting config
sudo nano /boot/firmware/config.txt
and add
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
to enable hardware acceleration. After saving your changes, reboot your device.
After that, execute
sudo raspi-config
to start configure your OS configuration, orderly select
6 Advanced Options
A6 Wayland
W3 Labwc (This is the recommended wayland compositor by Raspberry Pi)
After configuration, reboot your Pi.
Now, enter Raspberry Pi’s desktop via VNC (don’t use ssh), and execute
echo $XDG_SESSION_TYPE
in terminal. The configuration is succesful if the output is wayland.
3️⃣ Enable avahi-daemon
If you see this message when sunshine starts
Error: Failed to create client: Daemon not running
Execute
sudo systemctl enable --now avahi-daemon
3. Start Sunshine
Congratulations!🥳 All setups should be completed!
Now execute
sunshine
to start sunshine.
NOTE: If you don’t have a virtual monitor or headless wayland monitor, you should make sure Raspberry Pi have at least one GUI desktop on or connected to a physical monitor.
If the start up is succesful, you should see
open https://localhost:47990 via browser and you shall see the interface
The configuration after that is same as on Windows.