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
18.36k stars 765 forks source link

Bug with launching games #5889

Closed IgnIVertiKalCaD closed 1 month ago

IgnIVertiKalCaD commented 2 months ago

Hyprland Version

System/Version info ```sh Hyprland, built from branch at commit aaf35b9f1f0ce49080f2a0b1e7943336b1ba6057 (). Date: 2024-05-05 Tag: , commits: @COMMITS@ flags: (if any) System Information: System name: Linux Node name: desktop Release: 6.6.22 Version: #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 15 18:25:07 UTC 2024 GPU information: 09: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.19700101.dirty" 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

On versions x > v0.38 games with error on X11 do not run. Heroicgamelauncher, steam - not working. All the launchers I have tried for launching games do not work and give the same error related to x11

Faced the same problem as mine. https://discourse.nixos.org/t/lutris-games-and-minecraft-unplayable-on-hyprland-but-runs-fine-on-gnome/43464

How to reproduce

run the game on v.0.40, v0.39

Crash reports, logs, images, videos

fatal IO error 2 (No such file or directory) on X server ":0"

vaxerski commented 2 months ago

looks like xwayland is not running. @fufexan for nix

IgnIVertiKalCaD commented 2 months ago

looks like xwayland is not running. @fufexan for nix

Will it connect here when you tag him?

fufexan commented 2 months ago

Very odd, Steam launches just fine for me (along with other xwayland apps).

IgnIVertiKalCaD commented 2 months ago

Very odd, Steam launches just fine for me (along with other xwayland apps).

What information can I give you to solve my problem?

fufexan commented 2 months ago

I don't see any nixos config in your repos, so I assume it's not public. Do you have any overlays that might interfere with xwayland? Is your Nixpkgs up to date? In the version info you posted, the date is 19700101, so I can't exactly tell how old it is.

IgnIVertiKalCaD commented 2 months ago

I don't see any nixos config in your repos, so I assume it's not public. Do you have any overlays that might interfere with xwayland? Is your Nixpkgs up to date? In the version info you posted, the date is 19700101, so I can't exactly tell how old it is.

I'm using the flake version of hyprland. With this config, which is specified in the documentation, the games run on v0.36 (I'm using it now). So it is not a fact that the config somehow prevents games from running. Applications run that require x11 - webstorm, rustrover.

NixOS configuration ```nix { config, lib, pkgs, inputs, ... }: { boot.kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" "blacklist_module=acpi_cpufreq" "amd_pstate=active" "amd_pstate.shared_mem=1" ]; environment.sessionVariables = { QT_QPA_PLATFORM = "wayland"; TERM = "xterm"; XCURSOR_SIZE = "24"; XDG_CURRENT_DESKTOP = "hyprland"; NIXOS_OZONE_WL = "1"; VDPAU_DRIVER = "radeonsi"; LIBVA_DRIVER_NAME = "radeonsi"; }; programs.hyprland = { enable = true; #package = inputs.hyprland.packages.${pkgs.system}.hyprland; package = pkgs.hyprland; xwayland.enable = true; }; programs.nix-ld.enable = true; nixpkgs.config.allowUnfree = true; nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.auto-optimise-store = true; #virtualisation.virtualbox.host.enable = true; #virtualisation.virtualbox.guest.enable = true; #virtualisation.virtualbox.host.enableExtensionPack = true; hardware.opengl = { enable = true; driSupport = true; driSupport32Bit = true; extraPackages = with pkgs; [ rocm-opencl-icd rocmPackages.rocminfo dxvk_2 vulkan-loader vulkan-extension-layer vulkan-validation-layers vulkan-extension-layer ]; }; security.polkit.extraConfig = '' ''; imports = [ ./mods/fixMusnix ./hardware-configuration.nix ]; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.binfmt.registrations.appimage = { wrapInterpreterInShell = false; interpreter = "${pkgs.appimage-run}/bin/appimage-run"; recognitionType = "magic"; offset = 0; mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff''; magicOrExtension = ''\x7fELF....AI\x02''; }; #boot.kernelPackages = pkgs.linuxPackages_zen; boot.kernelModules = ["v4l2loopback" "amdgpu"]; boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; boot.extraModprobeConfig = '' options v4l2loopback devices=1 video_nr=10 card_label="OBS Virtualcam" exclusive_caps=1 options amdgpu audio=0 options snd-hda-intel power_save_controller=false power_save=0 model=auto blacklist snd_hda_codec_generic ''; networking.hostName = "desktop"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. time.timeZone = "Europe/Moscow"; services.ntp.enable = true; services.gnome.core-utilities.enable = false; services.xserver.desktopManager.xterm.enable = false; #musnix.enable = true; # Dconf programs.dconf = { enable = true; #packages = [pkgs.cinnamon.nemo-with-extensions]; }; #programs.dconf.packages = [pkgs.cinnamon.nemo]; # Dbus services.dbus.enable = true; # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; # console = { # font = "Lat2-Terminus16"; # keyMap = "us"; # useXkbConfig = true; # use xkb.options in tty. # }; # Enable CUPS to print documents. # services.printing.enable = true; # Enable sound. sound.enable = true; hardware.pulseaudio.enable = false; users.mutableUsers = true; users.groups.video = {}; users.groups.wheel = {}; users.groups.vboxusers = {}; musnix.enable = true; #musnix.kernel.realtime = true; users.users.igni = { isNormalUser = true; home = "/home/igni"; extraGroups = [ "wheel" "video" "vboxusers" "audio" "kvm" "libvirt" "input" "corectrl" "realtime"]; packages = with pkgs; [ firefox ]; }; environment.systemPackages = [ ] ++ (with pkgs; [ copyq discord rnote swappy easyeffects bottles apulse nodejs_21 wl-clipboard yarn (callPackage ./mods/davinci/davinci-resolve-crack.nix {}) auto-epp amdgpu_top corectrl #handbrake #hyprland v4l-utils nix-health insomnia vesktop qemu_full baobab egl-wayland pavucontrol adoptopenjdk-jre-bin stress redis postgresql glxinfo shadowsocks-libev wireguard-tools rustscan ffmpeg-full libva-utils vdpauinfo libdrm qpwgraph vlc bat killall tmux gparted pipewire wget playerctl kitty wofi telegram-desktop btop grim coreutils-full libreoffice obs-studio nettools google-chrome polkit_gnome libunwind fontconfig git wget curl hyprpaper transmission rustc transmission-gtk heroic s-tui evince gnome-text-editor lm_sensors ]) ++ (with pkgs.gnome; [ cheese gnome-tweaks eog gnome-music gdm gnome-disk-utility ]) ++ (with pkgs.qt6; [ full ]) ++ (with pkgs.cinnamon; [ nemo-with-extensions nemo-fileroller ]) ++ (with pkgs.jetbrains; [ clion rust-rover ]) ++ (with pkgs.obs-studio-plugins; [ wlrobs ]) ++ (with pkgs.winePackages; [ stableFull ]) ++ (with pkgs.wine64Packages; [ stableFull ]); programs.steam = { enable = true; }; programs.file-roller.enable = true; services.xserver.enable = true; services.xserver.videoDrivers = [ "amdgpu" ]; services.xserver.excludePackages = [ pkgs.xterm ]; services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome.enable = true; networking.wg-quick.interfaces.wg0.configFile = "/etc/wireguard/wg0.conf"; networking.wg-quick.interfaces.wg0.autostart = false; networking.wg-quick.interfaces.wg1.configFile = "/etc/wireguard/wg1.conf"; networking.wg-quick.interfaces.wg1.autostart = false; services.fstrim.enable = true; systemd = { user.services.polkit-gnome-authentication-agent-1 = { enable = true; description = "polkit-gnome-authentication-agent-1"; wantedBy = [ "default.target" ]; wants = [ "default.target" ]; after = [ "default.target" ]; serviceConfig = { Type = "simple"; ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; Restart = "on-failure"; RestartSec = 1; TimeoutStopSec = 10; }; }; }; systemd.services.systemd-networkd.enable = false; networking.networkmanager.enable = false; security.polkit.enable = true; # List services that you want to enable: # Enable the OpenSSH daemon. services.openssh.enable = false; # rtkit is optional but recommended security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; wireplumber.enable = true; jack.enable = false; }; services.pipewire.extraConfig.pipewire."92-low-latency" = { context.properties = { default.clock.rate = 48000; default.clock.quantum = 32; default.clock.min-quantum = 32; default.clock.max-quantum = 32; }; }; services.udev.extraRules = '' ''; fileSystems."/".options = [ "noatime" "nodiratime" "discard" ]; fileSystems."/mnt/a6f2b9d3-1b9b-46b4-ac60-7150c90e48f1" = { device = "/dev/disk/by-uuid/a6f2b9d3-1b9b-46b4-ac60-7150c90e48f1"; options = ["defaults" "x-gvfs-show"]; fsType = "ext4"; }; fileSystems."/mnt/dc84c237-143d-4017-94a0-5c8a076d493f" = { device = "/dev/disk/by-uuid/dc84c237-143d-4017-94a0-5c8a076d493f"; options = ["defaults" "x-gvfs-show"]; fsType = "ext4"; }; fileSystems."/mnt/6106d853-8f55-4d4e-949c-66e19666671c" = { device = "/dev/disk/by-uuid/6106d853-8f55-4d4e-949c-66e19666671c"; options = ["defaults" "x-gvfs-show"]; fsType = "ext4"; }; fileSystems."/mnt/f450d8ee-cfcd-4d49-af5e-c18cfab65a09" = { device = "/dev/disk/by-uuid/f450d8ee-cfcd-4d49-af5e-c18cfab65a09"; options = ["defaults" "x-gvfs-show"]; fsType = "btrfs"; }; system.stateVersion = "23.11"; # Did you read the comment? } ```
fufexan commented 2 months ago

I don't see anything that might interfere with xwayland. Is there anything about it in Hyprland logs?

DaniD3v commented 2 months ago

Very odd, Steam launches just fine for me (along with other xwayland apps).

same

IgnIVertiKalCaD commented 1 month ago

After almost a month, I was able to fix this bug.

The problem was in the package versions.... It turns out that in nixos, when using flake, the nixos-rebuild switch --upgrade-all command does not update the nixos packages, but updates the packages from flake.

The solution was to use the --no-flake attribute with additional parameters:

nixos-rebuild switch --upgrade --no-flake -I nixos-config=/etc/nixos/configuration.nix

Also don't forget to install the nixpkgs cloud

nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs

I don't know exactly why it interfered so much and why applications written on x11 protocol could run, but with games - trouble.