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.62k stars 904 forks source link

vrr does not function when the cursor is in the top left corner #8382

Open Atemu opened 5 days ago

Atemu commented 5 days ago

Already reported ? *

Regression?

No

System Info and Version

System/Version info ```sh Hyprland 0.44.0 built from branch at commit dirty (). Date: 2024-11-06 Tag: , commits: built against aquamarine 0.4.3 flags set: debug System Information: System name: Linux Node name: HEPHAISTOS Release: 6.11.6-xanmod1 Version: #1-NixOS SMP PREEMPT_DYNAMIC Tue Jan 1 00:00:00 UTC 1980 GPU information: 03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] [1002:73bf] (rev c1) (prog-if 00 [VGA controller]) 11:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c9) (prog-if 00 [VGA controller]) os-release: ANSI_COLOR="1;34" BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues" BUILD_ID="24.11pre-git" CPE_NAME="cpe:/o:nixos:nixos:24.11" DEFAULT_HOSTNAME=HEPHAISTOS DOCUMENTATION_URL="https://nixos.org/learn.html" HOME_URL="https://nixos.org/" ID=nixos ID_LIKE="" IMAGE_ID="" IMAGE_VERSION="" LOGO="nix-snowflake" NAME=NixOS PRETTY_NAME="NixOS 24.11 (Vicuna)" SUPPORT_URL="https://nixos.org/community.html" VARIANT="" VARIANT_ID="" VENDOR_NAME=NixOS VENDOR_URL="https://nixos.org/" VERSION="24.11 (Vicuna)" VERSION_CODENAME=vicuna VERSION_ID="24.11" plugins: ======Config-Start====== Config File: /Users/atemu/.config/hypr/hyprland.conf: Read Succeeded # ####################################################################################### # AUTOGENERATED HYPR CONFIG. # PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, # OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. # ####################################################################################### # autogenerated = 1 # remove this line to remove the warning # This is an example Hyprland config file. # Refer to the wiki for more information. # https://wiki.hyprland.org/Configuring/Configuring-Hyprland/ # Please note not all available settings / options are set here. # For a full list, see the wiki # You can split this configuration into multiple files # Create your files separately and then link them to this file like this: # source = ~/.config/hypr/myColors.conf ################ ### MONITORS ### ################ # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=,preferred,auto,auto ################### ### MY PROGRAMS ### ################### # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use $terminal = foot $fileManager = dolphin $menu = wofi --show drun,run ################# ### AUTOSTART ### ################# # Autostart necessary processes (like notifications daemons, status bars, etc.) # Or execute your favorite apps at launch like this: # exec-once = $terminal # exec-once = nm-applet & # exec-once = waybar & hyprpaper & firefox exec-once = hypridle ############################# ### ENVIRONMENT VARIABLES ### ############################# # See https://wiki.hyprland.org/Configuring/Environment-variables/ $cursorSize = 24 env = XCURSOR_SIZE,$cursorSize env = HYPRCURSOR_SIZE,$cursorSize # Work around https://github.com/hyprwm/Hyprland/issues/6501 env = PATH,$HOME/.local/bin/:$PATH ##################### ### LOOK AND FEEL ### ##################### # Refer to https://wiki.hyprland.org/Configuring/Variables/ # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 2 gaps_out = 0 border_size = 1 # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors col.active_border = rgba(33ccffee)# rgba(00ff99ee) 45deg col.inactive_border = rgba(595959aa) # Set to true enable resizing windows by clicking and dragging on borders and gaps resize_on_border = true # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on allow_tearing = false # layout = dwindle } # https://wiki.hyprland.org/Configuring/Variables/#decoration decoration { # rounding = 10 # Change transparency of focused and unfocused windows active_opacity = 1.0 inactive_opacity = 1.0 # drop_shadow = false # shadow_range = 4 # shadow_render_power = 3 # col.shadow = rgba(1a1a1aee) # https://wiki.hyprland.org/Configuring/Variables/#blur blur { enabled = false size = 3 passes = 1 vibrancy = 0.1696 } } # https://wiki.hyprland.org/Configuring/Variables/#animations animations { enabled = true # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = global, 0, 7, myBezier animation = workspaces, 1, 1.5, default } # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more dwindle { pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below preserve_split = true # You probably want this force_split = 2 # Split to the right rather than where the cursor is # no_gaps_when_only = true } group { groupbar { render_titles = false height = 1 } } # https://wiki.hyprland.org/Configuring/Variables/#misc misc { force_default_wallpaper = 1 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( # I'd like my screen to turn on when I press a button please mouse_move_enables_dpms = true key_press_enables_dpms = true # Variable frame rate? # TODO need to test whether this affects input delay vfr = true vrr = 2 allow_session_lock_restore = true } render { # direct_scanout = true } cursor { no_hardware_cursors = true hide_on_key_press = false no_break_fs_vrr = true min_refresh_rate = 20 hide_on_key_press = false } xwayland { force_zero_scaling = true } ############# ### INPUT ### ############# # https://wiki.hyprland.org/Configuring/Variables/#input input { kb_layout = us kb_variant = altgr-intl kb_model = kb_options = caps:escape kb_rules = repeat_rate = 30 repeat_delay = 175 accel_profile = flat follow_mouse = 1 sensitivity = 0 # -1.0 - 1.0, 0 means no modification. touchpad { natural_scroll = false disable_while_typing = false scroll_factor = 0.5 } } # https://wiki.hyprland.org/Configuring/Variables/#gestures gestures { workspace_swipe = true # workspace_swipe_distance = 200 workspace_swipe_min_speed_to_force = 10 workspace_swipe_invert = false } # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more device { name = pixa3854:00-093a:0274-touchpad sensitivity = -0.125 } #################### ### KEYBINDINGSS ### #################### # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, RETURN, exec, $terminal bind = $mainMod, w, killactive, unbind = $mainMod, e # Needs to be done for some reason? # TODO still necessary now that I do shift properly? bind = $mainMod, e, exec, emacsclient -c bind = $mainMod SHIFT, E, exit, bind = $mainMod, ESCAPE, exec, loginctl lock-session bindl = $mainMod SHIFT, s, exec, systemctl suspend bind = $mainMod SHIFT, SPACE, togglefloating, bind = $mainMod, x, exec, $menu # bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, s, togglesplit, # dwindle unbind = $mainMod, f bind = $mainMod, f, fullscreen, 2 bind = $mainMod SHIFT, f, fullscreen, 1 bind = $mainMod, t, togglegroup, # Move focus with mainMod + vi keys bind = $mainMod, h, movefocus, l bind = $mainMod, l, movefocus, r bind = $mainMod, k, movefocus, u bind = $mainMod, j, movefocus, d # Move window with mainMod + vi keys bind = $mainMod SHIFT, h, movewindoworgroup, l bind = $mainMod SHIFT, l, movewindoworgroup, r bind = $mainMod SHIFT, k, movewindoworgroup, u bind = $mainMod SHIFT, j, movewindoworgroup, d bind = $mainMod, u, lockactivegroup, lock bind = $mainMod, d, lockactivegroup, unlock bind = $mainMod, grave, changegroupactive, f bind = $mainMod SHIFT, grave, changegroupactive, b # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 bind = $mainMod, 3, workspace, 3 bind = $mainMod, 4, workspace, 4 bind = $mainMod, 5, workspace, 5 bind = $mainMod, 6, workspace, 6 bind = $mainMod, 7, workspace, 7 bind = $mainMod, 8, workspace, 8 bind = $mainMod, 9, workspace, 9 bind = $mainMod, 0, workspace, 10 # Move active window to a workspace with mainMod + SHIFT + [0-9] bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1 bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2 bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3 bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4 bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5 bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6 bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7 bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8 bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9 bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10 # Example special workspace (scratchpad) bind = $mainMod, p, togglespecialworkspace, magic bind = $mainMod SHIFT, p, movetoworkspacesilent, special:magic # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow bindel = , XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 ; wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 2%+ bindel = , XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 ; wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 2%- bindel = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle $brightnessDelayShort = 10000 $brightnessDelay = 10000 $brillo = pidof brillo || brillo bindel = , XF86MonBrightnessUp, exec, $brillo -A 3 -u $brightnessDelayShort bindel = , XF86MonBrightnessDown, exec, $brillo -U 3 -u $brightnessDelayShort bindel = SHIFT, XF86MonBrightnessUp, exec, $brillo -A 0.5 -u $brightnessDelay bindel = SHIFT, XF86MonBrightnessDown, exec, $brillo -U 0.5 -u $brightnessDelay bind=,KP_BEGIN,pass,^(TeamSpeak 3)$ bind=,MENU,pass,^(TeamSpeak 3)$ ############################## ### WINDOWS AND WORKSPACES ### ############################## # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules # Example windowrule v1 # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. # No gaps when it's the only window workspace = w[t1], gapsout:0, gapsin:0, border: 0, rounding:0 workspace = w[tg1], gapsout:0, gapsin:0, border: 0, rounding:0 ======Config-End======== ```

Description

VRR just doesn't feel right in games; symptoms are that it's super inconsistent and sometimes jumps back to the monitor's refresh rate eventhough the game runs much lower.

I've now stared vrrtest for long enough to figure out that this is caused by the cursor position.

It sounds weird but when the cursor is moved in the top left corner, refresh rate resets to max. The area correlates with about the top 1/8 of the screen (left/uppermost 1/4 of either side) but I'm not sure it's exactly that.

Unfortunately for games, this also appears to happen when the invisible cursor moves into that area (at least in the games I play). This means that moving the camera about during gameplay has a good chance to trigger this and moving it slightly somewhere else (i.e. down and/or right) makes it stop again. This explains the inconsistency. You can therefore also repro this in-game by moving the camera to the left and up.

This happens regardless of VRR mode (1/2) or hardware cursors. Repro'd on 2ec2b3bfb39ba22ba945bb23dc95970dfa50eb5a.

cc @UjinT34 @Gwenodai

How to reproduce

  1. Enable VRR and the fullscreen fix
  2. Enable your monitor's debug OSD with refresh rate or "FPS" display
  3. Run any fullscreen game or vrrtest
  4. Make the game run at fps significantly below the monitor refresh rate (arrow down in vrrtest)
  5. Move mouse cursor in the right half of the display
  6. Observe monitor refresh rate still matching in-game fps
  7. Move mouse cursor in top left 1/8th of the screen
  8. Observe jump to max refresh rate

Crash reports, logs, images, videos

No response

UjinT34 commented 5 days ago

What does hyprctl monitors show? Might be a smaller unused screen causing monitor enter-leave events.

Atemu commented 5 days ago

Thanks for the quick answer! It's just the primary monitor:

Monitor DP-1 (ID 0):
    3440x1440@143.92300 at 0x0
    description: LG Electronics LG ULTRAGEAR 101NTTQLP985
    make: LG Electronics
    model: LG ULTRAGEAR
    serial: 101NTTQLP985
    active workspace: 2 (2)
    special workspace: 0 ()
    reserved: 0 0 0 0
    scale: 1.00
    transform: 0
    focused: yes
    dpmsStatus: 1
    vrr: false
    solitary: 0
    activelyTearing: false
    disabled: false
    currentFormat: XRGB8888
    mirrorOf: none
    availableModes: 3440x1440@143.92Hz 3440x1440@60.00Hz 3440x1440@160.00Hz 3440x1440@99.99Hz 1920x1200@143.92Hz 1920x1080@74.98Hz 1920x1080@60.00Hz 1920x1080@60.00Hz 1920x1080@59.94Hz 1920x1080@50.00Hz 1600x1200@143.92Hz 1680x1050@59.95Hz 1600x900@60.00Hz 1280x1024@75.03Hz 1280x1024@60.02Hz 1440x900@143.92Hz 1280x800@59.81Hz 1152x864@59.97Hz 1280x720@60.00Hz 1280x720@60.00Hz 1280x720@59.94Hz 1280x720@50.00Hz 1024x768@60.00Hz 800x600@60.32Hz 720x576@50.00Hz 720x480@60.00Hz 720x480@59.94Hz 640x480@60.00Hz 640x480@59.94Hz 640x480@59.94Hz 
Gwenodai commented 4 days ago

I can't repro this on https://github.com/hyprwm/Hyprland/commit/3b66351eeb76e802bac37cc892529549efc49905. All seems to be working fine for me. Just to be clear, is the "fullscreen fix" you mention in step one of your repro steps referring to no_break_fs_vrr = true? As that's what I assumed that to mean when trying to reproduce the issue.

What do you have running in the background? Perhaps a some floating window or widget that exists in that portion of your screen behind your fullscreened app? I've found at least in older versions of Hyprland that waybar refreshes caused vrr spikes even though it was hidden while in fullscreen, while ags seemed to like causing it even when nothing was refreshing at all. Though waybar (I've not tested ags) no longer seems to cause those issues for me, but I'm not sure when that was fixed.

Atemu commented 4 days ago

Just to be clear, is the "fullscreen fix" you mention in step one of your repro steps referring to no_break_fs_vrr = true?

Yes indeed.

What do you have running in the background?

There was nothing of significance running in the background, not even a bar. Just a few terminals, Firefox and Emacs in other workspaces.

Atemu commented 4 days ago

I'll re-test this with the latest main and without anything else running to get a clean slate tomorrow.

Is there anything I could do to be able to figure out why it's behaving the way it is?

Atemu commented 3 days ago

Indeed I am no longer able to repro O.o

I'll keep an eye on this and see if I can repro this again at some point.