Restoring DRI performance for old Intel graphics cards on Linux
Some while I go, I wrote up my experience https://blog.iaddg.net/brico-repare/restoring-my-2007-mac-mini-2-1 with restoring my 2007 Mac Mini 2,1.
The performance of video was a bit sluggish, though, and this write up serves to document the fixes I found in order to accelerate video playback and window manager responsiveness.
My graphics card is a Gen-3.5 Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics and my OS is Debian testing/forky/14, but the fixes will probably work for other cards and systems as well.
Different performance under X.org and Wayland
I first noticed that Wayland and X.org have different behavior. Video in Wayland was faster, because programs under Wayland (mpv, vlc, firefox) could use the Direct Rendering Infrastructure (DRI) interface, while the same programs under X.org could not.
Where is the output of the inxi -GSaz --za --hostname command for my X.org setup:
System:
Host: macmini Kernel: 7.0.4+deb14-amd64 arch: x86_64 bits: 64 compiler: gcc
v: 15.2.0 clocksource: hpet avail: acpi_pm
parameters: BOOT_IMAGE=/vmlinuz-7.0.4+deb14-amd64 root=UUID=<filter> ro
quiet
Desktop: Xfce v: 4.20.2 tk: Gtk v: 3.24.52 wm: xfwm4 v: 4.20.0
with: xfce4-panel tools: xfce4-screensaver avail: light-locker,swayidle
vt: 7 dm: LightDM v: 1.32.0 Distro: Debian GNU/Linux forky/sid
Graphics:
Device-1: Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics
driver: i915 v: kernel arch: Gen-3.5 process: Intel 90nm built: 2005-06
ports: active: VGA-1 empty: DVI-D-1,SVIDEO-1 bus-ID: 00:02.0
chip-ID: 8086:27a2 class-ID: 0300
Display: x11 server: X.Org v: 21.1.22 with: Xwayland v: 24.1.11
compositor: xfwm4 v: 4.20.0 driver: X: loaded: intel
unloaded: fbdev,modesetting,vesa dri: swrast gpu: i915 display-ID: :0.0
screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26")
s-diag: 584mm (22.99")
Monitor-1: VGA-1 mapped: VGA1 model: Dell E2218HN serial: <filter>
built: 2018 res: mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 102 gamma: 1.2
size: 480x270mm (18.9x10.63") diag: 546mm (21.5") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
API: EGL v: 1.5 platforms: device: 1 drv: swrast gbm: drv: kms_swrast
surfaceless: drv: swrast x11: drv: swrast inactive: wayland,device-0
API: OpenGL v: 4.5 vendor: mesa v: 26.0.6-1 glx-v: 1.4 direct-render: yes
renderer: llvmpipe (LLVM 21.1.8 128 bits) device-ID: ffffffff:ffffffff
memory: 2.81 GiB unified: yes
Info: Tools: api: eglinfo,glxinfo de: xfce4-display-settings gpu: gputop,
intel_gpu_top, lsgpu wl: swaymsg x11: xdriinfo, xdpyinfo, xprop, xrandr
And here is the output of the command for Wayland:
System:
Host: macmini Kernel: 7.0.4+deb14-amd64 arch: x86_64 bits: 64 compiler: gcc
v: 15.2.0 clocksource: hpet avail: acpi_pm
parameters: BOOT_IMAGE=/vmlinuz-7.0.4+deb14-amd64 root=UUID=<filter> ro
quiet
Desktop: Sway v: 1.11 with: swaybar tools: avail: light-locker, swayidle,
xfce4-screensaver vt: 8 dm: LightDM v: 1.32.0 Distro: Debian GNU/Linux
forky/sid
Graphics:
Device-1: Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics
driver: i915 v: kernel arch: Gen-3.5 process: Intel 90nm built: 2005-06
ports: active: VGA-1 empty: DVI-D-1,SVIDEO-1 bus-ID: 00:02.0
chip-ID: 8086:27a2 class-ID: 0300
Display: wayland server: X.org v: 1.21.1.22 with: Xwayland v: 24.1.11
compositor: Sway v: 1.11 driver: X: loaded: intel
unloaded: fbdev,modesetting,vesa dri: i915 gpu: i915 display-ID: 1
Monitor-1: VGA-1 model: Dell E2218HN serial: <filter> built: 2018 res:
mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 102 gamma: 1.2
size: 476x268mm (18.74x10.55") diag: 546mm (21.5") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
API: EGL v: 1.5 hw: drv: intel i915 platforms: device: 0 egl: 1.4
drv: i915 device: 1 drv: swrast gbm: egl: 1.4 drv: i915 surfaceless:
egl: 1.4 drv: i915 wayland: egl: 1.4 drv: i915 x11: egl: 1.4 drv: i915
API: OpenGL v: 4.5 compat-v: 2.1 vendor: mesa v: 26.0.6-1 glx-v: 1.4
direct-render: yes renderer: i915 (: 945GM) device-ID: 8086:27a2
memory: 187.5 MiB unified: yes
Info: Tools: api: eglinfo,glxinfo de: xfce4-display-settings gpu: gputop,
intel_gpu_top, lsgpu wl: swaymsg x11: xdriinfo, xdpyinfo, xprop, xrandr
Notice that X.org uses fallback software drivers for rendering while Wayland allows to used the hardware ones.
Solution (almost): force the modesetting driver for X.org instead of the intel one
After a lot of searching, a simple solution for the problem seemed to be to use the modesetting X.org driver instead of the intel one. It suffices to create a /etc/X11/xorg.conf.d/20-intel.conf configuration file with the following content:
Section "Device"
Identifier "Intel Graphics"
Driver "modesetting"
EndSection
One should also edit /etc/environment and add a line saying DRM3 is disabled for these old graphics cards:
LIBGL_DRI3_DISABLE=1
After these modifications and re-logging-in, inxi reports, for the X.org session:
System:
Host: macmini Kernel: 7.0.4+deb14-amd64 arch: x86_64 bits: 64 compiler: gcc
v: 15.2.0 clocksource: hpet avail: acpi_pm
parameters: BOOT_IMAGE=/vmlinuz-7.0.4+deb14-amd64 root=UUID=<filter> ro
quiet
Desktop: Xfce v: 4.20.2 tk: Gtk v: 3.24.52 wm: xfwm4 v: 4.20.0
with: xfce4-panel tools: xfce4-screensaver avail: light-locker,swayidle
vt: 7 dm: LightDM v: 1.32.0 Distro: Debian GNU/Linux forky/sid
Graphics:
Device-1: Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics
driver: i915 v: kernel arch: Gen-3.5 process: Intel 90nm built: 2005-06
ports: active: VGA-1 empty: DVI-D-1,SVIDEO-1 bus-ID: 00:02.0
chip-ID: 8086:27a2 class-ID: 0300
Display: x11 server: X.Org v: 21.1.22 with: Xwayland v: 24.1.11
compositor: xfwm4 v: 4.20.0 driver: X: loaded: modesetting dri: i915
gpu: i915 display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26")
s-diag: 584mm (22.99")
Monitor-1: VGA-1 model: Dell E2218HN serial: <filter> built: 2018 res:
mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 102 gamma: 1.2
size: 476x268mm (18.74x10.55") diag: 546mm (21.5") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
API: EGL v: 1.5 hw: drv: intel i915 platforms: device: 0 egl: 1.4
drv: i915 device: 1 drv: swrast gbm: egl: 1.4 drv: i915 surfaceless:
egl: 1.4 drv: i915 x11: egl: 1.4 drv: i915 inactive: wayland
API: OpenGL v: 4.5 compat-v: 2.1 vendor: mesa v: 26.0.6-1 glx-v: 1.4
direct-render: yes renderer: i915 (: 945GM) device-ID: 8086:27a2
memory: 187.5 MiB unified: yes
Info: Tools: api: eglinfo,glxinfo de: xfce4-display-settings gpu: gputop,
intel_gpu_top, lsgpu wl: swaymsg x11: xdriinfo, xdpyinfo, xprop, xrandr
Fix for mpv
The video player mpv started strangely reporting a floating point exception at startup (under X.org and under Wayland) after the above fix was applied. VLC on the other hand worked without a problem.
That can be fixed by explaining to mpv that it needs to use the gpu-context x11egl or wayland. One can simply add the following line in the global /etc/mpv/mpv.conf configuration file:
gpu-context = x11egl
Now DRI works inside X.org, it seemed. However, the next day, the system became unstable while running X, experiencing various crashes (firefox browsing, compiling the linux kernel, ...). No problems at all when running Wayland.
Fixing X.org
The solution I found — but Wayland sessions do not start anymore — way to go back to the intel driver in /etc/X11/xorg.conf.d/20-intel.conf,
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
EndSection
and install the amber branch of mesa (see here: https://docs.mesa3d.org/amber.html ).
To do that, you need to retrieve the branch
git clone --depth 1 --branch amber https://gitlab.freedesktop.org/mesa/mesa.git mesa-amber-vanilla
then choose the right options in the meson_options.txt file:
cd mesa-amber-vanilla/
nano meson_options.txt
You need to switch on the dri-drivers
option(
'dri-drivers',
type : 'array',
value : ['i915','i965']
and switch off the new gallium-drivers
option(
'gallium-drivers',
type : 'array',
value : [],
Then do
meson setup builddir/
meson compile -C builddir/
sudo meson install -C builddir/
This will install the library files to /usr/local/lib/x86_64-linux-gnu (in Debian). Now you need to add this as the first line of a ld configuration file, for instance /etc/ld.so.conf.d/x86_64-linux-gnu.conf:
/usr/local/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu
Then run
sudo ldconfig
At next graphical login, you should be using the intel driver with native DRI. inxi now shows:
System:
Host: macmini Kernel: 6.18.31 arch: x86_64 bits: 64 compiler: gcc v: 15.2.0
clocksource: hpet avail: acpi_pm parameters: BOOT_IMAGE=/vmlinuz-6.18.31
root=UUID=<filter> ro quiet
Desktop: Xfce v: 4.20.2 tk: Gtk v: 3.24.52 wm: xfwm4 v: 4.20.0
with: xfce4-panel tools: xfce4-screensaver avail: light-locker,swayidle
vt: 7 dm: LightDM v: 1.32.0 Distro: Debian GNU/Linux forky/sid
Graphics:
Device-1: Intel Mobile 945GM/GMS 943/940GML Express Integrated Graphics
driver: i915 v: kernel arch: Gen-3.5 process: Intel 90nm built: 2005-06
ports: active: VGA-1 empty: DVI-D-1,SVIDEO-1 bus-ID: 00:02.0
chip-ID: 8086:27a2 class-ID: 0300
Display: x11 server: X.Org v: 21.1.22 with: Xwayland v: 24.1.11
compositor: xfwm4 v: 4.20.0 driver: X: loaded: intel dri: i915 gpu: i915
display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26")
s-diag: 584mm (22.99")
Monitor-1: VGA-1 mapped: VGA1 model: Dell E2218HN serial: <filter>
built: 2018 res: mode: 1920x1080 hz: 60 scale: 100% (1) dpi: 102 gamma: 1.2
size: 480x270mm (18.9x10.63") diag: 546mm (21.5") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
API: EGL v: 1.4 hw: drv: intel i915 platforms: device: 0 drv: i915 gbm:
drv: i915 surfaceless: drv: i915 x11: drv: i915 inactive: wayland
API: OpenGL v: 1.4 vendor: intel mesa v: 21.3.9 glx-v: 1.4
direct-render: yes renderer: Mesa DRI Intel 945GM device-ID: 8086:27a2
memory: 187.5 MiB unified: yes
Info: Tools: api: eglinfo,glxinfo de: xfce4-display-settings gpu: gputop,
intel_gpu_top, lsgpu wl: swaymsg x11: xdriinfo, xdpyinfo, xprop, xrandr
Either X.org or Wayland
You might think that a simpler solution was to go with Wayland in the first place and not bother with fixing X.org. However, for old hardware, there are not many Wayland-native window managers that a casual user can use. I do use Sway myself, however the family prefers to stay with XFCE, so finding a solution was necessary.
References
I found the following resources most helpful: – https://wiki.archlinux.org/title/Intel_graphics – https://lists.debian.org/debian-user/2025/10/msg00310.html



