Skip to content

Instantly share code, notes, and snippets.

@gogromat
Last active November 29, 2024 15:53
Show Gist options
  • Save gogromat/68ed18c2983a96deb888a3c198f6692a to your computer and use it in GitHub Desktop.
Save gogromat/68ed18c2983a96deb888a3c198f6692a to your computer and use it in GitHub Desktop.
NVIDIA fixes on Debian

Vulkan select NVIDIA GPU ICS loader on Linux

Check if session is Wayland or X11

> echo $XDG_SESSION_TYPE
wayland
> ...
x11

Steam not using Nvidia GPU

xhost +local:

xhost 1

  • run ps a |grep X
  • outputs ex. /run/user/1000/gdm/Xauthority
  • DISPLAY=:0|1 XAUTHORITY=/run/user/1000/gdm/Xauthority nvidia-settings

2

Root missing $DISPLAY hacks

> (user) echo $DISPLAY
:1
> (user) echo $XAUTHORITY
/run/user/1000/gdm/Xauthority
> su
> echo $DISPLAY
:1
> echo $XAUTHORITY
/run/user/1000/gdm/Xauthority
> su -
> echo $DISPLAY

> echo $XAUTHORITY

>

I have display :1, yours may vary.

When (user) or su are requesting $DISPLAY and it is set but when not inheriting from (user) $DISPLAY:

  • something happened to /root/.Xauthority?
    • (ex. ls -la /root/.Xauthority shows d-rw... and looking inside it has .Xauthority.)
      • Request new
      • xhost +local:$DISPLAY - in system default terminal (not tmux, etc.)
    • su -
    • ln -s /home/(user)/.Xauthority /root/.Xauthority
      • delete it
    • su -
    • add to /root/.profile:
      • export DISPLAY=:1; on a new line

Can be easier to see autocomplete of $DISPLAY/etc. by using fish instead of sh/bash

  • run as root nvidia-settings (should not see Invalid MIT-MAGIC-COOKIE-1 key)

Make Steam games work

(Overwatch/Apex/etc)

  • Steam -> Compatibility -> Enable Proton Edge/Experimental (top) / Hotfix (bottom)

  • If game doesn't load (but you have launched it at least once) or if you cannot Alt+Tab

    • https://www.youtube.com/watch?v=Q_xMmWt6sEY&t=2m50s
      • each game on Steam has appId which you can see on a website
    • Install protontricks
      • launch it via GUI: protontricks --gui
        • as a user, not as su because steam is installed for a user
        • select GameName - appId of a game you want to change
          • for a game to appear on this list you have to launch your game at least once via Steam -> right click game -> settings -> Compatibility -> [+] -> Proton
        • choose top launch Select the default wineprefix -> Run winecfg -> Compatibility -> set Resolution to your monitor
          • next time game launches it would go through this wincfg

Tearing in browser (FF)

@see https://www.reddit.com/r/linux_gaming/comments/1dj4z9u/is_there_something_wrong_with_my_gpu/

  • about:config -> layers.acceleration.force-enabled -> true

Deadlock - virtual memory/etc.: -> Steam Thread <-

Nvidia Section

1.Game not launching on a NVIDIA GPU? try
`PROTON_HIDE_NVIDIA_GPU=1 %command%`
in the launch options
2.Advanced, experimental launch options:
`gamemoderun %command% -high -nojoy +engine_low_latency_sleep_after_client_tick true +mat_queue_mode 2 +cl_forcepreload 1`
  • edit as su (nano /etc/sysctl.conf) and add a line at the bottom of a file vm.max_map_count=1048576
    • ~8GB of virtual memory - default on newer OSes
    • alt as sudo sysctl -w vm.max_map_count=1048576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment