This driver was discontinued at the end of 2017 and since then Nvidia has not released any more security updates. If this is a concern, I recommend using nouveau or updating your hardware.
The machine I was using for testing has had problems since then, and I can't physically test if it's working; I can only test if the packages are building.
This repository contains fixed packages and patches to use the Nvidia 304.137 driver on newer Linux distros
Inside each distribution folder you will find tutorials for generating the packages and installing the driver
You can use any desktop environment that hasn't made too drastic changes over the years
For example: XFCE, LXQT with the Openbox or XFWM4 window manager, and others.
NOTE: When using XFCE or XFWM4 as your window manager, run the command described in the issues.
Debian
- 12/13?/Sid(tested on unstable 2024/07/02)
Ubuntu
- 22.04/24.04
Mageia
- 9?
Archlinux
- linux(6.14) and linux-lts(6.12) (It might work on newer kernels)
Manjaro
- ?
Opensuse
- Leap 15.4/15.5/15.6(tested on 15.6 2025/03/04)
- Tumbleweed?
Fedora
- 39/40/41?
Run the command below or disable the window composer before installing the driver
xfconf-query -c xfwm4 -p /general/vblank_mode -s xpresent
If the above command fails, run this
xfconf-query -c xfwm4 -p /general/vblank_mode -t string -s "xpresent" --create
Most likely you need to compile a kernel with LKDTM(CONFIG_LKDTM) enabled
Go to about:config and change the webgl.disabled parameter to true
Comment out or delete the HorizSync and VertRefresh lines in xorg.conf
sudo sed -i 's/HorizSync/#HorizSync/' /etc/X11/xorg.conf
sudo sed -i 's/VertRefresh/#VertRefresh/' /etc/X11/xorg.conf
If I'm not mistaken, this parameter is necessary since kernel version 5.17/5.18
Add nvidia_drm.modeset=1 and initcall_blacklist=simpledrm_platform_driver_init as kernel parameter
Add logind-check-graphical=false in /etc/lightdm/lightdm.conf
[LightDM]
logind-check-graphical=false
or use the command below
sudo sed -i 's/\[LightDM\]/[LightDM]\nlogind-check-graphical=false/' /etc/lightdm/lightdm.conf
Start the application with the --disable-gpu parameter and that should fix it
Depending on the distribution and application you are using, you can leave these flags permanent.
In Archlinux, you can follow this link below and adapt it to your use:
https://wiki.archlinux.org/title/Chromium#Making_flags_persistent
Some flatpak applications also have this feature, I'll give Chrome as an example.
#Chrome flatpak
echo -e "--disable-gpu" >> ~/.var/app/com.google.Chrome/config/chrome-flags.conf
In ArchLinux for electron based applications you can use the link below and adapt it for your use.
https://wiki.archlinux.org/title/Wayland#Command_line_flags
Add the libGL.so.1 library to the libQt6Gui.so.6 using patchelf
sudo patchelf --add-needed /usr/lib/nvidia/libGL.so.1 /usr/lib/libQt6Gui.so.6
Add this in .config/kdeglobals
[QtQuickRendererSettings]
RenderLoop=basic
SceneGraphBackend=opengl
Put this in /etc/environment
KWIN_EXPLICIT_SYNC=0
__GL_YIELD=USLEEP
__GL_FSAA_MODE=0
__GL_LOG_MAX_ANISO=0
KWIN_OPENGL_INTERFACE=glx
KWIN_NO_GL_BUFFER_AGE=1
For arch-based distros only
You can create a hook with these parameters so whenever the qt6-base package is updated it will always receive nvidia libGL.so.1
[Trigger]
Operation=Install
Operation=Upgrade
Type=Package
Target=qt6-base
[Action]
Description=Patching Nvidia libGL in libQt6Gui.so.6
Depends=patchelf
When=PostTransaction
Exec=/usr/bin/patchelf --add-needed /usr/lib/nvidia/libGL.so.1 /usr/lib/libQt6Gui.so.6
Add the content in /etc/pacman.d/hooks/ to a file with the .hook extension, example: novideo.hook
Also don't forget to uncomment the HookDir line in the pacman.conf file
Try starting them with the LD_PRELOAD parameter pointing to the driver's libGL.so.*
Example in ubuntu:
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGL.so.304.137 PPSSPPSDL
It may be necessary to load libGL.so.304.137 along with the program for it to work. For this, you can pass the --env argument next to the flatpak run command
Example of a 64-bit application:
flatpak run --env=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/GL/nvidia-304-137/lib/libGL.so.304.137 org.ppsspp.PPSSPP
Or apply the variable globally across all flatpaks by creating the global file at ~/.local/share/flatpak/overrides
#If the directory does not exist, it is good to create it
mkdir -p ~/.local/share/flatpak/overrides
echo -e "[Environment]\nLD_PRELOAD=/usr/lib/x86_64-linux-gnu/GL/nvidia-304-137/lib/libGL.so.304.137:/app/lib/i386-linux-gnu/GL/nvidia-304-137/lib/libGL.so.304.137" >> ~/.local/share/flatpak/overrides/global
Segmentation faults when opening QT5 applications or crashes when starting the graphical environment:
If when you click on QT5 applications and nothing happens or the graphical environment does not want to start, check the system logs by running dmesg
[ 827.938059] konsole[3683]: segfault at 0 ip 0000000000000000 sp 00007ffcd745b928 error 14 in konsole[55b9167e0000+4000]
[ 827.938072] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
If you see lines similar to this, run the command below
Mageia:
sudo patchelf --add-needed /usr/lib64/libpthread.so.0 /usr/lib64/nvidia304/libGL.so.1
Opensuse:
sudo patchelf --add-needed /lib64/libpthread.so.0 /usr/X11R6/lib64/libGL.so.304.137