LightDM black screen after boot with Nvidia and i3 spin

Hi,
I have recently installed Fedora 38 - I3 spin on my laptop and it have been working greatly. Until I try to install nvidia drivers from rpmfusion. Installation goes fine, but after few restarts the problems starts to show. After selecting kernel version from GRUB boot menu and plymounth graphical boot, instead of LightDM the screen goes black without cursor.

The only way to fix it is switching to different tty, deleting all of nvidia drivers (sudo dnf remove *nvidia*) and rebooting again.

Any suggestions on fixing, or atleast debugging this?
Thanks.

Please post the output of dnf repolist and inxi -Fzxx

inxi -Fzxx

System:
  Kernel: 6.2.14-300.fc38.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.39-9.fc38 Desktop: i3 v: 4.22 dm: LightDM Distro: Fedora release 38
    (Thirty Eight)
Machine:
  Type: Laptop System: Dell product: G3 3579 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: Dell model: 0H5G44 v: A07 serial: <superuser required> UEFI: Dell
    v: 1.23.0 date: 09/20/2022
Battery:
  ID-1: BAT0 charge: 24.0 Wh (59.4%) condition: 40.4/55.9 Wh (72.2%)
    volts: 15.5 min: 15.2 model: LGC-LGC3.553 DELL 81PF3 serial: <filter>
    status: discharging
CPU:
  Info: quad core model: Intel Core i5-8300H bits: 64 type: MT MCP
    arch: Coffee Lake rev: A cache: L1: 256 KiB L2: 1024 KiB L3: 8 MiB
  Speed (MHz): avg: 2112 high: 2300 min/max: 800/4000 cores: 1: 2300 2: 2300
    3: 2300 4: 2300 5: 800 6: 2300 7: 2300 8: 2300 bogomips: 36799
  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: Dell
    driver: i915 v: kernel arch: Gen-9.5 ports: active: eDP-1 empty: DP-1,
    DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:3e9b
  Device-2: NVIDIA GP107M [GeForce GTX 1050 Ti Mobile] vendor: Dell
    driver: nvidia v: 530.41.03 arch: Pascal pcie: speed: 2.5 GT/s lanes: 8
    ports: active: none empty: HDMI-A-3 bus-ID: 01:00.0 chip-ID: 10de:1c8c
  Device-3: Sunplus Innovation Integrated_Webcam_HD type: USB
    driver: uvcvideo bus-ID: 1-5:2 chip-ID: 1bcf:28c1
  Display: x11 server: X.Org v: 1.20.14 compositor: Picom v: 10 driver: X:
    loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa alternate: nv
    dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96
  Monitor-1: eDP-1 model: BOE Display 0x07b0 res: 1920x1080 dpi: 142
    diag: 395mm (15.5")
  API: OpenGL v: 4.6 Mesa 23.0.3 renderer: Mesa Intel UHD Graphics 630 (CFL
    GT2) direct-render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Dell driver: snd_hda_intel
    v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a348
  Device-2: NVIDIA GP107GL High Definition Audio driver: snd_hda_intel
    v: kernel pcie: speed: 2.5 GT/s lanes: 8 bus-ID: 01:00.1 chip-ID: 10de:0fb9
  API: ALSA v: k6.2.14-300.fc38.x86_64 status: kernel-api
  Server-1: PipeWire v: 0.3.70 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:a370
  IF: wlo1 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Dell driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: 3000 bus-ID: 03:00.0 chip-ID: 10ec:8168
  IF: enp3s0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB
    driver: btusb v: 0.8 bus-ID: 1-14:5 chip-ID: 8087:0aaa
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Drives:
  Local Storage: total: 1.03 TiB used: 33.73 GiB (3.2%)
  ID-1: /dev/nvme0n1 vendor: Toshiba model: KBG30ZMS128G NVMe 128GB
    size: 119.24 GiB speed: 15.8 Gb/s lanes: 2 serial: <filter> temp: 37.9 C
  ID-2: /dev/sda vendor: Seagate model: ST1000LM035-1RK172 size: 931.51 GiB
    speed: 6.0 Gb/s serial: <filter>
Partition:
  ID-1: / size: 107.95 GiB used: 11.43 GiB (10.6%) fs: ext4
    dev: /dev/nvme0n1p3
  ID-2: /boot size: 3.86 GiB used: 241.6 MiB (6.1%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 1022 MiB used: 17.4 MiB (1.7%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 915.82 GiB used: 22.05 GiB (2.4%) fs: ext4
    dev: /dev/sda1
Swap:
  ID-1: swap-1 type: partition size: 4 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p4
  ID-2: swap-2 type: zram size: 7.6 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 45.0 C pch: 46.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 241 Uptime: 3m Memory: 7.6 GiB used: 1012.4 MiB (13.0%)
  Init: systemd v: 253 target: graphical (5) default: graphical Compilers:
  gcc: 13.1.1 Packages: pm: rpm pkgs: N/A note: see --rpm Shell: Zsh v: 5.9
  running-in: kitty inxi: 3.3.26

dnf repolist

repo id                        repo name
1password                      1Password Stable Channel
code                           Visual Studio Code
fedora                         Fedora 38 - x86_64
fedora-cisco-openh264          Fedora 38 openh264 (From Cisco) - x86_64
fedora-modular                 Fedora Modular 38 - x86_64
rpmfusion-free                 RPM Fusion for Fedora 38 - Free
rpmfusion-free-updates         RPM Fusion for Fedora 38 - Free - Updates
rpmfusion-nonfree              RPM Fusion for Fedora 38 - Nonfree
rpmfusion-nonfree-updates      RPM Fusion for Fedora 38 - Nonfree - Updates
updates                        Fedora 38 - x86_64 - Updates
updates-modular                Fedora Modular 38 - x86_64 - Updates

Now may we also see the output of dnf list installed '*nvidia*' and cat /etc/kernel/cmdline

The only repo I see that may be questionable is the 1password repo.

The inxi output tells me you are using the integrated graphics and not the nvidia gpu? That may be part of the problem since the dGPU is not active with the current config.

If you wish the best and full time performance from the nvidia GPU the instructions on how to configure that are here. Those instructions make it possible for the nvidia dGPU to manage both the internal screen as well as an external screen. By default nvidia normally only manages an external screen. You are already using xorg for the DE so that should work properly for you.

I found another way to get LightDM to show without uninstalling nvidia drivers. By logging to another tty and restarting the LightDM service. Also I do not want to nvidia to manage my internal screen, due to the battery drain, having it only manage external displays is fine by me.

dnf list installed '*nvidia*'

Installed Packages
akmod-nvidia.x86_64                                          3:530.41.03-1.fc38                    @rpmfusion-nonfree
kmod-nvidia-6.2.14-300.fc38.x86_64.x86_64                    3:530.41.03-1.fc38                    @@commandline     
nvidia-settings.x86_64                                       3:530.41.03-1.fc38                    @rpmfusion-nonfree
xorg-x11-drv-nvidia.x86_64                                   3:530.41.03-1.fc38                    @rpmfusion-nonfree
xorg-x11-drv-nvidia-cuda-libs.x86_64                         3:530.41.03-1.fc38                    @rpmfusion-nonfree
xorg-x11-drv-nvidia-kmodsrc.x86_64                           3:530.41.03-1.fc38                    @rpmfusion-nonfree
xorg-x11-drv-nvidia-libs.x86_64                              3:530.41.03-1.fc38                    @rpmfusion-nonfree
xorg-x11-drv-nvidia-power.x86_64                             3:530.41.03-1.fc38                    @rpmfusion-nonfree

cat /etc/kernel/cmdline

root=UUID=d7a40ae7-bc5b-4169-9eab-386d245e85ac ro resume=UUID=fe71b767-6d19-4fb9-babc-3b3dd83964c4 rhgb quiet rd.driver.blacklist=nouveau modprobe.blacklist=nouveau

Your previous uninstall of nvidia appears to have also removed the nvidia-gpu-firmware package.
It may be reinstalled by either dnf reinstall linux-firmware or explicitly by dnf install nvidia-gpu-firmware

Following that install then reboot so the proper firmware is loaded for that gpu.

My laptop is newer than yours and also optimus.
With the nvidia GPU set as primary and apps running with ~20% CPU load full time I still get more than 3 hours battery life. When the laptop is less loaded I get up to 6 hours life. I can live with the slight battery life reduction to have the improved graphics on screen.

Neither reinstalling explicitly or by reinstalling linux-firmware fixed the problem. The only hint i see about the problem now is that after restarting lightdm service, only thing that blinks is Failed starting service nvidia-powerd or something like that.

The nvidia-powerd warning is only that. It tells you the nvidia-powerd service is unable to start because the GPU is not supported by that service. Totally benign and can be ignored.

You can see the result of the firmware install by repeating the dnf list installed '*nvidia*' command, which should now show the nvidia-gpu-firmware package in that list.

I cannot assist further with LightDM as I have no experience with it directly.

It is kinda interesting that only nvidia drivers installed can cause this kind of problems. I have looked through journalctl and logs in /var/log/ that seemed relevant but nothing looked wrong. Only errors were the one with the nvidia-powerd service, which I found that it’s intentional.

Will try to set the nvidia gpu as primary to see if it fixes anything or will stick to noveau drivers.

Thanks for the help tho

You did not want nvidia as primary.
Simply follow all those instructions except do not edit the nvidia.conf file after copying it into the /etc/X11/xorg.conf.d/ directory and it will allow use of the nvidia gpu at users choice but not making it primary. The editing and adding that line into the file is actually what makes the gpu act as primary.

Once that file is in place and the user has rebooted then a right click on a desktop icon should bring up a menu to select using the dedicated gpu for that app if the user chooses.

After doing that, nothing has changed.

I’m guessing this is problem with LightDM, because on my previous instalation (f37 with GDM) did just fine with working with nvidia drivers.

I am having the same problem. Changing to a different ty i can run “sudo systemctl restart lightdm” and it gives me a login screen and everything works fine. I have tried everything I can find online with no luck.

I know it’s kinda old discussion at this point but for the future people who might find it.
I have the same problem with fedora everything 40 with awesome wm and lightdm. what I found is running grub2-mkconfig after every kernel update kinda solve the problem? I’m still not sure but I definitely see much much it less now. cause it doesn’t happen every time. I found an arch linux thread talking about changing the order of loading kernel modules but I don’t know these things tbh. but it’s definitely related to nvidia modules not loading sometimes.

You are correct about this being an old thread and you should have started your own.

However, the comments you make seem to indicate you may be using grub2-mkconfig with a command similar to grub2-mkconfig -o /boot/efi/EFI/fedora/grub .cfg.
This does work since that file is the first that grub looks at, but was changed with about fedora 34 release to become a pointer to redirect grub to the actual grub.cfg file at /boot/grub2/grub.cfg. The correct command is thus grub2-mkconfig -o /boot/grub2/grub.cfg

Once /boot/efi/EFI/fedora/grub .cfg has been overwritten and is no longer the default pointer file then the system updates cannot automatically keep it in sync when a new kernel is installed (the updates only change /boot/grub2/grub.cfg)

A fix to restore automatic updates of the grub.cfg file is to

  1. sudo rm /boot/grub2/grub.cfg /boot/efi/EFI/fedora/grub.cfg to remove the old files
  2. sudo reinstall grub2-common which will rebuild both those files properly

If you look at the output of ls -ld /etc/grub2* you will see two links that both point to the same file ( /boot/grub2/grub.cfg).

I am closing this thread and if you are still having problems after reading and following these instructions then please open a new thread for your current issue.