As the title asks, how does one actually use HDR for games after upgrading to Plasma 6?

This was the feature I was most excited about, and I can hit the HDR button on my display configuration and it looks like the desktop is going into HDR mode, but so far I have had zero luck enabling the HDR feature in games. Every game I’ve tried had the HDR toggle disabled with no way to enable it.

I am running these games under Proton and I’ve tried both 8-GE and 9 Beta. Any tips?

Edit: probably important to note that I am using an AMD GPU under Wayland

  • thadah@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    8 months ago

    Hi! To enable HDR in most games you will need to set your game in fullscreen. Windowed or Borderless won’t allow you to use HDR functionality.

    You’ll also need to use the DXVK_HDR=1 %command% startup variable in steam to enable HDR in any Proton game. Proton 8 and 9 should support HDR without issuez although there are some games that might need additional configuration.

    If you use an NVIDIA card, you might need to enable NVAPI with DXVK_ENABLE_NVAPI=1

    Happy gaming! :D

    • zelifcam@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      8 months ago

      NVIDIA Latest Drivers:

      Fixes Game Flicker:

      file: /etc/modprobe.d/nvidia.conf

      options nvidia NVreg_RegistryDwords="PowerMizerEnable=0x1; PerfLevelSrc=0x2222; PowerMizerLevel=0x3; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"

      General Wayland Fixes:

      These can also be set under modprobe, but I was troubleshooting a while back and it was easier to edit them this way before booting. So here’s my kernel parameters I have set:

      nvidia-drm.modeset=1 nvidia-modeset.hdmi_deepcolor=1 nvidia-drm.fbdev=1 nvidia.NVreg_TemporaryFilePath=/var/tmp

      ENV Variables

      LIBVA_DRIVER_NAME=nvidia
      __GLX_VENDOR_LIBRARY_NAME=nvidia
      __GL_GSYNC_ALLOWED=1
      

      https://lemmy.world/comment/8500390

    • Lojcs@lemm.ee
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      This only lets you enable hdr in game. Since proton runs under xwayland the hdr info won’t reach the compositor.

  • Domi@lemmy.secnd.me
    link
    fedilink
    English
    arrow-up
    1
    ·
    8 months ago

    To play Proton games you only need the latest gamescope from git, the HDR layer and environment variables are no longer needed for gamescope

    Just set the launch arguments on Steam for any game to: gamescope --hdr-enabled --nested-refresh 165 --fullscreen --steam -w 3440 -W 3440 -h 1440 -H 1440 -- %command%.

    Don’t forget to set your refresh rate and resolution.

    If you want to play videos files in HDR (YouTube also works) you need to use mpv together with the HDR layer.

    After installing the layer you can run mpv like this: ENABLE_HDR_WSI=1 mpv --vo=gpu-next --target-colorspace-hint --gpu-api=vulkan --gpu-context=waylandvk "https://www.youtube.com/watch?v=dQw4w9WgXcQ".

    • million@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      Thanks, appreciate the write up. Definitely sounds like HDR under Linux has a long way to go to reach the “just works” level.

      I asked this in another thread but I would be curious to get different perspectives; could you use gamescope and mpv under Gnome and get HDR support or is KDE’s HDR support essential here?

      • Domi@lemmy.secnd.me
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 months ago

        Thanks, appreciate the write up. Definitely sounds like HDR under Linux has a long way to go to reach the “just works” level.

        It’s not as long as you might think, by the end of the year we should have out of the box HDR on Linux. At least for Proton games. All the puzzle pieces are there, they just need to be put in place.

        could you use gamescope and mpv under Gnome and get HDR support or is KDE’s HDR support essential here?

        No, not until GNOME implements their HDR support. You can however run gamescope and mpv directly in tty instead of KDE/GNOME.

      • usrtrv@lemmy.ml
        link
        fedilink
        English
        arrow-up
        0
        ·
        8 months ago

        On the Steam Deck it already “just works” for a lot of games (with an OLED or an external display). So we’re not that far off for those changes propagating to Desktop.