You are on page 1of 4

4/7/24, 4:09 PM What's the difference between mesa and xf86-video-*?

ELI5 : r/archlinux

Skip to main content


r/archlinux Search in r/archlinux Log In

r/archlinux • 4 yr. ago


scaryAstronaut

What's the difference between mesa and xf86-video-*? ELI5


Sorry if this is a dumb question but I've been reading arch wiki but nothing is making sense.

I have two GPU's in my laptop ( Intel + Nvidia)

On arch wiki, both intel and nvida page told me to install mesa, so is mesa the open source driver for both intel and
Nvidia? If yes? Then what is xf86-video-*?

During installation i only installed xf86-video-intel as I don't play games or do heavy rendering stuffs.

Also xrandr --listproviders gives two providers, Intel and modesettings. What is modesetting?

Also hardinfo gui tells me, that for my Nvidia card, noveau driver is in use. But i never installed xf86-video-noveau !

Can someone here please explain like i'm five?

18 13 Share

Sort by: Best

Add a Comment

tinywrkb • 4y ago

xf86-video-* is the legacy DDX driver for Xorg 2D acceleration that isn't really being developed anymore.
Mesa has Glamor that implements the same thing but using the 3D capabilities of the GPU to accelerate 2D, and it
should be preferred over the xf86-video-* driver.
If you're running a Wayland session then the xf86-video-* is useless, only Glamor is used for XWayland.

19 Reply Share

NuBZs • 4y ago

Mesa is required for openfl stuff also isn't it?

3 Reply Share

tinywrkb • 4y ago

It's the open-source OpenGL library/driver. Unless you're installing the Nvidia or AMD proprietary binary
drivers then you need mesa.

3 Reply Share

NuBZs • 4y ago

So I was half correct. I require it since I don't have the proprietary drivers.

I probably knew this and forgot.

Thank you.

2 Reply Share

https://www.reddit.com/r/archlinux/comments/i0nay8/whats_the_difference_between_mesa_and_xf86video/ 1/4
4/7/24, 4:09 PM What's the difference between mesa and xf86-video-*? ELI5 : r/archlinux
Yazowa • 4y ago • Edited 4y ago
Skip to main content
Log In
Seems like the main issue is that vendor-specific X configuration doesn't seem to work with Glamor, for example,
TearFree on AMD won't work unless you use xf86-video-amdgpu. At least that's my experience, if you have a way
to avoid that, I'd love to hear about it.

1 Reply Share

tinywrkb • 4y ago

Isn't tearing already a solved issue? are you avoiding having an X compositor? I don't have such problem
when using picom with an Intel GPU.
Considering you flair, I'll be surprise if you're having trouble with Plasma.

At this point, except tearing, I don't care much about X issues or performance related tweaking (what else
there is in the vendor specific X configs) as I most likely will switch to Wayland the moment Chromium Ozone
will be switched on for the standard builds (estimate is 2021Q1).

1 Reply Share

Yazowa • 4y ago

I disable VSync in purpose. VSync is horribly broken with dual mixed refresh rate displays, specially on
KWin, so yeah (144hz and 60hz makes it sync at 60hz, which is horrible)

2 Reply Share

idontchooseanid • 4y ago • Edited 4y ago

https://www.reddit.com/r/archlinux/comments/i0nay8/whats_the_difference_between_mesa_and_xf86video/ 2/4
4/7/24, 4:09 PM What's the difference between mesa and xf86-video-*? ELI5 : r/archlinux

You need to understand that you need different drivers for different layers of the operating system.
Skip to main content
Log In
At the lowest layer we have the hardware. Hardware can contain its own software or the software (in this case
called firmware) can be uploaded to it as a special and often closed-source file by the kernel.
Kernel level driver. For Linux this is often provided by the default kernel package ( linux , linux-lts ). Kernel
controls the basics of the hardware and manages the memory of the GPU. Nowadays only the simplest stuff is
implemented in kernel and it works as a sophisticated message carrier between hardware/firmware and upper
layer drivers. Kernel provides device files under /dev to send stuff to the kernel driver.
User-space graphics layer drivers. GPUs are complex and since 90s we don't write programs for a specific GPU
anymore but we use some common APIs like OpenGL, Vulkan and DirectX (Windows only). A set of drivers as
loadable libraries takes this burden. The programmers use the common API to describe the behavior of the
pixels. The graphics driver converts OpenGL commands to GPU specific commands and passes them to the
kernel driver. This is the most complex driver in the hierarchy. Graphics drivers generally work with buffers i.e.
empty spaces of memory to draw on. They don't have concepts for common GUI stuff.

This is what Mesa is. Mesa is the open source implementation of OpenGL standard. It contains drivers for
GPUs. It takes the burden of compiling and optimizing OpenGL commands and uploading them to the GPU with
the help of kernel.
At the top of the driver stack lie the application drivers. These drivers can contain common user stuff like
shapes, or windows, easier API for buffers and additional support for things like displays. Generally graphics
driver do not care about displays. However, nowadays mode setting (setting display resolution and color depth)
is tied to GPU graphics so graphics libraries can provide some functionality for mode setting.

X11 has a complex protocol that defines various stuff like window management and shapes and ways to define
regions that are drawn by graphics driver on the display again called buffers. X11 provides APIs for changing
display resolution and all the other complex stuff. The days before everybody used GPUs and (hence) graphics
drivers to draw stuff, this required GPU specific drivers and nowadays we need libraries to translate X11
commands to OpenGL commands and provide other functionality. This is what xf86-video-{intel, amdgpu,
ati, nouveau} drivers do. There is a special one among them: xf86-video-modesetting . A lot of
functionality is carried to kernel drivers due to the complex nature of resource management in user-space and
kernel being the ultimate resource manager. So changing display resolution and allocating memory buffers is on
kernel space. The modesetting driver uses the kernel facilities of mode setting and puts an end to GPU
specific X11 drivers.

On the other hand Wayland defines nearly nothing about GUI. It defines a communication protocol between the
graphics driver and client applications. That's it. The components that make up the GUI environment is left to
the compositor implementors to figure out. Wayland doesn't define the exact details of what can be drawn in a
buffer. It only defines that the communication protocol includes "a" buffer. Everything like windows, buttons,
events, display, mode setting, GUI stuff, shapes and all is left to the compositor implementors. So they can
come up with any kind of mind boggling complex GUI thing and there can be loads of incompatible compositors
and they can now truly drive application developers insane :) . Or they can just tell application developers to
suck it and use a GUI toolkit like Qt.

14 Reply Share

[deleted] • 4y ago

Those laptops with dual GPUs are bit of a special case. Have you read this wiki page?

3 Reply Share

sneekyleshy • 4y ago

Since you have two graphics card I can recommend using Nvidia-xrun. It's provides the best performance I
experienced.

2 Reply Share

pailanderCO • 4y ago

https://www.reddit.com/r/archlinux/comments/i0nay8/whats_the_difference_between_mesa_and_xf86video/ 3/4
4/7/24, 4:09 PM What's the difference between mesa and xf86-video-*? ELI5 : r/archlinux

Nvidia-xrun
Log In

How can I use that?

1 Reply Share

sneekyleshy • 4y ago

The way i use it is by switching between one of the ttys and starting nvidia-xrun when i need to run something
with my graphics card. Its works like the same way as the startx command, it can use the same xinitrc config
file as you already have or a separate one to start all the settings an applications you need. Im not quiet sure
how you mean “How can i use it”?

1 Reply Share

pailanderCO • 4y ago

Yeah, I meant that. Thanks.

2 Reply Share

More posts you may like

TOP POSTS

Reddit

reReddit: Top posts of July 30, 2020

Reddit

reReddit: Top posts of July 2020

Reddit

reReddit: Top posts of 2020

https://www.reddit.com/r/archlinux/comments/i0nay8/whats_the_difference_between_mesa_and_xf86video/ 4/4

You might also like