Remote virtio GPU Project usage
ysh One

ref

unified-hmi/remote-virtio-gpu: A UnifiedHMI project to provide a client-server based rendering engine. (github.com)

使用效果:能运行简单的opengl 游戏(比如stk)

前置

weston

1
sudo apt install weston 

环境准备

RVGPU

1
2
3
4
5
6
7
8
sudo apt install cmake pkg-config libvirglrenderer-dev libegl-dev libgles-dev libwayland-dev libgbm-dev libdrm-dev libinput-dev
wget https://github.com/unified-hmi/virtio-loopback-driver/releases/download/v1.0.0/virtio-lo-dev_1.0.0.deb
sudo dpkg -i virtio-lo-dev_1.0.0.deb
git clone https://github.com/unified-hmi/remote-virtio-gpu.git
cd ./remote-virtio-gpu
cmake -B build -DCMAKE_BUILD_TYPE=Release
make -C build
sudo make install -C build

Virtio-loopback-driver

1
2
3
4
5
6
7
8
9
10
sudo apt install libjpeg-dev libwebp-dev libsystemd-dev libpam-dev libva-dev freerdp2-dev \
libxcb-composite0-dev liblcms2-dev libcolord-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libpipewire-0.2-dev \
libxml2-dev meson libxkbcommon-x11-dev libpixman-1-dev libinput-dev libdrm-dev wayland-protocols libcairo2-dev \
libpango1.0-dev libdbus-1-dev libgbm-dev libxcursor-dev
wget https://wayland.freedesktop.org/releases/weston-8.0.93.tar.xz
tar -xf weston-8.0.93.tar.xz
cd ~/weston-8.0.93/
meson build/
sudo ninja -C build/ install
sudo ldconfig

切换到wayland

1
2
3
4
5
6
7
8
echo $XDG_SESSION_TYPE
vim /etc/gdm3/custom.conf
###
#WaylandEnable=false -> WaylandEnable=true
###
#注意不是gdm3
sudo systemctl restart gdm
echo $XDG_SESSION_TYPE

mesa

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#换内核
sudo wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.18.tar.xz
sudo tar -xf linux-5.8.18.tar.xz
cd linux-5.8.18
cp /boot/config-5.8.0-50-generic .config # Other versions of config are acceptable
vim .config # comment this line CONFIG_SYSTEM_TRUSTED_KEYS=""
make menuconfig # save config
make HOSTCC=gcc-11 CC=gcc-11 -j`nproc`

#装mesa
sudo apt install libwayland-egl-backend-dev llvm-dev libxdamage-dev libxcb-glx0-dev libxcb-dri2-0-dev libxcb-dri3-dev libxcb-present-dev libxshmfence-dev
wget https://archive.mesa3d.org/mesa-20.3.5.tar.xz
tar -xf mesa-20.3.5.tar.xz
cd mesa-20.3.5
meson setup builddir/
meson compile -C builddir/
sudo meson install -C builddir/
Powered by Hexo & Theme Keep