git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #111551 from xaverdh/xserver-modern-drivers

nixos/xserver: use modern video drivers

commitaf6037b338b5aec2f10d3b8afbdfb3116077497d authorMichele Guerini Rocco <rnhmjoj@users.noreply.github.com> dateTue 9 Mar 2021, 08:14 (6 years ago) parent29b0d4de3d705e
3 files changed+13−15
nixos/doc/manual/configuration/x-windows.xml+5−11 nixos/doc/manual/release-notes/rl-2105.xml+5 nixos/modules/services/x11/xserver.nix+3−4
nixos/doc/manual/configuration/x-windows.xml+5−11
@@ -150,7 +150,6 @@
150150<xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy390" ];
151151<xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy340" ];
152152<xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy304" ];
153−<xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy173" ];
154153</programlisting>
155154 You may need to reboot after enabling this driver to prevent a clash with
156155 other kernel modules.
@@ -159,21 +158,16 @@
159158 <simplesect xml:id="sec-x11--graphics-cards-amd">
160159 <title>Proprietary AMD drivers</title>
161160 <para>
162− AMD provides a proprietary driver for its graphics cards that has better 3D
163− performance than the X.org drivers. It is not enabled by default because
164− it’s not free software. You can enable it as follows:
161+ AMD provides a proprietary driver for its graphics cards that is not
162+ enabled by default because it’s not Free Software, is often broken
163+ in nixpkgs and as of this writing doesn't offer more features or
164+ performance. If you still want to use it anyway, you need to explicitly set:
165165<programlisting>
166−<xref linkend="opt-services.xserver.videoDrivers"/> = [ "ati_unfree" ];
166+<xref linkend="opt-services.xserver.videoDrivers"/> = [ "amdgpu-pro" ];
167167</programlisting>
168168 You will need to reboot after enabling this driver to prevent a clash with
169169 other kernel modules.
170170 </para>
171− <note>
172− <para>
173− For recent AMD GPUs you most likely want to keep either the defaults
174− or <literal>"amdgpu"</literal> (both free).
175− </para>
176− </note>
177171 </simplesect>
178172 <simplesect xml:id="sec-x11-touchpads">
179173 <title>Touchpads</title>
nixos/doc/manual/release-notes/rl-2105.xml+5
@@ -539,6 +539,11 @@ self: super:
539539 <package>imagemagick6Big</package> if you need the older version.
540540 </para>
541541 </listitem>
542+ <listitem>
543+ <para>
544+ <xref linkend="opt-services.xserver.videoDrivers" /> no longer uses the deprecated <literal>cirrus</literal> and <literal>vesa</literal> device dependent X drivers by default. It also enables both <literal>amdgpu</literal> and <literal>nouveau</literal> drivers by default now.
545+ </para>
546+ </listitem>
542547 </itemizedlist>
543548 </section>
544549
nixos/modules/services/x11/xserver.nix+3−4
@@ -251,11 +251,10 @@ in
251251
252252 videoDrivers = mkOption {
253253 type = types.listOf types.str;
254− # !!! We'd like "nv" here, but it segfaults the X server.
255− default = [ "radeon" "cirrus" "vesa" "modesetting" ];
254+ default = [ "amdgpu" "radeon" "nouveau" "modesetting" "fbdev" ];
256255 example = [
257− "ati_unfree" "amdgpu" "amdgpu-pro"
258− "nv" "nvidia" "nvidiaLegacy390" "nvidiaLegacy340" "nvidiaLegacy304"
256+ "nvidia" "nvidiaLegacy390" "nvidiaLegacy340" "nvidiaLegacy304"
257+ "amdgpu-pro"
259258 ];
260259 # TODO(@oxij): think how to easily add the rest, like those nvidia things
261260 relatedPackages = concatLists