mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
🐜 fix(runner): Workaround for NVIDIA driver issue (#180)
Co-authored-by: DatCaptainHorse <DatCaptainHorse@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
9d084011a2
commit
4546eb6767
@@ -120,7 +120,8 @@ RUN sed -i \
|
|||||||
RUN pacman --noconfirm -Sy && \
|
RUN pacman --noconfirm -Sy && \
|
||||||
# Core system components
|
# Core system components
|
||||||
pacman -S --needed --noconfirm \
|
pacman -S --needed --noconfirm \
|
||||||
archlinux-keyring mesa steam steam-native-runtime \
|
archlinux-keyring vulkan-intel lib32-vulkan-intel mesa \
|
||||||
|
steam steam-native-runtime \
|
||||||
sudo xorg-xwayland labwc wlr-randr mangohud \
|
sudo xorg-xwayland labwc wlr-randr mangohud \
|
||||||
pipewire pipewire-pulse pipewire-alsa wireplumber \
|
pipewire pipewire-pulse pipewire-alsa wireplumber \
|
||||||
noto-fonts-cjk supervisor jq chwd lshw pacman-contrib && \
|
noto-fonts-cjk supervisor jq chwd lshw pacman-contrib && \
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ get_gpu_info
|
|||||||
|
|
||||||
# Check vendors in priority order
|
# Check vendors in priority order
|
||||||
if [[ -n "${vendor_devices[nvidia]:-}" ]]; then
|
if [[ -n "${vendor_devices[nvidia]:-}" ]]; then
|
||||||
echo "NVIDIA GPU detected. Assuming drivers are linked"
|
echo "NVIDIA GPU detected, assuming driver is linked and applying Vulkan fix..."
|
||||||
|
echo "{\"file_format_version\":\"1.0.0\",\"ICD\":{\"library_path\":\"libGLX_nvidia.so.0\",\"api_version\":\"1.3\"}}" > /usr/share/vulkan/icd.d/nvidia_icd.json
|
||||||
elif [[ -n "${vendor_devices[intel]:-}" ]]; then
|
elif [[ -n "${vendor_devices[intel]:-}" ]]; then
|
||||||
echo "Intel GPU detected, installing required packages..."
|
echo "Intel GPU detected, installing required packages..."
|
||||||
pacman -Sy --noconfirm gstreamer-vaapi gst-plugin-va gst-plugin-qsv
|
pacman -Sy --noconfirm gstreamer-vaapi gst-plugin-va gst-plugin-qsv
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ start_nestri_server() {
|
|||||||
for _ in {1..15}; do # Wait up to 15 seconds
|
for _ in {1..15}; do # Wait up to 15 seconds
|
||||||
if [ -e "$WAYLAND_SOCKET" ]; then
|
if [ -e "$WAYLAND_SOCKET" ]; then
|
||||||
echo "Wayland display 'wayland-1' is ready."
|
echo "Wayland display 'wayland-1' is ready."
|
||||||
sleep 1 # necessary sleep - reduces chance that non-ready socket is used
|
sleep 5 # necessary sleep - reduces chance that non-ready socket is used
|
||||||
start_compositor
|
start_compositor
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
@@ -127,7 +127,7 @@ start_steam() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting Steam with -tenfoot..."
|
echo "Starting Steam with -tenfoot..."
|
||||||
WAYLAND_DISPLAY=wayland-0 steam -tenfoot &
|
WAYLAND_DISPLAY=wayland-0 steam-native -tenfoot &
|
||||||
STEAM_PID=$!
|
STEAM_PID=$!
|
||||||
|
|
||||||
# Verify Steam started successfully
|
# Verify Steam started successfully
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ mod proto;
|
|||||||
use crate::args::encoding_args;
|
use crate::args::encoding_args;
|
||||||
use crate::nestrisink::NestriSignaller;
|
use crate::nestrisink::NestriSignaller;
|
||||||
use crate::websocket::NestriWebSocket;
|
use crate::websocket::NestriWebSocket;
|
||||||
|
use crate::gpu::GPUVendor;
|
||||||
use futures_util::StreamExt;
|
use futures_util::StreamExt;
|
||||||
use gst::prelude::*;
|
use gst::prelude::*;
|
||||||
use gstrswebrtc::signaller::Signallable;
|
use gstrswebrtc::signaller::Signallable;
|
||||||
@@ -54,7 +55,7 @@ fn handle_gpus(args: &args::Args) -> Option<gpu::GPUInfo> {
|
|||||||
gpu = filtered_gpus.get(args.device.gpu_index as usize).cloned();
|
gpu = filtered_gpus.get(args.device.gpu_index as usize).cloned();
|
||||||
} else {
|
} else {
|
||||||
// get first GPU
|
// get first GPU
|
||||||
gpu = filtered_gpus.get(0).cloned();
|
gpu = filtered_gpus.into_iter().find(|g| *g.vendor() != GPUVendor::UNKNOWN);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if gpu.is_none() {
|
if gpu.is_none() {
|
||||||
|
|||||||
Reference in New Issue
Block a user