Open TheFeelTrain opened 2 months ago
With some further testing, trying different builds and different settings do not seem to fix it. I tried enabling all of the different config options like protonify, still no luck.
Proton 9.0-2 -> gamescope -> HDR works Proton 9.0-2 -> wayland driver -> not supported
Proton Experimental -> gamescope -> HDR works Proton Experimental -> wayland driver -> not supported
GE-Proton9-11 -> gamescope -> HDR works GE-Proton9-11 -> wayland driver -> not supported
proton-ge-custom (AUR) -> gamescope -> HDR works proton-ge-custom (AUR) -> wayland driver -> runs but input does not work
proton-tkg (Valve Exp Bleeding Edge) -> gamescope -> HDR works proton-tkg (Valve Exp Bleeding Edge) -> wayland driver -> runs but input does not work
proton-tkg (Wine Master) -> gamescope -> HDR greyed out in settings proton-tkg (Wine Master) -> wayland driver -> HDR greyed out in settings
It's not expected to work on upstream bases so I don't see anything abnormal here. Works on valve trees as it should (outside of winewayland which is incomplete and broken).
Oh okay, I just assumed enabling "protonify" (or one of the other config options) would pull in the patches to sort of convert upstream wine to match Valve's wine.
(outside of winewayland which is incomplete and broken)
It does actually work perfectly in Divinity Original Sin 2 and Witcher 3, I haven't had any problems with it. Elden Ring also works perfectly minus the HDR detection, but since that's also not working with gamescope I'm just assuming it's unrelated to the wayland driver.
I did find this pull request from about a year ago https://github.com/ValveSoftware/Proton/pull/7048
So it does seem like Elden Ring (and Sekiro) in particular have always been finicky with HDR. But this was never merged so it must have gotten fixed some other way.
If this is expected behavior feel free to close the issue, I don't want to waste your time. I was just hoping I could get it working because the game is noticeably smoother with the wayland driver compared to gamescope. And it seems like it should be possible with the right environment variable and/or patch.
It works on my machine, albeit on Nvidia GPU, both with native wayland and gamescope. If I can somehow help debug, feel free to ping.
I am about 95% sure I have narrowed the issue down to AMD AGS so I need to test some of the related patches, just haven't had time yet. Looks like it has caused a lot of HDR-detection issues on the OLED Steam Deck in the past for various games. Nvidia uses the NVAPI instead so that's probably why it works fine.
But actually this is off topic to this issue but I do have a friend with a 2080 Ti who can't seem to launch proton-tkg at all, and gamescope crashes for them in all games regardless of proton version. What does your setup look like and what launch options are you using? I would love to get HDR working for him.
Right after I commented I thought of something and tried it out.
I manually copied lib/wine/i386-windows/amd_ags_x64.dll
and lib64/wine/x86_64-windows/amd_ags_x64.dll
from the valve-based tkg and overwrote the ones in the wine-based tkg. Sure enough now the detection works no problem. The valve-based versions were almost double the filesize so they are completely different.
@TheFeelTrain
But actually this is off topic to this issue but I do have a friend with a 2080 Ti who can't seem to launch proton-tkg at all, and gamescope crashes for them in all games regardless of proton version. What does your setup look like and what launch options are you using? I would love to get HDR working for him.
Linux arch-linus 6.10.5-1-cachyos #1 SMP PREEMPT_DYNAMIC Thu, 15 Aug 2024 12:23:25 +0000 x86_64 GNU/Linux
initrd=\linux\initramfs-linux-cachyos-modeset.img root=/dev/disk/by-label/ArchLinux modprobe.blacklist=nouveau fsck.mode=skip nvidia-drm.modeset=1 nvidia-drm.fbdev=1 vt.global_cursor_default=0 intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction
wine-tkg-git commit: ecd65dc53a6b62de7a1a7704b8d1912d8d284ae2
HKCU\Software\Wine\Drivers /v Graphics /d x11,wayland
VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_wait PROTON_ENABLE_NVAPI=1 DXVK_HDR=1 ENABLE_HDR_WSI=1 MANGOHUD_CONFIG=vsync=2,preset=1 MANGOHUD=1 __PULSE_LATENCY_MSEC=60 __GL_SYNC_TO_VBLANK=0 WINE_CPU_TOPOLOGY=16:0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 __PULSE_LATENCY_MSEC=60 VKD3D_CONFIG=force_static_cbv DISPLAY= %command%
sed -i 's/distro=""/distro="archlinux"/' proton-tkg.cfg
sed -i 's/uninstaller="false"/uninstaller="true"/' proton-tkg.cfg
sed -i 's/autoinstall="false"/autoinstall="true"/' proton-tkg.cfg
sed -i 's/LOCAL_PRESET=""/LOCAL_PRESET="none"/' proton-tkg.cfg
sed -i 's/build_gstreamer="false"/build_gstreamer="true"/' proton-tkg.cfg
sed -i 's/lib32_gstreamer="false"/lib32_gstreamer="true"/' proton-tkg.cfg
sed -i 's/wayland_driver="false"/wayland_driver="true"/' proton-tkg.cfg
sed -i 's/use_esync="true"/use_esync="false"/' proton-tkg.cfg
sed -i 's/use_fsync="true"/use_fsync="false"/' proton-tkg.cfg
sed -i 's/use_ntsync="false"/use_ntsync="true"/' proton-tkg.cfg
options nvidia NVreg_InitializeSystemMemoryAllocations=0
options nvidia NVreg_TemporaryFilePath=/opt/nvidia-mem
options nvidia NVreg_PreserveVideoMemoryAllocations=1
options nvidia NVreg_EnableGpuFirmware=0
options nvidia NVreg_EnableResizableBar=1
COLORFGBG=15;0
COLORTERM=truecolor
DISPLAY=:1
ELECTRON_OZONE_PLATFORM_HINT=wayland
GBM_BACKEND=nvidia-drm
KDE_APPLICATIONS_AS_SCOPE=1
KDE_FULL_SESSION=true
KWIN_DRM_DEVICES=/dev/dri/card0:/dev/dri/by-path/pci-0000:00:02.0-card
LANG=en_US.utf8
PLASMA_USE_QT_SCALING=1
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_WAYLAND_RECONNECT=1
SHELL=/bin/zsh
SHELL_SESSION_ID=634a7777bab648a3b00f9577b0853839
SHLVL=1
TERM=xterm-256color
USER=pew
WAYLAND_DISPLAY=wayland-0
WINEDLLOVERRIDES=winemenubuilder.exe=d
XAUTHORITY=/run/user/1000/xauth_InSkci
XDG_ACTIVATION_TOKEN=kwin-2
XDG_CONFIG_DIRS=/home/pew/.config/kdedefaults:/etc/xdg
XDG_CURRENT_DESKTOP=KDE
XDG_DATA_DIRS=/home/pew/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
XDG_MENU_PREFIX=plasma-
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=plasma
XDG_SESSION_ID=2
XDG_SESSION_TYPE=wayland
XDG_VTNR=1
__GLX_VENDOR_LIBRARY_NAME=nvidia
Thank you so much, I made a build with your exact settings and then taking these three environment variables: VKD3D_DISABLE_EXTENSIONS=VK_KHR_present_wait PROTON_ENABLE_NVAPI=1 VKD3D_CONFIG=force_static_cbv
were the key.
Without those options the games would crash and/or freeze after a few seconds but with them it works. However the performance took a roughly 20% hit until also switching from 555 to the 560 beta for whatever reason. But with those three things combined it's working perfectly in all the games we've tested.
In Elden Ring HDR works perfectly with Proton Experimental and
proton-ge-custom
, but it does not work with proton-tkg.Using this:
gamescope -f -W 3840 -H 2160 --hdr-enabled -- python er-patcher --all --rate 120 -- %command%
The option is greyed out in the menu so Elden Ring is not detecting that HDR is available.
I tried a few different versions from the GitHub CI and my own build and it did not work on any of them. Is there a particular patch or config option that's needed?
I should also note that HDR works fine with Divinity Original Sin 2 and The Witcher 3, even without gamescope, so this is something that seems to be tripping up Elden Ring in particular.
Arch Linux Ryzen 9 7950X + RX 7900XTX Kernel 6.10.4-zen2-1-zen Mesa 24.1.6 KDE Plasma 6.1.4