Intel GMA 950 / 945gm Express GPU Acceleration In Linux With i915 Modesetting Driver - No More LLVMPipe! - Cover Photo

Intel GMA 950 / 945gm Express GPU Acceleration In Linux With i915 Modesetting Driver - No More LLVMPipe!

The llvmpipe CPU renderer in Linux certainly has its uses - but on an older Intel 945gm Express chipset machine (like the first gen Intel Mac Mini or MacBook) you can eke out a bit more performance and get a smoother desktop experience by enabling hardware acceleration using Linux’s hardware accelerated i915 driver on the GMA 950 integrated graphics - and also free up a bit of CPU time.

To allow this, we’ll need to enable something called Kernel Mode Setting or KMS.

So let’s do that!

Quick Navigation

Introduction

I recently found myself installing the very latest Debian Linux (12.6 “bookworm” at time of writing) on my 2006 Intel Mac Mini. This machine is notoriously difficult as, even if you’ve upgraded it to a 64 bit Core 2 Duo CPU it will still have a 32-bit EFI. Legacy BIOS mode is of course an option, but hard to force on these machines and generally not recommended these days and, besides, Apple’s implementation is a bit broken anyway.

Thankfully, the Debian net installer still supports 32-bit EFI on 64-bit machines and will boot and install fine from USB with no fuss.

That’s right - a bang up to date OS on an 18 year old machine, with excellent performance (under XFCE at least) and out of the box support for all those awkward bits of hardware like the gigabit networking, onboard audio and Apple’s “AirPort” wifi card. A great little machine for office stuff, email, web browsing, burning CDs and DVDs, and general “Linuxy stuff”.

Unfortunately, I found after installing that graphics hardware acceleration wasn’t working properly. In the worst cases the system may not even boot, showing the initial grub menu and then failing to a blank screen, necessitating the use of the nomodeset parameter. It took me a while to track down a proper fix, and so I decided to document it here.

Of course, while I’m using Debian as the example, this should apply to many other Linux distros too. Note that on Debian-based distributions (ie Ubuntu, Mint) these instructions should be pretty universal, but they may need to be adapted for other distros.

The i915 driver is ancient after all, so I can understand why testing it thoroughly isn’t really a priority in a modern Linux distro.

If you are working with a MacMini 1,1 in this day and age, I highly recommend that you install the modified firmware and upgrade the RAM to 4GB as it makes the machine much more useful. The 2006 Intel Mac Mini 1,1 takes 2x 667MHz DDR2 PC2-5300 SODIMMs and they can be picked up inexpensively on eBay.

You can also upgrade the CPU to a 2.33GHz Core 2 Duo T7600. These two upgrades resulted in a 30% performance improvement on my 1.83GHz Core Duo machine.

Is GPU Hardware Acceleration Actually Enabled? The glxinfo Red Herring

You may have read the advice to install mesa-utils:

apt-get install mesa-utils

and run glxinfo:

> glxinfo | grep "direct rendering"

to check whether your system is using hardware acceleration. Unfortunately this is no longer reliable using the llvmpipe renderer, as it will report:

direct rendering: Yes

Of course, this is technically true and accurate, but it’s not necessarily what we actually want, as it is using the CPU to render graphics using software rendering.

How To Determine Whether You’re Using The LLVMPipe CPU Renderer

If you’re here, chances are you’ve probably already determined this. But just to be sure, you can check the output of:

inxi -GSaz

You may need to install inxi first, of course, depending on whether it’s preinstalled with your Linux distribution.

Here is an example of the llvmpipe renderer being used with Intel 945gm chipset integrated graphics:

Output of inxi command showing llvmpipe renderer

Note the driver: N/A towards the top of the output, and renderer: llvmpipe (LLVM 15.0.6 128 bits) towards the bottom.

With Kernel Mode Setting (KMS) enabled, the output should look like this:

Output of inxi command showing i915 renderer

Note the driver: i915 towards the top of the output, and renderer: i915 (: 945GM) towards the bottom. It’s also worth noting all of the extra information in the Monitor-1 section, as the GPU can now correctly query the monitor and pass that information back to the OS.

The output also implies that this chipset offers s-video support - which now appears to be correctly detected and enabled, but the Apple Mac Mini doesn’t have the physical port so I haven’t been able to test this. Of course there are Intel 945gm laptops out there that do have this connector, so this is potentially very useful!

Caveats - OpenGL Version Support

The eagle-eyed among you may have spotted this already but I just wanted to point it out: as you can see from the output of the above command, llvmpipe (at least the version that ships with Debian bookworm) supports OpenGL 4.5, whereas the GMA 950 integrated GPU (in this machine at least) only supports the much older 2.1. If this matters to you, you may want to stick with the llvmpipe renderer. Realistically, you’re not going to be running the latest and greatest OpenGL games on this hardware and I haven’t found the older version to cause any issues, but consider yourself informed. :)

Adding The Kernel Boot Parameter To grub To Enable Modesetting

With all of the above in mind, let’s get on with it!

Thankfully this is very simple and just requires a boot parameter to be passed to the Linux kernel, which means a small tweak to the grub bootloader. First we need to edit our default grub config by running the following command. Substitute your favourite text editor of choice of course, but nano is newbie-friendly so I’m using it to demo here:

sudo nano /etc/default/grub

Editing the default grub config

Now we need to edit the GRUB_CMDLINE_LINUX_DEFAULT parameters to add the following:

i915.modeset=1

New boot parameter added

Note that I removed quiet because I like to see the full kernel output on boot to check for potential problems, but you can just add the new parameter after this with a space if you want to preserve it. Then press ctrl-x and then y to save the file.

Finally, we need to run the following command to update the grub bootloader:

sudo update-grub

Updating grub to use the new config

If it’s run correctly, it will look like the above. All that’s left is to reboot the system, and then re-check using the above instructions.

Benchmarking The Performance Improvement

Here are some interesting performance results using glxgears. Of course this very basic synthetic benchmark isn’t the be-all-and-end-all, but it’s usually a pretty good indication as to whether things are running smoothly - graphically at least.

glxgears output with llvmpipe CPU renderer

Using llvmpipe, this system gets an average of 188.99 FPS.

glxgears output with i915 hardware GPU renderer

Using i915, this system gets an average of 242.29 FPS - that’s a 28.2% increase!

Quick Version For People Who Already Know What They’re Doing

All you need to do is add:

i915.modeset=1

to

GRUB_CMDLINE_LINUX_DEFAULT

in

/etc/default/grub

and then run

sudo update-grub

and reboot!

If you liked this post please consider following me on Instagram or BlueSky!