Wayland + Nvidia - No Signal Black Screen on Login

Hi all, a while ago I had started my Linux journey (in a more serious way, on my main PC) with EndeavourOS. I had a great time with it, but kept running into system breakages as a relative noob by installing unstable updates and throwing caution to the wind with the AUR.

I could also never get Wayland to work, in spite of my best efforts.

What I mean by this is - I’d switch to Wayland on the login screen, and after logging in, I’d be greeted with a black screen and eventual “no signal detected” from my monitors. No amount of key combinations to reboot, switch to a TTY, etc. would do anything. Only a hard reboot would get me back, and I could only get back into the system by switching back to X11.

I switched to Fedora (KDE version) for a while, and I had the same experience with Wayland not working. It was more stable for a while…until randomly during use every screen would go black and the system would be nonresponsive and require a hard reboot - again this is in X11. So much for “Fedora is stable.”

Decided to give OpenSUSE a go, and it seemed promising! Wasn’t a fan of YaST, but Wayland seemed to work. And then on reboot I suddenly got whisked into icewm and KDE just entirely failed to load. Didn’t feel like troubleshooting it beyond that - after 24 hours I gave up on that distro.

So I decided maybe it was time to go back to EndeavourOS - I know it’d received some updates since my last use of it, and I am marginally (just barely) a bit wiser about not installing updates impulsively.

I did a fresh install, and chose systemd-boot instead of grub.

Everything seemed nice - on X11 at least. Refreshed my memory on initial steps and package installers, enabled Bluetooth, added Flatpak, installed Baum just in case (will try to force myself to use terminal over GUI for packages, but wanted a tool for searching at least), etc.

Installed the proprietary Nvidia drivers as well, was very obsessively-careful that I did this right. The “new” nvidia-inst -t command seemed to make this much easier.

Finally, time to try Wayland, right? I installed it, and then logged out and switched to it from the login screen - worked great. Got stuff setup, was excited.

On reboot? Back to the original problem. Black screen after login. I have tried so much troubleshooting. I have asked ChatGPT for help, perused this forum, Reddit, the ArchWiki, and random sites online.

I can verify the following. On entering sudo cat /sys/module/nvidia_drm/parameters/modeset in Konsole, I get Y in response.

I’ve edited /etc/environment and it is currently configured as follows:

#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
QT_QPA_PLATFORMTHEME="wayland;xcb"
GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia
ENABLE_VKBASALT=1
LIBVA_DRIVER_NAME=nvidia
WLR_NO_HARDWARE_CURSORS=1
#QT_STYLE_OVERRIDE=kvantum
BROWSER=firefox
EDITOR=nano

I saw mentions of editing grub, but those configuration files are obviously not on my system since I am using systemd. So after some digging I think I found the correct location - /etc/kernel/cmdline - it reads as follows:

nvme_load=YES nowatchdog rw rootflags=subvol=/@ root=UUID=c7a23b03-2871-497d-8f14-05e51b72801c nvidia-drm.modeset=1

I kept seeing mentions of building “intramfs” and the “usual” commands I saw online indicated no presence of such folder/files on my system. Seems my system might be using “dracut” - such a folder does exist in my /etc/ directory, so I followed some conversations and did what some folks there had done, and created a “custom.conf” under /etc/dracut.conf.d. It reads:

kernel_cmdline="nvidia_drm.modeset=1"
add_drivers+=” nvidia nvidia-drm nvidia-modeset nvidia-uvm ”

I then ran dracut -f to rebuild, as I’d seen explained. I also saw that sudo reinstall-kernels was possibly needed - did that too.

Nothing has worked. I get the same issue every single time I choose Wayland from the login screen. Here is the result of running pacman -Q | grep -e wayland (saw this online for some troubleshooting):

egl-wayland 2:1.1.13-1
kwayland-integration 5.27.10-1
kwayland5 5.115.0-1
plasma-wayland-session 5.27.10-2
qt5-wayland 5.15.12+kde+r61-1
wayland 1.22.0-1
wayland-utils 1.2.0-1
xorg-xwayland 23.2.4-2

For reference, my hardware is as follows:

AMD Ryzen 7 7700X
Nvidia GeForce RTX 4090
64GB DDR5 RAM
1TB PCIe 5.0 M.2 SSD (For Linux; Separate One for Windows Dual-Boot)

I also have three monitors - one primary 4K, two side 1080p monitors. The 4K one is 120Hz capable, the two side ones are 75Hz capable.

Would super-appreciate any assistance for this. It has been plaguing me since early 2022. I’ve been excited to try out KDE Plasma 6 and Wayland and finally maybe even enjoy HDR on Linux! But I have been stymied. :frowning:

I’ve seen others end threads with no resolution to this, or people’s unhelpful guidance be “run X11” and “use AMD” - hoping to get to a real solution here and hopefully this can be a guide for others too!

I’m rather frustrated but hoping I’ve just overlooked something silly, and maybe optimistic, haha.

Thank you in advance if you read my text wall and have the patience to help me out!

2 Likes

I’ve been using Wayland on nvidia for a long time on EOS. No issues.

Edit: I can give you what ever info i can to compare. If you did a fresh install you shouldn’t need to do anything really. There might be one file i installed?

Oh that would be great! It was a fresh install, yep! Initially, all I did was install the Nvidia drivers and Wayland - the other finagling I did when things didn’t work.

Perhaps I need to install something else for the Nvidia drivers or Wayland?

I don’t know if it makes any difference, but the primary display is using an HDMI 2.1 port.

I have no problems on X11 (or on Windows, for that matter).

First off are you using grub or systemd-boot. I’m using grub and my grub command line is;

GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES nvidia-drm.modeset=1 loglevel=3'

Using systemd-boot (should I not be?) - mentioned above that my “command line” is:

nvme_load=YES nowatchdog rw rootflags=subvol=/@ root=UUID=c7a23b03-2871-497d-8f14-05e51b72801c nvidia-drm.modeset=1

Not sure if that’s the same/analogous thing?

I’m not an expert on systemd-boot but i think it looks normal. Can i see the output for inxi -Ga

Not sure if you did any set up for vainfo or vdpau for acceleration which shouldn’t have anything to do with the black screen if you haven’t. Mine is all setup according the the Arch wiki. Not sure it’s correct but i have configured it anyway. But again it shouldn’t have anything to do with the black screen.

[ricklinux@asus-tuff ~]$ pacman -Qs nvidia
local/egl-wayland 2:1.1.13-1
    EGLStream-based Wayland external platform
local/lib32-nvidia-utils 550.54.14-1
    NVIDIA drivers utilities (32-bit)
local/libva-nvidia-driver 0.0.11-1
    VA-API implementation that uses NVDEC as a backend
local/libvdpau 1.5-2
    Nvidia VDPAU library
local/nvidia-dkms 550.54.14-2
    NVIDIA drivers - module sources
local/nvidia-hook 1.5-1
    pacman hook for nvidia
local/nvidia-inst 23.1-1
    Script to setup nvidia drivers (dkms version) in EndeavourOS
local/nvidia-utils 550.54.14-2
    NVIDIA drivers utilities
[ricklinux@asus-tuff ~]$ 
[ricklinux@asus-tuff ~]$ pacman -Q | grep -e wayland
egl-wayland 2:1.1.13-1
kwayland-integration 5.27.10-1
kwayland5 5.115.0-1
lib32-wayland 1.22.0-1
plasma-wayland-session 5.27.10-2
qt5-wayland 5.15.12+kde+r61-1
wayland 1.22.0-1
wayland-utils 1.2.0-1
xorg-xwayland 23.2.4-2
[ricklinux@asus-tuff ~]$ 

Sure thing, the output is:

Graphics:
  Device-1: NVIDIA AD102 [GeForce RTX 4090] driver: nvidia v: 550.54.14
    alternate: nouveau,nvidia_drm non-free: 545.xx+
    status: current (as of 2024-02) arch: Lovelace code: AD1xx
    process: TSMC n4 (5nm) built: 2022+ pcie: gen: 1 speed: 2.5 GT/s lanes: 16
    link-max: gen: 4 speed: 16 GT/s ports: active: none
    off: DP-2,DP-3,HDMI-A-1 empty: DP-1 bus-ID: 01:00.0 chip-ID: 10de:2684
    class-ID: 0300
  Device-2: Logitech Logitech Webcam C925e driver: snd-usb-audio,uvcvideo
    type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-4.1.4:7
    chip-ID: 046d:085b class-ID: 0102 serial: 947C2EEF
  Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.4
    compositor: kwin_x11 driver: X: loaded: nvidia unloaded: modesetting
    alternate: fbdev,nouveau,nv,vesa gpu: nvidia,nvidia-nvswitch
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 6000x2160 s-dpi: 101 s-size: 1508x543mm (59.37x21.38")
    s-diag: 1603mm (63.1")
  Monitor-1: DP-2 note: disabled pos: bottom-l model: Acer SB220Q
    serial: 2423261942 built: 2019 res: 1080x1920 hz: 75 dpi: 102 gamma: 1.2
    size: 268x476mm (10.55x18.74") diag: 546mm (21.5") ratio: 16:9 modes:
    max: 1920x1080 min: 640x480
  Monitor-2: DP-3 mapped: DP-4 note: disabled pos: bottom-r
    model: Acer SB220Q serial: 2423259539 built: 2019 res: 1080x1920 hz: 75
    dpi: 102 gamma: 1.2 size: 268x476mm (10.55x18.74") diag: 546mm (21.5")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  Monitor-3: HDMI-A-1 mapped: HDMI-0 note: disabled pos: primary,top-center
    model: PG42UQ serial: N8LMTF071258 built: 2022 res: 3840x2160 dpi: 106
    gamma: 1.2 size: 920x520mm (36.22x20.47") diag: 1055mm (41.5") ratio: 16:9
    modes: max: 3840x2160 min: 640x480
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.54.14
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce RTX 4090/PCIe/SSE2
    memory: 23.43 GiB
  API: Vulkan v: 1.3.276 layers: 1 device: 0 type: discrete-gpu
    name: NVIDIA GeForce RTX 4090 driver: nvidia v: 550.54.14
    device-ID: 10de:2684 surfaces: xcb,xlib

I had not done anything with “vainfo” or “vdpau” - honestly just ran nvidia-inst and then later I tried the commands on I think the Arch Wiki for Nvidia pertaining to the latest GPUs, and it just said it was already installed.

I ran pacman -Qs nvidia and my output for that is:

local/egl-wayland 2:1.1.13-1
    EGLStream-based Wayland external platform
local/libvdpau 1.5-2
    Nvidia VDPAU library
local/libxnvctrl 550.54.14-1
    NVIDIA NV-CONTROL X extension
local/nvidia-dkms 550.54.14-2
    NVIDIA drivers - module sources
local/nvidia-hook 1.5-1
    pacman hook for nvidia
local/nvidia-inst 23.1-1
    Script to setup nvidia drivers (dkms version) in EndeavourOS
local/nvidia-settings 550.54.14-1
    Tool for configuring the NVIDIA graphics driver
local/nvidia-utils 550.54.14-2
    NVIDIA drivers utilities

Ya i was missing nvidia settings. I also have the 32 bit lib files installed.

So I do want to get rid of “nvidia-settings” then, haha?

What’s the “lib32” stuff? I see that on both your Wayland and Nvidia outputs - is that needed for me?

It’s only needed if you play steam games or use Wine etc. I just install it all not that i use it.
Edit: It’s not causing the black screen.

Have you tried sddm-git instead of sddm

Edit:If not you could try it.

yay -S sddm-git

It will automatically remove sddm and install sddm-git. Then see after reboot if you can log into wayland.

Oh OK - I do use Steam so I suppose I would need it.

I have not tried sddm-git - will do!

Also, don’t know if this matters - I disabled my iGPU in my BIOS (AMD’s latest lineup has them now).

Oh so the ryzen has amdgpu?

Yep! Since the Ryzen 7xxx series even the main lineup has them now. But it’s been disabled in BIOS and I think I blacklisted all integrated GPUs in EndeavourOS…somewhere…

I think i would try un-blacklisting it and enabling it just to see if it makes any difference. Then if you can log in run inxi -Ga and see which gpu it’s rendering on. Because normally the integrated graphics you have to use the onboard hdmi port if this is a desktop board in order to use it. So if you are connected via the nvidia card by way of hdmi or dp then it shouldn’t matter that the amdgpu is enabled.

Oh OK - should I holdoff on the “sddm-git” until I give that a try?

Yes…