How can I enable the SNA acceleration method for Intel cards, under Ubuntu 12.04 - 12.10?
Solution 1:
Enable SNA under Ubuntu 12.04.0 or 12.04.1 LTS
Due to LTS version of 12.04 , the new point releases will have the HWE stack of the current stable release (right now 12.04.3 has HWE stack of 13.04). The next point releases of 12.04 (12.04.2 and 12.04.3) have the HWE stack of 12.10 and 13.04 respectively. So the Intel driver is above 2.20 and the following procedure of upgrading the Intel driver is not needed.
Check the current Intel driver version. Apply this command
apt-cache policy xserver-xorg-video-intel* | grep Installed
If the results of Installed
are under 2.20 e.g. 2:2.17.0-1ubuntu4 0
, then proceed with the procedure below to upgrade the driver.
Open a terminal (Ctrl + Alt+T) and apply the commands below to upgrade the Intel driver to the latest version
sudo add-apt-repository ppa:glasen/intel-driver
sudo apt-get update ; sudo apt-get dist-upgrade
Then activate the SNA acceleration method with the two commands below
sudo mkdir /etc/X11/xorg.conf.d/
echo -e 'Section "Device"\n Identifier "Card0"\n Driver "Intel"\n Option "AccelMethod" "sna"\nEndSection' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf
Reboot your PC for changes to take effect.
Test if SNA acceleration method work with the command
cat /var/log/Xorg.0.log | grep -i sna
The results should be something like
(**) intel(0): Option "AccelMethod" "sna"
(II) intel(0): SNA initialized with Ironlake backend
Enable SNA under Ubuntu 12.10 and beyond
Well , is the same method as above , but you have to avoid the upgrade of the driver , because Ubuntu 12.10 has the 2.20 Intel driver by default. Also in newer versions of Ubuntu the SNA acceleration method is enabled by default.
Check if the SNA acceleration method is enabled and in use with the following command
cat /var/log/Xorg.0.log | grep -i sna
if results read something like
(II) intel(0): SNA compiled: xserver-xorg-video-intel-lts-raring
2:2.21.6-0ubuntu4.1~precise1 (Maarten Lankhorst <[email protected]>)
(II) intel(0): SNA initialized with Ironlake backend
then you are OK. Above results are from Ubuntu 12.04.3 LTS.
If not, then execute the following commands to enable the SNA
sudo mkdir /etc/X11/xorg.conf.d/
echo -e 'Section "Device"\n Identifier "Card0"\n Driver "Intel"\n Option "AccelMethod" "sna"\nEndSection' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf
In case of a problem.
To revert back to the default acceleration method , just delete the file you created.
sudo rm /etc/X11/xorg.conf.d/20-intel.conf
and restart X or your PC for the changes to take effect.
In case of a problem at Ubuntu 12.04.0 or 12.04.1 with the driver 2.20
Just remove the PPA with the appropriate commands .
sudo apt-get install ppa-purge
sudo ppa-purge ppa:glasen/intel-driver
sudo apt-get update
Reboot you PC.
In case of a problem if the default acceleration method is SNA (e.g. 12.04.3) and you want to use the UXA.
Execute the following commands
sudo mkdir /etc/X11/xorg.conf.d/
echo -e 'Section "Device"\n Identifier "Card0"\n Driver "Intel"\n Option "AccelMethod" "uxa"\nEndSection' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf
Reboot your PC (or Display Manager) for changes to take effect.
Hope you see a difference in performance or/and graphics with the new AccelMethod SNA and if not, you know the way to revert back to UXA.