mirror of
https://github.com/Heretek-AI/fedora-nvidia-kernel-7.4-fix.git
synced 2026-11-07 10:45:57 -10:00
main
fedora-nvidia-kernel-7.4-fix
Fixes the missing login screen (SDDM), akmod-nvidia compilation failures, and KDE Plasma Wayland desktop failing to load after login on Fedora Rawhide (Fedora 46+) and Linux kernel 7.4+ with NVIDIA GPUs (akmod-nvidia / nvidia-drm).
Symptoms
After upgrading to Linux 7.4.0-rc0+ kernels on Fedora Rawhide:
- Missing Login Screen: Your monitor stays black or drops to a text console on
tty1instead of displaying the SDDM login screen. - Desktop Does Not Load After Login:
- Authenticating via PAM on
tty1startsstartplasma-wayland, but the monitor remains blank. - Switching to
tty2–tty6only opens a text shell.
- Authenticating via PAM on
akmodsBuild Fails on Upstream Changes:- Kernel
7.4.0-0.rc0.261026+:akmods: Building and installing nvidia-kmod [FAILED] nvidia-drm/nvidia-drm-drv.c:67:10: fatal error: drm/drm_fb_helper.h: No such file or directory 67 | #include <drm/drm_fb_helper.h> | ^~~~~~~~~~~~~~~~~~~~~ - Kernel
7.4.0-0.rc0.261028+:nvidia-uvm/uvm_hmm.c:4040:29: error: ‘VM_SPECIAL’ undeclared (first use in this function) 4040 | (vma->vm_flags & VM_SPECIAL) || | ^~~~~~~~~~ nvidia-uvm/uvm_hmm.c:4042:12: error: implicit declaration of function ‘is_vm_hugetlb_page’ 4042 | is_vm_hugetlb_page(vma); | ^~~~~~~~~~~~~~~~~~
- Kernel
nvidia-fallback.serviceloadsnouveau, causingkwin_waylandERANGE:systemd[1]: Starting nvidia-fallback.service - Fallback to nouveau as nvidia did not load... sddm[...]: The configured theme "01-breeze-fedora" doesn't exist, using the embedded theme instead sddm-helper-start-wayland[...]: "kwin_wayland_drm: Failed to create framebuffer: Numerical result out of range" sddm-greeter-qt6[...]: There are no outputs - creating placeholder screen
Root Causes
flowchart TD
A["Linux 7.4-rc0 Kernel Updates"] --> B["Header Move: drm_fb_helper.h -> clients/drm_fbdev_helper.h"]
A --> C["MM API Cleanup: VM_SPECIAL & is_vm_hugetlb_page removed"]
B --> D["nvidia-drm-drv.c fails compilation"]
C --> E["nvidia-uvm/uvm_hmm.c fails compilation"]
D --> F["akmods fails to build kmod-nvidia"]
E --> F
F --> G["nvidia-fallback.service loads nouveau"]
G --> H["kwin_wayland fails DRM framebuffer (ERANGE: Numerical result out of range)"]
H --> I["KWin creates headless placeholder screen (0 physical outputs)"]
I --> J["SDDM Greeter & KDE Plasma Wayland render to invisible placeholder (Blank Screen)"]
- Kernel DRM Header Move (
<drm/drm_fb_helper.h>→<drm/clients/drm_fbdev_helper.h>): Upstream movedinclude/drm/drm_fb_helper.htoinclude/drm/clients/drm_fbdev_helper.h. Bothnvidia-drm/nvidia-drm-drv.candconftest.shinnvidia-kmod(<= 615.78.08) unconditionally include<drm/drm_fb_helper.h>, breaking build. - Kernel MM API Removals (
VM_SPECIALandis_vm_hugetlb_page): In7.4.0-0.rc0.261028+:VM_SPECIALwas removed from<linux/mm.h>.is_vm_hugetlb_page()was removed from<linux/hugetlb.h>/<linux/hugetlb_inline.h>in favor ofvma_is_hugetlb().nvidia-uvm/uvm_hmm.cfails compilation when calling these macros.
nouveauFallback + NVIDIA Userspace Libraries Breakkwin_wayland_drm: Whennvidia.kofails to load,nvidia-fallback.serviceloadsnouveau. Withxorg-x11-drv-nvidia-libsinstalled,kwin_waylandfails DRM framebuffer creation withNumerical result out of range(ERANGE) and falls back to a virtual headless placeholder screen (There are no outputs - creating placeholder screen), leaving both SDDM and the user's Plasma Wayland desktop invisible.- Missing
01-breeze-fedoraSDDM Theme: During Fedora KDE Plasma upgrades,sddm-breezemay be absent whiledisplay-manager.servicestill points tosddm.service.
Quick Start (One-Command Fix)
Clone the repository from a TTY (Ctrl+Alt+F3) or SSH session and run the repair script:
git clone https://github.com/Heretek-AI/fedora-nvidia-kernel-7.4-fix.git
cd fedora-nvidia-kernel-7.4-fix
sudo ./fix-nvidia-sddm.sh
Or run directly with curl:
curl -fsSL https://raw.githubusercontent.com/Heretek-AI/fedora-nvidia-kernel-7.4-fix/main/fix-nvidia-sddm.sh | sudo bash
Read-Only Diagnosis
To inspect your system without making any changes:
./fix-nvidia-sddm.sh --diagnose
What fix-nvidia-sddm.sh Does
- Restores
<drm/drm_fb_helper.h>Compatibility: Creates relative symlinksinclude/drm/drm_fb_helper.h -> clients/drm_fbdev_helper.hacross all installed Linux 7.4+/usr/src/kernels/*trees. - Installs Persistent Kernel Hooks:
- Installs
/etc/kernel/install.d/90-nvidia-drm-fb-helper-compat.installso Fedora'skernel-installruns the link before95-akmodsposttrans.install. - Installs
/etc/kernel/postinst.d/99-nvidia-drm-fb-helper-compatfor fallback package managers.
- Installs
- Patches
akmodsSource Package: Updates/usr/src/akmods/nvidia-kmod.latestwith both the DRM fbdev helper and UVMVM_SPECIAL/hugetlbcompatibility patches, allowingakmodsto compile cleanly for any future kernel build. - Rebuilds & Installs
kmod-nvidia: Runsakmods --force --kernels <kver>anddepmod -a(or installs matching prebuilt RPMs). - Restores
sddm-breeze: Ensures the01-breeze-fedoraSDDM theme is installed whensddm.serviceis active. - Activates
nvidia_drm: Attempts to unloadnouveauand startnvidia_drm(modeset=1) +sddm.servicelive, or prompts forsudo systemctl rebootifnouveauis bound to the kernel framebuffer (fb0).
Repository Contents
| Path | Description |
|---|---|
fix-nvidia-sddm.sh |
Diagnostic (--diagnose) and automated repair script for Fedora / Linux 7.4+ |
hooks/90-nvidia-drm-fb-helper-compat.install |
/etc/kernel/install.d/ hook for Fedora kernel-install |
hooks/99-nvidia-drm-fb-helper-compat |
/etc/kernel/postinst.d/ hook fallback |
patches/nvidia-drm-linux-7.4-fbdev-helper.patch |
Clean patch for nvidia-drm-drv.c and conftest.sh using __has_include(<drm/clients/drm_fbdev_helper.h>) |
patches/nvidia-uvm-linux-7.4-vm-special-hugetlb.patch |
Compatibility patch for nvidia-uvm/uvm_hmm.c restoring VM_SPECIAL and is_vm_hugetlb_page shims |
LICENSE |
MIT License |
Description
Fix missing SDDM login screen & KDE Plasma Wayland desktop on Fedora Rawhide / Linux 7.4+ with NVIDIA (drm_fb_helper.h -> clients/drm_fbdev_helper.h akmods fix)
Readme
MIT
42 KiB
0 Stars
1 Watchers
0 Forks
Languages
Shell
100%