Commit graph

180 commits

Author SHA1 Message Date
Edward Tjörnhammar 903ebdc0a0 nixos/nvidia: don't assume x11 is used.. 2023-09-14 18:19:15 +02:00
Edward Tjörnhammar 9b95f21cdb nvidia,nixos/nvidia: add datacenter drivers compatible with default cudaPkgs
For NVLink topology systems we need fabricmanager. Fabricmanager itself is
dependent on the datacenter driver set and not the regular x11 ones, it is also
tightly tied to the driver version. Furhtermore the current cudaPackages
defaults to version 11.8, which corresponds to the 520 datacenter drivers.

Future improvement should be to switch the main nvidia datacenter driver version
on the `config.cudaVersion` since these are well known from:

> https://docs.nvidia.com/deploy/cuda-compatibility/index.html#use-the-right-compat-package

This adds nixos configuration options `hardware.nvidia.datacenter.enable` and
`hardware.nvidia.datacenter.settings` (the settings configure fabricmanager)

Other interesting external links related to this commit are:

* Fabricmanager download site:
    - https://developer.download.nvidia.com/compute/cuda/redist/fabricmanager/linux-x86_64/
* Data Center drivers:
    - https://www.nvidia.com/Download/driverResults.aspx/193711/en-us/

Implementation specific details:

* Fabricmanager is added as a passthru package, similar to settings and
  presistenced.
* Adds `use{Settings,Persistenced,Fabricmanager}` with defaults to preserve x11
  expressions.
* Utilizes mkMerge to split the `hardware.nvidia` module into three comment
  delimited sections:
    1. Common
    2. X11/xorg
    3. Data Center
* Uses asserts to make the configurations mutualy exclusive.

Notes:

* Data Center Drivers are `x86_64` only.
* Reuses the `nvidia_x11` attribute in nixpkgs on enable, e.g. doesn't change it
  to `nvidia_driver` and sets that to either `nvidia_x11` or `nvidia_dc`.
* Should have a helper function which is switched on `config.cudaVersion` like
  `selectHighestVersion` but rather `selectCudaCompatibleVersion`.
2023-09-12 07:17:33 +02:00
Gerg-L 4ca2a16390 nixos/nvidia: add Dynamic Boost support 2023-08-03 09:32:14 -04:00
Gerg-L a5ccd2c5c8 nixos/nvidia: cleaned up reorganized and reformatted 2023-07-18 16:50:42 -04:00
Pol Dellaiera f9c3e5dac1
Merge pull request #232415 from jensbin/displaylink57
displaylink: 5.6.1-59.184 -> 5.7.0-61.129
2023-06-28 08:36:14 +02:00
Jens Binkert 46336e7a53 displaylink: 5.6.1-59.184 -> 5.7.0-61.129 2023-06-26 09:43:22 +02:00
seth 18aeed351a
nixos/nvidia: fix typo in PRIME/nvidiaBusID assertion 2023-06-21 17:51:59 -04:00
Martin Weinelt 19fa5ab1e6
nixos/hardware/ipu6: Improve the enable description
The module is doing much more than just enabling the ipu6 kernel
module, so extending the enable options scope to support for these
camera modules seems a better fit.
2023-04-10 18:43:21 +02:00
betaboon e4e00d22bf nixos/hardware/ipu6: init 2023-04-09 00:41:45 +02:00
Kiskae 0491659cd0
nixos/nvidia: use correct attribute 2023-04-01 20:24:02 +02:00
Kiskae ea126529eb nixos/nvidia: allow package to override IBT support 2023-04-01 14:44:43 +02:00
Kiskae c3ce711249 nixos/nvidia: re-enable IBT for newer drivers 2023-03-24 11:37:35 +01:00
K900 4787ebf7ae nixos/hidpi: remove
The single option tries to do too much work, which just ends up confusing people.

So:
- don't force the console font, the kernel can figure this out as of #210205
- don't force the systemd-boot mode, it's an awkward mode that's not supported
  on most things and will break flicker-free boot
- add a separate option for the xorg cursor scaling trick and move it under the xorg namespace
- add a general `fonts.optimizeForVeryHighDPI` option that explicitly says what it does
- alias the old option to that
- don't set any of those automatically in nixos-generate-config
2023-03-21 13:29:57 +01:00
nicoo df4faec23b nixos/hidpi: Explicitely refer to fontconfig.nix for the choice of defaults 2023-03-12 21:33:38 +00:00
nicoo fc65af6a74 nixos/hidpi: Minor refactor 2023-03-03 12:42:55 +00:00
nicoo e1220cf121 nixos/hidpi: Don't set subpixel order
It has no effect with `subpixel.lcdfilter = "none"`.

If the user overrides the module's default, the correct subpixel order
depends on their actual monitor, and cannot be known by this module.
2023-03-03 12:42:55 +00:00
nicoo b2366655e2 nixos/hidpi: Disable font hinting
Per the documentation:
> At high resolution (> 200 dpi) hinting will do nothing (at best);
> users of such displays may want to disable this option.
2023-03-03 12:42:55 +00:00
nicoo f03716715f nixos/hidpi: Disable anti-aliasing
Per the documentation:
> At high resolution (> 200 DPI), antialiasing has no visible effect;
> users of such displays may want to disable this option.
2023-03-03 12:42:55 +00:00
Kiskae d120c53077 linuxPackages_6_2.nvidia_x11: disable ibt 2023-02-22 18:08:41 +01:00
Googlebot 458c1628ee fix logic 2023-02-07 00:51:39 -05:00
Googlebot 2a7130d13a nvidia: Reverse Prime Sync 2023-02-06 22:46:56 +00:00
Artturin 7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00
Artturin 6910a4eea0 treewide: makeWrapper to nativeBuildInputs
this should be all of them other than the failed splices
found with nixpkgs-lint
2022-09-26 17:53:26 +03:00
Nick Cao 81b615ea51
nixos/nvidia: replace IFD based assertion on power management support with version constraint 2022-09-03 19:38:23 +08:00
pennae ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00
Max Schorradt 2461a62334 nvidia: remove deleted useGlamor option 2022-08-24 21:34:42 +02:00
Christian Kögler b055aadc3d
Merge pull request #157997 from kirelagin/grayscale-antialiasing
hidpi: Use gray-scale antialiasing for fonts
2022-08-19 10:37:30 +02:00
pennae 61e93df189 nixos/*: automatically convert option docs to MD
once again using nix-doc-munge (69d080323a)
2022-08-03 22:46:41 +02:00
pennae 9c8531c8a5 nixos/*: replace <replaceable>s with «thing»
we can't embed syntactic annotations of this kind in markdown code
blocks without yet another extension. replaceable is rare enough to make
this not much worth it, so we'll go with «thing» instead. the module
system already uses this format for its placeholder names in attrsOf
paths.
2022-08-03 21:08:58 +02:00
pennae 2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Timothy DeHerrera 371db36e56
nvidia: improve robustness of udev rules
fixes #165719
2022-07-15 19:37:13 -07:00
yuu ce2e4707b7
hardware/nvidia: add @ to constraint on busIDType
On some configurations, the only known syntax that works
requires the `@` character, such as `intelBusId = "0@0:2:0";`  and
`nvidiaBusId = "1@1:0:0";` [1].

[1]. https://discourse.nixos.org/t/struggling-with-nvidia-prime/13794/4
2022-07-10 02:48:40 -03:00
Nick Cao e84828b973
nixos/nvidia: add option hardware.nvidia.open for selecting the opensource kernel driver 2022-06-03 10:50:33 +08:00
Nick Cao 94f5bd2051
nvidia_x11: init opensource kernel driver 2022-06-03 10:50:33 +08:00
Thiago Kenji Okada 679197e9ff
Merge pull request #174058 from jian-lin/fix-nvidia.powerManagement.finegrained-only-apply-workarounds-when-needed
nixos/nvidia: only apply workarounds for finegrained when needed
2022-06-02 17:55:23 +01:00
Thiago Kenji Okada 64870a0c57
Merge pull request #174259 from schuelermine/add-nixos-option/hardware.nvidia.forceFullCompositionPipeline
nixos/nvidia: add hardware.nvidia.forceFullCompositionPipeline
2022-06-02 17:50:50 +01:00
Anselm Schüler 446d2cb021 nixos/nvidia: add hardware.nvidia.forceFullCompositionPipeline 2022-05-24 11:46:50 +02:00
linj d5a9c1dd08 nixos/nvidia: remove a useless option
According to the doc[1], NVreg_DynamicPowerManagement is a kernel
module parameter, which it is already set as. So it should not be set
as an xorg option.

[1]: https://download.nvidia.com/XFree86/Linux-x86_64/515.43.04/README/dynamicpowermanagement.html#DriverSettingsfe624
2022-05-23 05:11:26 +08:00
linj 97a855ca0e nixos/nvidia: only apply workarounds for finegrained when needed
Accoriding to the doc[1], these workarounds is no needed for kernel
5.5 and newer.

[1]: https://download.nvidia.com/XFree86/Linux-x86_64/515.43.04/README/dynamicpowermanagement.html#KnownIssuesAndW6426e
2022-05-23 05:01:40 +08:00
Rick van Schijndel 536528ede8
Merge pull request #170695 from matshch/fix/nvidia-device-minor
nixos/nvidia: fix /dev/nvidia* devices minors
2022-04-30 15:34:16 +02:00
Graham Christensen f00109472a
Merge pull request #164185 from alexshpilkin/calibration
facetimehd: support sensor calibration files
2022-04-29 15:53:30 -04:00
Artem Leshchev 4d7bc6ccc0 nixos/nvidia: fix /dev/nvidia-uvm-tools device minor 2022-04-28 13:55:53 +03:00
Artem Leshchev 73261bdc59 nixos/nvidia: make nvidia-frontend device major constant
It is assigned by https://www.kernel.org/doc/Documentation/admin-guide/devices.txt
and never changes, so we can skip grep.
2022-04-28 13:55:53 +03:00
Artem Leshchev b01be47c87 nixos/nvidia: fix /dev/nvidia* devices minors
We can't assume that DRI card minor is the same as NVidia GPU device minor,
because some DRI minors could be taken by GPUs of other vendors.

Fixes #87788, #98942.
2022-04-28 01:18:58 +03:00
Janne Heß 4f3a868e59
Merge pull request #169049 from helsinki-systems/feat/systemd-stage-1-amdgpu-pro
nixos/amdgpu-pro: Add support for systemd stage 1
2022-04-20 11:36:53 +02:00
Janne Heß 0a60a12fae
nixos/amdgpu-pro: Add support for systemd stage 1 2022-04-17 14:00:02 +01:00
Guillaume Girol 5f95bff481 nixos/nvidia: fix type of bus ID option to accept empty string 2022-04-17 12:00:00 +00:00
polykernel 614b54d9b0 hardware/nvidia: stricter constraints on PCI bus-id.
The current type for the busId options are too relaxed, a stricter
constraint should be imposed to guard against typos which result
in Xorg unable to start.

This commit restricts the type to adhere to the B/D/F notation[1] for
addressing devices as expected by the module option.

[1] - https://wiki.osdev.org/PCI#Configuration_Space_Access_Mechanism_.231
2022-04-16 15:25:37 -04:00
Alyssa Ross ae8e8aaee7 treewide: remove obsolete kernel version checks
We no longer support any Linux kernel older than 4.9.
2022-04-08 09:56:09 +00:00
Googlebot 4007aa201b Merge remote-tracking branch 'upstream/master' 2022-03-21 11:32:36 -04:00