Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gamescope doesn't update with new frames from aplication after #6268 presumably #6376

Closed
nonetrix opened this issue Jun 9, 2024 · 46 comments
Labels
bug Something isn't working
Milestone

Comments

@nonetrix
Copy link

nonetrix commented Jun 9, 2024

System Info and Version

System/Version info
Hyprland, built from branch  at commit 9994b73ad0af5c9ba5fc4058234cea77d0a1ddb1  ().
Date: 2024-06-08
Tag: , commits: 

flags: (if any)


System Information:
System name: Linux
Node name: nixos
Release: 6.9.3
Version: #1-NixOS SMP PREEMPT_DYNAMIC Thu May 30 07:45:04 UTC 2024


GPU information: 
09:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] [1002:73bf] (rev c3) (prog-if 00 [VGA controller])


os-release: ANSI_COLOR="1;34"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="24.11.20240607.051f920"
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.11 (Vicuña)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="24.11 (Vicuña)"
VERSION_CODENAME="vicuña"
VERSION_ID="24.11"


plugins:
  hyprsplit by shezdy ver 1.0

======Config-Start======


Config File: /home/noah/.config/hypr/hyprland.conf: Read Succeeded
exec-once = /nix/store/bnipzdfv788l7yvgn7k7s7gp76sd1zpz-dbus-1.14.10/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target
plugin=/nix/store/861wyd4zv4xcwg18qa0nwg1c7yk1fa06-hyprsplit-0.1/lib/libhyprsplit.so
$mod=SUPER
debug {
  disable_logs=false
  enable_stdout_logs=true
}

decoration {
  blur {
    enabled=true
    passes=3
    size=5
  }
  blurls=bar-0
  blurls=bar-1
  blurls=launcher
  blurls=notifications0
  blurls=notifications1
  blurls=mpris
  rounding=8
}

device {
  name=wacom-intuos-s-pen
}

dwindle {
  preserve_split=true
}

general {
  border_size=2
  col.active_border=rgba(74c7ecff)
  col.inactive_border=rgba(1e1e2eff)
  gaps_in=5
  gaps_out=10
}

input {
  accel_profile=flat
  follow_mouse=1
  mouse_refocus=false
}

misc {
  disable_hyprland_logo=true
}
animation=workspaces, 1, 5, default, slidevert
animation=windows, 1, 5, default, slide
animation=layers, 1, 5, default, slide
bind=, XF86AudioPlay, exec, playerctl play-pause
bind=, XF86AudioNext, exec, playerctl next
bind=, XF86AudioPrev, exec, playerctl previous
bind=CTRL, Print, exec, satty-shot
bind=, Print, exec, hyprshot -m output -o ~/Pictures/Screenshots
bind=$mod, p, exec, wl-copy $(hyprpicker)
bind=$mod, h, movefocus, l
bind=$mod, l, movefocus, r
bind=$mod, k, movefocus, u
bind=$mod, j, movefocus, d
bind=$mod SHIFT, h, movewindow, l
bind=$mod SHIFT, l, movewindow, r
bind=$mod SHIFT, k, movewindow, u
bind=$mod SHIFT, j, movewindow, d
bind=$mod, slash, togglesplit
bind=$mod, mouse_down, split:workspace, e-1
bind=$mod, mouse_up, split:workspace, e+1
bind=$mod, t, togglefloating
bind=$mod, c, killactive
bind=$mod, q, exec, shutdown-menu
bind=$mod, B, exec, firefox
bind=$mod, y, exec, kitty -e yazi
bind=alt, f4, exec, hyprctl kill
bind=$mod, Return, exec, kitty
bind=$mod, Space, exec, fuzzel
bind=$mod, E, exec, bemoji -n
bind=$mod, a, exec, kitty -e ollama run mixtral
bind=$mod SHIFT, a, exec, llm-actions
bind=$mod, 1, split:workspace, 1
bind=$mod SHIFT, 1, split:movetoworkspace, 1
bind=$mod, 2, split:workspace, 2
bind=$mod SHIFT, 2, split:movetoworkspace, 2
bind=$mod, 3, split:workspace, 3
bind=$mod SHIFT, 3, split:movetoworkspace, 3
bind=$mod, 4, split:workspace, 4
bind=$mod SHIFT, 4, split:movetoworkspace, 4
bind=$mod, 5, split:workspace, 5
bind=$mod SHIFT, 5, split:movetoworkspace, 5
bind=$mod, 6, split:workspace, 6
bind=$mod SHIFT, 6, split:movetoworkspace, 6
bind=$mod, 7, split:workspace, 7
bind=$mod SHIFT, 7, split:movetoworkspace, 7
bind=$mod, 8, split:workspace, 8
bind=$mod SHIFT, 8, split:movetoworkspace, 8
bind=$mod, 9, split:workspace, 9
bind=$mod SHIFT, 9, split:movetoworkspace, 9
bind=$mod, 0, split:workspace, 10
bind=$mod SHIFT, 0, split:movetoworkspace, 10
binde=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 1%+
binde=, XF86AudioLowerVolume, exec, wpctl set-volume -l 1.4 @DEFAULT_AUDIO_SINK@ 1%-
binde=$mod CTRL, l, resizeactive, 10 0
binde=$mod CTRL, h, resizeactive, -10 0
binde=$mod CTRL, k, resizeactive, 0 -10
binde=$mod CTRL, j, resizeactive, 0 10
bindm=$mod, mouse:272, movewindow
bindm=$mod, mouse:273, resizewindow
exec-once=ags
exec-once=fcitx5
exec-once=wpaperd
exec-once=mpv --no-video --volume=150 /nix/store/ag6v7p7x8ksxirkyqjl9xfsmhzr45w31-start.wav
layerrule=ignorealpha, bar-0
layerrule=ignorealpha, bar-1
layerrule=ignorealpha, notifications0
layerrule=ignorealpha, notifications1
layerrule=ignorealpha, mpris
layerrule=ignorealpha, launcher
layerrule=noanim,selection
monitor=DP-2, 1920x1200, 1920x0, 1
monitor=DP-1, 1920x1080@165, 0x0, 1, vrr, 1 
windowrulev2=noanim, class:^(com.gabm.satty)$
windowrulev2=size 640 360, title:(Picture-in-Picture)
windowrulev2=pin, title:^(Picture-in-Picture)$
windowrulev2=move 1906 14, title:(Picture-in-Picture)
windowrulev2=float, title:^(Picture-in-Picture)$

======Config-End========

Bug or Regression?

Regression

Description

Gamescope was working okayish once #6159 was fixed but after #6268 being merged (I assume) it doesn't update when a new frame is submitted after a few frames. Chromium does kinda but only every few minutes, Kitty doesn't at all after the first few frames enough to see cursor blink then it freezes, and QT apps seem uneffected.

How to reproduce

  1. Use newest Hyprland version with Wayland Core rewrite
  2. Open Kitty in Gamescope
  3. See no new frames or anything after first few
  4. Open Chromium browser
  5. See new frames only every few minutes

Crash reports, logs, images, videos

WAYLAND_DEBUG=1 gamescope -r 165 -W 1920 -H 1080 kitty closing instantly after trying to type (no new frames after first few)

wl_debug_kitty.txt

WAYLAND_DEBUG=1 gamescope -r 165 -W 1920 -H 1080 brave waiting for it to update then closing

wl_debug_kitty.txt

out.mp4
@vaxerski
Copy link
Member

vaxerski commented Jun 9, 2024

must be the work of an enemy stand

@vaxerski
Copy link
Member

vaxerski commented Jun 9, 2024

works for me just fine, both nested and on a real session. Try with the default config I guess?

@nonetrix
Copy link
Author

nonetrix commented Jun 9, 2024

I reproduced it on my system loading the default Hyprland config with --config. Also tried disabling my 2nd display with Hyprctl, no changes

@vaxerski
Copy link
Member

vaxerski commented Jun 9, 2024

still can't repro. Does it go away with debug:damage_tracking=1?

@nonetrix
Copy link
Author

nonetrix commented Jun 9, 2024

Time to give myself a seizure

@vaxerski
Copy link
Member

vaxerski commented Jun 9, 2024

tracking not blink

@nonetrix
Copy link
Author

nonetrix commented Jun 9, 2024

I thought it was like that Android developer setting sorry, but it doesn't do anything it's the same

@nonetrix
Copy link
Author

nonetrix commented Jun 9, 2024

Maybe this could be the home manager module?

@vaxerski
Copy link
Member

vaxerski commented Jun 9, 2024

what about damage_tracking = 0?

@nonetrix
Copy link
Author

nonetrix commented Jun 9, 2024

Same thing

@vaxerski
Copy link
Member

vaxerski commented Jun 9, 2024

then dunno lemao

@leiserfg
Copy link
Contributor

leiserfg commented Jun 10, 2024

I'm having the same issue with krita under gamescope, happens only after opening the canvas (that as far as I know, uses a gl context) not in the initial view.

@vaxerski
Copy link
Member

image
works for me (excuse my artistic prowess)

@leiserfg
Copy link
Contributor

just in case, I tested with gamescope 3.14.16

@nonetrix
Copy link
Author

I must just have skill issue I guess

@nonetrix
Copy link
Author

nonetrix commented Jun 11, 2024

Just tested Krita, it bugs in the same way for me so we both have the same issue seemingly. Judging by @leiserfg Github profile he seems to also be using NixOS maybe?... Curious

out.mp4

Also noticed drop downs are bugged, likely Gamescope maybe? I'd hope but still :/

@leiserfg
Copy link
Contributor

Judging by @leiserfg Github profile he seems to also be using NixOS maybe?

Yes, I'm in nixos too.

@nonetrix
Copy link
Author

Home manager module? I have both installed since it caused issues with XWayland to only have the home manager module

{inputs, ...}: let
  global = import ../global-var.nix;
in {
  programs.hyprland.enable = true;

  home-manager.users.${global.username} = {pkgs, ...}: {
   ...
wayland.windowManager.hyprland = {
      # Uses package from flake pulling the newest Git version
      package = inputs.hyprland.packages.${pkgs.system}.hyprland;
      enable = true;
      ...

@nonetrix
Copy link
Author

Thought maybe could be a issue with how I am installing Hyprland tried the following

  programs.hyprland = {
    enable = true;
    package = inputs.hyprland.packages.${pkgs.system}.hyprland;
  };

No changes but I likely should have been doing it that way regardless

@nonetrix
Copy link
Author

nonetrix commented Jun 14, 2024

Also find it really weird that with Hyprland somehow the corner rounding effects Gamescope?! I thought it was nested compositor so that wouldn't have a effect on it right? Doesn't make sense to me at all like how the fuck even?
image
I guess my understanding of Wayland might be really off I assumed something like this wasn't possible and leave everything else to the nested compositor. But if it's the case I don't think Hyprland should effect Gamescope in anyway and just render it raw as possible, also makes the issue where it would scale pixels differently on Hyprland and Sway make more sense I guess? Not sure which would be correct to do, Hyprland does look nicer I guess without blocky scaling unless it's pixel art :-)

@nonetrix
Copy link
Author

Anyway, you seem to be the Nix guy @fufexan maybe look into this and see if you can reproduce it. As only two people having this happen to be Nix users, I imagine something needs to be updated or something? Other person also seems to be using hm module when I take a look at their dots

@leiserfg
Copy link
Contributor

Yes, I'm the other person 😄 I'm using hyprland from the flake but building it myself following nixpkgs from stable to avoid messing with mesa versions.

@fufexan
Copy link
Member

fufexan commented Jun 15, 2024

Getting the same issue in both kitty and krita. Running gamescope 3.14.18.

@nonetrix
Copy link
Author

nonetrix commented Jun 15, 2024

Chromium gives interesting errors which is only app that semi works bit not really

[22345:22345:0615/141034.048079:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.ScreenSaver.GetActive: object_path= /org/freedesktop/ScreenSaver: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
[0615/141038.916356:ERROR:process_memory_range.cc(75)] read out of range
[22345:22345:0615/141038.940406:ERROR:gpu_process_host.cc(999)] GPU process exited unexpectedly: exit_code=512
[22652:22652:0615/141039.114948:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
xdg_backend: Changed refresh to: 59.950hz
xdg_backend: Changed refresh to: 164.917hz
xdg_backend: Changed refresh to: 59.950hz
xdg_backend: Changed refresh to: 164.917hz
[22652:22652:0615/141054.244930:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!

Edit: forgot I had Vulkan flags enabled, but seems the same with and without mostly same errors even. But another one is

[24010:7:0615/141648.131803:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.

Also seems if you run Chromium long enough it will run normally for a while and display new frames before crashing? Weird

(EE) failed to read Wayland events: Broken pipe
[24285:24326:0615/141830.485942:ERROR:connection.cc(61)] X connection error received.
[24285:24285:0615/141830.485942:ERROR:connection.cc(61)] X connection error received.
zsh: abort (core dumped)  gamescope brave

@nonetrix
Copy link
Author

I found a good workaround for now though! --backend sdl completely bypasses the issues

@leiserfg
Copy link
Contributor

I found a good workaround for now though! --backend sdl completely bypasses the issues

I moved to 3.14.18 to test it, it does not fix the issue for real (to me). At least with krita it blinks a lot, alternating between new and old frames. And new ones are not coming all the time, so more like old and older frames.

@nonetrix
Copy link
Author

nonetrix commented Jun 15, 2024

I found a good workaround for now though! --backend sdl completely bypasses the issues

I moved to 3.14.18 to test it, it does not fix the issue for real (to me). At least with krita it blinks a lot, alternating between new and old frames. And new ones are not coming all the time, so more like old and older frames.

Do you happen to be using NVIDIA? I am not haviing any issues like that, but reminds me of explicit sync issues a lot. Only bug I have in Krita with --backend sdl is for some reason the cursor is locked to the canvas and will teleport back if you move outside of it

out.mp4

@shogeki
Copy link

shogeki commented Jun 15, 2024

I can reproduce this on Arch. The --backend sdl workaround works for me while lightly testing (tested in Dota 2) , as seems to downgrading to gamescope 3.14.2.

@nonetrix
Copy link
Author

So I guess this isn't NixOS :o

@nonetrix
Copy link
Author

nonetrix commented Jun 15, 2024

I noticed something really weird when I tried --backend sdl on Sway, in Krita at least it acts like Hyprland before #6159 was fixed but Kitty seems uneffected. The normal Wayland backend is fine and works perfectly, so it's opposite on Sway than in Hypland which is strange coincidence

I couldn't test --backend sdl on Krita under sway for this reason, but the mouse lock issue happens on Krita without that flag so I am going to assume it's Gamescope issue or Krita perhaps but DRM backend it doesn't?

@leiserfg
Copy link
Contributor

Do you happen to be using NVIDIA?

No, AMD with igpu (framework13).

@bajidu
Copy link

bajidu commented Jun 17, 2024

Here from ValveSoftware/gamescope#1374, seems to be an issue with Hyprland. Downgrading to 39 helped, using the default config didn't. Using --force-composition for gamescope fixes it as well but leads to horrible performance. AMD 6700XT here.

@nonetrix
Copy link
Author

nonetrix commented Jun 17, 2024

Can confirm that flag also works for me maybe gives more insight, also it seems to make the borders not rounded so Hyprland isn't effecting Gamescope not sure how or why it does that but could be related

@vaxerski
Copy link
Member

image
Not an issue on my end here on the amd desktop. I'll test my laptop tomorrow, but I doubt anything will be different.

Is there anything in common between you guys that could be a clue in why this happens?

I assume disabling damage tracking doesnt fix this

@nonetrix
Copy link
Author

Completely forgot about that I am sorry

@nonetrix
Copy link
Author

nonetrix commented Jun 18, 2024

image Not an issue on my end here on the amd desktop. I'll test my laptop tomorrow, but I doubt anything will be different.

Is there anything in common between you guys that could be a clue in why this happens?

I assume disabling damage tracking doesnt fix this

Maybe going out of a limb here but what GPU exactly? Everyone that has had this is using RNDA2, aren't you on RDNA3 GPU? I forgot didn't you once say something like 7800 XT? At this point only thing I can think of, and no disabling damage tracking does nothing. Really doubt has anything to do with that but I am stumped how you are not having this bug 🥴

@adlainewson
Copy link

I had this issue on Hyprland (but not on X11 or sway), with both my igpu (intel) and egpu (nvidia 555) while trying to run vkcube through gamescope. The --backend sdl flag resolved the issue. Arch btw.

@nonetrix
Copy link
Author

nonetrix commented Jun 22, 2024

Well another major rewrite is soon and the last one at that, might fix or more likely not. But at least Vaxry can focus on squashing a hopefully most of the bugs that came with it

@vaxerski
Copy link
Member

thats the plan

@nonetrix
Copy link
Author

nonetrix commented Jun 29, 2024

So far Aquamarine has has no effect unfortunately, maybe shouldn't have expected it to but still. Also reproduced on Arch

@vaxerski
Copy link
Member

vaxerski commented Jul 3, 2024

I still can't repro this. IMO this is some config opt doing this.

@vaxerski vaxerski added this to the 0.43 milestone Jul 3, 2024
@nonetrix
Copy link
Author

nonetrix commented Jul 3, 2024

Try default config then because happens there

@leiserfg
Copy link
Contributor

I'm just notifying that in aquamarine this is still happening.

@PaideiaDilemma
Copy link
Contributor

Has been fixed by #7110 on my end.

@leiserfg
Copy link
Contributor

leiserfg commented Aug 3, 2024

It was also fixed for me (please leave a 👍 to avoid more me-too comments).

@vaxerski
Copy link
Member

vaxerski commented Aug 3, 2024

:)

@vaxerski vaxerski closed this as completed Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants