[Nix-dev] How to unleash your ATI graphics card on NixOS

Eelco Dolstra e.dolstra at tudelft.nl
Fri Jul 15 11:43:34 CEST 2011


Hi,

On 07/14/2011 10:30 PM, Peter Simons wrote:

> The radeon driver used in Linux by default does not support 3D hardware
> rendering on modern ATI chips, like RS880 (Radeon HD 4250). Everything
> seems to works fine, but 3D graphics are slow, because rendering actually
> takes place on the CPU:
>
>    $ glxinfo | grep renderer
>    OpenGL renderer string: Software Rasterizer
>
> Now, to improve graphics performance a *lot*, you need to enable the new
> radeon driver in your kernel by setting CONFIG_DRM_RADEON_KMS=y. A kernel
> that has been built with that feature is already included in nixpkgs; just
> add the lines
>
>    boot.kernelPackages = pkgs.linuxPackages_2_6_38_ati;

Is there a reason why we have a separate ATI kernel?  In other words, is there a 
downside to turning on CONFIG_DRM_RADEON_KMS in the main 2.6.38 kernel?

> Any user who wants to perform hardware rendering must be a member of the
> 'video' group
>
>    groupmems -g video -a your_username_here
>
> ..., otherwise they won't be able to read/write the devices in /etc/dri/.

(I assume you mean /dev/dri.)  Udev should automatically grant ownership to such 
devices to logged-in users (unless there is a security problem in doing so). 
Something like this should do the trick:

   services.udev.extraRules =
     ''
       SUBSYSTEM=="dri", TAG+="udev-acl"
     '';

only I don't know what the match (SUBSYSTEM==...) should be.

> After you've made those changes, run "nixos-rebuild boot", and reboot. Now
> you'll see:
>
>    $ glxinfo | grep renderer
>    OpenGL renderer string: Mesa DRI R600 (RS880 9715) 20090101  TCL DRI2

Great :-)

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list