updated wine to newer version, replaced xvfb with weston wayland that is using Xwayland. also switching from WineD3D to inbuilt vulkan support through DXVK which is send to weston using lavapipe instead of llvmpipe

This commit is contained in:
2026-06-13 22:17:22 +01:00
parent cf4c95fe2c
commit 5975979415
5 changed files with 72 additions and 31 deletions
+19 -9
View File
@@ -1,23 +1,31 @@
#!/bin/bash
# Clean up any leftover Xvfb lock files
# Clean up stale sockets from previous run
rm -f /tmp/.X99-lock
rm -f /tmp/.X11-unix/X99
# Clean up stale PulseAudio sockets from previous run
rm -rf /tmp/pulse-*
rm -f /run/user/$(id -u)/pulse/native
rm -rf /tmp/weston-runtime
wine reg add "HKCU\\Software\\Wine\\WineDbg" /v ShowCrashDialog /t REG_DWORD /d 0 /f
# Set up Weston runtime directory
export XDG_RUNTIME_DIR=/tmp/weston-runtime
mkdir -p $XDG_RUNTIME_DIR
chmod 700 $XDG_RUNTIME_DIR
Xvfb :99 -screen 0 800x600x24 &
# Start Weston in headless mode (handles Vulkan/DXVK rendering)
weston --backend=headless-backend.so --width=800 --height=600 --no-config &
sleep 2
export WAYLAND_DISPLAY=wayland-0
# Start Xwayland — bridges Weston Wayland to X11 for ximagesrc capture
Xwayland :99 &
sleep 1
export DISPLAY=:99
matchbox-window-manager -use_titlebar no &
sleep 1
# Suppress Wine crash dialog
wine reg add "HKCU\\Software\\Wine\\WineDbg" /v ShowCrashDialog /t REG_DWORD /d 0 /f
# Start PulseAudio for game audio
pulseaudio --start --exit-idle-time=-1
# Wait for PulseAudio to be ready with retries
for i in $(seq 1 10); do
pactl info > /dev/null 2>&1 && break
echo "Waiting for PulseAudio... attempt $i"
@@ -29,6 +37,8 @@ pactl load-module module-null-sink sink_name=mic_sink
pactl load-module module-virtual-source source_name=virtual_mic master=mic_sink.monitor
pactl set-default-source virtual_mic
# Launch CSS — Wine uses Wayland driver for rendering via Weston/Vulkan
wine ~/Counter-Strike\ Source/revLoader.exe &
sleep 5
python3 ~/streaming-agent/gst_agent.py