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.09k stars 882 forks source link

Some fullscreen proton games go black and freeze after a workspace switch (hyprland issue) #6914

Closed rabaimorp closed 2 months ago

rabaimorp commented 3 months ago

Regression?

No

Description

Some proton games on steam don't survive a workspace swich, tested with many proton versions, as well as custom ones, they don't make any difference. Also to make sure it was related to hyprland I tested it on kde wayland as well as kde x11 and the issue wasn't present there. Some games like Geometry Dash and Thief Siumulator had this issue when played with the in-game fullscreen option, but was fixed when disabled and using hyprland fullscreen insted. Some games however doesn't have an in game full screen option to disable like Granny 3 (Granny 1 is the same I have no idea why the issue is not present there). As seen on the video presentation the game audio still keeps playing but any input is blocked mouse, and keyboard.

How to reproduce

As seen on video, open an affected game on steam, and switch workspaces.

Crash reports, logs, images, videos

Video: (I'm sorry for link github wouldn't let me upload because of file size) https://drive.google.com/file/d/1J9bJLZzeoWNm0JpAiTaQ1MHsefrhVvDV/view?usp=sharing

System Info and Version

System/Version info ```sh ```Hyprland, built from branch main at commit 0502c3f62b1a562e7649ac72bd208b4a89d4f3f4 (keybinds: fix movewindow float to 0 (6777)). Date: Fri Jul 5 20:46:38 2024 Tag: v0.41.2-21-g0502c3f6, commits: 4907 flags: (if any) System Information: System name: Linux Node name: legion Release: 6.9.9-lqx1-1-lqx Version: #1 ZEN SMP PREEMPT Fri, 12 Jul 2024 15:20:10 +0000 GPU information: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107M [GeForce RTX 4050 Max-Q / Mobile] [10de:28e1] (rev a1) (prog-if 00 [VGA controller]) 06:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev db) (prog-if 00 [VGA controller]) NVRM version: NVIDIA UNIX x86_64 Kernel Module 555.58.02 Tue Jun 25 01:39:15 UTC 2024 os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ======Config-Start====== Config File: /home/rabaimor/.config/hypr/hyprland.conf: Read Succeeded # This file contains general customization options # For Environment variables see env.conf # For Keybinds variables see keybinds.conf # For Auto-run stuff see execs.conf # For Window/layer rules see rules.conf source=~/.config/hypr/hyprland/env.conf # MONITOR CONFIG monitor=,preferred,auto,1 monitor=,addreserved, 0, 0, 0, 0 #monitor=CSO161D,2560x1600@165 #monitor=HDMI-A-1,2560x1600@165,1600x,mirror,eDP-1 # Startup executions source=~/.config/hypr/hyprland/execs.conf input { # Keyboard: Add a layout and uncomment kb_options for Win+Space switching shortcut # kb_layout = us # kb_options = grp:win_space_toggle numlock_by_default = true repeat_delay = 250 repeat_rate = 35 touchpad { natural_scroll = yes disable_while_typing = true clickfinger_behavior = true scroll_factor = 0.5 } # special_fallthrough = true } binds { # focus_window_on_workspace_c# For Auto-run stuff see execs.confhange = true scroll_event_delay = 0 } # Screensharing exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP gestures { workspace_swipe = true workspace_swipe_distance = 700 workspace_swipe_fingers = 4 workspace_swipe_cancel_ratio = 0.2 workspace_swipe_min_speed_to_force = 5 workspace_swipe_direction_lock = true workspace_swipe_direction_lock_threshold = 10 workspace_swipe_create_new = true } general { # Gaps and border gaps_in = 4 gaps_out = 5 gaps_workspaces = 50 border_size = 1 # Fallback colors col.active_border = rgba(0DB7D4FF) col.inactive_border = rgba(31313600) resize_on_border = true no_focus_fallback = true layout = dwindle #focus_to_other_workspaces = true # ahhhh i still haven't properly implemented this allow_tearing = false # some guy told me tearing might make things smoother idk } dwindle { preserve_split = true # no_gaps_when_only = 1 smart_split = false smart_resizing = false } decoration { rounding = 20 blur { enabled = true xray = true special = false new_optimizations = on size = 5 passes = 4 brightness = 1 noise = 0.01 contrast = 1 } # Shadow drop_shadow = true shadow_ignore_window = true shadow_range = 20 shadow_offset = 0 2 shadow_render_power = 2 col.shadow = rgba(0000001A) # Shader # screen_shader = ~/.config/hypr/shaders/nothing.frag # screen_shader = ~/.config/hypr/shaders/vibrance.frag # Dim dim_inactive = false dim_strength = 0.1 dim_special = 0 } animations { enabled = true # Animation curves bezier = linear, 0, 0, 1, 1 bezier = md3_standard, 0.2, 0, 0, 1 bezier = md3_decel, 0.05, 0.7, 0.1, 1 bezier = md3_accel, 0.3, 0, 0.8, 0.15 bezier = overshot, 0.05, 0.9, 0.1, 1.1 bezier = crazyshot, 0.1, 1.5, 0.76, 0.92 bezier = hyprnostretch, 0.05, 0.9, 0.1, 1.0 bezier = fluent_decel, 0.1, 1, 0, 1 bezier = easeInOutCirc, 0.85, 0, 0.15, 1 bezier = easeOutCirc, 0, 0.55, 0.45, 1 bezier = easeOutExpo, 0.16, 1, 0.3, 1 # Animation configs animation = windows, 1, 3, md3_decel, popin 60% animation = border, 1, 10, default animation = fade, 1, 2.5, md3_decel # animation = workspaces, 1, 3.5, md3_decel, slide animation = workspaces, 1, 7, fluent_decel, slide # animation = workspaces, 1, 7, fluent_decel, slidefade 15% # animation = specialWorkspace, 1, 3, md3_decel, slidefadevert 15% animation = specialWorkspace, 1, 3, md3_decel, slidevert } misc { vfr = 1 vrr = 1 #layers_hog_mouse_focus = true focus_on_activate = true animate_manual_resizes = false animate_mouse_windowdragging = false enable_swallow = true swallow_regex = (foot|kitty|allacritty|Alacritty) disable_hyprland_logo = true # force_hypr_chan = true new_window_takes_over_fullscreen = 2 } debug { # overlay = true # damage_tracking = 0 # damage_blink = yes } # Window and layer rules layerrule = noanim, selection source=~/.config/hypr/hyprland/rules.conf # Dynamic colors #source=~/.config/hypr/colors.conf # Keybinds source=~/.config/hypr/hyprland/keybinds.conf windowrulev2=rounding 20, onworkspace:1 Config File: /home/rabaimor/.config/hypr/hyprland/env.conf: Read Succeeded # ######### Input method ########## # See https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland env = QT_IM_MODULE, fcitx env = XMODIFIERS, @im=fcitx # env = GTK_IM_MODULE, wayland # Crashes electron apps in xwayland # env = GTK_IM_MODULE, fcitx # My Gtk apps no longer require this to work with fcitx5 hmm env = SDL_IM_MODULE, fcitx env = GLFW_IM_MODULE, ibus env = INPUT_METHOD, fcitx # ############ Themes ############# env = QT_QPA_PLATFORM, wayland env = QT_QPA_PLATFORMTHEME, qt5ct # env = QT_STYLE_OVERRIDE,kvantum #env = WLR_NO_HARDWARE_CURSORS, 1 # ######## Screen tearing ######### # env = WLR_DRM_NO_ATOMIC, 1 # ############ NVIDIA ############ #env = LIBVA_DRIVER_NAME,nvidia #env = XDG_SESSION_TYPE,wayland #env = GBM_BACKEND,nvidia-drm #env = __GLX_VENDOR_LIBRARY_NAME,nvidia #env = WLR_NO_HARDWARE_CURSORS,1 # ######### NVIDIA UPDATE ######### env = LIBVA_DRIVER_NAME,nvidia env = XDG_SESSION_TYPE,wayland env = GBM_BACKEND,nvidia-drm env = __GLX_VENDOR_LIBRARY_NAME,nvidia cursor { no_hardware_cursors = true } # VA-API hardware video acceleration # package "nvidia-vaapi-driver" is required env = NVD_BACKEND,direct # ############ Others ############# Config File: /home/rabaimor/.config/hypr/hyprland/execs.conf: Read Succeeded # Bar, wallpaper exec-once = swww-daemon --format xrgb exec-once = ags & # Input method exec-once = fcitx5 # Foot daemon #exec-once = foot --server # Core components (authentication, lock screen, notification daemon) exec-once = gnome-keyring-daemon --start --components=secrets exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # exec-once = hypridle exec-once = dbus-update-activation-environment --all exec-once = sleep 1 && dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # Some fix idk # Clipboard: history # exec-once = wl-paste --watch cliphist store & exec-once = wl-paste --type text --watch cliphist store exec-once = wl-paste --type image --watch cliphist store # Cursor exec-once = hyprctl setcursor Bibata-Modern-Classic 24 # foot daemon exec-once = foot --server --config ~/.config/foot/footserver.ini # cuda exec-once = echo a | sudo -S nvidia-modprobe exec-once = echo a | sudo -S systemctl enable --now nvidia-resume.service Config File: /home/rabaimor/.config/hypr/hyprland/rules.conf: Read Succeeded # ######## Window rules ######## windowrule = noblur,.* # windowrule = opacity 0.89 override 0.89 override, .* # Applies transparency to EVERY WINDOW windowrule = float, ^(blueberry.py)$ windowrule = float, ^(steam)$ windowrule = float, ^(guifetch)$ # FlafyDev/guifetch windowrulev2 = tile,class:(wps) windowrulev2 = tile,class:(dev.warp.Warp) windowrule = float, ^(footclient)$ windowrulev2 = float,class:(footclient),title:(footclient)$ windowrulev2 = float,class:(mpv),title:(mpv)$ # Dialogs windowrule=float,title:^(Open File)(.*)$ windowrule=float,title:^(Select a File)(.*)$ windowrule=float,title:^(Choose wallpaper)(.*)$ windowrule=float,title:^(Open Folder)(.*)$ windowrule=float,title:^(Save As)(.*)$ windowrule=float,title:^(Library)(.*)$ # ######## Layer rules ######## layerrule = xray 1, .* # layerrule = noanim, .* layerrule = noanim, selection layerrule = noanim, overview layerrule = noanim, anyrun layerrule = noanim, sideleft layerrule = noanim, sideright layerrule = noanim, osk layerrule = noanim, noanim layerrule = blur, gtk-layer-shell layerrule = ignorezero, gtk-layer-shell layerrule = blur, launcher layerrule = ignorealpha 0.5, launcher layerrule = blur, notifications layerrule = ignorealpha 0.69, notifications # ags layerrule = blur, session layerrule = noanim, sideright layerrule = noanim, sideleft layerrule = blur, bar layerrule = ignorealpha 0.6, bar layerrule = blur, corner.* layerrule = ignorealpha 0.6, corner.* layerrule = blur, dock layerrule = ignorealpha 0.6, dock layerrule = blur, indicator.* layerrule = ignorealpha 0.6, indicator.* layerrule = blur, overview layerrule = ignorealpha 0.6, overview layerrule = blur, cheatsheet layerrule = ignorealpha 0.6, cheatsheet layerrule = blur, sideright layerrule = ignorealpha 0.6, sideright layerrule = blur, sideleft layerrule = ignorealpha 0.6, sideleft layerrule = blur, indicator* layerrule = ignorealpha 0.6, indicator* layerrule = blur, osk layerrule = ignorealpha 0.6, osk # Xwayland video bridge #windowrulev2 = opacity 0.0 override,class:^(xwaylandvideobridge)$ #windowrulev2 = noanim,class:^(xwaylandvideobridge)$ #windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$ #windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$ #windowrulev2 = noblur,class:^(xwaylandvideobridge)$ Config File: /home/rabaimor/.config/hypr/hyprland/keybinds.conf: Read Succeeded # Binds are like 5 pages, irrelevant and confidential. ======Config-End========
rabaimorp commented 3 months ago

I filled all the fields why are they not showing up? I can't even delete the issue EDIT: Fixed it, the template was broken

UjinT34 commented 3 months ago

https://github.com/hyprwm/Hyprland/issues/6375

vaxerski commented 2 months ago

I think this is still happening on 0.42.0 @UjinT34 can you repro?

einCyberSimon commented 2 months ago

It is, I triggered it yesterday, but did not find a way to reproduce it.

einCyberSimon commented 2 months ago

I am able to reproduce it now, but just in some weird case: The affected game for me is Apex (I did not try it with other games yet). Starting the game in fullscreen works and I can tab out since #6966 was merged. What triggers the bug is calling the togglefloating dispatcher and then switching focus to another window. The game stays black as described previously until calling the fullscreen dispatcher. Once the game is in fullscreen mode, it works again.

log.txt

musicfunfan commented 2 months ago

This is still happening for me. On archlinux and hyprland (918d8340afd652b011b937d29d5eea0be08467f5). When i open for example World of Tanks via Steam. And then i move to a different work space the game disappear and re-appear with black screen. In that black screen i can see the game in the top left side but its VERY VERY small and i have no way to make it big again. Also i play on 1080p in a 4k monitor because i do not have powerful GPU to play in 4k yet.

I have tested this on KDE(Wayland) and on Gnome(Wayland/X11) and does not happening so is only on Hyprland for my system.

If i play in a window mode. I do not have this problem but the (World of Tanks) on window mode renders the game on native resolution and i do not get good frame rates because of my low and GPU.

Is there a way to render a window to scaled resolution on a window rule or something like that ? Because if that exist this probably is a work around. Or i can use KDE but other than gaming Hyprland is very good and i want to use it.

If that matters i use rx560 4GB GPU and Ryzer 5 3600 CPU.

vaxerski commented 2 months ago

your hl version is OUTDATED

myned commented 2 months ago

Was able to reproduce only on Hyprland @ v0.41.2. Built @ 77cf651825c2afac69e3a827ff910a62c73e1218 and v0.42.0 when I encountered this in PoE exclusive fullscreen, can no longer reproduce - it seems fixed in both main and the new release.

musicfunfan commented 2 months ago

I switch to version, to this (77cf651825c2afac69e3a827ff910a62c73e1218). And is now a little be better. I still loose the window but if try to full screen it or to tiled it and un-tiled. Some how the game re appear. So i ques the situation is better.

No for some reason on some windows (I thing it has to do with native Wayland windows and Xwayland windows the cursor size changing) I need to investigate this at some point.

rabaimorp commented 2 months ago

I switch to version, to this (77cf651). And is now a little be better. I still loose the window but if try to full screen it or to tiled it and un-tiled. Some how the game re appear. So i ques the situation is better.

No for some reason on some windows (I thing it has to do with native Wayland windows and Xwayland windows the cursor size changing) I need to investigate this at some point.

Not for me, its comepletely fixed for me in v0.42.0. I'm using the latest stable arch package (hyprland 0.42.0-1).

musicfunfan commented 2 months ago

Ok i am do not have access to the machine write now, but if i do have access i will install the package from the repo extra .