Commit Graph

196 Commits

Author SHA1 Message Date
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Bjørn Forsman
a29010fe79 nixos: improve many 'enable' descriptions 2024-04-09 07:10:17 +02:00
Philip Taron
29a46d2802
nixos/nvidia: Set SidebandSocketPath to a user-writable path in /run
The NVIDIA X driver uses a UNIX domain socket to pass information to
other driver components. If unable to connect to this socket, some
driver features, such as G-Sync, may not work correctly. The socket will
be bound to a file with a name unique to the X server instance created
in the directory specified by this option. Note that on Linux, an
additional abstract socket (not associated with a file) will also be
created, with this pathname socket serving as a fallback if connecting
to the abstract socket fails.

The default, which was in effect prior to this change, was `/var/run`.

The effect of not setting this option was that GDM X sessions
(and other non-root sessions) would see this warning in the log files:

```
   (WW) NVIDIA: Failed to bind sideband socket to
   (WW) NVIDIA:     '/var/run/nvidia-xdriver-b4f69129' Permission denied
```

I don't see any security implications of turning this on universally,
since there already was an abstract socket created according to the
docs.

Documentation:

1. [NVIDIA X Config Options](https://download.nvidia.com/XFree86/Linux-x86_64/440.82/README/xconfigoptions.html#SidebandSocketPath)

Diagnosis:

1. [Arch Linux BBS post](https://bbs.archlinux.org/viewtopic.php?pid=1909115#p1909115)
2024-03-19 16:34:41 -07:00
Julio Gutierrez
811872a489 Add ivsc-firmware to ipu6 option 2024-03-15 09:29:46 -05:00
Gerg-L
d70c353c16
nixos/switcherooControl: add package option
clean up
2024-02-25 20:49:31 -05:00
github-actions[bot]
f50aae4fb1
Merge master into staging-next 2023-12-29 18:00:57 +00:00
nikstur
80fa4731f9 nixos/amdgpu-pro: replacce activationScript via tmpfiles 2023-12-29 03:21:32 +01:00
github-actions[bot]
9f26e7ee02
Merge staging-next into staging 2023-12-18 18:01:22 +00:00
timothy
6e4d90f0b0 nvidia_x11.dc_535: 535.129.03 2023-12-15 18:20:42 +07:00
André Silva
85169ed61c
nixos/ipu6: add support for ipu6epmtl 2023-12-11 13:10:50 +00:00
André Silva
fc2013e3eb
ipu6-camera-bins: rename from ipu6-camera-bin 2023-12-11 13:10:45 +00:00
Yang, Bo
932441c86d
nixos/nvidia: load nvidia-uvm kernel module via softdep (#267335) 2023-11-23 16:19:27 +01:00
Timothy DeHerrera
f06b975898
Merge pull request #262135 from Kiskae/nvidia-udev-fix
nixos/nvidia: partially revert #181674
2023-10-24 13:58:22 -06:00
Bjørn Forsman
142074c2a8 nixos: fix bad mkEnableOption descriptions
Fix descriptions that don't account for (1) the "Whether to enable"
prefix or (2) the automatically added trailing dot.
2023-10-20 16:22:40 +01:00
Kiskae
e24d43a18c nixos/nvidia: partially revert #181674
nvidia has changed the name of the chardev in the latest beta driver.
Match the behavior of `nvidia-modprobe` and hardcode the major number.
2023-10-19 21:57:35 +02:00
K900
c018561f54 nixos/amdgpu-pro: remove nixpkgs.config usage
A new X.org ABI is exceptionally unlikely at this point, and we can
add an assertion if it ever happens.
2023-09-26 18:02:00 +03:00
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