HOWTO: Compiling Intel Atom Poulsbo GMA 500 graphics driver on Debian
Purpose: Finally here is a step-by-step guide to get the Intel Poulsbo (PSB) GMA 500 graphics driver working under Debian testing/unstable. Over the last 3 months or so since I wrote an introductory post regarding this whole issue, I have got several emails and comments with a request to put up such a guide. Sorry I could not do this earlier because of work. Recently the work has just got a lot busier. I know, by looking at the length of the post you might get discouraged or scared and decide not to embark on this journey, but trust me and follow with me and you will be there. Towards the end of this post I have a link from where you can download all the packages and file required to get the driver working. In any case here it is…
Disclaimer
As I may or may not have noted in my previous post, I don’t claim this to be the perfect method. In fact this is not a perfect method as we have to overwrite some files later in the installation process. I bet Debian Developers will never accept such a kind of workaround. So please use this method at your own risk. This is for folks who don’t care about right or wrong method as long as they can get a native driver for their GMA 500 graphics controller on their Intel Atom notebooks. You have been WARNED!!!
Setup Environment
Kernel: 2.6.30-2-686
Debian: Testing (Squeeze)
We need two components namely the “kernel” and the “Xorg” component to get Poulsbo (psb) driver working in Debian testing/unstable. Also make sure that you just have one and only kernel installed. The reason is that if you have multiple kernel installed you might have trouble generating the kernel components.
Step 1: Add Jaunty Ubuntu Mobile sources
Add the following line to your /etc/apt/sources.list file:
deb-src http://ppa.launchpad.net/ubuntu-mobile/ppa/ubuntu jaunty main
Save and quit file.
Update repositories with the new sources:
# apt-get update
Alternatively you can get the packages from here.
Step 2: Prepare your system
We need to make sure that we have kernel header files and some other development packages installed for the currently running kernel:
# apt-get install dkms module-assistant dpatch autotools-dev quilt libx11-dev pkg-config xserver-xorg-dev x11proto-gl-dev x11proto-video-dev libgl1-mesa-dev libxvmc-dev x11proto-core-dev x11proto-fonts-dev x11proto-randr-dev x11proto-render-dev x11proto-xinerama-dev x11proto-xf86dri-dev x11proto-xf86dga-dev x11proto-xf86misc-dev libxfixes-dev libxdamage-dev libexpat1-dev
# m-a prepare
Update: If you are using Debian Stable (Lenny), you need to download the package from Debian Testing and then install it on Debian Stable. The package installs just fine without complaining about any incompatibility or missing libraries.
Step 3: Install PSB source packages (Kernel Component)
In this Step we will just see how to build kernel components for the PSB driver, psb.ko and drm.ko:
# cd; mkdir -p psb/drm; cd psb/drm
# apt-get source psb-kernel-source
# cd psb-kernel-source-4.41.1
We will be taking care of any modification that are supplied in the debian/control file. If you really want to see what I am saying then please refer to Adam’s git repository. Many thanks to him!
Now before you can build kernel components you need to edit the following files:
drm_os_linux.h
drm_fops.c
drm_sysfs.c
psb_i2c.c
debian/control
debian/rules
You can download the above six modified files from here and overwrite the original files in the psb-kernel-source-4.41.1 directory. If you want to see the changes then refer to the git repository above. I could have setup my own git repository here but I am having trouble setting up gitweb on my bluehost domain account. If I ever get a chance to resolve it, I will setup the git repository and highlight all the changes.
Now we are ready to compile the kernel modules:
# debuild -i -us -uc -d -b
If the compilation went without any fatal errors then the following packages will be created:
# ls -l ../psb-*.deb
-rw-r--r-- 1 root root 90422 2009-10-27 17:42 ../psb-kernel-headers_4.41.1-1squeeze1_all.deb
-rw-r--r-- 1 root root 402272 2009-10-27 17:42 ../psb-kernel-source_4.41.1-1squeeze1_all.deb
-rw-r--r-- 1 root root 156944 2009-10-27 17:41 ../psb-modules_4.41.1-1squeeze1_i386.deb
# cd ..
Let’s install the following packages:
# dpkg -i psb-kernel-headers_4.41.1-1squeeze1_all.deb psb-modules_4.41.1-1squeeze1_i386.deb
Your kernel modules, psb.ko and drm.ko, will be installed automatically at the following location:
# ls -l /lib/modules/2.6.30-2-686/updates/char/drm
total 392
-rw-r--r-- 1 root root 207207 2009-11-04 02:07 drm.ko
-rw-r--r-- 1 root root 180389 2009-11-04 02:07 psb.ko
Now just copy these modules to their proper locations so that they can get loaded during boot time:
# cd /lib/modules/2.6.30-1-686/updates/char/drm
# cp psb.ko drm.ko ../../../kernel/drivers/gpu/
# rm -rf ../../../kernel/driver/gpu/drm/
# depmod -ae
You may add the modules to your /etc/modules so that they load early in the boot process. I am not sure if this step is required or not:
# nano /etc/modules
drm
psb
Save and quit the file.
Congratulations! You have successfully installed the kernel module You are one step closer to bliss.
Step 4: Install source packages (XOrg Component)
So our next job is to install XOrg components, psb_drv.so and other related files.. In this step we are going to compile a lot of packages. Create a separate directory for xorg stuff:
# cd; mkdir -p psb/xorg; cd psb/xorg
Then download these source packages:
# apt-get source libdrm-poulsbo libva psb-firmware psb-meta xpsb-glx xserver-xorg-video-psb
Step 4(a): Compile libdrm-poulsbo package
# cd libdrm-poulsbo-2.3.0
# nano debian/control
and comment the following lines as shown in blue:
Architecture: any
#Conflicts: libdrm-dev
#Replaces: libdrm-dev
Depends: libdrm-poulsbo1 (= ${binary:Version})
......
Depends: ${shlibs:Depends}, ${misc:Depends}
#Conflicts: libdrm2
#Replaces: libdrm2
and build the package:
# debuild -i -us -uc -d -b
This will results into the following packages being created:
# ls -l ../libdrm-poulsbo*.deb
-rw-r--r-- 1 root root 18420 2009-10-27 15:20 ../libdrm-poulsbo1_2.3.0-1squeeze1_i386.deb
-rw-r--r-- 1 root root 34168 2009-10-27 15:20 ../libdrm-poulsbo1-dbg_2.3.0-1squeeze1_i386.deb
-rw-r--r-- 1 root root 24786 2009-10-27 15:20 ../libdrm-poulsbo-dev_2.3.0-1squeeze1_i386.deb
# cd ..
Step 4(b): Compile psb-firmware package
# cd psb-firmware-0.30
# debuild -i -us -uc -d -b
# ls -l ../psb*.deb
-rw-r--r-- 1 root root 11260 2009-10-27 15:00 ../psb-firmware_0.30-1squeeze1_all.deb
# cd ..
Step 4(c): Compile psb-meta package
# cd psb-meta-1.1/
# debuild -i -us -uc -d -b
# ls -l ../poulsbo*.deb
-rw-r--r-- 1 root root 1736 2009-10-27 15:06 ../poulsbo-driver-2d_1.1-1squeeze1_all.deb
-rw-r--r-- 1 root root 1750 2009-10-27 15:06 ../poulsbo-driver-3d_1.1-1squeeze1_all.deb
# cd ..
Step 4(d): Compile libva package
Before we compile this package we need to install the following packages that we just built above:
# dpkg -i --force-overwrite libdrm-poulsbo*.deb
# cd libva-0.29/
# debuild -i -us -uc -d -b
# ls -l ../libva*.deb
-rw-r--r-- 1 root root 11876 2009-10-27 15:15 ../libva1_0.29-1squeeze1_i386.deb
-rw-r--r-- 1 root root 29318 2009-10-27 15:15 ../libva-dev_0.29-1squeeze1_i386.deb
# cd ..
Note: If the above force-overwrite command does not work then try the following:
# dpkg -i –force-overwrite libdrm-poulsbo*.deb psb-firmware_0.30-1squeeze1_all.deb
Thanks Jon_J.
Step 4(e): Compile lxpsb-glx package
Before we compile this package we need to install the following packages that we just built above:
# dpkg -i libva*.deb
# cd xpsb-glx-0.18
# debuild -i -us -uc -d -b
# ls -l ../xpsb-glx*.deb
-rw-r--r-- 1 root root 1191406 2009-10-27 16:11 ../xpsb-glx_0.18-1squeeze1_i386.deb
# cd ..
Step 4(f): Compile xserver-xorg-video-psb package
# cd xserver-xorg-video-psb-0.31.0
# debuild -i -us -uc -d -b
# ls -l ../xserver-xorg-video-psb*.deb
-rw-r--r-- 1 root root 83848 2009-10-27 17:48 ../xserver-xorg-video-psb_0.31.0-1squeeze1_i386.deb
# cd ..
Now we will install the rest of the packages that we have built so far:
# dpkg -i poulsbo-driver-*.deb xserver-xorg-video-psb_0.31.0-1squeeze1_i386.deb xpsb-*.deb libva*.deb
Congratulations once again if you have come so far and all your packages were being built and installed successfully.
To cross-check if you have compiled and installed all the packages successfully here is the list:
# dpkg -l | grep squeeze1
ii libdrm-poulsbo-dev 2.3.0-1squeeze1 Userspace interface to kernel DRM services -- developme
ii libdrm-poulsbo1 2.3.0-1squeeze1 Userspace interface to kernel DRM services -- runtime
ii libdrm-poulsbo1-dbg 2.3.0-1squeeze1 Userspace interface to kernel DRM services -- debugging
ii libva-dev 0.29-1squeeze1 Video Acceleration (VA) API for Linux -- development fi
ii libva1 0.29-1squeeze1 Video Acceleration (VA) API for Linux -- runtime
ii poulsbo-driver-2d 1.1-1squeeze1 Metapackage for the 2D Poulsbo (psb) X11 driver.
ii poulsbo-driver-3d 1.1-1squeeze1 Metapackage for the 3D Poulsbo (psb) X11 driver.
ii psb-firmware 0.30-1squeeze1 Binary firmware for the Poulsbo (psb) 3D X11 driver
ii psb-kernel-headers 4.41.1-1squeeze1 Kernel module headers for the Poulsbo (psb) 2D X11 driv
ii psb-modules 4.41.1-1squeeze1 Kernel module built for -686 kernel
ii xpsb-glx 0.18-1squeeze1 X11 drivers for Poulsbo (psb) 3D acceleration
ii xserver-xorg-video-psb 0.31.0-1squeeze1 X.Org X server -- Intel Poulsbo (2D)
At this stage you should have all the above packages installed.
Step 5: Add Symlinks
Now we need to do some “dirty” hack in order to make this driver work:
# rm /usr/lib/libdrm.so.2.4.0
# ln -s /usr/lib/libdrm.so.2.3.0 /lib/libdrm.so.2
# ln -s /usr/lib/libdrm.so.2.3.0 /lib/
Step 6: Copy xorg.conf
Finally you will need a valid xorg.conf file to make the driver work. You can download my working xorg.conf file from here.
# cp xorg.conf /user/X11/xorg.conf
One important thing to verify is that the following line is un-commented in the xorg.conf file:
Option "IgnoreACPI" "1"
otherwise you will see a blank/black display when the system boots.
Step 7: Reboot!
Finally reboot your system and cross your fingers. Did you see your GDM or KDM screen? If yes, then chances are that the psb driver has worked. Congratulations once again. Your hard work paid off.
Step 8: Verify
Here are some steps to verify if your psb drivers is actually loaded or not.
To check for the kernel component (drm.ko and psb.ko):
# dmesg | grep drm
Output:
[ 9.762315] [drm] Initialized drm 1.1.0 20060810
[ 9.824743] [drm] psb - 5.0.1.0046
.........................................
[ 12.207384] [drm] intel_lvds_set_backlight: the level is 100
[ 12.207391] [drm] LVDSGetPWMMaxBacklight: the max_pwm_blc is 31250.
[ 12.207402] [drm] fb0: psbfb frame buffer device
[ 12.207412] [drm] intel_lvds_prepare
[ 12.207417] [drm] intel_lvds_set_power: 0
[ 12.207422] [drm] intel_lvds_set_backlight: the level is 0
[ 12.207428] [drm] LVDSGetPWMMaxBacklight: the max_pwm_blc is 31250.
[ 12.268109] [drm] LVDS: set mode 1024x768 4
[ 12.268169] [drm] intel_lvds_commit
I haven’t verified yet, but I think this driver uses the new KMS feature.
To check if the XOrg driver, psb, has been loaded or not:
# cat /var/log/Xorg.0.log | grep driver
Output:
(WW) AllowEmptyInput is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
X.Org XInput driver : 4.0
(II) Loading /usr/lib/xorg/modules/drivers//psb_drv.so
(II) PSB: driver for Intel GMA500 chipsets: Intel GMA500
(II) Loading /usr/lib/xorg/modules/drivers//Xpsb.so
(II) PSB(0): [Xpsb] Disable hog plug daemon in PSB driver.
ABI class: X.Org XInput driver, version 4.0
Lastly if you are lazy and don’t want to go through this entire process then you can download all the packages and files from here.
Update: I have uploaded the kernel config file, at the above link, that I used to compile these packages.
That’s it guys. Have fun.
Would really appreciate if you can report success or failure on your system. Feel free to point out any improvements and errors. I would really to make this as easy as possible. So if you know a better method for steps please chip in.
Happy PSB’ing!

Free Email Subscription









November 5th, 2009 at 3:39 pm
[...] one of my next post, we will see step-by-step instructions on how to compile and install the Poulsbo (GMA 500) graphics [...]
November 6th, 2009 at 2:33 am
Great, thank you !
I’ll try it this week-end…
Reply to this comment
November 7th, 2009 at 3:18 am
Great work ! Thank you very much, this is the unique howto for GMA 500 that allows me to install debian on my acer aspire !
Reply to this comment
November 8th, 2009 at 2:17 pm
Thanks for the howto, although I managed to compile psb for 2.6.30 before, I have not been able to make 3d work, until your blogpost.
Just for the record, I have compiled everything here (kernel included) with gcc optimized for the Atom cpu (package lpia-wrapper from Ubuntu), in hope I’ll get some performance improvement.
I suggest to apply the patch described at http://bbs.archlinux.org/viewtopic.php?pid=620607#p620607
to be able to dim the display brightness more. And look also at drm/psb-kernel-source-4.41.1/intel_lvds.c, to be able to do it via /sys interface as well (not only through xbacklight). If you replace 1 with 0 in the patch, you’ll be able to make the display completely black with just the brightness control – you might or might not want this.
Reply to this comment
December 14th, 2009 at 11:25 am
Hello!
Thank you very much for the great post. I followed this guide to my dell mini 10 with gma500 and the only problem i have is that i can’t dim my display. My /sys/class/backlight is empty. I tried xbackligh,setpci with no results too. Am i missing something?
Thank you
Reply to this comment
December 19th, 2009 at 2:24 pm
I’m glad to finally have Debian Squeeze on my Dell Mini-10 using its default resolution! Thank you so much!
I didn’t compile anything, I just used the files linked.
I came across one stumbling block, and repeated the procedure over 3 times. I found an omission that prevented me getting this installed using the collection of files.
At the command above:
# dpkg -i –force-overwrite libdrm-poulsbo*.deb
I changed it to the following and finally got the firmware installed:
# dpkg -i –force-overwrite libdrm-poulsbo*.deb psb-firmware_0.30-1squeeze1_all.deb
Reply to this comment
Admin Reply:
January 20th, 2010 at 10:45 am
Thanks for your input. I have added your info.
Reply to this comment
December 31st, 2009 at 3:40 pm
Thanks!!! you are my new god…..
I’m now enjoying my new resolution. Great HowTo, thanks a lot
Reply to this comment
January 7th, 2010 at 6:11 am
Hy guys
I got a Acer O751H and i have this cursed GMA 500, but 1 thing odd is the touchpad ‘tap to click’ not working on kde4, but it works under tty’s after installed gpm package, im running debian Squeeze on this netbook. Any clues on how to make it work in kde4 the tap to click?
thx in advance
Reply to this comment
January 10th, 2010 at 5:20 am
Thanks a lot! You’ve made a really nice work. By reading your HOWTO (and, I should admit, by installing the precompiled packages provided by you, without recompiling them from source
), I was able to use that damn-crazy Poulsbo driver with Debian Squeeze on my ASUS 1101HA.
It’s a pity that this driver is not going to be included in the official Debian repos (mainly because of binary blobs and file overwriting….). And it’s even worse that we would probably never have any free driver for this chip-shit.
Reply to this comment
February 2nd, 2010 at 4:30 pm
Will these instructions work on Debian stable (lenny), or is there something here that requires testing/unstable?
Reply to this comment
Admin Reply:
February 15th, 2010 at 10:16 am
John,
These instructions should work on Debian Stable except for the fact that you will need to install the dkms package manually from Debian Testing since DKMS is not a part of current Debian Stable Release.
Reply to this comment
February 10th, 2010 at 3:38 pm
Hmm, on this page…
http://blogs.koolwal.net/2009/07/25/info-state-of-intel-poulsbo-chipset-graphics-driver/
He said…
“I took the pointers provided by these people and was able to compile and install the Poulsbo’s XOrg driver (psb.ko) and framebuffer driver (psbfb) on my Debian Stable (Lenny system)”
I have Lenny too, but I’m stuck with “DKMS isn’t installed” so I should have forgotten something, but if he got his working then we should too !
Reply to this comment
February 11th, 2010 at 10:36 pm
John…
You’re right…I’m on a pure stable Lenny and I HAD to install the dkms from backport, no way without this. I then have successfully compiled psb.
Dear Admin, thanks a lot for the whole damn work you’ve done here !
Could you post here an ikconfig file from the Lenny kernel you used please ?
Thanks again for this nice usefull blog.
Reply to this comment
Admin Reply:
February 15th, 2010 at 10:11 am
Yes, you need to install DKMS package from Debian Testing if you are using Debian Stable. That’s what I ended up doing too. The only drawback in Debian Stable is that you cannot get 3D acceleration working on Stable. I have posted the .config file also now.
Reply to this comment
February 24th, 2010 at 11:53 am
Hi there!
I’m trying to switch my new eeepc 1201ha featuring gma500 to linux and this guide seems to be my only hope.
I installed a Debian Squeeze and tried to follow these steps, but the first debuild you wrote comes with a fatal error at line 1330:
applying patch use_udev to ./ … failed.
Do you have any idea?
Reply to this comment
RaptorBlue Reply:
February 26th, 2010 at 4:38 pm
Hi Aster,
do not copy the file drm_sysfs.c from the .tar file as described. As it seems the newer version is already patched.
Good Luck!
Raptor
P.S. Please let me know when you have working packages.
Reply to this comment
February 26th, 2010 at 4:49 pm
Hi Admin,
thanks for the work you have done.
Nevertheless i experienced a problem with the xorg driver.
During the boot process the display is changed to high resolution (when loading the psb kernel module).
But the xserver does not start anymore (your xorg.conf). The error log says: dlopen: dlopen: /usr/lib/xorg/modules/drivers/psb_drv.so: undefined symbol: resVgaShared
Any ideas on this?
Thx
Raptor
Reply to this comment
February 27th, 2010 at 11:08 am
First off, thank you for all your hard work. I’m running Gentoo, and can’t get the psb driver to work. I have everything installed, kernel mod loads and works, your xorg, etc. The moment that I try to start X I get a blank screen, X just hangs when it loads the psb driver. Only way to get into the system at that point is to ssh in. Half the time it just totally locks the system up and not even ssh is possible. Some system info:
System: VGN-P788K (2gb ram, 64gb ssd)
Kernel: 2.6.32 (Tux on Ice)
Gentoo packages and revisions:
Xorg-x11: 7.4-r1
Xorg-Server: 1.7.5
psb-kmod: 4.41.1_p10-r1
psb-firmware: 0.30_p3
xf86-video-psb: 0.32.0_p1
As long as I don’t ‘force’ X to use the psb driver, it will load and run fine ‘autoselecting’ the mesa driver…. Any suggestions?
Thank you!
Reply to this comment
March 3rd, 2010 at 2:55 pm
hi,
this looks great, i really want to be able to code on the move with my vaio p.
I’m willing to go with debian, but i thought i should ask, can this method be adapted to some other common distros? fedora 8,9,10?
i can guess at reasons why not, but i’m not that much a of a linux buff.
thanks for any constructive replies.
Reply to this comment