summaryrefslogtreecommitdiff
path: root/scripts/desktop/proton-env
blob: 4652d0b6bc4e3eaf637c0dfc0b45cccd277bb9c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /usr/bin/env sh

# https://gist.github.com/Kron4ek/af1bbc1353302751a0941308294ec24a

export STEAM_COMPAT_LAUNCHER_SERVICE=proton

export PROTON_USE_NTSYNC=1
export PROTON_ENABLE_WAYLAND=1
export PROTON_WAYLAND_MONITOR=$MAIN_MONITOR

export DXVK_HUD=compiler
export DXVK_LOG_LEVEL=none
export DXVK_DEBUG=none
export DXVK_CONFIG="dxvk.enableDescriptorHeap = True;"

export VKD3D_DEBUG=none
export VKD3D_SHADER_DEBUG=none
export VKD3D_CONFIG=descriptor_heap

export RADV_EXPERIMENTAL=heap

unset SDL_VIDEODRIVER
unset SDL_VIDEO_DRIVER

if [[ $DISPLAY_MODE_60HZ == 1 ]]; then
  swaymsg "output $MAIN_MONITOR mode 2560x1440@59.951Hz"
fi

if [[ $DISPLAY_MODE_HDR == 1 ]]; then
  swaymsg "output $MAIN_MONITOR hdr on"
fi

xrandr --output $MAIN_MONITOR --primary

scxctl start --sched lavd --mode gaming

if [[ $MANGOHUD == 1 || -z $MANGOHUD ]]; then
  env LD_PRELOAD="$LD_PRELOAD:/usr/lib64/libgamemodeauto.so" mangohud "$@"
else
  env LD_PRELOAD="$LD_PRELOAD:/usr/lib64/libgamemodeauto.so" "$@"
fi

scxctl stop

if [[ $DISPLAY_MODE_HDR == 1 ]]; then
  swaymsg "output $MAIN_MONITOR hdr off"
fi

if [[ $DISPLAY_MODE_60HZ == 1 ]]; then
  swaymsg "output $MAIN_MONITOR mode 2560x1440@119.998Hz"
fi