Tuesday, November 9, 2010

Fix Kernel 2.6.36 build with Intel PSB GMA 500 (psb-kmod)

Linux kernel 2.6.36 changed  the ioctl structure.  I have attached a new patch and e-build which should fix the issue to the following ticket: http://bugs.gentoo.org/show_bug.cgi?id=344889

Sunday, October 24, 2010

Fix suspend/resume with Intel PSB GMA 500

You can work around the suspend/resume when using the Intel PSB driver for the GMA500.  

  > mv /usr/lib/pm-utils/sleep.d/99video /usr/lib/pm-utils/99video

NOTE that you will have to do this again every time you emerge pm-utils.  This will cause the video hardware to not get reset by the suspend system.  There is probably a video quirk that needs to be added to the pm-suspend script, I will work on what it might be and report once I find anything.

Tuesday, September 21, 2010

xf86-video-psb (GMA 500 / Poulsbo on Xorg 1.7

I was finally able to get Xorg 1.7 working with the xf86-video-psb, including 3D acceleration and va-api.  The overall performance of the driver seems better than Xorg 1.6 was.  I am running XFCE with a composite desktop, which works well.

After shamelessly stealing the patches from http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/x11-driver-video-psb/current/SOURCES/, and some slight modifications to the ebuild, I was able to get everything working.  Basic steps:

Apply the following patches (in addition to the ones already included in current ebuild):
  • xserver-xorg-video-psb-0.31.0-assert.patch
  • xserver-xorg-video-psb-0.31.0-comment_unused.patch
  • xserver-xorg-video-psb-0.31.0-greedy.patch
  • xserver-xorg-video-psb-0.31.0-loader.patch
  • xserver-xorg-video-psb-0.31.0-xf86AddModuleInfo.patch
When building, you also need to set the CFLAGS to include -fvisibility=default.

Once this is done, just emerge like normal and your full Poulsbo graphics card will work with the latest stable Xorg 1.7.  To make things easier, I have submitted a patch to Gentoo, you can download everything you need there into your own local overlay.

Wednesday, April 28, 2010

Gentoo Linux on the Dell Mini 10/12

Installing Gentoo on the Dell Mini 10/12 was actually fairly easy.  There are a couple of snags during the processes, so I would point out a few of the problems and the solutions.  Running the XFCE4 Desktop environment, the system is very ice, responsive and performs well.  Compile speed on this machine is not too bad but I setup distcc to my main desktop to speed things up.

Hard-drive not recognized on LiveCD

The LiveCD (20100326) didn't load the driver for the SATA/IDE controller durring boot.  You can load the driver by typing the following command:    

modprobe pata_ach.

NOTE: this likely makes the hard-drive the second drive (the LiveCD is now the first, since it was probably USB), however, when the system boots, the HD will be the first.  So durring the install, (partitioning, etc), you will reference /dev/sdb, but when writing the config files (fstab, grub.conf, etc), make sure you reference /dev/sda.

 Wireless network card support (b43) in kenel 2.6.33


 In order to use the Wireless card, you have to unmask the kernel to version 2.6.33 (masked ~x86 currently) and the latest version of b43-firmware and b43-fwcutter (required version 13).  I added the following to /usr/portage/package.keywords:

sys-kernel/gentoo-sources
net-wireless/b43-firmware
net-wireless/b43-fwcutter
app-text/a2ps


Optimize for the Intel Atom Z530

I am using the following CFLAGS and options which seem to work best for CPU used on this device.  Using these options improved my performance signifigantly.  See the Gentoo guide for more information: http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel

CFLAGS="-O2 -march=core2 -mtune=generic -mssse3 -mfpmath=sse -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j3"


Full graphics, frame-buffer, accelerated X, including opengl and va-api

This is where things get a little messy.  From what I have found, almost no distro out there has a good solution for this problem.  There are two Graphics drivers available for this chipset (GMA 500 also known as PSB).

IEGD - The Intel embedded graphics driver.  From the research I have done, this is a binary driver only, supports up to Xorg 1.6.  There is currently no Gentoo ebuild for this driver and support seems to be not available.  Rumors are this driver has better performance, I have not yet tried it.

PSB - The "open" source version of the driver, includes Framebuffer, X11, openGL, and va-api.  This is the driver I chose as it is currently masked ~x86 in portage.  Although patches are available for Xorg 1.7, I could not get it to work.  It would compile but fail to load because of missing symbols.  I patched the missing symbols, but the Xpsb driver (binary only portion of driver) still had the problem, and thus acceleration would not work.  Instead since portage still contains Xorg 1.6 tree, I masked Xorg 1.7 (according to http://www.happyassassin.net/, it might be fixed soon) .  Simply add the following lines to /etc/portage/package.mask.

>=x11-base/xorg-server-1.7.0
>=x11-base/xorg-drivers-1.7
>=media-libs/mesa-7.7.0
>=x11-libs/libXinerama-1.1
>=x11-proto/xineramaproto-1.2
>=x11-libs/libXext-1.1.1
>=x11-proto/xextproto-7.1.1
>=x11-libs/libXtst-1.1.0
>=x11-proto/recordproto-1.14
>=x11-proto/xcmiscproto-1.2.0
>=x11-proto/xf86bigfontproto-1.2.0
>=x11-proto/bigreqsproto-1.1.0
>=x11-proto/fixesproto-4.1.1
>=x11-proto/bigreqsproto-1.1.0
>=x11-libs/libX11-1.3.2
>=x11-proto/inputproto-2.0
>=x11-libs/libXi-1.3
>=x11-proto/recordproto-1.14
>=x11-proto/xf86vidmodeproto-2.3
>=x11-libs/libXxf86vm-1.1.0
>=x11-proto/scrnsaverproto-1.2.0
>=x11-libs/libXScrnSaver-1.2.0
>=x11-proto/xf86dgaproto-2.1
>=x11-libs/libXxf86dga-1.1.1
>=x11-apps/xinput-1.5.1

>=xfce-base/xfce4-settings=4.6.3-r1

You also need to unmask the drivers, they are ~x86.  In /etc/portage/package.keywords:

x11-drivers/xf86-video-psb
x11-libs/libdrm-poulsbo
x11-libs/xpsb-glx
x11-drivers/psb-kmod
x11-drivers/psb-firmware