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

Hyprland stutters a lot after an upgrade to Linux 6.11, adds an invisible "unknown" monitor between the two. #7971

Closed
1 task done
iddm opened this issue Oct 2, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@iddm
Copy link
Contributor

iddm commented Oct 2, 2024

Already reported ? *

  • I have searched the existing open and closed issues.

Regression?

Yes

System Info and Version

System/Version info
Hyprland, built from branch  at commit 0f594732b063a90d44df8c5d402d658f27471dfe  (props: bump version to 0.43.0).
Date: Sun Sep 8 16:48:21 2024
Tag: v0.43.0, commits: 5196

flags: (if any)


System Information:
System name: Linux
Node name: purplejam
Release: 6.11.1-arch1-1
Version: #1 SMP PREEMPT_DYNAMIC Mon, 30 Sep 2024 23:49:50 +0000


GPU information:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD102 [GeForce RTX 4090] [10de:2684] (rev a1) (prog-if 00 [VGA controller])
NVRM version: NVIDIA UNIX x86_64 Kernel Module  560.35.03  Fri Aug 16 21: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:
  split-monitor-workspaces by Duckonaut ver 1.2.0

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


Config File: /home/user/.config/hypr/hyprland.conf: Read Succeeded
env = QT_QPA_PLATFORM,wayland
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
# Disable GSYNC
env = __GL_GSYNC_ALLOWED,0
# Make electron apps work better
env = ELECTRON_OZONE_PLATFORM_HINT,auto

# Experiments
env = __GL_MaxFramesAllowed,1
env = __GL_SYNC_TO_VBLANK,0


# Enable tearing: disables the usage ot a newer kernel DRM API that doesn't support tearing yet.
env = WLR_DRM_NO_ATOMIC,1

plugin {
    split-monitor-workspaces {
        count = 5
    }
}

debug {
    enable_stdout_logs = true
    disable_logs = false
}

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=DP-3, 2560x1440@240, 0x0, 1, vrr, 0, bitdepth, 10
monitor=DP-2, preferred, auto, 1, vrr, 0, bitdepth, 10
monitor=HDMI-A-1, disable

# See https://wiki.hyprland.org/Configuring/Keywords/ for more

# Execute your favorite apps at launch
exec-once = waybar
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = gnome-keyring-daemon --start --components=secrets
exec-once = dbus-update-activation-environment --all
exec-once = wl-paste --type text --watch cliphist store #Stores only text data
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
exec-once=hyprctl plugin load /home/user/workspace/split-monitor-workspaces/split-monitor-workspaces.so

# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf

# Some default env vars.
env = XCURSOR_SIZE,24

# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options = grp:alt_shift_toggle
    kb_rules =

    follow_mouse = 1

    touchpad {
        natural_scroll = no
    }

    sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
    #accel_profile = "flat"
    force_no_accel = true
}

cursor {
    inactive_timeout = 2
}

general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    gaps_in = 5
    gaps_out = 20
    border_size = 2
    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.inactive_border = rgba(595959aa)

    layout = dwindle

    # Enable tearing
    allow_tearing = true
}

decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    rounding = 10

    blur {
        enabled = true
        size = 3
        passes = 1
    }

    drop_shadow = yes
    shadow_range = 4
    shadow_render_power = 3
    col.shadow = rgba(1a1a1aee)
}

misc {
    disable_hyprland_logo = true
    background_color = 0x000000
}

animations {
    enabled = yes

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.05

    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}

dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
    new_status = master
}

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = off
}

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device {
    name = compx-pulsar-xlite-wireless
    sensitivity = 0
    accel_profile = flat
    #force_no_accel = true
}

# Allow tearing for Quake
windowrulev2 = immediate, title:^(Quake Live)$
windowrulev2 = immediate, title:^(Freesync test)$
# Let steam NOT lose focus
windowrulev2 = stayfocused, title:^()$,class:^(steam)$
windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, C, killactive,
bind = $mainMod SHIFT, M, exit,
bind = $mainMod, V, togglefloating,
bind = $mainMod, F, fullscreen,
bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle

# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, split-workspace, 1
bind = $mainMod, 2, split-workspace, 2
bind = $mainMod, 3, split-workspace, 3
bind = $mainMod, 4, split-workspace, 4
bind = $mainMod, 5, split-workspace, 5
bind = $mainMod, 6, split-workspace, 6
bind = $mainMod, 7, split-workspace, 7
bind = $mainMod, 8, split-workspace, 8
bind = $mainMod, 9, split-workspace, 9
bind = $mainMod, 0, split-workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, split-movetoworkspace, 1
bind = $mainMod SHIFT, 2, split-movetoworkspace, 2
bind = $mainMod SHIFT, 3, split-movetoworkspace, 3
bind = $mainMod SHIFT, 4, split-movetoworkspace, 4
bind = $mainMod SHIFT, 5, split-movetoworkspace, 5
bind = $mainMod SHIFT, 6, split-movetoworkspace, 6
bind = $mainMod SHIFT, 7, split-movetoworkspace, 7
bind = $mainMod SHIFT, 8, split-movetoworkspace, 8
bind = $mainMod SHIFT, 9, split-movetoworkspace, 9
bind = $mainMod SHIFT, 0, split-movetoworkspace, 10

# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, split-workspace, e+1
bind = $mainMod, mouse_up, split-workspace, e-1

# Basic ALT-TAB functionality.
bind = $mainMod, tab, cyclenext
bind = $mainMod SHIFT, tab, cyclenext, prev
bind = $mainMod, return, exec, /home/user/downloads/browser/Warp-x86_64.AppImage
bind = $mainMod SHIFT, G, exec, hyprctl keyword monitor "DP-2, modeline 1504.400 2560 2568 2600 2640 1440 1575 1580 1583 +hsync -vsync, 0x0, 1, vrr, 0"
bind = $mainMod CTRL, G, exec, hyprctl keyword monitor "DP-2, modeline 1504.400 2560 2568 2600 2640 1440 1575 1580 1583 +hsync -vsync, 0x0, 1, vrr, 1"
bind = $mainMod SHIFT, A, exec, hyprctl keyword input:kb_layout "us" && notify-send "us"
bind = $mainMod CTRL, A, exec, hyprctl keyword input:kb_layout "us,ru" && notify-send "us,ru"
bind = $mainMod, L, exec, urlshortener-cli --get-from-clipboard --set-to-clipboard
bind = $mainMod, O, split-changemonitor, +1
bind = $mainMod, D, dpms, off DP-3
bind = $mainMod, S, dpms, off DP-2
bind = $mainMod SHIFT, D, dpms, on DP-3
bind = $mainMod SHIFT, S, dpms, on DP-2
bind = $mainMod SHIFT, D, exec, xrandr --output DP-2 --primary
bind = $mainMod SHIFT, S, exec, xrandr --output DP-2 --primary
bind = $mainMod SHIFT CTRL, return, exec, shutdown -h now
bind = $mainMod, Z, focusmonitor, +1
bind = CTRL ALT, Z, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
# Screenshot the entire display area (all the monitors).
bind = CTRL SHIFT, 3, exec, grim /tmp/screenshot.png
# Screenshot a part of the screen (user selection).
bind = CTRL SHIFT, 4, exec, slurp | grim -g - /tmp/screenshot.png
# Screenshot for the current active window.
bind = CTRL SHIFT, 5, exec, hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -g - /tmp/screenshot.png
# Toggle waybar
bindr = ALT, Alt_R, exec, killall -SIGUSR1 waybar


# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
======Config-End========

Description

I can run Hyprland, but I have a 2-hertz refresh rate after yesterday's ArchLinux upgrade and a weird fake monitor between my two. According to the logs, somehow, aquamarine detects two GPUs and creates the rendering backends for both of them; however, only one is enabled in BIOS (the discrete GPU):

   11 [LOG] GPU information:
   12 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD102 [GeForce RTX 4090] [10de:2684] (rev a1) (prog-if 00 [VGA controller])

  561 [LOG] DRM driver information: simpledrm v1.0.0 from 0 description DRM driver for simple-framebuffer platform devices
  562 [LOG] DRM driver information: nvidia-drm v0.0.0 from 0 description NVIDIA DRM driver

 81 [LOG] [AQ] drm: Enumerated device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/drm/card1
   82 [LOG] [AQ] libseat: Device /dev/dri/card1 supports kms
   83 [LOG] [AQ] drm: Enumerated device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/drm/card1/card1-DP-1
   84 [ERR] [AQ] drm: Skipping device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/drm/card1/card1-DP-1, no devnode
   85 [LOG] [AQ] drm: Enumerated device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/drm/card1/card1-DP-2
   86 [ERR] [AQ] drm: Skipping device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/drm/card1/card1-DP-2, no devnode
   87 [LOG] [AQ] drm: Enumerated device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/drm/card1/card1-DP-3
   88 [ERR] [AQ] drm: Skipping device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/drm/card1/card1-DP-3, no devnode
   89 [LOG] [AQ] drm: Enumerated device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/drm/card1/card1-HDMI-A-1
   90 [ERR] [AQ] drm: Skipping device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/drm/card1/card1-HDMI-A-1, no devnode
   91 [LOG] [AQ] drm: Enumerated device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/simple-framebuffer.0/drm/card0
   92 [LOG] [AQ] libseat: Device /dev/dri/card0 supports kms
   93 [LOG] [AQ] drm: Enumerated device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/simple-framebuffer.0/drm/card0/card0-Unknown-1
   94 [ERR] [AQ] drm: Skipping device /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0/simple-framebuffer.0/drm/card0/card0-Unknown-1, no devnode
   95 [LOG] [AQ] drm: Found 2 GPUs
   96 [LOG] [AQ] drm: Starting backend for /dev/dri/card0, with driver simpledrm
   97 [LOG] [AQ] drm: Registered gpu /dev/dri/card0
   98 [LOG] [AQ] drm: Atomic supported, using atomic for modesetting
   99 [LOG] [AQ] drm: drmProps.supportsAsyncCommit: false
  100 [LOG] [AQ] drm: drmProps.supportsAddFb2Modifiers: true
  101 [LOG] [AQ] drm: drmProps.supportsTimelines: false
  102 [LOG] [AQ] drm: found 1 CRTCs
  103 [LOG] [AQ] drm: found 1 planes
  104 [LOG] [AQ] drm: Plane 32 has type 1
  105 [LOG] [AQ] drm: Plane 32 has 1 formats
  106 [LOG] [AQ] drm: Plane: checking for modifiers
  107 [LOG] [AQ] drm: Basic init pass for gpu /dev/dri/card0
  108 [LOG] [AQ] drm: Scanning connectors for /dev/dri/card0
  109 [LOG] [AQ] drm: Scanning connector id 36
  110 [LOG] [AQ] drm: Initializing connector id 36
  111 [LOG] [AQ] drm: Connector gets name Unknown-1
  112 [LOG] [AQ] drm: Connector 36 connection state: 1
  113 [LOG] [AQ] drm: Rechecking CRTCs
  114 [LOG] [AQ] drm: Skipping connector Unknown-1, has crtc 34 and is connected
  115 [LOG] [AQ] drm: slot 0 crtc 34 taken by Unknown-1, skipping
  116 [LOG] [AQ] drm: rescanning after realloc
  117 [LOG] [AQ] drm: Scanning connectors for /dev/dri/card0
  118 [LOG] [AQ] drm: Scanning connector id 36
  119 [LOG] [AQ] drm: Connector id 36 already initialized
  120 [LOG] [AQ] drm: Connector 36 connection state: 1
  121 [LOG] [AQ] drm: Connector Unknown-1 connected
  122 [LOG] [AQ] drm: Connecting connector Unknown-1, CRTC ID 34
  123 [LOG] [AQ] drm: Dumping detected modes:
  124 [LOG] [AQ] drm: Mode 0: 2560x1440@60.00Hz  (preferred)
  125 [LOG] [AQ] drm: Physical size [Vector2D: x: 677, y: 381] (mm)
  126 [ERR] [AQ] drm: failed to parse edid
  127 [LOG] [AQ] drm: Description    (Unknown-1)
  128 [LOG] [AQ] drm: connector Unknown-1 crtc is incapable of vrr: props.vrr_capable -> 0, crtc->props.vrr_enabled -> 24
  129 [LOG] [AQ] drm: Explicit sync unsupported
  130 [LOG] [AQ] drm: gpu /dev/dri/card0 becomes primary drm
  131 [LOG] [AQ] drm: Starting backend for /dev/dri/card1, with driver nvidia-drm with primary /dev/dri/card0
  132 [LOG] [AQ] drm: Registered gpu /dev/dri/card1
  133 [LOG] [AQ] drm: Atomic supported, using atomic for modesetting

Then, further in the logs it says that the "card0" becomes the primary DRM, while card1 being the NVIDIA one (the discrete GPU only enabled in BIOS). And the last problem is many-many messages of:

eglCreateSyncKHR failed

And other sorts of error messages. Just before yesterday's evening ArchLinux update everything was flawless, nothing except the new packages has changed.

UPD: found from here

env = AQ_DRM_DEVICES,/dev/dri/card1

Completely fixes the issue. What has happened and why? Did the new kernel suddenly start to report the GPU, which is disabled in BIOS, as enabled so that Aquamarine attempts to use it?

How to reproduce

Use the latest ArchLinux. It has two GPUs, one disabled in BIOS.

Crash reports, logs, images, videos

The log file is too big (10.2 MB) and is constantly growing, can't upload it here, I guess, so uploading as an archive.
log.tar.gz

Drm log:
dmesg.log

@iddm iddm added the bug Something isn't working label Oct 2, 2024
@vaxerski
Copy link
Member

vaxerski commented Oct 2, 2024

unknown display is an nvidia bug.

Completely fixes the issue. What has happened and why? Did the new kernel suddenly start to report the GPU, which is disabled in BIOS, as enabled so that Aquamarine attempts to use it?

dk, ask nv

@vaxerski vaxerski closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
@iddm
Copy link
Contributor Author

iddm commented Oct 2, 2024

unknown display is an nvidia bug.

Completely fixes the issue. What has happened and why? Did the new kernel suddenly start to report the GPU, which is disabled in BIOS, as enabled so that Aquamarine attempts to use it?

dk, ask nv

But finding two GPUs, too? Even though in the beginning, just one was reported to be found? Why has it always been working previously but after Linux 6.11, we need to use the env = AQ_DRM_DEVICES,/dev/dri/card1 to specify exactly the card we want?
The problem wasn't just the unknown display.

@vaxerski
Copy link
Member

vaxerski commented Oct 2, 2024

sounds like an nvidia bug

@iddm
Copy link
Contributor Author

iddm commented Oct 2, 2024

I figured that the /dev/dri/card0 is also nvidia (so one GPU is found instead of reported two), but it is the simple framebuffer instead. I doubt any renderer should use the direct framebuffer instead of using the proper GPU device.

I also don't think this is an NVIDIA problem since this is a Linux-generic thing, not related to NVIDIA or any other vendor.

Linux exposes the device node from the DRM/tiny module:

1147 Oct 02 09:58:57 purplejam kernel: [drm] Initialized simpledrm 1.0.0 for simple-framebuffer.0 on minor 0
1149 Oct 02 09:58:57 purplejam kernel: simple-framebuffer simple-framebuffer.0: [drm] fb0: simpledrmdrmfb frame buffer device

The entire problem appears to be using this device node instead of the proper GPU device node for rending using Aquamarine. Hyprland shouldn't probably ever be using the framebuffer device nodes. It is easy to filter out the framebuffer devices.

Here we could simply check for the device not being the "simple-framebuffer" implementation and otherwise skip it. This is wrong for any vendor for all the scenarios. It should be used when there is a direct purpose for it. It is wrong to require each and every user to manually and always disable it on their system when we know we can skip it because it is, either way, wrong to try working with it.

If there really had been two different GPUs as it is claimed, for example, one integrated and one discrete, or three, then it would have made sense to remind the users to use the AQ_DRM_DEVICES environment variable to specify the device(s) they want to be used. But using the simple-framebuffer device is just wrong all the way in all the cases. Do you mind if I create a PR addressing this issue? Just to re-iterate, this is Linux-related, not NVIDIA/AMD/Intel/Qualcomm/PowerVR/etc related.

@vaxerski
Copy link
Member

vaxerski commented Oct 2, 2024

MRs welcome

@MAKMED1337
Copy link

MAKMED1337 commented Oct 2, 2024

sounds like an nvidia bug

I have a laptop with only intel graphics and it also happened to me.

00:02.0 VGA compatible controller [0300]: Intel Corporation Meteor Lake-P [Intel Arc Graphics] [8086:7d55] (rev 08) (prog-if 00 [VGA controller])

Also I have only 1 monitor, and it adds the second one "Unknown-1".
Using env variable doesn't help in my case.

FYI, my workaround for stutters is to disable(in config) this fake monitor.

@iddm
Copy link
Contributor Author

iddm commented Oct 3, 2024

sounds like an nvidia bug

I have a laptop with only intel graphics and it also happened to me.

00:02.0 VGA compatible controller [0300]: Intel Corporation Meteor Lake-P [Intel Arc Graphics] [8086:7d55] (rev 08) (prog-if 00 [VGA controller])

Also I have only 1 monitor, and it adds the second one "Unknown-1". Using env variable doesn't help in my case.

FYI, my workaround for stutters is to disable(in config) this fake monitor.

What is your Linux kernel version and when it started to happen? Does disabling the simple framebuffer help? Try adding this to your kernel cmd line before you boot it:

initcall_blacklist=sysfb_init

In my case forcing aquamarine to use the non-simple-framebuffer device fixed all the issues, I have none now just as before. This is why I am going to create a PR to ignore it.

@MAKMED1337
Copy link

What is your Linux kernel version and when it started to happen?

Linux archlinux 6.11.1-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Mon, 30 Sep 2024 23:49:48 +0000 x86_64 GNU/Linux
I'm not sure when it has happened, but a month ago there was no this bug.

Does disabling the simple framebuffer help?

Yes, it helped.

@iddm
Copy link
Contributor Author

iddm commented Oct 3, 2024

I can say prior to upgrading to 6.11 there were no issues, so I connect this to the changes there. Anyway, thanks for your report, I'll create the aquamarine patch this week.

@danielwerg
Copy link

@iddm env = AQ_DRM_DEVICES,/dev/dri/card1 fixed it for me for the most part, thanks for that! But all my electron apps got inverted colors now, for example ts5:

2024-10-07_18-27-13

If you use anything build on electron, can you confirm this is an issue for you too?

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

4 participants