3

I have installed Kernel 4.15.0 mainline from the Kernel PPA and booted up a PC and installed a minimal GUI. Afterwards, I checked what was running and noticed that the nouveau driver was being loaded, however when I was installing the GUI I didn't explicitly choose the install the Ubuntu package xserver-xorg-video-nouveau.

I used modinfo to check what module was being loaded and this is the output: /lib/modules/4.15.0-041500-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko

I searched the contents of the package that Ubuntu provides at the Ubuntu packages directory and it lists these files:

/usr/lib/xorg/modules/drivers/nouveau_drv.so /usr/share/bug/xserver-xorg-video-nouveau/script /usr/share/doc/xserver-xorg-video-nouveau/NEWS.Debian.gz /usr/share/doc/xserver-xorg-video-nouveau/README.Debian /usr/share/doc/xserver-xorg-video-nouveau/changelog.Debian.gz /usr/share/doc/xserver-xorg-video-nouveau/copyright /usr/share/man/man4/nouveau.4.gz

And even though I'm clearly using the driver I don't have this file in my system: /usr/lib/xorg/modules/drivers/nouveau_drv.so.

So what are the differences if any between these two files?.

  • 1
    The Arch Wiki includes this somewhat illuminating line: "The Linux kernel includes open-source video drivers and support for hardware accelerated framebuffers. However, userland support is required for OpenGL and 2D acceleration in X11." – muru Feb 22 '18 at 7:30
  • Just curious why you would install 4.15.0 instead of kernel 4.15.4? – WinEunuuchs2Unix Feb 22 '18 at 12:06
  • @WinEunuuchs2Unix That was the newest kernel at the time. – Uri Herrera Feb 22 '18 at 19:32
  • @muru If you can expand on that comment I'd appreciate it. – Uri Herrera Feb 22 '18 at 19:33
  • 2
    I think @muru already answered pretty well what the difference is. So the noveau kernel module takes care about all the low level stuff. The reason that you may be able use X, although you do not have the nouveau driver for the high level stuff, is that X falls back to some other driver (I am guessing vesa or fbdev). Have a look at /var/log/Xorg.0.log – mbeyss Feb 23 '18 at 8:24
4
+300

Difference between two files

Differences can be found on many levels. For this limited answer the size differences and application differences are described.

Size differences

$ ll /usr/lib/xorg/modules/drivers/nouveau_drv.so
-rw-r--r-- 1 root root 221200 Jul  6  2017 /usr/lib/xorg/modules/drivers/nouveau_drv.so
$ ll /lib/modules/4.14.20-041420-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko
-rw-r--r-- 1 root root 3646510 Feb 16 15:53 /lib/modules/4.14.20-041420-generic/kernel/drivers/gpu/drm/nouveau/nouveau.ko

The kernel Nouveau module is 16 times larger than the Xorg driver. This implies the kernel module does a lot more.

There are additional Xorg drivers some systems (especially laptops) will have:

In Debian the 2D graphics drivers for the X.Org Server are packaged individually and called xserver-xorg-video-*.[7] After installation the 2D graphics driver-file is found under /usr/lib/xorg/modules/drivers/. The package xserver-xorg-video-nouveau installs nouveau_drv.so with a size of 215 KiB, the proprietary Nvidia GeForce driver installs a 8 MiB-sized file called nvidia_drv.so ...

The nvidia_drv.so is 37 times larger than nouveau_drv.so.

Application differences

The kernel Nouveau module is a .ko file and the Xorg driver is a .drv.so file type. This question asks what the difference is between the two file types. The best answer (IMO) states:

In laymen terms:

Kernel modules (ko) run in kernel space, user modules (so) run in user space.

Kernel spaces facilitate (or not) access to a variety of functions that user space does not.

Kernel modules are always executed in kernel space and if buggy or erroneous, can freeze the system.

User space is "protected" and a buggy module or app is less likely to crash the system.

| improve this answer | |
  • "If you have an AMD GPU and wish to run any Ubuntu version 16.04 LTS or newer, there are two open source driver options: Radeon or AMDGPU." Might be a useful addition to your answer as fglrx is deprecated. Source. – Elder Geek Feb 25 '18 at 16:58
  • @ElderGeek I don't have an AMD graphics card. I do have nVidia GT650M and GTX 970M so can test stuff. 1) This question is about nVidia and the AMD stuff was included in wikipedia link so it's merely an "aside". 2) I've only read bits and pieces about AMD graphics and am a "useful idiot" on the subject. If I expand the answer on AMD I might start getting questions from AMD users looking for help. 3) Your comment here serves up the link so I don't need to add it to the answer :) – WinEunuuchs2Unix Feb 25 '18 at 17:05
  • 1
    Why not simply remove the references to fglrx then? – Elder Geek Feb 25 '18 at 17:07
  • @ElderGeek It would require truncating a sentence. As such I'd have to move the word and which technically no longer makes it a quote. Plus the section is about file sizes and I thought it adds a nice contrast. That said if you think the fglrx should be removed I'd be happy to oblige because I value your esteemed opinion more than my gut-instinct in this area. Just say the word... – WinEunuuchs2Unix Feb 25 '18 at 17:12
  • 1
    I don't think there's any harm in truncating the irrelevant from a quote. If your concerned about that you could always just use ... at the end to indicate that there is more. If anyone wan't to see it all they can always check your sources. That's just my opinion brought on by perhaps an invalid concern that those on systems beyond what 14.04.2? will attempt to use fglrx and generate more useless questions.. – Elder Geek Feb 25 '18 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.