Difference between revisions of "Intel GMA 500"

From ArchWiki
Jump to: navigation, search
(removed deprecated stuff, left only native support by kernel driver)
Line 19: Line 19:
 
On this page you find comprehensive information about how to get the best out of your Poulsbo hardware using Arch Linux.
 
On this page you find comprehensive information about how to get the best out of your Poulsbo hardware using Arch Linux.
  
== Drivers: Advantages and Disadvantages ==
+
== Kernel's gma500_gfx module ==
  
=== Kernel's gma500_gfx module ===
+
With kernel 2.6.39, a new psb_gfx module appeared in the kernel developed by [http://en.wikipedia.org/wiki/Alan_Cox Alan Cox] to support Poulsbo hardware. As of kernel 3.3.rc1 the driver has left staging and been renamed gma500_gfx. ([http://blog.bodhizazen.net/linux/linux-gma500-poulsbo-driver-moved-out-of-staging/])
With kernel 2.6.39, a new psb_gfx module appeared in the kernel developed by Alan Cox to support Poulsbo hardware.
+
 
+
As of kernel 3.3.rc1 the driver has left staging and been renamed gma500_gfx. ([http://blog.bodhizazen.net/linux/linux-gma500-poulsbo-driver-moved-out-of-staging/])
+
  
 
'''Advantages'''
 
'''Advantages'''
  
* Native resolution (1366x768) with early KMS (on Asus Eee 1101HA)
+
* Native resolution (1366x768) with early KMS (tested on Asus Eee 1101HA)
 
* Up to date kernel and Xorg
 
* Up to date kernel and Xorg
 
* 2D acceleration
 
* 2D acceleration
* Nothing to do to make it work
+
* Works out of the box
  
 
'''Disadvantages'''
 
'''Disadvantages'''
  
* Did not manage to get native resolution (e.g 1366x768)
+
* Some are unable to get native resolution (e.g 1366x768)
* Buggy backlight control (Fixed in Linux 3.0.0)
+
 
* No 3D acceleration possible
 
* No 3D acceleration possible
* Poor performances (use mplayer with x11 or sdl so fullscreen video will be quite slow)
+
* Poor multimedia performance (use mplayer with x11 or sdl so fullscreen video will be quite slow)
  
=== PSB/GMA500 Driver ===
+
To check if the driver is loaded the output of <code>lsmod | grep gma</code> should look like this:
'''Advantages'''
+
     
 +
gma500_gfx            131893  2
 +
i2c_algo_bit            4615  1 gma500_gfx
 +
drm_kms_helper        29203  1 gma500_gfx
 +
drm                  170883  2 drm_kms_helper,gma500_gfx
 +
i2c_core              16653  5 drm,drm_kms_helper,i2c_algo_bit,gma500_gfx,videodev
  
* Native resolution
+
== Troubleshooting ==
* 2D acceleration
+
* Possible 3D acceleration with work and luck - Fedora, as well as Ubuntu, have this [http://ubuntuforums.org/showthread.php?t=1229345]
+
* Backlight control possible
+
  
'''Disadvantages'''
+
=== Fix suspend ===
  
* Performance not on par with IEGD (Youtube videos play smoothly at 360p, perhaps 480p, but no higher)
+
If suspend does not work, there are various quirk options you can try. First, make sure that you have pm-utils and pm-quirks installed.
* Not supported through official packages. Use of AUR required.
+
* Needs kernel <=2.6.37 and Xorg 1.9
+
  
=== PSB/GMA500 Driver with FBDEV ===
+
# pacman -S pm-utils pm-quirks
'''Advantages'''
+
  
* Up to date Xorg without hacking libdrm
+
See the manpage for pm-suspend for a list of them all. One that has been reported to help is <code>quirk-vbemode-restore</code>, which saves and restores the current VESA mode.
* Native resolution
+
* 2D acceleration
+
* Backlight control possible
+
  
'''Disadvantages'''
+
To test it, open a terminal and use the following commands
  
* Needs kernel <=2.6.37
+
# pm-suspend --quirk-vbemode-restore
* Performance comparable to FBDEV solution
+
* Not supported through official packages. Use of AUR required.
+
  
=== IEGD Driver ===
+
That should suspend your system. If you are able to resume, you'll want to use this option every time you suspend. Create a new file
'''Advantages'''
+
  
* X works
+
# $EDITOR /etc/pm/config.d/gma500
* Native resolution
+
* Basic OpenGl Capabilities
+
* 2D acceleration
+
* HD video playback without stuttering
+
  
'''Disadvantages'''
+
and add in the following code.
As of August 12 2010:
+
  
* Artifacts in video playback
+
  ADD_PARAMETERS='--quirk-vbemode-restore'
* Suspend states are broken
+
* Works only for kernel <= 2.6.31 & Xorg server <= 1.6
+
* Lengthy process to install
+
* Not supported through official packages.
+
  
=== FBDEV Driver ===
+
If you are not able to resume and you get a black screen instead, try the above quirk command with only 'one dash'
'''Advantages'''
+
 
+
* Combined with 915resolution-static and Uvesafb, allows native resolution
+
* Up to date kernel and Xorg
+
* No recompiling needed on kernel updates
+
 
+
'''Disadvantages'''
+
 
+
* Video playback may not be smooth
+
* Flash video playback, such as on YouTube, not smooth above 360p
+
* Full-screen Flash video playback useless
+
* No Xv video acceleration whatsoever
+
 
+
Installation and configuration procedure is [[Poulsbo#FBDEV Driver (xf86-video-fbdev)|is discussed later.]]
+
 
+
=== VESA Driver ===
+
'''Advantages'''
+
 
+
* Combined with 915resolution-static and Uvesafb, possibly allows native resolution (untested)
+
* Up to date kernel and Xorg
+
* No recompiling needed on kernel updates
+
 
+
'''Disadvantages'''
+
 
+
* Video playback may not be smooth
+
* Full-screen Flash video playback useless
+
* Slower than the FBDEV driver
+
* Not supported through official packages. Use of AUR required.
+
 
+
== Do I Need To Downgrade? ==
+
 
+
As of November, 2011 you do not need to downgrade anything to use the gma500_gfx, FBDEV, or VESA Xorg video drivers.
+
 
+
However, if you wish to experiment with the PSB or IEGD driver, you will need to downgrade your kernel and maybe xorg-server, along with several other packages.
+
 
+
== Xorg-server 1.7 or higher (current Arch) ==
+
 
+
=== Kernel's gma500_gfx module ===
+
 
+
If you have a kernel newer than 2.6.39, then it should work out of the box.
+
 
+
The module is psb_gfx or gma500_gfx:
+
$ find /lib/modules -iname "*_gfx*"
+
/lib/modules/3.3.3-1-ARCH/kernel/drivers/gpu/drm/gma500/gma500_gfx.ko.gz
+
 
+
For native resolution you may have to use early KMS. Add {{ic|gma500_gfx}} to your {{ic|/etc/mkinitcpio.conf}} MODULES array and update initramfs:
+
# mkinitcpio -p linux
+
 
+
Before linux 3.3 the {{ic|gma500_gfx}} module was called {{ic|psb_gfx}}.
+
 
+
Xorg should use fbdev ({{Pkg|xf86-video-fbdev}}) by default. You can check it in /var/log/Xorg.0.log.
+
 
+
=== PSB/GMA500 Driver ===
+
 
+
You need kernel <=2.6.37 to use the PSB-Driver
+
 
+
==== Install from custom repository ====
+
 
+
Add the following repository to your {{ic|/etc/pacman.conf}}
+
[poulsbo-old]
+
Server = http://kissmyarch.eu/gma500/poulsbo-old/
+
and install the psb driver with
+
# pacman -Syu xorg-x11-drv-psb
+
 
+
==== Build and Install from AUR (xorg 1.9) ====
+
Build and install the following packages in this exact order
+
 
+
1) {{AUR|psb-firmware}}
+
2) {{AUR|psb-kmod}}
+
3) {{AUR|libdrm-poulsbo}}
+
4) {{AUR|xpsb-glx}}
+
5) {{AUR|xorg-x11-drv-psb}}
+
 
+
==== Configure xorg.conf ====
+
 
+
To tell Xorg to use this driver, change the Driver line in <code>/etc/X11/xorg.conf</code> to read as:
+
Driver "psb"
+
 
+
You can also try adding a couple options to try improving acceleration or stability:
+
 
+
with:
+
Option "ShadowFB" "true"
+
and possibly:
+
Option      "MigrationHeuristic" "greedy"
+
 
+
Cross fingers and restart X.
+
 
+
==== Hardware accelerated video playback ====
+
 
+
In order to have video acceleration, you must
+
* Install {{AUR|xorg-x11-drv-psb}}
+
* Install {{AUR|libva-freeworld}} from the [[Arch User Repository|AUR]] or from [https://wiki.archlinux.org/index.php/Poulsbo#Install_from_custom_repository above] given repository
+
* Install {{pkg|mplayer-vaapi}} from [community]
+
* Run
+
mplayer -vo vaapi -va vaapi videofile
+
 
+
=== PSB/GMA500 Driver with FBDEV ===
+
 
+
The advantage of this solution is that you just add a kernel module
+
but you do not need to bother about specific Xorg version or libdrm
+
while keeping backlight control.
+
 
+
It makes it simpler to manage than the PSB/GMA500 Driver and FBDEV Driver solutions.
+
 
+
==== Build and Install from AUR (xorg 1.9) ====
+
Build and install the following packages in this exact order
+
 
+
1) {{AUR|psb-firmware}}
+
2) {{AUR|psb-kmod}}
+
 
+
You can either download these packages from the repository given [https://wiki.archlinux.org/index.php/Poulsbo#Install_from_custom_repository above].
+
 
+
==== Install the fbdev Xorg driver ====
+
 
+
# pacman -S xf86-video-fbdev
+
 
+
==== Configure your system ====
+
 
+
Load the module at startup by adding "psb" to you MODULES in <code>/etc/rc.conf</code>.
+
To avoid an unnecessary reboot, as root perform to get your module loaded:
+
# modprobe psb
+
 
+
 
+
To tell Xorg to use the framebuffer driver, change the Driver line in <code>/etc/X11/xorg.conf</code> to read as:
+
Driver "fbdev"
+
 
+
Restart X and you are done !
+
 
+
=== FBDEV Driver (xf86-video-fbdev) ===
+
 
+
Download <code>v86d</code> and <code>xf86-video-fbdev</code>:
+
pacman -S v86d xf86-video-fbdev
+
 
+
You will also need to install {{AUR|915resolution-static}} from the [[Arch User Repository|AUR]] or the repository given [https://wiki.archlinux.org/index.php/Poulsbo#Install_from_custom_repository above].
+
 
+
Create the file <code>/etc/modprobe.d/uvesafb.conf</code>, if it does not exist, and change it so the only non-comment line is this:
+
options uvesafb mode_option=1280x800-32 scroll=ywrap
+
 
+
Make sure you use the right resolution for your setup -- if you have a 1366x768 screen, for example, change the "mode_option=" number to "1366x768-32".
+
 
+
Edit <code>/lib/initcpio/hooks/915resolution</code> and make sure it has the right resolution for your setup -- the same resolution as specified in <code>/etc/modprobe.d/uvesafb.conf</code>.
+
 
+
Next, edit <code>/etc/mkinitcpio.conf</code> and add <code>915resolution</code> and <code>v86d</code> to the "HOOKS", like this:
+
HOOKS="base udev 915resolution v86d ..."
+
 
+
Make sure you run mkinitcpio:
+
mkinitcpio -p linux
+
 
+
Edit <code>/etc/X11/xorg.conf</code> and change driver to fbdev:
+
Driver "fbdev"
+
 
+
See the [[Uvesafb|Uvesafb article]] for more information.
+
 
+
=== VESA Driver ===
+
 
+
Download <code>xf86-video-vesa</code> and install.
+
 
+
# pacman -S xf86-video-vesa
+
 
+
Then edit <code>/etc/X11/xorg.conf</code> to use it.
+
 
+
Driver "vesa"
+
 
+
== Xorg-server 1.6 ==
+
 
+
'''Please note that Kernel 2.6.31 and Xorg server 1.6 are no longer supported by the Arch Linux team.'''
+
 
+
=== Installing Xorg-server 1.6 ===
+
 
+
Add to your <code>/etc/pacman.conf</code> the following custom repository and make sure it is higher than the others.
+
 
+
[xorg16]
+
Server = http://catalyst.apocalypsus.net/repo/xorg16/i686/
+
 
+
Then uninstall old packages if any, and install xorg
+
 
+
# pacman -R xorg-server xf86-input-evdev xf86-input-mouse xf86-input-synaptics xf86-input-keyboard
+
            xf86-video-vesa xf86-video-fbdev
+
# pacman -S xf86-evdev xorg-server xf86-input-keyboard xf86-input-mouse xf86-input-synaptics
+
            xf86-video-vesa openssl-compatibility
+
 
+
 
+
An older version of <code>libssl</code> is required. This can be fulfilled using the {{AUR|openssl-compatibility}} package from the [[Arch User Repository|AUR]].
+
 
+
mkdir openssl-compatibility
+
cd openssl-compatibility
+
wget https://aur.archlinux.org/packages/openssl-compatibility/PKGBUILD
+
makepkg -s
+
# pacman -U openssl-compatibility*.pkg.tar.xz
+
 
+
Once this is done, you may reboot the computer. Alternatively, kill all instances of Xorg and restart.
+
 
+
The Xorg 1.6 server should start without issue.
+
 
+
=== FBDEV Driver using xorg-server-1.6.3.901 ===
+
 
+
The <code>xf86-video-fbdev</code> driver is not currently in the Chakra Project's repositories. Download and install from here
+
 
+
$ wget http://dl.dropbox.com/u/6228981/poulsbo/i686/fbdev/xf86-video-fbdev-0.4.1-1-i686.pkg.tar.gz
+
# pacman -U xf86-video-fbdev-0.4.1-1-i686.pkg.tar.gz
+
 
+
=== Installing IEGD-enabled kernel ===
+
 
+
This process is still under development. Some info may be found [http://org.bonfus.it/wiki/doku.php?id=en:argo#ubuntu_kernel_patches_for_fitpc here.]
+
 
+
=== Installing IEGD binary drivers ===
+
 
+
tbd
+
 
+
=== Troubleshooting Xorg 1.6 ===
+
==== Driver cannot be found ====
+
 
+
If X complains that the driver cannot be found, you may have the FBDEV driver specified in xorg.conf file, but the FBDEV driver is not installed as described in [[Poulsbo#Installing the FBDEV Xorg framebuffer driver|above]]. Revert back to "vesa" by finding the line with the video driver - fbdev - and alter it,
+
 
+
Driver "fbdev"
+
 
+
to
+
 
+
Driver "vesa"
+
  
Then make sure to follow the steps in the aforementioned section on installing FBDEV.
+
# pm-suspend -quirk-vbemode-restore
  
== Taking Advantage of non-FBDEV/VESA Driver ==
+
{{Note| If you stuck with a black screen after resume, be aware that besides the black screen, your system works fine. Instead of hard rebooting, you could try to blindly reboot your system, since the last thing you used before suspend was the terminal. Alternatively, if you have ssh enabled on your machine you could do it remotely.}}
  
 
=== Set backlight brightness ===
 
=== Set backlight brightness ===
  
'''This has only been tested with the PSB driver'''
+
All that is needed to set the brightness is sending a number (0-100) to {{ic|/sys/class/backlight/psblvds/brightness}}. This obviously requires sysfs to be enabled in the kernel, as it is in the Arch Linux kernel. To set display to minimal brightness, issue this command as root:
  
''This is pertinent to machines with built-in LCD screens, not to devices such as the Fit-PC''
+
  # echo 0 > /sys/class/backlight/psb-bl/brightness
 
+
With a driver installed and loaded (via modprobe or at boot), all that is needed to set the brightness is sending a number (0-100) to
+
 
+
/sys/class/backlight/psblvds/brightness
+
 
+
This obviously requires sysfs to be enabled in the kernel, as it is in the Arch Linux kernel.
+
 
+
An example: to set display to minimal brightness, issue this command as root:
+
 
+
  echo 0 > /sys/class/backlight/psb-bl/brightness
+
  
 
Or, for full luminosity:
 
Or, for full luminosity:
  
  echo 100 > /sys/class/backlight/psb-bl/brightness
+
  # echo 100 > /sys/class/backlight/psb-bl/brightness
  
 
A very short script is available to do this with less typing written by [https://bbs.archlinux.org/viewtopic.php?pid=813074#p813074 mulenmar].
 
A very short script is available to do this with less typing written by [https://bbs.archlinux.org/viewtopic.php?pid=813074#p813074 mulenmar].
Line 347: Line 98:
  
 
Sudo may obviously ask for your password, so you have to be in the sudoers file.
 
Sudo may obviously ask for your password, so you have to be in the sudoers file.
 +
 +
=== Memory allocation optimization ===
 +
 +
You can often improve performance by limiting the amount of RAM used by the system so that there will be more available for the videocard. If you have 1GB RAM use <code>mem=896mb</code> or if you have 2GB RAM use <code>mem=1920mb</code>. Add the following parameters to your bootloader's configuration file.
 +
 +
*[[Grub-legacy]]
 +
Edit {{ic|/boot/grub/menu.lst}}
 +
...
 +
kernel /vmlinuz-linux root=/dev/sda2 ro mem=896mb
 +
...
 +
 +
*[[Grub]]
 +
Edit {{ic|/etc/default/grub}}
 +
...
 +
GRUB_CMDLINE_LINUX="mem=896mb"
 +
...
 +
 +
*[[Syslinux]]
 +
Edit {{ic|/boot/syslinux/syslinux.cfg}}
 +
...
 +
APPEND root=/dev/sda2 ro mem=896mb
 +
...
  
 
==See also==
 
==See also==
 
* [http://www.kriptopolis.org/arch-linux-03#comment-66066 An experience about configuring Poulsbo (spanish)]
 
* [http://www.kriptopolis.org/arch-linux-03#comment-66066 An experience about configuring Poulsbo (spanish)]
 +
* [https://wiki.ubuntu.com/HardwareSupportComponentsVideoCardsPoulsbo/ Ubuntu Wiki]
 +
* [http://ubuntuforums.org/showthread.php?t=1984236 Ubuntu Forums]
 +
* [http://blog.bodhizazen.net/linux/ubuntu-12-04-gma500-poulsbo-boot-options/ Ubuntu 12.04 gma500 (poulsbo) boot options (blog post)]

Revision as of 21:10, 7 August 2012

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary wiki Template:Article summary wiki Template:Article summary heading Template:Article summary link Template:Article summary end

The Intel Poulsbo Chipset, also known by its official names "GMA 500" and "Intel System Controller Hub US15W", is typically found on boards for the Atom Z processor series. It embeds a PowerVR SGX 535 graphics core developed by Imagination Technologies and then licensed by Intel. Its major advantages include the hardware decoding capability of up to 720p/1080i video content in various state-of-the-art codecs, e.g. H.264.

As the graphics hardware was not developed by Intel themselves, the standard Intel drivers do not work with this hardware. Furthermore, at least two different accelerated Linux drivers for this hardware exist, each of which have major problems. Alternatively, there is a generic framebuffer driver solution, but this is unaccelerated.

On this page you find comprehensive information about how to get the best out of your Poulsbo hardware using Arch Linux.

Kernel's gma500_gfx module

With kernel 2.6.39, a new psb_gfx module appeared in the kernel developed by Alan Cox to support Poulsbo hardware. As of kernel 3.3.rc1 the driver has left staging and been renamed gma500_gfx. ([1])

Advantages

  • Native resolution (1366x768) with early KMS (tested on Asus Eee 1101HA)
  • Up to date kernel and Xorg
  • 2D acceleration
  • Works out of the box

Disadvantages

  • Some are unable to get native resolution (e.g 1366x768)
  • No 3D acceleration possible
  • Poor multimedia performance (use mplayer with x11 or sdl so fullscreen video will be quite slow)

To check if the driver is loaded the output of lsmod | grep gma should look like this:

gma500_gfx            131893  2 
i2c_algo_bit            4615  1 gma500_gfx
drm_kms_helper         29203  1 gma500_gfx
drm                   170883  2 drm_kms_helper,gma500_gfx
i2c_core               16653  5 drm,drm_kms_helper,i2c_algo_bit,gma500_gfx,videodev

Troubleshooting

Fix suspend

If suspend does not work, there are various quirk options you can try. First, make sure that you have pm-utils and pm-quirks installed.

# pacman -S pm-utils pm-quirks

See the manpage for pm-suspend for a list of them all. One that has been reported to help is quirk-vbemode-restore, which saves and restores the current VESA mode.

To test it, open a terminal and use the following commands

# pm-suspend --quirk-vbemode-restore 

That should suspend your system. If you are able to resume, you'll want to use this option every time you suspend. Create a new file

# $EDITOR /etc/pm/config.d/gma500 

and add in the following code.

 ADD_PARAMETERS='--quirk-vbemode-restore' 

If you are not able to resume and you get a black screen instead, try the above quirk command with only 'one dash'

# pm-suspend -quirk-vbemode-restore 
Note: If you stuck with a black screen after resume, be aware that besides the black screen, your system works fine. Instead of hard rebooting, you could try to blindly reboot your system, since the last thing you used before suspend was the terminal. Alternatively, if you have ssh enabled on your machine you could do it remotely.

Set backlight brightness

All that is needed to set the brightness is sending a number (0-100) to /sys/class/backlight/psblvds/brightness. This obviously requires sysfs to be enabled in the kernel, as it is in the Arch Linux kernel. To set display to minimal brightness, issue this command as root:

# echo 0 > /sys/class/backlight/psb-bl/brightness

Or, for full luminosity:

# echo 100 > /sys/class/backlight/psb-bl/brightness

A very short script is available to do this with less typing written by mulenmar.

#! /bin/sh
sudo sh -c "echo $1 > /sys/class/backlight/psb-bl/brightness"

Simply save it as brightness.sh, and give it executable permissions. Then you can use it like so:

Set brightness to minimum:

   ./brightness.sh 0

Set brightness to half:

   ./brightness.sh 50

Sudo may obviously ask for your password, so you have to be in the sudoers file.

Memory allocation optimization

You can often improve performance by limiting the amount of RAM used by the system so that there will be more available for the videocard. If you have 1GB RAM use mem=896mb or if you have 2GB RAM use mem=1920mb. Add the following parameters to your bootloader's configuration file.

Edit /boot/grub/menu.lst

...
kernel /vmlinuz-linux root=/dev/sda2 ro mem=896mb 
...

Edit /etc/default/grub

...
GRUB_CMDLINE_LINUX="mem=896mb"
...

Edit /boot/syslinux/syslinux.cfg

...
APPEND root=/dev/sda2 ro mem=896mb 
...

See also