Re: Preventing automatic driver loading on live boot disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Awesome, thanks, it is EXTREMELY useful
 | Find the right one and denylist it.
One more question:  how do I  'denylist'  the offending alias?

Thanks
Vadim

On Thu, Nov 17, 2022 at 3:22 PM Lennart Poettering <lennart@xxxxxxxxxxxxxx> wrote:
On Mi, 16.11.22 10:24, Vadim Lebedev (vadiml1024@xxxxxxxxx) wrote:

> I'm preparing ubuntu-based live boot disk. It works fine mostly, but on
> some machines equipped with Nvidia Quadro cards the default nouveau driver
> causes problems (temporary freezes). I've determined that buy blacklisting
> nouveau driver (in /etc/modprobe.d/blacklist.conf) I can fix the problem.
> However this approach inhibits nouveau driver for every nvidia equipped
> machine which is an overkill. Of course, i can detect the presence of the
> Quadro card after the boot, blacklist it, do update-initramfs -u and reboot
> but this approach modifies live boot disk and I would like to avoid that. I
> wonder if there is a way to detect the presence of nvidia Quadro somewhere
> very early in the boot sequence and prevent loading of the offending driver
> and fall back to standard VESA driver.

PCI drivers are loaded via a "modalias" string, which is synthesized
from the PCI and USB vendor and product IDs (and other PCI
info). Drivers declare in their kmod metadata which of these modalias
strings they want to be responsible for.

Do "modinfo nouveau" for example, which will show you this
information:

<snip>

alias:          pci:v000012D2d*sv*sd*bc03sc*i*
alias:          pci:v000010DEd*sv*sd*bc03sc*i*

</snip>

The "*" are wildcard expressions.

Now, the kernel will never ask userspace for the "nouveau" driver but
only for a driver for such a modalias string.

You can denylist that string for your hw and thus disable the
autoloading.

Use "grep . /sys/bus/*/*/*/modalias" to get a list of the actual
modalias strings requested on your system. The one nuveau.ko matched
against will be among them. Find the right one and denylist it.

Lennart

--
Lennart Poettering, Berlin

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux