Merge pull request #111551 from xaverdh/xserver-modern-drivers

nixos/xserver: use modern video drivers
This commit is contained in:
Michele Guerini Rocco 2021-03-09 08:14:24 +01:00 committed by GitHub
commit af6037b338
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 15 deletions

View File

@ -150,7 +150,6 @@
<xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy390" ]; <xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy390" ];
<xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy340" ]; <xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy340" ];
<xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy304" ]; <xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy304" ];
<xref linkend="opt-services.xserver.videoDrivers"/> = [ "nvidiaLegacy173" ];
</programlisting> </programlisting>
You may need to reboot after enabling this driver to prevent a clash with You may need to reboot after enabling this driver to prevent a clash with
other kernel modules. other kernel modules.
@ -159,21 +158,16 @@
<simplesect xml:id="sec-x11--graphics-cards-amd"> <simplesect xml:id="sec-x11--graphics-cards-amd">
<title>Proprietary AMD drivers</title> <title>Proprietary AMD drivers</title>
<para> <para>
AMD provides a proprietary driver for its graphics cards that has better 3D AMD provides a proprietary driver for its graphics cards that is not
performance than the X.org drivers. It is not enabled by default because enabled by default because its not Free Software, is often broken
its not free software. You can enable it as follows: in nixpkgs and as of this writing doesn't offer more features or
performance. If you still want to use it anyway, you need to explicitly set:
<programlisting> <programlisting>
<xref linkend="opt-services.xserver.videoDrivers"/> = [ "ati_unfree" ]; <xref linkend="opt-services.xserver.videoDrivers"/> = [ "amdgpu-pro" ];
</programlisting> </programlisting>
You will need to reboot after enabling this driver to prevent a clash with You will need to reboot after enabling this driver to prevent a clash with
other kernel modules. other kernel modules.
</para> </para>
<note>
<para>
For recent AMD GPUs you most likely want to keep either the defaults
or <literal>"amdgpu"</literal> (both free).
</para>
</note>
</simplesect> </simplesect>
<simplesect xml:id="sec-x11-touchpads"> <simplesect xml:id="sec-x11-touchpads">
<title>Touchpads</title> <title>Touchpads</title>

View File

@ -539,6 +539,11 @@ self: super:
<package>imagemagick6Big</package> if you need the older version. <package>imagemagick6Big</package> if you need the older version.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
<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.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>

View File

@ -251,11 +251,10 @@ in
videoDrivers = mkOption { videoDrivers = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
# !!! We'd like "nv" here, but it segfaults the X server. default = [ "amdgpu" "radeon" "nouveau" "modesetting" "fbdev" ];
default = [ "radeon" "cirrus" "vesa" "modesetting" ];
example = [ example = [
"ati_unfree" "amdgpu" "amdgpu-pro" "nvidia" "nvidiaLegacy390" "nvidiaLegacy340" "nvidiaLegacy304"
"nv" "nvidia" "nvidiaLegacy390" "nvidiaLegacy340" "nvidiaLegacy304" "amdgpu-pro"
]; ];
# TODO(@oxij): think how to easily add the rest, like those nvidia things # TODO(@oxij): think how to easily add the rest, like those nvidia things
relatedPackages = concatLists relatedPackages = concatLists