nvidia module without nvidia card

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

nvidia module without nvidia card

Christoph Pleger-4
Hello,

can anybody tell me why the nvidia kernel module is loaded / tried to be
loaded even when the computer has no nvidia card and the nvidia module
is not listed in /etc/modules or /etc/modules-load.d/? In my Ubuntu
18.04, that causes the problem that my /var/log/syslog is flooded with
nvidia error messages, because when loading the nvidia module, udev
actions from /lib/udev/rules.d/71-nvidia.rules are called and most of
these actions cannot be performed successfully when no nvidia card is
present.

I found that the nvidia module was not loaded after changing the systemd
default target to multi-user.target, so that X did not start. But after
re-switching to graphical.target, I could not find anyhing about trying
to use the nvidia driver in the X log file ...

Regards
   Christoph

PS: Before someone asks why I do not just simply remove the nvidia
packages, that is because I want to create a generic package list that
also supports computers WITH nvidia graphics hardware.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: nvidia module without nvidia card

Liam Proven
On Tue, 4 Sep 2018 at 09:07, Christoph Pleger
<[hidden email]> wrote:
>
> Hello,
>
> can anybody tell me why the nvidia kernel module is loaded / tried to be
> loaded even when the computer has no nvidia card and the nvidia module
> is not listed in /etc/modules or /etc/modules-load.d/?

You might add one. This way, it will work.

This is how distros work. It's how hardware autodetection works. Try
the driver; does it work? Yay. No? Move to the next one.

Don't want it? Switch to Gentoo or some other distro where you only
compile in stuff *you* need on that particular box.

--
Liam Proven - Profile: https://about.me/liamproven
Email: [hidden email] - Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: nvidia module without nvidia card

Colin Watson
On Wed, Sep 05, 2018 at 10:53:49AM +0200, Liam Proven wrote:

> On Tue, 4 Sep 2018 at 09:07, Christoph Pleger
> <[hidden email]> wrote:
> > can anybody tell me why the nvidia kernel module is loaded / tried to be
> > loaded even when the computer has no nvidia card and the nvidia module
> > is not listed in /etc/modules or /etc/modules-load.d/?
>
> You might add one. This way, it will work.
>
> This is how distros work. It's how hardware autodetection works. Try
> the driver; does it work? Yay. No? Move to the next one.

Well, sort of.  For a lot of devices it doesn't work that way at all.

Instead, kernel drivers declare the device IDs that they support, and
the kernel build system compiles all those declarations into a database
that userspace tools can read; for example, look at "modinfo nouveau |
grep ^alias:".  The kernel can then request a module for a particular
device it's detected, and userspace will look that up and load it if it
exists.  It generally *isn't* necessary to go through trying all drivers
to see if they work, which would be very much slower and not
hotplug-friendly.

It's possible that this isn't hooked up quite the same way for nvidia; I
don't know.  But it's not a general rule of how hardware autodetection
works.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: nvidia module without nvidia card

Christoph Pleger-4
In reply to this post by Liam Proven
Hello,

>> can anybody tell me why the nvidia kernel module is loaded / tried to
>> be
>> loaded even when the computer has no nvidia card and the nvidia module
>> is not listed in /etc/modules or /etc/modules-load.d/?
>
> You might add one. This way, it will work.
>
> This is how distros work. It's how hardware autodetection works. Try
> the driver; does it work? Yay. No? Move to the next one.

I am running pools with about 250 computers (using non-nvidia graphics)
with older versions of Ubuntu and with Debian stable - as I can see in
the syslog, none of these computers tried to load the nvidia module when
starting X. And I am running some nvidia-graphic computers with exactly
the same package list like the non-nvidia ones and the nvidia hardware
is working successfully. So, I doubt very much that X does not have
means to detect the graphcs hardware other than to really load the
driver.

Regards
   Christoph

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: nvidia module without nvidia card

Christoph Pleger-4
In reply to this post by Colin Watson
Hello,

> It's possible that this isn't hooked up quite the same way for nvidia;
> I
> don't know.  But it's not a general rule of how hardware autodetection
> works.

At least, in older versions of kernel, nvidia driver and Xorg, nvidia
hardware detection worked very well without trying to load the kernel
module. But even if now it does not, there's still the question why the
system keeps trying to load the module - I guess that just for hardware
detection one unsuccessful attempt should be sufficient.

Regards
   Christoph

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: nvidia module without nvidia card

Colin Law
In reply to this post by Christoph Pleger-4
On Tue, 4 Sep 2018 at 08:06, Christoph Pleger
<[hidden email]> wrote:
>
> Hello,
>
> can anybody tell me why the nvidia kernel module is loaded / tried to be
> loaded even when the computer has no nvidia card and the nvidia module
> is not listed in /etc/modules or /etc/modules-load.d/?

Could you post syslog around that action?  Include a bit before it for context.

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: nvidia module without nvidia card

Oliver Grawert
In reply to this post by Christoph Pleger-4
hi,
Am Dienstag, den 04.09.2018, 09:04 +0200 schrieb Christoph Pleger:
...
> PS: Before someone asks why I do not just simply remove the nvidia 
> packages, that is because I want to create a generic package list
> that 
> also supports computers WITH nvidia graphics hardware.

you will likely run into another issue when shipping the nvidia driver
... it actually replaces all the GL/GLES libraries with its own:

$ ls -l /etc/alternatives/|grep gl_
lrwxrwxrwx 1 root root  34 Okt 24  2017 i386-linux-gnu_egl_conf ->
/usr/lib/nvidia-384/alt_ld.so.conf
lrwxrwxrwx 1 root root  34 Okt 24  2017 i386-linux-gnu_gl_conf ->
/usr/lib/nvidia-384/alt_ld.so.conf
lrwxrwxrwx 1 root root  30 Okt 24  2017 x86_64-linux-gnu_egl_conf ->
/usr/lib/nvidia-384/ld.so.conf
lrwxrwxrwx 1 root root  30 Jul  7 12:18 x86_64-linux-gnu_gl_conf ->
/usr/lib/nvidia-384/ld.so.conf

you might need some hackery here to adjust the alternatives dynamically
based on if there is a nvidia card in the system or not ...

you might want to take a look at the postinst/postrm scripts of the
nvidia package how they are set/unset

ciao
        oli
--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: nvidia module without nvidia card

Christoph Pleger-4
In reply to this post by Colin Law
Hello,

> > can anybody tell me why the nvidia kernel module is loaded / tried to be
> > loaded even when the computer has no nvidia card and the nvidia module
> > is not listed in /etc/modules or /etc/modules-load.d/?
>
> Could you post syslog around that action?  Include a bit before it for
> context.

An excerpt of syslog is attached.

Regards
  Christoph
--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

syslog.txt (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: nvidia module without nvidia card

Christoph Pleger-4
In reply to this post by Christoph Pleger-4
Hello,

> But even if now it does not, there's still the question why the
> system keeps trying to load the module - I guess that just for hardware
> detection one unsuccessful attempt should be sufficient.

Well, obviously when X is started, something tries to load the nvidia.ko
kernel module and though that fails in the end, lsmod shows for a short time
that the module is loaded and in that short time, actions from /lib/udev/
rules.d/71-nvidia.rules  are executed. As some of them are actions to load
other modules which depend on nvidia.ko, nvidia.ko is tried to be loaded once
again, and once again actions from 71-nvidia.rules are executed, and so on, so
that an endless loop is created.

I am still wondering about the first load attempt of nvidia.ko; this did/does
not occur in older Ubuntu versions or in Debian versions.

Regards
  Christoph

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users