feat: Recover from GPU crashes on the primary GPU - from jupiter-hw-support

This commit is contained in:
Kyle Gospodnetich 2024-05-20 21:32:55 -07:00
parent c3581b4910
commit cae8d96985
4 changed files with 16 additions and 0 deletions

View File

@ -76,6 +76,7 @@ xcursorgen usr/share/steamos/steamos-cursor-config %{buildroot}%{_datadir}/icons
rm %{buildroot}%{_datadir}/jupiter_bios_updater/h2offt-g
rm %{buildroot}%{_datadir}/jupiter_bios_updater/H2OFFTx64-G.sh
rm %{buildroot}%{_datadir}/steamos/steamos.png
rm %{buildroot}%{_prefix}/lib/udev/rules.d/80-gpu-reset.rules
rm -rf %{buildroot}%{_datadir}/jupiter_bios_updater/driver
rm -rf %{buildroot}%{_unitdir}/multi-user.target.wants
rm -rf %{buildroot}%{_datadir}/alsa

View File

@ -0,0 +1,5 @@
# If a GPU crash is caused by a specific process, kill the PID
ACTION=="change", ENV{DEVNAME}=="/dev/dri/card0", ENV{RESET}=="1", ENV{PID}!="0", RUN+="/sbin/kill -9 %E{PID}"
# Kill SDDM and Gamescope if the GPU crashes and VRAM is lost
ACTION=="change", ENV{DEVNAME}=="/dev/dri/card0", ENV{RESET}=="1", ENV{FLAGS}=="1", RUN+="/usr/sbin/systemctl restart sddm"

View File

@ -0,0 +1,5 @@
# If a GPU crash is caused by a specific process, kill the PID
ACTION=="change", ENV{DEVNAME}=="/dev/dri/card0", ENV{RESET}=="1", ENV{PID}!="0", RUN+="/sbin/kill -9 %E{PID}"
# Kill SDDM and Gamescope if the GPU crashes and VRAM is lost
ACTION=="change", ENV{DEVNAME}=="/dev/dri/card0", ENV{RESET}=="1", ENV{FLAGS}=="1", RUN+="/usr/sbin/systemctl restart sddm"

View File

@ -0,0 +1,5 @@
# If a GPU crash is caused by a specific process, kill the PID
ACTION=="change", ENV{DEVNAME}=="/dev/dri/card0", ENV{RESET}=="1", ENV{PID}!="0", RUN+="/sbin/kill -9 %E{PID}"
# Kill SDDM and Gamescope if the GPU crashes and VRAM is lost
ACTION=="change", ENV{DEVNAME}=="/dev/dri/card0", ENV{RESET}=="1", ENV{FLAGS}=="1", RUN+="/usr/sbin/systemctl restart gdm"