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 to 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?.

Zanna
  • 72,312
Uri Herrera
  • 15,318

1 Answers1

4

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.