Jolicloud

Sharing our stories about developing the perfect netbook OS

The Quest for Implementing Support for the GMA500 Chipset

November 17th, 2009 at 11:18 pm

Hello! My name is Adam McDaniel and I will write this inaugural Jolicloud Developers blog post. With the Jolicloud team we decided that this first post should be about how we implemented support for the GMA500 chipset, infamously codenamed as “Poulsbo”, in the upcoming Jolicloud Pre-Beta release.

But first, some background. I started the Array.org Netbook Kernel project in July of 2008 as an effort to provide a set of kernel packages optimized for the Asus EeePC. In January 2009 I joined the Jolicloud team as their lead OS architect. My role is to provide Jolicloud with support for as many netbook architectures as possible, and to fix the other little quirks that other Linux distributions have not yet solved. This is one of the things that makes Jolicloud unique. Our team has spent a lot of time optimizing netbook performances. One huge quirk for us was to find a way to support the new netbook hardware using the GMA500 chipset.

How New Hardware is Supported on Linux

When a new hardware component is released, the company that developed the technology has a choice in terms of how to release its drivers. Often, official drivers are released using various license agreements. In order to support the hardware on Linux, either the company needs to donate resources to the Linux kernel, and create a driver for the community to share, or, someone working on behalf of the Linux kernel will attempt to port the existing drivers, but only if the technical hardware documentation is available.

When this happens, the hardware is supported by the kernel, ensuring support on as many distributions as possible.

The main issue with the GMA500 chipset, which was originally launched in mid 2007, is that its source code was never released publicly. This resulted in poor levels of support amongst Linux users and developers.

The Problem with GMA500 in Netbooks

Since mid-2008 the GMA500 video chipset has be used in all netbooks that run the Intel Atom z500-series processor. Some examples include the Dell Mini 10Mini 12, the Acer Aspire One 751, the Asus EeePC 1101, and many more.

By the end of 2008, when the Dell Mini 10 and 12 models were released, they had GMA500 support, thanks to the collaboration between Ubuntu and Dell on a customized build of Ubuntu v8.04 (Hardy Heron). The company that owns the GMA500 chipset’s IP, Imagination Technologies, licensed the Linux drivers to Ubuntu for their Dell-specific “remix” of v8.04. Ubuntu released the pre-compiled GMA500 binaries, that were linked againsted other open-sourced libraries on their distribution. One such dependency was the open-sourced OpenGL implementation called Direct Rendering Infrastructure, or DRI. Ubuntu v8.04 used DRI v2.3.0, so that was the only version that the GMA500 binaries were linked against.

This was great. Users could now support 720p video, 1000+ frames per second in glxgears, no issues!

Work soon started to implement GMA500 into other Linux distributions, however they couldn’t implement a complete solution. The problem was there was no source code to the driver, and the original binaries had to be manually re-implemented for future libraries, like the DRI.

How is GMA500 supported today?

Without specific consideration for GMA500, the only way to display graphics on these netbooks was to fall back to 640×480 resolution through the vesa driver. This is what users would be met with when they first booted a Linux LiveUSB onto their Poulsbo-based netbook.

Fortunately, after Ubuntu v8.04, the team at Ubuntu-Mobile managed to implement the older binary drivers onto a newer version of Ubuntu Linux. They backported their current libdrm/DRI library to the known-working 2.3.0 release, but kept all the other features, like Gnome, KDE, and everything else, intact. This actually kind of worked. The team released a set of packages that did this on their Personal Package Archive, or PPA, at launchpad.net. However there were two problems. First, it required users to follow instructions to manually install the new packages, and second, portions of the code, specific to their running kernel, needed to be compiled locally on the user’s device.

Granted, the instructions provided by the Ubuntu-Mobile team weren’t that complicated, however a newbie in Linux could get lost easily. Canonical couldn’t say that Ubuntu v9.04 and later actually supported the GMA500 out-of-the-box; these Ubuntu-Mobile modifications had to be performed in a broken X display, running vesa drivers in 640×480, before full resolution would work. Furthermore, the on-site compilation process was managed by a program called Dynamic Kernel Module Support, or DKMS, which actually built a set of poulsbo-specific modules for your running kernel, on demand. This build process required the user to download DKMS, make, fakeroot, and the Kernel headers onto their netbook, which ate up almost 100 Megabytes.

So, provided that you were not turned off with poor video in LiveUSB mode, and you were OK with manually adding in the PPA and its packages, and with the DKMS build, you can get GMA500 to work on Ubuntu releases post-v8.04. However, as of Ubuntu v9.10 (Karmic Koala), support is still not available out-of-the-box.

Since the Ubuntu-Mobile team released their GMA500 packages, other distributions have jumped on the GMA500 train. One such distribution that announced support is Mandriva 2010 in their “One” release build. This was essentially a repackaging of Ubuntu-Mobile’s DEBs as RPMs, then pre-install the DKMS package. It worked, GMA500 support was available without user intervention, but we thought that there were still some things that could be improved.

Jolicloud’s Implementation of GMA500

Jolicloud believes that the DKMS approach to the GMA500 problem, which is fine for faster hardware, should not be necessary, especially on netbook hardware. Our goal was to integrate the Poulsbo drivers directly into the kernel itself, and support GMA500 out-of-the-box. Established conventions say that you must “decide” which DRI to use: either a Pouslbo-specific libdrm from v2.3.0, or something more recent. You couldn’t have both on the same system, right?

To tackle this problem, we worked directly on a newer method of integrating the original Ubuntu v8.04 binaries into the newer Jolicloud kernel. Initially, because the GMA500 binaries were built against libdrm 2.3.0, it seemed like the entire kernel needed to be kept at 2.6.28 (where libdrm 2.3.0 was standard). We thought this meant that we would have to implement two kernels simultaneously; a Poulsbo-specific kernel from v2.6.28, and a kernel from v2.6.32 for everyone else.  At one point, this seemed like the only option.

However, we developed a way to install the Poulsbo DRI along side the native kernel’s DRI. First, we renamed the Poulsbo DRI’s exported symbols. This allowed us to release two DRIs without the versions colliding in the same kernel. We next promoted libdrm-poulsbo into its own, separate, implementation of libdrm (not just a simple drop-in replacement) and instructed it to use the alternate symbols. Other packages, like xserver-xorg-video-psb, were re-linked to our jolicloud-upgraded libdrm-poulsbo library.  Now, our kernel provides both DRIs, and packages provide both DRMs. This basically means that one distribution ISO can support GMA500 and all other chipsets with unique DRIs and DRMs! :)

The end result?

Jolicloud’s Pre-Beta release will support native resolution for Intel Atom z500-series netbooks with the GMA500 chipset. This is on par with the other major distributions advertising built-in Poulsbo support, except we’ve simplified the installation into a truer form of an out-of-the-box implementation.

GMA500 support out of the box is part of our mission to provide an OS that can install on the widest number of netbooks. Our quest is not finished yet. Now that we have improved the support of GMA500, we are going to continue working on our hardware support and focus on improving boot time and other optimization.

Comments

Massimiliano
November 18, 2009 at 9:50 am

THAT is Great. thank you for your hardwork.

Sledge
November 18, 2009 at 10:26 am

That’s real great great news !
Thanks so much for caring about lonely buyers of such hardware.

[...] Developers blog [...]

[...] Update: 18th Nov 2009. Jolicloud have announced out-of-the-box support for the GMA500. [...]

TrackSmart
November 18, 2009 at 5:00 pm

Hurrah! Thanks for all your hardwork!

Now when do I get to download this new version? I got my ‘invitation’ a while back, but GMA 500 support was still on the horizon at that point (though it some twitter posts showed that you guys were working on it).

It’s great to hear that you made it work!

[...] OS works on all possible netbooks. Lead developer Adam McDaniel (of Array.org kernel fame) wrote a brief article yesterday explaining how the team has been going about adding support for netbooks with GMA 500 [...]

[...] Como o Jolicloud vai suportar as problemáticas GMA500? Leia aqui. [...]

[...] chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

[...] chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

[...] chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

[...] chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

November 19, 2009 at 3:51 pm

You are rather limiting the work done by Mandriva.
It is not just “repackaging” the Ubuntu debs.
Actually, our Mandriva packages have almost nothing to do with Ubuntu packages, they use the Linux driver kit delivered by Intel, with a lot of integration in the distro.

Mandriva is also renaming the symbols in the customized drm module from poulsbo driver, so that it can live next to the standard drm module in the kernel.

And the custom libdrm from poulsbo drivers is also packaged in a separate package with distinct installation path (but same filename).
Then we set the proper libGL/libdrm path using the update-alternatives scheme, to prefer the poulsbo implementation when running on poulsbo hardware.
This is done at boot time, when our config tools detect that the hardware configuration has been changed.

We also have some patches in the psb driver to prefer some options by default.

So, no, it’s not repackaging of Ubuntu or Fedora’s packages :p

Anyway, our approach look quite similar :)

[...] chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

[...] chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

[...] chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

[...] chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

November 19, 2009 at 5:45 pm

As Olivier pointed out, what you’re doing is not particularly original. My implementation for Fedora (in RPM Fusion) is much like Olivier’s for Mandriva, it also installs Poulsbo’s libdrm in parallel with the main system’s libdrm, and works with the main system kernel. I’ve tested it to work perfectly well with kernel 2.6.31, and the packages install entirely alongside the standard Fedora distribution packages, no replacement needed.

[...] t&#104at’s a &#114at&#104e&#114 big deal, but Joli&#99loud’s Adam M&#99&#68a&#110iel bl&#111gged &#97b&#111&#117t the h&#111w &#97nd why m&#117ch mor&#101 &#101&#108oq&#117&#101n&#116&#108y and in m&#117ch mor&#101 d&#101&#116ai&#108 [...]

[...] vindicate ground that’s a kinda bounteous deal, but Jolicloud’s cristal McDaniel blogged most the how and why such more eloquently and in such more discourse than I ever could. (McDaniel, by the way, is the [...]

[...] the GMA500 chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

[...] chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

[...] the GMA500 chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

[...] the GMA500 chipset. I’d explain why that’s a rather big deal, but Jolicloud’s Adam McDaniel blogged about the how and why much more eloquently and in much more detail than I ever could. (McDaniel, by the way, is the guy [...]

[...] is the first Linux distribution that fully supports Intel’s GMA500 graphics chipset, used on Atom Z-series netbooks such as the Dell Mini 12, the Asus Eee 1101HA, and the Acer Aspire One 751. That support will allow [...]

November 24, 2009 at 6:04 pm

[...] is now compatible with almost every netbook. With our recent announcement on the GMA500 support, we think we did quite a good job in enabling 98% of netbooks with out-of-the-box compatibility [...]

November 24, 2009 at 6:19 pm

As I don’t write kernel drivers I am not fully qualified to say this, but you are a genius! Can’t wait to try out the beta on my AAO 751. I’ve gone through a huge struggle getting Ubuntu to run in Karmic on it (with limited success, I might add). Mandriva has native support for their 2010 release, but it’s unstable as all hell – video freezes randomly in about 30 min. intervals, requiring a hard reboot. If you guys can manage to get GMA-500 working stably you have definitely got yourself a customer.

orange
November 25, 2009 at 3:05 am

I think “Graphics” and “Office” are not part of social networking and therefore should be removed to make the download and the OS slimmer.

November 26, 2009 at 8:59 pm

Hi!
This sounds very good, specially as I own an Asus T91 and a Clevo TN70M (aka “Wesurf” in France): both implement the GMA500.
So when the version (even beta) including GMA500 support will be available? I’ve received my invitation this week.
TIA!
Laurent.

[...] is the first Linux distribution that fully supports Intel’s GMA500 graphics chipset, used on Atom Z-series netbooks such as the Dell Mini 12, the Asus Eee 1101HA, and the Acer Aspire One 751. That support will allow [...]

[...] is now compatible with almost every netbook. With our recent announcement on the GMA500 support, we think we did quite a good job in enabling 98% of netbooks with out-of-the-box compatibility [...]

vincent
December 3, 2009 at 6:36 pm

That’s good news,
my brand new eeepc t91mt is a nice machine,but I’d rather have it run linux…
However right now, jolicloud in a distorted 800×600 resolution is quite painfull to the eyes.
I’d be more than glad to help testing the graphic driver (as well as trying to have this atheros wifi card to run…).

Rob
December 11, 2009 at 2:24 am

On my Dell mini 12, I only see an option for one screen resolution: 1280×800. Is it possible to use a smaller resolution? I’d really prefer 1024×768, or even 800×600. With the full 1280×800, it’s nearly impossible to use the tiny icons along the top of the screen on Jolicloud.

Also, is there a way to turn off the UNR remix look?

[...] UNR 的痕迹,使安装界面更加简单美观;其次,增加了对 Intel GMA500 [...]

bigdbag
December 15, 2009 at 3:02 am

Hi, I own an Acer 1410, which has a SU3500 CULV Core 2 Solo CPU and Intel’s 4500HD graphics chipset. Is there any planning being done towards supporting this hardware, either on Core 2 Solos or on the 4500HD? I have searched for information regarding this and have come up empty handed. I would love to get Jolicloud running on my Acer. Thanks!

[...] uno. Lo malo, lleva meses sin actualizarse. Pero no es el fin del mundo, Jolicloud ha anunciado que trabaja en un controlador nativo para esta plataforma, y Moblin se basara en Gallium3D para resolver este [...]

January 7, 2010 at 12:57 am

Nice blog Adam ;) keep them coming
Happy new year dude

[...] a simple vista en esta nueva versión respecto a la anterior alpha aunque en su blog prometen haber mejorado el rendimiento para el chipset GMA500 que es el que traen de serie más del 95% de los netbooks actualmente en el [...]

Carlos
February 3, 2010 at 10:22 am

I installed pre-beta release on my Sony vaio P hoping the poulsbo drivers would work out of the box, WHICH IS NOT THE CASE.
I just get low resolution and a warning my specific devices cannot be correctly detected.
I did the installation twice as trying to get a new configuration for the screen drove to a wrong setup.

How can I get them active ?

Arch
February 11, 2010 at 9:08 pm

I have also installed the pre-beta release, again the drivers do not work out of the box, there is no GMA support as promised, certainly not for the Vaio P.

Leave a comment

Please fill these informations to comment.