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
20.87k stars 874 forks source link

Nvidia update caused GBM_BACKEND=nvidia-drm to not work #1878

Closed TanX-009 closed 1 year ago

TanX-009 commented 1 year ago

What happened?

  1. Updated everything using yay -Syu

updates:

``` [2023-03-25T13:32:20+0530] [ALPM] upgraded m4 (1.4.19-2 -> 1.4.19-3) [2023-03-25T13:32:20+0530] [ALPM] upgraded bison (3.8.2-4 -> 3.8.2-5) [2023-03-25T13:32:21+0530] [ALPM] upgraded cmake (3.26.0-1 -> 3.26.1-1) [2023-03-25T13:32:21+0530] [ALPM] upgraded flex (2.6.4-4 -> 2.6.4-5) [2023-03-25T13:32:21+0530] [ALPM] upgraded gdb-common (13.1-1 -> 13.1-2) [2023-03-25T13:32:21+0530] [ALPM] upgraded libelf (0.188-3 -> 0.189-1) [2023-03-25T13:32:21+0530] [ALPM] upgraded gdb (13.1-1 -> 13.1-2) [2023-03-25T13:32:21+0530] [ALPM] upgraded glib2 (2.76.0-2 -> 2.76.1-1) [2023-03-25T13:32:21+0530] [ALPM] upgraded libgirepository (1.76.0-1 -> 1.76.1-1) [2023-03-25T13:32:21+0530] [ALPM] upgraded gobject-introspection-runtime (1.76.0-1 -> 1.76.1-1) [2023-03-25T13:32:21+0530] [ALPM] upgraded python-markdown (3.4.2-1 -> 3.4.3-1) [2023-03-25T13:32:21+0530] [ALPM] upgraded gobject-introspection (1.76.0-1 -> 1.76.1-1) [2023-03-25T13:32:21+0530] [ALPM] upgraded libusb (1.0.26-1 -> 1.0.26-2) [2023-03-25T13:32:21+0530] [ALPM] upgraded mkinitcpio (35.1-1 -> 35.2-1) [2023-03-25T13:32:22+0530] [ALPM] upgraded linux (6.2.7.arch1-1 -> 6.2.8.arch1-1) [2023-03-25T13:32:24+0530] [ALPM] upgraded linux-headers (6.2.7.arch1-1 -> 6.2.8.arch1-1) [2023-03-25T13:32:25+0530] [ALPM] upgraded linux-zen (6.2.7.zen1-1 -> 6.2.8.zen1-1) [2023-03-25T13:32:26+0530] [ALPM] upgraded linux-zen-headers (6.2.7.zen1-1 -> 6.2.8.zen1-1) [2023-03-25T13:32:27+0530] [ALPM] upgraded nvidia-utils (525.89.02-2 -> 530.41.03-1) [2023-03-25T13:32:28+0530] [ALPM] upgraded nvidia-dkms (525.89.02-2 -> 530.41.03-1) [2023-03-25T13:32:28+0530] [ALPM] upgraded python-gobject (3.42.2-1 -> 3.44.1-1) [2023-03-25T13:32:28+0530] [ALPM] upgraded python-pydantic (1.10.6-2 -> 1.10.7-1) [2023-03-25T13:32:28+0530] [ALPM] upgraded sqlite (3.41.1-1 -> 3.41.2-1) [2023-03-25T13:32:28+0530] [ALPM] upgraded xorg-xwayland (22.1.8-1 -> 23.1.0-1) [2023-03-25T13:50:39+0530] [ALPM] upgraded waydroid-image-gapps (18.1_20230304-1 -> 18.1_20230318-1) ```
  1. Rebooted and then hyprland wasn't starting.
  2. Tried non-wrapped hyprland. Logged in sucessfully.
  3. After debugging, found that export GBM_BACKEND=nvidia-drm was causing problem.
  4. Relogged-in by commenting above line in the wrapper. Logged in sucessfully.

~/.local/bin/wrappedhl

``` #!/bin/sh cd ~ || exit # Log WLR errors and logs to the hyprland log. Recommended export HYPRLAND_LOG_WLR=1 # Tell XWayland to use a cursor theme export XCURSOR_THEME=material-light-cursors # Set a cursor size export XCURSOR_SIZE=24 # Example IME Support: fcitx export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS=@im=fcitx export SDL_IM_MODULE=fcitx export GLFW_IM_MODULE=ibus # Nvidia export LIBVA_DRIVER_NAME=nvidia export XDG_SESSION_TYPE=wayland # export GBM_BACKEND=nvidia-drm export __GLX_VENDOR_LIBRARY_NAME=nvidia export WLR_NO_HARDWARE_CURSORS=1 exec Hyprland ```

Questions

  1. What is GBM_BACKEND used for? (Tried googling it but, I wasn't able understand everything.)
  2. Do I need it? If yes, then why?

Installed packages:

``` hyprland 0.23.0beta-2 waybar-hyprland 0.9.16-1 xdg-desktop-portal-hyprland-git r258.2fa7e34-1 nvidia-open-dkms 530.41.03-1 nvidia-settings 530.41.03-1 nvidia-utils 530.41.03-1 nvidia-vaapi-driver-git 0.0.8.r63.g766d843-1 linux-zen 6.2.8.zen1-1 ```

hyprland log:

hyprland.log

hyprland crash:

There were no crash reports.

hyprland config:

hyprland.conf

inxi -Fxz:

``` System: Kernel: 6.2.8-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.2.1 Desktop: Hyprland Distro: Arch Linux Machine: Type: Laptop System: ASUSTeK product: ROG Strix G531GT_G531GT v: 1.0 serial: Mobo: ASUSTeK model: G531GT v: 1.0 serial: UEFI: American Megatrends v: G531GT.308 date: 02/01/2021 Battery: ID-1: BAT0 charge: 26.0 Wh (63.6%) condition: 40.9/50.5 Wh (81.0%) volts: 12.5 min: 12.5 model: ASUSTeK ASUS Battery status: not charging CPU: Info: quad core model: Intel Core i5-9300H bits: 64 type: MT MCP arch: Coffee Lake rev: A cache: L1: 256 KiB L2: 1024 KiB L3: 8 MiB Speed (MHz): avg: 1600 high: 2400 min/max: 800/4100 cores: 1: 800 2: 800 3: 2400 4: 800 5: 800 6: 2400 7: 2400 8: 2400 bogomips: 38400 Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx Graphics: Device-1: Intel CoffeeLake-H GT2 [UHD Graphics 630] vendor: ASUSTeK driver: i915 v: kernel arch: Gen-9.5 bus-ID: 00:02.0 Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: ASUSTeK driver: nvidia v: 530.41.03 arch: Turing bus-ID: 01:00.0 Display: wayland server: X.org v: 1.21.1.7 with: Xwayland v: 23.1.0 compositor: Hyprland driver: X: loaded: modesetting,nvidia unloaded: vesa dri: iris gpu: i915 resolution: 1920x1080~60Hz API: EGL/GBM Message: No known Wayland EGL/GBM data sources. Audio: Device-1: Intel Cannon Lake PCH cAVS vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 Device-2: NVIDIA vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 01:00.1 Sound API: ALSA v: k6.2.8-zen1-1-zen running: yes Sound Interface: sndio v: N/A running: no Sound Server-1: JACK v: 1.9.22 running: no Sound Server-2: PulseAudio v: 16.1 running: no Sound Server-3: PipeWire v: 0.3.67 running: yes Network: Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel bus-ID: 00:14.3 IF: wlo1 state: up mac: Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169 v: kernel port: 3000 bus-ID: 03:00.0 IF: eno2 state: up speed: 100 Mbps duplex: full mac: IF-ID-1: waydroid0 state: down mac: Bluetooth: Device-1: N/A type: USB driver: btusb v: 0.8 bus-ID: 1-14:5 Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends Drives: Local Storage: total: 942.7 GiB used: 305.93 GiB (32.5%) ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKNW512G8 size: 476.94 GiB temp: 30.9 C ID-2: /dev/sda vendor: Seagate model: ST500VT000-1DK142 size: 465.76 GiB Partition: ID-1: / size: 97.87 GiB used: 25.08 GiB (25.6%) fs: ext4 dev: /dev/nvme0n1p2 Swap: ID-1: swap-1 type: partition size: 20 GiB used: 0 KiB (0.0%) dev: /dev/sda2 Sensors: System Temperatures: cpu: 42.0 C pch: 44.0 C mobo: N/A Fan Speeds (RPM): cpu: 3200 Info: Processes: 242 Uptime: 1h 4m Memory: 15.48 GiB used: 2.59 GiB (16.7%) Init: systemd Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: 882 Shell: Zsh v: 5.9 inxi: 3.3.25 ```
vaxerski commented 1 year ago

Nvidia is not officially supported. Can't provide much help as the entire nvidia section is written by volunteers.

tchofy commented 1 year ago

While I can still start hyprland with GBM_BACKEND=nvidia-drm (nvidia-dkms 530.41.03-1, GTX 1650 mobile), I noticed some games (both dxvk/vulkan and native opengl) get intense noisy artifacts, it starts behaving normally if I set no_direct_scanout=1, probably caused by the broken GBM backend.

ClarkQAQ commented 1 year ago

You can use GBM_BACKEND=nvidia instead, it works on my computer

lou-perret commented 1 year ago

I have the same issue with xorg-xwayland-23.1.0-1, downgrading it to 22.1.8-1 fixed the issue

DashieTM commented 1 year ago

Latest nvidia driver update seemed to break running hyprland for a friend of mine.(same error) Downgrading nvidia-dkms and nvidia-utils fixed it.

Torvalds is right about nvidia....

Eclextic commented 1 year ago

You can use GBM_BACKEND=nvidia instead, it works on my computer

Don't do that! If you switch GBM_BACKEND=nvidia-drm with random letters (GBM_BACKEND=asdasda) you will still get the same result! (Booting, but not using Nvidia)

I have the same issue with xorg-xwayland-23.1.0-1, downgrading it to 22.1.8-1 fixed the issue

Doesn't fix it for me...

Latest nvidia driver update seemed to break running hyprland for a friend of mine.(same error) Downgrading nvidia-dkms and nvidia-utils fixed it.

Torvalds is right about nvidia....

Also behaves weirdly on my system... This solution works, but using nvtop shows that it DOESNT EVEN RECOGNIZE MY GRAPHICS CARD ANYMORE!!!

I'm actually ripping out my hair as it seems like a package caused this issue, as a clean-install worked with the previous settings...

Will report my findings if any package removal solves it...

Eclextic commented 1 year ago

Much work but to no avail...

I have looked through multiple article by now and couldn't fix it (neither downgrading Hyprland, nor removing any packages worked). Keep in mind I have only tried packages that SHOULD have a any kind of relation with GPU work...

Even still I found some good resources! It seems like the Nvidia patch is based on wlroots (would love to have the git repo grrr) and whenever my Hyprland launch crashed it would report something about this file (line 847): Wlroots' Gles2 Renderer code

Sometimes (though randomly/happened only once) I also got a crash from this file, while forcing Hyprland to run using sudo (--i-am-really-stupid flag) Wlroots' Wayland Backend code

These are the logs when launching with downgraded nvidia drivers (remember these make the card not show up anymore) and it seems like there were already issues/errors with the patch before? That were just being ignored? There are numerous errors in this...

The launch logs

Welcome to Hyprland! Instance Signature: b08b72358ad549fd066e5be0fc3aa4c9df367607_1690315752 Hyprland PID: 22975 ===== SYSTEM INFO: ===== System name: Linux Node name: AcerNitro5 Release: 6.1.39-1-lts Version: #1 SMP PREEMPT_DYNAMIC Wed, 19 Jul 2023 17:58:31 +0000 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-H GT2 [UHD Graphics] [8086:9bc4] (rev 05) (prog-if 00 [VGA controller]) 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] [10de:2520] (rev a1) (prog-if 00 [VGA controller]) Warning: you're using an NVIDIA GPU. Make sure you follow the instructions on the wiki if anything is amiss. 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://bugs.archlinux.org/" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo ======================== If you are crashing, or encounter any bugs, please consult https://wiki.hyprland.org/Crashes-and-Bugs/ Current splash: Here we go back, this is the moment, tonight is the night Creating the HookSystem! Creating the KeybindManager! Creating the AnimationManager! Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 26.30µs. Estimated average calc time: 0.00µs. Creating the ConfigManager! Creating the CHyprError! [hookSystem] New hook event registered: focusedMon [hookSystem] New hook event registered: preRender Creating the LayoutManager! Reloading the config! Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 12.93µs. Estimated average calc time: 0.00µs. Using config: /home/TangerineDev/.config/hypr/hyprland.conf Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 12.62µs. Estimated average calc time: 0.00µs. Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 12.45µs. Estimated average calc time: 0.00µs. Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 12.46µs. Estimated average calc time: 0.00µs. Created a bezier curve, baked 255 points, mem usage: 4.08kB, time to bake: 12.44µs. Estimated average calc time: 0.00µs. Registered dynamic var "$mainMod" -> SUPER Registered dynamic var "$mainModShift" -> SUPERSHIFT 00:00:00.000 [backend/wayland/backend.c:572] Creating wayland backend 00:00:00.004 [render/egl.c:206] Supported EGL client extensions: EGL_EXT_platform_base EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_KHR_client_get_all_proc_addresses EGL_EXT_client_extensions EGL_KHR_debug EGL_KHR_platform_x11 EGL_EXT_platform_x11 EGL_EXT_platform_device EGL_KHR_platform_wayland EGL_EXT_platform_wayland EGL_EXT_explicit_device EGL_EXT_platform_xcb EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless 00:00:00.004 [EGL] command: eglQueryDevicesEXT, error: EGL_BAD_ALLOC (0x3003), message: "EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list. " 00:00:00.004 [EGL] command: eglQueryDevicesEXT, error: EGL_BAD_ALLOC (0x3003), message: "EGL_BAD_ALLOC error: In eglQueryDevicesEXT: Failed to allocate device list. " 00:00:00.029 [render/egl.c:355] Using EGL 1.5 00:00:00.029 [render/egl.c:356] Supported EGL display extensions: EGL_ANDROID_blob_cache EGL_ANDROID_native_fence_sync EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_IMG_context_priority EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_context_flush_control EGL_KHR_create_context EGL_KHR_create_context_no_error EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image_base EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display 00:00:00.029 [render/egl.c:358] Supported EGL device extensions: EGL_EXT_device_drm EGL_EXT_device_drm_render_node 00:00:00.029 [render/egl.c:360] EGL vendor: Mesa Project 00:00:00.031 [render/gles2/renderer.c:843] Creating GLES2 renderer 00:00:00.031 [render/gles2/renderer.c:844] Using OpenGL ES 3.2 Mesa 23.1.4 00:00:00.031 [render/gles2/renderer.c:845] GL vendor: Intel 00:00:00.031 [render/gles2/renderer.c:846] GL renderer: Mesa Intel(R) UHD Graphics (CML GT2) 00:00:00.031 [render/gles2/renderer.c:847] Supported GLES2 extensions: GL_EXT_blend_minmax GL_EXT_multi_draw_arrays GL_EXT_texture_filter_anisotropic GL_EXT_texture_compression_s3tc GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_format_BGRA8888 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_stencil8 GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_EXT_draw_instanced GL_EXT_texture_sRGB_decode GL_OES_EGL_image GL_OES_depth_texture GL_AMD_performance_monitor GL_OES_packed_depth_stencil GL_EXT_texture_type_2_10_10_10_REV GL_NV_conditional_render GL_OES_get_program_binary GL_APPLE_texture_max_level GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_NV_pack_subimage GL_EXT_frag_depth GL_NV_fbo_color_attachments GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_array_object GL_OES_viewport_array GL_ANGLE_pack_reverse_row_order GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_occlusion_query_boolean GL_EXT_robustness GL_EXT_texture_rg GL_EXT_unpack_subimage GL_NV_draw_buffers GL_NV_read_buffer GL_NV_read_depth GL_NV_read_depth_stencil GL_NV_read_stencil GL_EXT_draw_buffers GL_EXT_instanced_arrays GL_EXT_map_buffer_range GL_KHR_debug GL_KHR_robustness GL_KHR_texture_compression_astc_ldr GL_NV_generate_mipmap_sRGB GL_NV_pixel_buffer_object GL_OES_depth_texture_cube_map GL_OES_required_internalformat GL_OES_surfaceless_context GL_EXT_color_buffer_float GL_EXT_debug_label GL_EXT_sRGB_write_control GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_group_vote GL_EXT_shader_implicit_conversions GL_EXT_shader_integer_mix GL_EXT_tessellation_point_size GL_EXT_tessellation_shader GL_INTEL_conservative_rasterization GL_INTEL_performance_query GL_ANDROID_extension_pack_es31a GL_EXT_base_instance GL_EXT_compressed_ETC1_RGB8_sub_texture GL_EXT_copy_image GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_gpu_shader5 GL_EXT_polygon_offset_clamp GL_EXT_primitive_bounding_box GL_EXT_render_snorm GL_EXT_shader_io_blocks GL_EXT_texture_border_clamp GL_EXT_texture_buffer GL_EXT_texture_cube_map_array GL_EXT_texture_norm16 GL_EXT_texture_view GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_KHR_context_flush_control GL_KHR_robust_buffer_access_behavior GL_NV_image_formats GL_NV_shader_noperspective_interpolation GL_OES_copy_image GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_gpu_shader5 GL_OES_primitive_bounding_box GL_OES_sample_shading GL_OES_sample_variables GL_OES_shader_io_blocks GL_OES_shader_multisample_interpolation GL_OES_tessellation_point_size GL_OES_tessellation_shader GL_OES_texture_border_clamp GL_OES_texture_buffer GL_OES_texture_cube_map_array GL_OES_texture_stencil8 GL_OES_texture_storage_multisample_2d_array GL_OES_texture_view GL_EXT_blend_func_extended GL_EXT_buffer_storage GL_EXT_float_blend GL_EXT_geometry_point_size GL_EXT_geometry_shader GL_EXT_shader_samples_identical GL_EXT_texture_sRGB_R8 GL_KHR_no_error GL_KHR_texture_compression_astc_sliced_3d GL_NV_fragment_shader_interlock GL_OES_EGL_image_external_essl3 GL_OES_geometry_point_size GL_OES_geometry_shader GL_OES_shader_image_atomic GL_EXT_clear_texture GL_EXT_clip_cull_distance GL_EXT_disjoint_timer_query GL_EXT_texture_compression_s3tc_srgb GL_MESA_shader_integer_functions GL_EXT_clip_control GL_EXT_color_buffer_half_float GL_EXT_memory_object GL_EXT_memory_object_fd GL_EXT_semaphore GL_EXT_semaphore_fd GL_EXT_texture_compression_bptc GL_EXT_texture_mirror_clamp_to_edge GL_KHR_parallel_shader_compile GL_NV_alpha_to_coverage_dither_control GL_EXT_EGL_image_storage GL_EXT_shader_framebuffer_fetch_non_coherent GL_EXT_texture_shadow_lod GL_INTEL_blackhole_render GL_MESA_framebuffer_flip_y GL_NV_compute_shader_derivatives GL_EXT_demote_to_helper_invocation GL_EXT_depth_clamp GL_EXT_texture_query_lod GL_MESA_bgra MESA-LOADER: failed to open nvidia-drm: /usr/lib/gbm/nvidia-drm_gbm.so: cannot open shared object file: No such file or directory (search paths /usr/lib/gbm, suffix _gbm) 00:00:00.049 [types/wlr_drm_lease_v1.c:715] No DRM backend supplied, failed to create wlr_drm_lease_v1_manager 00:00:00.049 [backend/headless/backend.c:67] Creating headless backend 00:00:00.049 [xwayland/sockets.c:63] Failed to bind socket @/tmp/.X11-unix/X0: Address already in use 00:00:00.070 [wayland] unable to lock lockfile /run/user/1000/wayland-1.lock, maybe another compositor is running 00:00:00.070 [backend/wayland/backend.c:432] Starting Wayland backend 00:00:00.074 [util/env.c:9] Loading WLR_NO_HARDWARE_CURSORS option: 1 00:00:00.111 [backend/headless/backend.c:17] Starting headless backend /bin/sh: line 1: discord: command not found /bin/sh: line 1: discord: command not found /bin/sh: line 1: swaync: command not found /bin/sh: line 1: /usr/lib/polkit-kde-authentication-agent-1: No such file or directory MESA-LOADER: failed to open nvidia-drm: /usr/lib/gbm/nvidia-drm_gbm.so: cannot open shared object file: No such file or directory (search paths /usr/lib/gbm, suffix _gbm) ok 00:00:00.440 [xwayland/server.c:108] Starting Xwayland on :2 libEGL warning: egl: failed to create dri2 screen libEGL warning: egl: failed to create dri2 screen MESA-LOADER: failed to open nvidia-drm: /usr/lib/gbm/nvidia-drm_gbm.so: cannot open shared object file: No such file or directory (search paths /usr/lib/gbm, suffix _gbm) MESA-LOADER: failed to open nvidia-drm: /usr/lib/gbm/nvidia-drm_gbm.so: cannot open shared object file: No such file or directory (search paths /usr/lib/gbm, suffix _gbm) The XKEYBOARD keymap compiler (xkbcomp) reports: > Warning: Unsupported maximum keycode 708, clipping. > X11 cannot support keycodes above 255. Errors from xkbcomp are not fatal to the X server DBus name already taken. Ulauncher is probably backgrounded. Did you mean `ulauncher-toggle`? MESA-LOADER: failed to open nvidia-drm: /usr/lib/gbm/nvidia-drm_gbm.so: cannot open shared object file: No such file or directory (search paths /usr/lib/gbm, suffix _gbm) 00:00:10.798 [xwayland/server.c:215] Restarting Xwayland (lazy)

It also seems as if the Intel Drivers are taking over?

Also the arch wiki seems to say that you can see which backend is being used for Nvidia (GBM or EGLStreams) using this command journalctl -b 0 --grep "renderer for" but I get no entries?

That's it for what I found today... I do have an another NVME Drive on which I'll REINSTALL THE WHOLE THING AGAIN (ffs) and see if we can find the actual buggy package by rebooting after every package install... (I hate myself, yes)

To quicken the process I'll do archinstall and a Hyprland Installer Script that I found that seems to do exactly everything I needed from Hyprland anyway (with proper Nvidia installation) so if THAT works I'll copy what that script did and see what exactly is happening.

For now I'll go and sleep 😴 See you tommorow!

If anybody got any kind of clues, then lets Kamehameha this sh*t together.

Oh and btw the Hyprland Discord (specifically the #hyprland-nvidia channel seems to be the place to report bugs?) AUR package maintainer's words: Hi all! Just want to clarify some things. a) I am not a technical support person. (UPDATE: There might actually be an issue, but I need to test it on my personal machine.) If you want help with your individual issues, please join the hyprland discord and send in a message to either #hyprland-help or #hyprland-nvidia (not linking it here because I'm unsure of the AUR linking policy).

I'll try to see if I can do something there with the devs...

Eclextic commented 1 year ago

PS: Forgot to mention that from the TTY I get errors about a seatd.sock and creating the file doesn’t solve it. Note to self: comes from the libseat/libseat.c:76 file

Eclextic commented 1 year ago

Conclusion

I’ll be blunt… sadly there doesn’t seem to be an actual solution… A fresh install with GBM_BACKEND=nvidia-drm still apparently crashes!

Why? After the Nvidia 495 driver update they switched prematurely over to the GBM Backend (which our environment variable is supposed to force) but it seems like it was to early for them… Egl-Streams‘ backend was also nuked in the latest wl-roots commits! Meaning Nvidia support is seriously limited/lacking!

There might be a way, but as it seems, this is pretty much impossible without actually fixing the bugs in the wl-roots git repo!

Solution?

I pretty much just recommend commenting out the variable to use the integrated graphics as there is no other solution…

Other apps can still be run using the Nvidia GPU with PRIME, etc. I also found out that this is actually more battery-efficient for laptops, where I expected the opposite!

If anyone considers ever trying further than what I did (don’t try downgrades, I already did) here are some links: https://github.com/hyprwm/hyprland-wiki/blob/main/pages/Configuring/Multi-GPU.md https://download.nvidia.com/XFree86/Linux-x86_64/525.53/README/gbm.html https://bbs.archlinux.org/viewtopic.php?id=282714 https://github.com/NVIDIA/egl-gbm

😣

Eclextic commented 1 year ago

PS: Forgot to mention that from the TTY I get errors about a seatd.sock and creating the file doesn’t solve it. Note to self: comes from the libseat/libseat.c:76 file

This has a simple fix: add LIBSEAT_BACKEND=logind to the /etc/environment file and reboot!

Eclextic commented 1 year ago

I actually have a question on all of you, that could be the reason for this bug… Do we all have Hybrid Graphics? Like a laptop? Can someone test it on their Desktop if possible?

MysticBytes786 commented 1 year ago

I actually have a question on all of you, that could be the reason for this bug… Do we all have Hybrid Graphics? Like a laptop? Can someone test it on their Desktop if possible?

Same issue on the desktop. I have a 1080ti and the IGPU is enabled

tchofy commented 1 year ago

Interestingly I started getting this issue now while it wasn't the case when OP and others reported this issue. Laptop gpu but no igpu, disabled by manufacturer.

TobiasB91 commented 1 year ago

There is still no fix for this issue, right?

vaxerski commented 1 year ago

I have one, go amd :trollface:

relief-melone commented 1 year ago

:/ very sad. Hyprland seemed like so much fun. Really makes me think if I should buy nvidia again. It just makes everything so hard. Guess nobody has found a workaround to make this work so far?

Eclextic commented 1 year ago

Well as far as I think what’s happening (don’t trust me on this) This only happens with systems that have multiple GPUs…

Hyprland starts up searching for your dedicated graphics card and finds your integrated one first resulting in its usage instead of the dedicated one…

It chooses that one thinking it’s Nvidia while it’s Intel‘s Graphics and calls the wrong commands causing a crash!

(That’s what I think is happening anyways…)

So hopefully (Nobody has tested this afaik on here) if you have a MUX Switch (on a laptop) or a system with no integrated graphics (AMD+Nvidia not Intel+Nvidia) then it could work…

relief-melone commented 1 year ago

Thanks for the clarification. Sounds reasonable. I am on a Laptop with integrated graphics as well as dedicated gpu. Just out of interest what is you expectation for how that story will continue will continue with Hyprland and Nvidia? What I did not completely understand. Is this a Hyprland issue because I thing at least the one setting GBM_BACKEND to nvidia also breaks my KDE Plasma environment that is on X11. (at least I think it is the same cause because changing it back resolves the issue again). I feel with having a hybrid system at least with an nvidia gpu it is still a pretty bad idea to go with wayland. Is that fair to say?

Eclextic commented 1 year ago

Going to be honest with you... I don't know... I've heard support for NVIDIA drivers is currently better on Wayland than X11, but why I can't really tell, if you're going with proprietary drivers...

AFAIK the biggest turnoff for Wayland is still the support of the applications (it has gotten considerably better, but still exists).

In a couple months, I might try to switch from Arch to something else, in hopes of finding out how to fix these issues... (Gnome+NVIDIA+Wayland supposedly works fine)

If someone already is on Gnome+Wayland (I don't know how good a VM is for this), can you print your env variables? It would interest me what the value for GBM_BACKEND is.

Eclextic commented 1 year ago

I might be onto smth guys... But I need someone to test this with a MUX Switch or smth similiar (I don't have one, lol Optimus laptop)

I recently learned that the env = ... syntax does something different if a , or an = is used (e.g. env = GBM_BACKEND,nvidia-drm or env = GBM_BACKEND=nvidia-drm ) @vaxerski Can you confirm this? (If that's correct, can we document that?)

As far as I can see an = preserves the environment variable, while a , uses it only for Hyprland launch (it gets cleared after launch).

Please someone try this

So in a last ditch effort I changed this line from env = GBM_BACKEND,nvidia-drm (with comma) to env = GBM_BACKEND=nvidia-drm and it magically launches Hyprland!

My NVIDIA card shows up on Nvtop, but my Intel card is being used. I suspect that this might just be, because of my bad Optimus experience...

lkm commented 1 year ago

As far as I can tell it makes no difference whether you have the variable set with env = GBM_BACKEND=nvidia-drm or not at all, so I suspect it's just invalid syntax. Either way I see the card in nvtop and am able to launch other apps with prime-run (see https://wiki.archlinux.org/title/PRIME#PRIME_render_offload) to use the dedicated card. Hyprland is clearly still using the Intel card.

relief-melone commented 1 year ago

What did work for me in NixOS after you mentioned the hypothesis with the instructions being sent to the intel card. I turned off offloading altogether. Unfortunately I do not know how to set it in non NixOS distros but here its basically this. Going from

# ...
  hardware.nvidia.prime = {
    enable = true;
    enableOffloadCmd = true;
  };

to

# ...
  hardware.nvidia.prime = {
    sync.enable = true;
  };

Obviously that comes with all the downsides of turning off the ingetrated gpu but at least Hyprland is working with the dedicated GPU.

TanX-009 commented 1 year ago

As far as I can tell it makes no difference whether you have the variable set with env = GBM_BACKEND=nvidia-drm or not at all, so I suspect it's just invalid syntax. Either way I see the card in nvtop and am able to launch other apps with prime-run (see https://wiki.archlinux.org/title/PRIME#PRIME_render_offload) to use the dedicated card. Hyprland is clearly still using the Intel card.

Yes I am too able to see Nvidia GPU in nvtop. I can also disable Nvidia GPU completely using supergfxctl. And now I'm also able to use prime-run for blender (Thanks for that @lkm, I thought wayland doesn't support nvidia-prime). before removing GBM_BACKEND=nvidia-drm, blender used to work smooth, now using prime-run it again works smooth

normal

blender 2023-10-05T17:48:07,114026832+05:30

prime-run

prime-run blender 2023-10-05T17:48:44,641990239+05:30

LazarusCat59 commented 11 months ago

I used to have this issue on 535 drivers, but the new driver version 545.29.02 has fixed it for me and Hyprland now starts with GBM_BACKEND=nvidia-drm.

Eclextic commented 11 months ago

@LazarusCat59 Can you try with a comma instead of an equal sign? (Like how it is in the official Hyprland documentation) GBM_BACKEND,nvidia-drm

I also got it working with an equal (NVIDIA 535 Drivers) so I don’t really know honestly if this solution actually works…

LazarusCat59 commented 11 months ago

@LazarusCat59 Can you try with a comma instead of an equal sign? (How it is in the official Hyprland documentation)

I also got it working with an equal (NVIDIA 535 Drivers) so I don’t really know honestly if this solution actually works…

Sorry, I just meant the variable's value is nvidia-drm, not anything about the syntax I used. I did use the syntax env = GBM_BACKEND,nvidia-drm. The variable is being initialized correctly and doing echo $GBM_BACKEND does give me nvidia-drm as output, so I'm pretty sure it does work. Sorry again for my lack of proper wording!

Eclextic commented 11 months ago

@LazarusCat59 Can you try with a comma instead of an equal sign? (How it is in the official Hyprland documentation)

I also got it working with an equal (NVIDIA 535 Drivers) so I don’t really know honestly if this solution actually works…

Sorry, I just meant the variable's value is nvidia-drm, not anything about the syntax I used. I did use the syntax env = GBM_BACKEND,nvidia-drm. The variable is being initialized correctly and doing echo $GBM_BACKEND does give me nvidia-drm as output, so I'm pretty sure it does work. Sorry again for my lack of proper wording!

Ok so testing myself I got it to work, but we have the problem again, that nvtop only shows my integrated graphics card and not my dedicated graphics card...

I want to say, Hyprland feels more responsive though, but I feel like I'm experiencing the Placebo effect...

I'll test further!

Eclextic commented 11 months ago

Abort! I said abort!!!

Upon further testing, it seems like the whole 545 Drivers just make it my graphics card stop working!!! Either with or without the environment variable, my GPU doesn't show up!!!

I repeat don't install this, downgrade! Prime (prime-run) also stopped working and it seems like running games without prime will just run them on the iGPU... (With 545 Drivers I got 240 fps on a 2D game, with the 535 Drivers using prime-run more than 480 fps....)

I downgraded... Something is wrong with those drivers for me...

LazarusCat59 commented 11 months ago

I repeat don't install this, downgrade! Prime (prime-run) also stopped working and it seems like running games without prime will just run them on the iGPU... (With 545 Drivers I got 240 fps on a 2D game, with the 535 Drivers using prime-run more than 480 fps....)

Ah I myself am not really having those issues, I do have the GPU show up perfectly fine and I can play games pretty fine (excluding issues I already had on older drivers). So I guess it might just be different experience for different people.

abmantis commented 9 months ago

I've updated to 545 and env = GBM_BACKEND,nvidia-drm now works. But I see no changes with or without it.

Eclextic commented 9 months ago

I've updated to 545 and env = GBM_BACKEND,nvidia-drm now works. But I see no changes with or without it.

Try launching a GPU application without passing in prime-run... Does it automatically utilize the GPU? (Blender, A game, Firefox with WebGPU, etc.)

abmantis commented 9 months ago

I've updated to 545 and env = GBM_BACKEND,nvidia-drm now works. But I see no changes with or without it.

Try launching a GPU application without passing in prime-run... Does it automatically utilize the GPU? (Blender, A game, Firefox with WebGPU, etc.)

I don't use prime-run to lunch apps. They all run on the Intel GPU. The external display is wired to the Nvidia GPU in this laptop.

SolDev69 commented 7 months ago

Still an issue on latest drivers. glx works but es2_info still shows mesa and eglinfo says that were still using integrated graphics