Skip to content

Instantly share code, notes, and snippets.

@pantor
Last active September 18, 2025 04:26
Show Gist options
  • Save pantor/9786c41c03a97bca7a52aa0a72fa9387 to your computer and use it in GitHub Desktop.
Save pantor/9786c41c03a97bca7a52aa0a72fa9387 to your computer and use it in GitHub Desktop.
Installing NVIDIA drivers on a realtime Linux (PREEMPT-RT)
# Tested on Ubuntu 16.04 and X11, 2019
# 1. Download NVIDIA driver as a .run file
# 2. Stop X-Server
sudo service lightdm stop
# 3. Blacklist Nouveau driver
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
# Insert into file:
# blacklist nouveau
# options nouveau modeset=0
# 4. Update kernel initramfs
sudo update-initramfs -u
sudo reboot # I'm not sure if needed
# 5. Install driver!
sudo IGNORE_PREEMPT_RT_PRESENCE=1 bash <*>.run # Insert downloaded .run file
# 6. Reboot
sudo reboot
@hwmanager
Copy link

it worked on the same setting, Ubuntu 22.04 with 5.15.0-1081-realtime kernel and nvida-535. thx bro

@yaoweixiao-ux
Copy link

Hi ALL how did I get 5.15.0-1081-realtime or 5.15.0-1072-realtime kernel
I can't find this two version in following 2 URL
https://www.kernel.org/pub/linux/kernel/
https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/5.15/older/

@yaoweixiao-ux
Copy link

@hwmanager
Copy link

hwmanager commented May 20, 2025

@yaoweixiao-ux

There was a misunderstanding.
i mean a realtime kernel with a ubuntu pro kernel

@racarla96
Copy link

Works correctly with IGNORE_PREEMPT_RT_PRESENCE=1 and nvidia-driver-545=545.29.06-0ubuntu5, on Ubuntu 24.04 and (6.8.0-rc5-rt4).

cat /etc/modprobe.d/nvidia-graphics-drivers-kms.conf # This file was generated by nvidia-driver-545 # Set value to 0 to disable modesetting options nvidia-drm modeset=1 fbdev=1

[ 2.705146] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 545.29.06 Thu Nov 16 01:59:08 UTC 2023

How can I install kernel 6.8.0-rc5-realtime-sunlight1-rt4?

@ionutnechita
Copy link

Hi @racarla96,

Are you looking to install the realtime version from the 6.8 branch? I'd be happy to help you get it set up properly.
To provide you with the most accurate guidance, could you please share some details about your current setup:

Your current Linux distribution and version
Hardware specifications (CPU architecture, etc.)
What specific realtime features you're planning to use
Any particular use case or application you have in mind

As the author and maintainer of the Sunlight Linux kernel, I can provide you with detailed installation instructions, configuration recommendations, and help troubleshoot any issues you might encounter during the process.
For more efficient communication and detailed technical support, feel free to reach out to me directly at: [email protected]
This way we can have a more streamlined conversation and I can provide you with personalized assistance based on your specific needs.

Best regards,
Ionut Nechita
ionutnechita
Sunlight Developer Kernel - AMD/Intel Lowlatency Platform

@spookyfirehorse
Copy link

yes with the runfil is it possible to install nvidia-driver on 6.12 rt kernel !!

but when you install cuda with runfile and compile ffmpeg --eenable-cuda-nvcc the error is nvcc not found

when i install nvidia-cuda-toolkit wih apt without repro from nvidia nvcc was found

but when i install cuda with apt i must install nvidia-driver also and than i have no realtime kernel

regards spooky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment