Skip to content

Commit

Permalink
run nvidia-xconfig if x11 hasn't started properly on nvidia gpus
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscon committed Jan 14, 2025
1 parent fddc244 commit c114d6d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions resources/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,13 @@ echo "booting..."
#if hash X 2>/dev/null;then
# su - quakeuser -l -c /usr/bin/startx >/tmp/startx.log 2>&1&
#fi

if (hash nvidia-xconfig >/dev/null 2>&1) && (lsmod|grep -cE 'nvidia_modeset' >/dev/null 2>&1);then
echo "nvidia gpu detected, checking if x11 has started correctly..."
sleep 15
systemctl status slim >/dev/null 2>&1 || (
echo "x11 hasn't started properly, running nvidia-xconfig..."
nvidia-xconfig
systemctl restart slim
)
fi

0 comments on commit c114d6d

Please sign in to comment.