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

Multiple GPU's Not Working when GBM_BACKEND=nvidia-drm is set (not a laptop, displays connected to both integrated and discrete GPU's) #4274

Open JPDucky opened 11 months ago

JPDucky commented 11 months ago

Hyprland Version

Hyprland, built from branch main at commit e5eb11ad0423bfdfd4056964ef868e26b2d3c8 46 dirty (Nix: wrap with gcc). Date: Wed Dec 27 12:27:55 2023 Tag: v0.33.1-101-ge5eb11ad flags: (if any)

Bug or Regression?

Bug

Description

I am on archcraft using hyprland-git, and I am using a somewhat odd setup: I have an intel iGPU with one monitor plugged into it, and I have an nvidia 980 Ti with two monitors plugged into it.

My nvidia drivers are the dkms version, installed using the "frogging family" installer, and everything seems to work just fine except when trying to enable all the nvidia parameters. I've narrowed it down to it being the GBM_BACKEND=nvidia-drm env variable, as commenting out all other variables in my config and just having the nvidia variables from the readme (and commenting out the GBM_BACKEND line) lets hyprland start. But it's laggy as hell and only barely passes the mark of being useable.

Judging by the output of the log, I'm assuming that it is trying to assign the nvidia-drm to the intel GPU as well, as it mentions a "bad parameter" and an incorrect number of variables being passed. I do not have this issue on other desktop environments/window managers that are wayland based.

How to reproduce

Crash reports, logs, images, videos


Hyprland Crash Report

This was an accident, I swear!

Hyprland received signal 11 (Segmentation fault)

Version: e5eb11ad0423bfdfd4056964ef868e26b2d3c846 Tag: v0.33.1-101-ge5eb11ad

System info: System name: Linux Node name: archbtw Release: 6.6.8-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Thu, 21 Dec 2023 19:01:01 +0000

GPU: 00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06) (prog-if 00 [VGA controller]) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM200 [GeForce GTX 980 Ti] [10de:17c8] (rev a1) (prog-if 00 [VGA controller])

os-release: NAME="Archcraft" PRETTY_NAME="Archcraft" ID=archcraft ID_LIKE=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archcraft.io" DOCUMENTATION_URL="https://wiki.archcraft.io" SUPPORT_URL="https://www.reddit.com/r/archcraft" BUG_REPORT_URL="https://github.com/archcraft-os/archcraft/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archcraft

Backtrace:

0 | Hyprland(_Z12getBacktracev+0x62) [0x55d926ad7d32]

    ??
    ??:0
#1 | Hyprland(_ZN13CrashReporter18createAndSaveCrashEi+0x64d) [0x55d926aa464d]
    ??
    ??:0
#2 | Hyprland(_Z25handleUnrecoverableSignali+0x48) [0x55d926a386d8]
    ??
    ??:0
#3 | /usr/lib/libc.so.6(+0x3e710) [0x7f883e05c710]
    ??
    ??:0
#4 | /usr/lib/gbm/nvidia-drm_gbm.so(+0x156eb) [0x7f8831e156eb]
    ??
    ??:0
#5 | /usr/lib/gbm/nvidia-drm_gbm.so(+0x159b8) [0x7f8831e159b8]
    ??
    ??:0
#6 | /usr/lib/libgbm.so.1(+0x4e09) [0x7f883e53de09]
    ??
    ??:0
#7 | /usr/lib/libgbm.so.1(gbm_create_device+0x61) [0x7f883e53f961]
    ??
    ??:0
#8 | /usr/lib/libwlroots.so.13032(wlr_gbm_allocator_create+0x87) [0x7f883ea77087]
    ??
    ??:0
#9 | /usr/lib/libwlroots.so.13032(+0x3d318) [0x7f883ea77318]
    ??
    ??:0
#10 | Hyprland(_ZN11CCompositor10initServerEv+0x1e7) [0x55d926a403a7]
    ??
    ??:0
#11 | Hyprland(main+0x79e) [0x55d926a2065e]
    ??
    ??:0
#12 | /usr/lib/libc.so.6(+0x27cd0) [0x7f883e045cd0]
    ??
    ??:0
#13 | /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f883e045d8a]
    ??
    ??:0
#14 | Hyprland(_start+0x25) [0x55d926a35c95]
    ??
    ??:0

Log tail: [LOG] Instance Signature: e5eb11ad0423bfdfd4056964ef868e26b2d3c846_1703712825 [LOG] Hyprland PID: 1582 [LOG] ===== SYSTEM INFO: ===== [LOG] System name: Linux [LOG] Node name: archbtw [LOG] Release: 6.6.8-arch1-1 [LOG] Version: #1 SMP PREEMPT_DYNAMIC Thu, 21 Dec 2023 19:01:01 +0000

[LOG] GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06) (prog-if 00 [VGA controller]) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM200 [GeForce GTX 980 Ti] [10de:17c8] (rev a1) (prog-if 00 [VGA controller])

[WARN] Warning: you're using an NVIDIA GPU. Make sure you follow the instructions on the wiki if anything is amiss.

[LOG] os-release: NAME="Archcraft" PRETTY_NAME="Archcraft" ID=archcraft ID_LIKE=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archcraft.io" DOCUMENTATION_URL="https://wiki.archcraft.io" SUPPORT_URL="https://www.reddit.com/r/archcraft" BUG_REPORT_URL="https://github.com/archcraft-os/archcraft/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archcraft

[LOG] ========================

[INFO] If you are crashing, or encounter any bugs, please consult https://wiki.hyprland.org/Crashes-and-Bugs/

[LOG] Current splash: And all that I can see, is just a yellow lemon tree.

[LOG] Creating the HookSystem! [LOG] Creating the KeybindManager! [LOG] [hookSystem] New hook event registered: configReloaded [LOG] Creating the AnimationManager! [LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 22.00µs. Estimated average calc time: 0.03µs. [LOG] Creating the ConfigManager! [LOG] NOTE: further logs to stdout / logfile are disabled by default. Use debug:disable_logs and debug:enable_stdout_logs to override this. [LOG] Creating the CHyprError! [LOG] [hookSystem] New hook event registered: focusedMon [LOG] [hookSystem] New hook event registered: preRender [LOG] Creating the LayoutManager! [LOG] [hookSystem] New hook event registered: preConfigReload [LOG] Reloading the config! [LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 9.98µs. Estimated average calc time: 0.03µs. [LOG] Using config: /home/palmerd/.config/hypr/hyprland.conf [WARN] source= skipping non-file /home/palmerd/dotfiles/hypr/themes/ [LOG] Registered dynamic var "$background" -> rgb(1a1e25) [LOG] Registered dynamic var "$foreground" -> rgb(ecdcbd) [LOG] Registered dynamic var "$color0" -> rgb(1a1e25) [LOG] Registered dynamic var "$color1" -> rgb(A99778) [LOG] Registered dynamic var "$color2" -> rgb(D08870) [LOG] Registered dynamic var "$color3" -> rgb(5A7598) [LOG] Registered dynamic var "$color4" -> rgb(90768E) [LOG] Registered dynamic var "$color5" -> rgb(6486AD) [LOG] Registered dynamic var "$color6" -> rgb(7DA2C2) [LOG] Registered dynamic var "$color7" -> rgb(ecdcbd) [LOG] Registered dynamic var "$color8" -> rgb(a59a84) [LOG] Registered dynamic var "$color9" -> rgb(A99778) [LOG] Registered dynamic var "$color10" -> rgb(D08870) [LOG] Registered dynamic var "$color11" -> rgb(5A7598) [LOG] Registered dynamic var "$color12" -> rgb(90768E) [LOG] Registered dynamic var "$color13" -> rgb(6486AD) [LOG] Registered dynamic var "$color14" -> rgb(7DA2C2) [LOG] Registered dynamic var "$color15" -> rgb(ecdcbd) [LOG] Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 9.98µs. Estimated average calc time: 0.03µs. [LOG] Registered dynamic var "$mainMod" -> SUPER [LOG] Registered dynamic var "$dropterm" -> ^(kitty-dropterm)$ [LOG] Disabling stdout logs! Check the log for further logs. [EGL] command: eglQueryDmaBufModifiersEXT, error: EGL_BAD_PARAMETER (0x300c), message: "EGL_BAD_PARAMETER error: In eglQueryDmaBufModifiersEXT: Invalid format " [render/egl.c:856] Failed to query dmabuf number of modifiers [EGL] command: eglQueryDmaBufModifiersEXT, error: EGL_BAD_PARAMETER (0x300c), message: "EGL_BAD_PARAMETER error: In eglQueryDmaBufModifiersEXT: Invalid format " [render/egl.c:856] Failed to query dmabuf number of modifiers

tchofy commented 11 months ago

Probably https://github.com/hyprwm/Hyprland/issues/1878. Try the steps on the multi-gpu wiki page https://wiki.hyprland.org/Configuring/Multi-GPU/

abmantis commented 10 months ago

I have a similar issue. In my case, without GBM_BACKEND on the external display (the one connected to NVidia) some applications seem to have rendering refresh delays (gnome-terminal, kitty, ferdium), where the output takes too much to refresh some times. If I move the mouse, they refresh instantaneously with no delay!

Apps like vscode or firefox are fine.

If I add env = WLR_DRM_DEVICES,/dev/dri/card1 (using nvidia only) the issue does not happen on the external display. Maybe a problem updating surfaces for windows rendered on intel and sent to the nvidia?

EDIT: I just updated the nvidia drivers to 545 and GBM_BACKEND works now. Unfortunatelly, I don't see any improvements in the refresh delays on some apps.

EDIT2: having a video playing on firefox, also makes the apps refresh faster.