hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.45k stars 897 forks source link

git nix flakes versions of hyprland causing games to crash on launch. #6007

Open shayanz23 opened 5 months ago

shayanz23 commented 5 months ago

Hyprland Version

System/Version info Hyprland, built from branch at commit fe7b748eb668136dd0558b7c8279bfcd7ab4d759 (). Date: 2024-04-16 Tag: , commits: @COMMITS@ flags: (if any) System Information: System name: Linux Node name: nixos Release: 6.8.9 Version: #1-NixOS SMP PREEMPT_DYNAMIC Thu May 2 14:35:35 UTC 2024 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] [1002:73df] (rev c5) (prog-if 00 [VGA controller]) os-release: ANSI_COLOR="1;34" BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues" BUILD_ID="24.05.20240507.b211b39" DOCUMENTATION_URL="https://nixos.org/learn.html" HOME_URL="https://nixos.org/" ID=nixos IMAGE_ID="" IMAGE_VERSION="" LOGO="nix-snowflake" NAME=NixOS PRETTY_NAME="NixOS 24.05 (Uakari)" SUPPORT_URL="https://nixos.org/community.html" VERSION="24.05 (Uakari)" VERSION_CODENAME=uakari VERSION_ID="24.05" plugins:

Bug or Regression?

Bug

Description

Recently I had an issue where if I tried to play the witcher 3 on the latest git commit using nix flakes, the cursor got stuck in the top left corner.

to fix this I tried going back to 0.39.1 on NixOS (the last time I had 0.39.1 I was on Opensuse Tumbleweed) with hyprland.url = "github:hyprwm/Hyprland/?ref=v0.39.1";, but that just resulted in games crashing on launch, cs2 for example quits with this error The selected graphics queue does not support presenting a swapchain image in cs 2.

Then I tried switching back to the latest git version using nix flakes, and that problem came back.

But going to the 'normal' 0.39.1 release from the nixos repos works perfectly fine, with no games crashing or witcher 3 having cursor issues.

How to reproduce

  1. use nixos with this flake https://paste.mozilla.org/vsQ3xWQC and maybe this config https://paste.mozilla.org/Ey425A8u
  2. try to launch a game

Crash reports, logs, images, videos

counter strike crash dump: cs2_crash_dmp.txt

witcher 3 crash steam logs

Setting breakpad minidump AppID = 292030
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198208414187 [API loaded no]
GameOverlay: started '/home/human/.local/share/Steam/ubuntu12_32/gameoverlayui' (pid 463144) for game process 462960
05/10 01:44:02 minidumps folder is set to /tmp/dumps
05/10 01:44:02 Init: Installing breakpad exception handler for appid(gameoverlayui)/version(20240503231115)/tid(463144)
05/10 01:44:02 Init: Installing breakpad exception handler for appid(gameoverlayui)/version(1.0)/tid(463144)
Fossilize INFO: Overriding serialization path: "/home/human/.local/share/Steam/steamapps/shadercache/292030/fozpipelinesv6/steamapprun_pipeline_cache".
vulkan: No DRI3 support detected - required for presentation
Note: you can probably enable DRI3 in your Xorg config
pid 462883 != 462882, skipping destruction (fork without exec?)
fufexan commented 5 months ago

This reads to me as the same bug as https://github.com/hyprwm/Hyprland/issues/5983.

shayanz23 commented 5 months ago

That was just supposed to be the cursor getting stuck, but it also included this as my attempts to fix that resulted in this issue. Because it isn't actually the same bug I thought I should make separate issue for it.

Because this makes it so all games don't launch at all, where for the other one almost every game like Blackops 3 and counter strike 2 worked fine, except for the witcher 3 which only had a stuck cursor, but otherwise still worked perfectly fine.

Maybe I'm wrong though I'm not sure.

vaxerski commented 5 months ago

cs2 is https://github.com/ValveSoftware/csgo-osx-linux/issues/3728 I believe

Zawaken commented 5 months ago

Adding onto what Vaxry mentioned here

Question, do you have Rebar and Above 4G encoding enabled in the BIOS?

I also thought this issue was a Wayland issue, but from my testing, it broke just as much on XMonad, so while cs2 has issues on wayland, this was not one of them, this got fixed by enabling Rebar and Above 4G Encoding in the BIOS. And I managed to play a game without any further issues. This also fixed Sekiro which had some issues with crashing after a few seconds ingame.

Hopefully this gets fixed soon in the kernel, so we don't need to have this enabled.

shayanz23 commented 5 months ago

Yeah both of those are enabled.

Also this is not the same bug because, this affects all games crashing nearly instantly when the games are launched, sometimes as if they weren't even launched.

If the game has a launcher though, the launcher starts, but the game crashes immediately.

This isn't an issue on repo version of hyprland 0.39.1 or gnome 46 either.