mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-04 19:24:20 +00:00
Merge pull request #324921 from CobaltCause/more-magic-kernel-params
nixos/nvidia: enable fbdev when available
This commit is contained in:
commit
1f86d2ae2c
@ -96,7 +96,11 @@ in
|
|||||||
Enabling this fixes screen tearing when using Optimus via PRIME (see
|
Enabling this fixes screen tearing when using Optimus via PRIME (see
|
||||||
{option}`hardware.nvidia.prime.sync.enable`. This is not enabled
|
{option}`hardware.nvidia.prime.sync.enable`. This is not enabled
|
||||||
by default because it is not officially supported by NVIDIA and would not
|
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 {
|
prime.nvidiaBusId = lib.mkOption {
|
||||||
@ -568,9 +572,10 @@ in
|
|||||||
"nvidia_drm"
|
"nvidia_drm"
|
||||||
];
|
];
|
||||||
|
|
||||||
# If requested enable modesetting via kernel parameter.
|
# If requested enable modesetting via kernel parameters.
|
||||||
kernelParams =
|
kernelParams =
|
||||||
lib.optional (offloadCfg.enable || cfg.modesetting.enable) "nvidia-drm.modeset=1"
|
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.powerManagement.enable "nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||||
++ lib.optional cfg.open "nvidia.NVreg_OpenRmEnableUnsupportedGpus=1"
|
++ lib.optional cfg.open "nvidia.NVreg_OpenRmEnableUnsupportedGpus=1"
|
||||||
++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2" && !ibtSupport) "ibt=off";
|
++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2" && !ibtSupport) "ibt=off";
|
||||||
|
Loading…
Reference in New Issue
Block a user