mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-04 06:42:33 +03:00
Merge pull request #324921 from CobaltCause/more-magic-kernel-params
nixos/nvidia: enable fbdev when available
This commit is contained in:
commit
1f86d2ae2c
1 changed files with 7 additions and 2 deletions
|
@ -96,7 +96,11 @@ in
|
|||
Enabling this fixes screen tearing when using Optimus via PRIME (see
|
||||
{option}`hardware.nvidia.prime.sync.enable`. This is not enabled
|
||||
by default because it is not officially supported by NVIDIA and would not
|
||||
work with SLI
|
||||
work with SLI.
|
||||
|
||||
Enabling this and using version 545 or newer of the proprietary NVIDIA
|
||||
driver causes it to provide its own framebuffer device, which can cause
|
||||
Wayland compositors to work when they otherwise wouldn't.
|
||||
'';
|
||||
|
||||
prime.nvidiaBusId = lib.mkOption {
|
||||
|
@ -568,9 +572,10 @@ in
|
|||
"nvidia_drm"
|
||||
];
|
||||
|
||||
# If requested enable modesetting via kernel parameter.
|
||||
# If requested enable modesetting via kernel parameters.
|
||||
kernelParams =
|
||||
lib.optional (offloadCfg.enable || cfg.modesetting.enable) "nvidia-drm.modeset=1"
|
||||
++ lib.optional ((offloadCfg.enable || cfg.modesetting.enable) && lib.versionAtLeast nvidia_x11.version "545") "nvidia-drm.fbdev=1"
|
||||
++ lib.optional cfg.powerManagement.enable "nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||
++ lib.optional cfg.open "nvidia.NVreg_OpenRmEnableUnsupportedGpus=1"
|
||||
++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2" && !ibtSupport) "ibt=off";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue