1

I'm trying to understand what the difference is between DRM (Direct Rendering Manager) and a graphics driver, such as AMD or Nvidia GPU drivers.

Reading the DRM wiki[1], it seems to me like DRM is basically a graphics hardware driver, however this doesn't explain the existence of proprietary or FOSS graphics drivers for discrete GPUs.

What then, is the difference, or use case, for DRM over mesa or Nvidia drivers? What happens with DRM when AMD drivers are installed? Are they used for different tasks? Are proprietary drivers built around DRM?

[1]https://en.wikipedia.org/wiki/Direct_Rendering_Manager

  • 1
    DRM is a functionality ( a bunch of standardized API, also allows drivers to implement more) provided by GPU driver. Mesa is different, it's a userland software. – 炸鱼薯条德里克 May 8 at 0:12
4

"Graphics driver" can mean any number of things.

The way X (the graphical windowing system) works is that there is a central X server, which can load modules ("X drivers") for different hardware. Like vesa, fbdev, nvidia, nouveau, amdgpu.

Some of these drivers can work on their own (vesa). Some need linux kernel drivers. Many of these kernel drivers following the "direct rendering manager API", and therefore they are called "DRM drivers". Others, like the proprietary nvidia driver (which needs both an X driver and a kernel driver), don't.

It gets more complicated: The hardware consists of parts that read out the framebuffer and display it at different resolutions etc. This is called "modesetting". Modern graphics card also have a GPU, which is used to accelerate 3D drawing (OpenGL). "DRM kernel drivers" provide an interface for both.

"Mesa" is a software library that understands OpenGL, but does the rendering either on the CPU, or on some (but not all) GPUs (see here for a list). So the Mesa library can offer this functionality for graphics card that do not or do not sufficiently have hardware for this, or can serve as the OpenGL library for a few GPUs.

You could probably make a case to call anything in this complex picture a "graphics driver".

  • xf86-video-nvidia will use the nvidia kernel driver, which now supports DRM, although not as perfect as i915. – 炸鱼薯条德里克 May 8 at 8:17
  • @炸鱼薯条德里克 isn’t that nv? That driver is obsolete now anyway, there’s only nouveau in current kernels. – Stephen Kitt May 8 at 8:31
  • @StephenKitt nvidia kernel drivers is not obsolete, but as proprietary kernel module, it's always shipped separately from the mainline kernel. It might fix some graphics issue caused by nouveau on some graphic cards, and of course, also might causing other issues. – 炸鱼薯条德里克 May 8 at 11:00
  • @炸鱼薯条德里克: nvidia really supports DRM? Do you have links? The last time I looked (which was quite some time ago), the nvidia driver had a completely different architecture, namely a unified architecture both for Windows and Linux, which was closely modelled on the Windows architecture. If they've refactored that to DRM, that's quite a bit of effort, and I wonder how they handle the Windows side. – dirkt May 8 at 11:13
  • us.download.nvidia.com/XFree86/Linux-x86_64/418.74/README/… wiki.archlinux.org/index.php/NVIDIA#DRM_kernel_mode_setting Seems only support KMS, not fully DRM. But still not nonexistent at all. – 炸鱼薯条德里克 May 8 at 11:35

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.