Bug#938985: live-config: fails to load correct version of nvidia driver
Source: live-config
Version: 5.20190519
Severity: normal
Dear Maintainer,
I use live-build to create a custom image including nvidia drivers (currend and
legacy).
Somewhen this summer that images started to fail to boot with working X on
hardware with nvidia graphics.
After some debugging i found out that by the moment
/lib/live/config/1140-xserver-xorg is executed, some nvidia driver modules have
already been tried to load.
However, since it is named script that actually runs update-alternatives to
configure which nvidia driver is the correct one this seems to result in a
situation where (parts of ?) the wrong driver are loaded.
For debugging purposes i tried to see if things start to work if i added:
modprobe -r nvidia_drm || true
modprobe -r nvidia_modeset || true
modprobe -r nvidia || true
before
modprobe --ignore-install ${_NVIDIA_MODULE:-nvidia} || true
... which didn't work.
Not understanding that line anyway (why --ignore-install ?) i tried to manually
load the modules after boot, but it was not possible to load the modules with
this option.
However, just doing a normal "modprobe nvidia_drm" did give me a working driver
and X.
So for now i replaced
modprobe --ignore-install ${_NVIDIA_MODULE:-nvidia} || true
with
modprobe nvidia_drm || true
and now all three modules are loaded properly and X is working.
At least on the hardware i tested.
I have no clue about what the correct way would be, i don't know if it is
intentional to have nvidia modules loaded before /lib/live/config/1140-xserver-
xorg - nor do i know how to prohibit it.
I don't have enough knowledge about how the config script is supposed to work,
but i hope with the above report i can aid in getting live-config able to
handle multiple nvidia drivers.
-- System Information:
Debian Release: 10.0
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable'), (300, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.19.0-5-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8), LANGUAGE=en_US (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Reply to: