<div dir="ltr">Awesome, thanks, it is EXTREMELY useful<div> | <span style="color:rgb(0,0,0)">Find the right one and denylist it.</span><br><div>One more question: how do I 'denylist' the offending alias?<br><br>Thanks<br>Vadim</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 17, 2022 at 3:22 PM Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mi, 16.11.22 10:24, Vadim Lebedev (<a href="mailto:vadiml1024@gmail.com" target="_blank">vadiml1024@gmail.com</a>) wrote:<br>
<br>
> I'm preparing ubuntu-based live boot disk. It works fine mostly, but on<br>
> some machines equipped with Nvidia Quadro cards the default nouveau driver<br>
> causes problems (temporary freezes). I've determined that buy blacklisting<br>
> nouveau driver (in /etc/modprobe.d/blacklist.conf) I can fix the problem.<br>
> However this approach inhibits nouveau driver for every nvidia equipped<br>
> machine which is an overkill. Of course, i can detect the presence of the<br>
> Quadro card after the boot, blacklist it, do update-initramfs -u and reboot<br>
> but this approach modifies live boot disk and I would like to avoid that. I<br>
> wonder if there is a way to detect the presence of nvidia Quadro somewhere<br>
> very early in the boot sequence and prevent loading of the offending driver<br>
> and fall back to standard VESA driver.<br>
<br>
PCI drivers are loaded via a "modalias" string, which is synthesized<br>
from the PCI and USB vendor and product IDs (and other PCI<br>
info). Drivers declare in their kmod metadata which of these modalias<br>
strings they want to be responsible for.<br>
<br>
Do "modinfo nouveau" for example, which will show you this<br>
information:<br>
<br>
<snip><br>
…<br>
alias: pci:v000012D2d*sv*sd*bc03sc*i*<br>
alias: pci:v000010DEd*sv*sd*bc03sc*i*<br>
…<br>
</snip><br>
<br>
The "*" are wildcard expressions.<br>
<br>
Now, the kernel will never ask userspace for the "nouveau" driver but<br>
only for a driver for such a modalias string.<br>
<br>
You can denylist that string for your hw and thus disable the<br>
autoloading.<br>
<br>
Use "grep . /sys/bus/*/*/*/modalias" to get a list of the actual<br>
modalias strings requested on your system. The one nuveau.ko matched<br>
against will be among them. Find the right one and denylist it.<br>
<br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Berlin<br>
</blockquote></div>