nvidia 470.57.02 changed the path of `nvidia-sleep.sh` and systemd
scripts, making `builder.sh` miss them and suspend-to-ram on systems
where `hardware.nvidia.powerManagement.enable = true` is set fail.
Ignore the sanity check that prevents the Nvidia drivers from
being built for kernels with real-time patches.
Even though the driver might not be officially supported by
Nvidia for linux-rt, it seems to work without issues.
Attempting to install the driver for linux-rt fails with the
following error message:
The kernel you are installing for is a PREEMPT_RT kernel!
The NVIDIA driver does not support real-time kernels. If you
are using a stock distribution kernel, please install
a variant of this kernel that does not have the PREEMPT_RT
patch set applied; if this is a custom kernel, please
install a standard Linux kernel. Then try installing the
NVIDIA kernel module again.
*** Failed PREEMPT_RT sanity check. Bailing out! ***
The original file contains just a library name, which does not work when LD_LIBRARY_PATH does not contain /run/opengl-driver/lib, as is the case in unstable NixOS.
Fixes https://github.com/NixOS/nixpkgs/issues/69264
nvidia_x11 and persistenced were modified to provide binaries which can be
mounted inside a docker-container to be executed there.
most ldconfig-based discovery of bundled nvidia libraries is patched out
ldconfig itself is patched to be able to deal with patchelf'ed libraries
See https://sourceware.org/bugzilla/show_bug.cgi?id=23964
In ffc498c490 -j$NIX_BUILD_JOBS was added.
Somehow this caused my machine to run many many more parallel jobs than
it was supposed to, freezing the system.
If you don't experience this, feel free to revert.
Tested & reviewed by vcunat:
- the patch seems not needed anymore,
- reflects changes in their build system
ftp://download.nvidia.com/XFree86/packaging/linux/new-kbuild-for-355/README
nvidia's EGL stack looks for libGLESv2.so.2 at runtime (confirmed by
watching strace), however builder.sh only provides a libGLESv2.so.1
symlink.
@vcunat ported to legacy_340; older ones don't produce GLES.
Otherwise we end up with multiple versions of GTK in the system
closure. Also, GTK 3 is not well integrated in NixOS yet (e.g. it
doesn't respect KDE's colour scheme).
The GUI would no longer find libs it needed.
Now it's gtk3 by default, so we don't support gtk2 version for simplicity.
ldd finds no missing libs after this commit.