From a0201020e257d19cc716ddb3ce0891e39d64ed34 Mon Sep 17 00:00:00 2001 From: dish Date: Sat, 20 Sep 2025 12:49:21 -0400 Subject: [PATCH] amdvlk,nixos/amdvlk: drop AMDVLK has been deprecated by upstream and has been replaced by RADV. Drop it for 25.11. --- .../manual/configuration/gpu-accel.chapter.md | 31 +--- .../manual/release-notes/rl-2411.section.md | 2 +- .../manual/release-notes/rl-2511.section.md | 2 + nixos/modules/module-list.nix | 1 - nixos/modules/rename.nix | 5 + nixos/modules/services/hardware/amdgpu.nix | 1 - nixos/modules/services/hardware/amdvlk.nix | 65 -------- pkgs/by-name/am/amdvlk/package.nix | 141 ------------------ pkgs/by-name/am/amdvlk/test.nix | 58 ------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 1 - 11 files changed, 11 insertions(+), 297 deletions(-) delete mode 100644 nixos/modules/services/hardware/amdvlk.nix delete mode 100644 pkgs/by-name/am/amdvlk/package.nix delete mode 100644 pkgs/by-name/am/amdvlk/test.nix diff --git a/nixos/doc/manual/configuration/gpu-accel.chapter.md b/nixos/doc/manual/configuration/gpu-accel.chapter.md index 2cbf2c51bb70..0046337320a5 100644 --- a/nixos/doc/manual/configuration/gpu-accel.chapter.md +++ b/nixos/doc/manual/configuration/gpu-accel.chapter.md @@ -91,16 +91,7 @@ All successfully loaded drivers are exposed to the application as different GPUs. In NixOS, there are two ways to make ICD files visible to Vulkan applications: an environment variable and a module option. -The first option is through the `VK_ICD_FILENAMES` environment variable. -This variable can contain multiple JSON files, separated by `:`. For -example: - -```ShellSession -$ export \ - VK_ICD_FILENAMES=`nix-build '' --no-out-link -A amdvlk`/share/vulkan/icd.d/amd_icd64.json -``` - -The second mechanism is to add the Vulkan driver package to +The way to do this is to add the Vulkan driver package to [](#opt-hardware.graphics.extraPackages). This links the ICD file under `/run/opengl-driver`, where it will be visible to the ICD loader. @@ -129,25 +120,7 @@ vulkan-tools package. Modern AMD [Graphics Core Next](https://en.wikipedia.org/wiki/Graphics_Core_Next) (GCN) GPUs are -supported through either radv, which is part of mesa, or the amdvlk -package. Adding the amdvlk package to -[](#opt-hardware.graphics.extraPackages) -makes amdvlk the default driver and hides radv and lavapipe from the device list. -A specific driver can be forced as follows: - -```nix -{ - hardware.graphics.extraPackages = [ pkgs.amdvlk ]; - - # To enable Vulkan support for 32-bit applications, also add: - hardware.graphics.extraPackages32 = [ pkgs.driversi686Linux.amdvlk ]; - - # Force radv - environment.variables.AMD_VULKAN_ICD = "RADV"; - # Or - environment.variables.VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json"; -} -``` +supported through the RADV driver, which is part of mesa. ## VA-API {#sec-gpu-accel-va-api} diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 997c0bf1f325..f0fac1194f2f 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -29,7 +29,7 @@ - Convenience options for `amdgpu`, the open source driver for Radeon cards, are now available under [`hardware.amdgpu`](#opt-hardware.amdgpu.initrd.enable). -- [AMDVLK](https://github.com/GPUOpen-Drivers/AMDVLK), AMD's open source Vulkan driver, is now available to be configured under the [`hardware.amdgpu.amdvlk`](#opt-hardware.amdgpu.amdvlk.enable) option. +- [AMDVLK](https://github.com/GPUOpen-Drivers/AMDVLK), AMD's open source Vulkan driver, is now available to be configured under the {option}`hardware.amdgpu.amdvlk` option. This also allows configuring runtime settings for AMDVLK, including enabling experimental features. - The `moonlight-qt` package (for [Moonlight game streaming](https://moonlight-stream.org/)) now has HDR support on Linux systems. diff --git a/nixos/doc/manual/release-notes/rl-2511.section.md b/nixos/doc/manual/release-notes/rl-2511.section.md index 6b3b2e9536f1..0ee259066638 100644 --- a/nixos/doc/manual/release-notes/rl-2511.section.md +++ b/nixos/doc/manual/release-notes/rl-2511.section.md @@ -150,6 +150,8 @@ - The `no-broken-symlink` build hook now also fails builds whose output derivation contains links to $TMPDIR (typically /build, which contains the build directory). +- `hardware.amdgpu.amdvlk` and the `amdvlk` package have been removed, as they have been deprecated by AMD. These have been replaced with the RADV driver from Mesa, which is enabled by default. + - The `services.polipo` module has been removed as `polipo` is unmaintained and archived upstream. - `virtualisation.lxd` has been removed due to lack of Nixpkgs maintenance. Users can migrate to `virtualisation.incus`, a fork of LXD, as a replacement. See [Incus migration documentation](https://linuxcontainers.org/incus/docs/main/howto/server_migrate_lxd/) for migration information. diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 9507f4472eb9..7163e87c704d 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -631,7 +631,6 @@ ./services/hardware/acpid.nix ./services/hardware/actkbd.nix ./services/hardware/amdgpu.nix - ./services/hardware/amdvlk.nix ./services/hardware/argonone.nix ./services/hardware/asusd.nix ./services/hardware/auto-cpufreq.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index c7e541c8a628..6c59f1c5c5e4 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -34,6 +34,11 @@ in "fontconfig" "penultimate" ] "The corresponding package has removed from nixpkgs.") + (mkRemovedOptionModule [ + "hardware" + "amdgpu" + "amdvlk" + ] "'amdvlk' has been removed. The replacement driver RADV, part of Mesa, is enabled by default.") (mkRemovedOptionModule [ "hardware" "brightnessctl" ] '' The brightnessctl module was removed because newer versions of brightnessctl don't require the udev rules anymore (they can use the diff --git a/nixos/modules/services/hardware/amdgpu.nix b/nixos/modules/services/hardware/amdgpu.nix index 4aff9cdd077d..0958ef58b4b0 100644 --- a/nixos/modules/services/hardware/amdgpu.nix +++ b/nixos/modules/services/hardware/amdgpu.nix @@ -40,7 +40,6 @@ in }; opencl.enable = lib.mkEnableOption ''OpenCL support using ROCM runtime library''; - # cfg.amdvlk option is defined in ./amdvlk.nix module }; config = { diff --git a/nixos/modules/services/hardware/amdvlk.nix b/nixos/modules/services/hardware/amdvlk.nix deleted file mode 100644 index ba0349a069bc..000000000000 --- a/nixos/modules/services/hardware/amdvlk.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -let - cfg = config.hardware.amdgpu.amdvlk; -in -{ - options.hardware.amdgpu.amdvlk = { - enable = lib.mkEnableOption "AMDVLK Vulkan driver"; - - package = lib.mkPackageOption pkgs "amdvlk" { }; - - supportExperimental.enable = lib.mkEnableOption "Experimental features support"; - - support32Bit.enable = lib.mkEnableOption "32-bit driver support"; - support32Bit.package = lib.mkPackageOption pkgs [ "driversi686Linux" "amdvlk" ] { }; - - settings = lib.mkOption { - type = with lib.types; attrsOf (either str int); - default = { }; - example = { - AllowVkPipelineCachingToDisk = 1; - ShaderCacheMode = 1; - IFH = 0; - EnableVmAlwaysValid = 1; - IdleAfterSubmitGpuMask = 1; - }; - description = '' - Runtime settings for AMDVLK to be configured {file}`/etc/amd/amdVulkanSettings.cfg`. - See [AMDVLK GitHub page](https://github.com/GPUOpen-Drivers/AMDVLK?tab=readme-ov-file#runtime-settings). - ''; - }; - }; - - config = lib.mkIf cfg.enable { - hardware.graphics = { - enable = true; - extraPackages = [ cfg.package ]; - } - // lib.optionalAttrs cfg.support32Bit.enable { - enable32Bit = true; - extraPackages32 = [ cfg.support32Bit.package ]; - }; - - environment.sessionVariables = lib.mkIf cfg.supportExperimental.enable { - AMDVLK_ENABLE_DEVELOPING_EXT = "all"; - }; - - environment.etc = lib.mkIf (cfg.settings != { }) { - "amd/amdVulkanSettings.cfg".text = lib.concatStrings ( - lib.mapAttrsToList (n: v: '' - ${n},${builtins.toString v} - '') cfg.settings - ); - }; - }; - - meta = { - maintainers = with lib.maintainers; [ johnrtitor ]; - }; -} diff --git a/pkgs/by-name/am/amdvlk/package.nix b/pkgs/by-name/am/amdvlk/package.nix deleted file mode 100644 index 8b6d97d3bcae..000000000000 --- a/pkgs/by-name/am/amdvlk/package.nix +++ /dev/null @@ -1,141 +0,0 @@ -{ - stdenv, - callPackage, - lib, - fetchRepoProject, - nix-update-script, - cmake, - directx-shader-compiler, - glslang, - ninja, - patchelf, - perl, - pkg-config, - python3, - expat, - libdrm, - ncurses, - openssl, - wayland, - xorg, - zlib, -}: -let - - suffix = if stdenv.system == "x86_64-linux" then "64" else "32"; - -in -stdenv.mkDerivation (finalAttrs: { - pname = "amdvlk"; - version = "2025.Q1.3"; - - src = fetchRepoProject { - name = "amdvlk-src"; - manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git"; - rev = "refs/tags/v-${finalAttrs.version}"; - hash = "sha256-ZXou5g0emeK++NyV/hQllZAdZAMEY9TYs9c+umFdcfo="; - }; - - buildInputs = [ - expat - libdrm - ncurses - openssl - wayland - zlib - ] - ++ (with xorg; [ - libX11 - libxcb - xcbproto - libXext - libXrandr - libXft - libxshmfence - ]); - - nativeBuildInputs = [ - cmake - directx-shader-compiler - glslang - ninja - patchelf - perl - pkg-config - python3 - ] - ++ (with python3.pkgs; [ - jinja2 - ruamel-yaml - ]); - - rpath = lib.makeLibraryPath ( - [ - libdrm - openssl - stdenv.cc.cc - zlib - ] - ++ (with xorg; [ - libX11 - libxcb - libxshmfence - ]) - ); - - cmakeDir = "../drivers/xgl"; - - cmakeFlags = [ - # There is some incredibly cursed issue with - # `directx-shader-compiler` flagging up compiler errors only on - # `i686-linux` and only when it has been compiled with a recent - # GCC. Since few 32‐bit games are going to use ray tracing anyway, - # we just disable it for now. Arch has done this since 2022. - # - # See: - # * - # * - # * - (lib.cmakeBool "VKI_RAY_TRACING" (!(stdenv.hostPlatform.isx86 && stdenv.hostPlatform.is32bit))) - ]; - - installPhase = '' - runHook preInstall - - install -Dm755 -t $out/lib icd/amdvlk${suffix}.so - install -Dm644 -t $out/share/vulkan/icd.d icd/amd_icd${suffix}.json - install -Dm644 -t $out/share/vulkan/implicit_layer.d icd/amd_icd${suffix}.json - - patchelf --set-rpath "$rpath" $out/lib/amdvlk${suffix}.so - - runHook postInstall - ''; - - # Keep the rpath, otherwise vulkaninfo and vkcube segfault - dontPatchELF = true; - - passthru.updateScript = nix-update-script { - extraArgs = [ - "--url" - "https://github.com/GPUOpen-Drivers/AMDVLK" - "--version-regex" - "v-(.*)" - ]; - }; - - passthru.impureTests = { - amdvlk = callPackage ./test.nix { }; - }; - - meta = { - description = "AMD Open Source Driver For Vulkan"; - homepage = "https://github.com/GPUOpen-Drivers/AMDVLK"; - changelog = "https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-${finalAttrs.version}"; - license = lib.licenses.mit; - platforms = [ - "x86_64-linux" - "i686-linux" - ]; - maintainers = with lib.maintainers; [ Flakebi ]; - }; -}) diff --git a/pkgs/by-name/am/amdvlk/test.nix b/pkgs/by-name/am/amdvlk/test.nix deleted file mode 100644 index 40da948c6836..000000000000 --- a/pkgs/by-name/am/amdvlk/test.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - lib, - makeImpureTest, - coreutils, - amdvlk, - vulkan-tools, -}: -makeImpureTest { - name = "amdvlk"; - testedPackage = "amdvlk"; - - sandboxPaths = [ - "/sys" - "/dev/dri" - ]; - - nativeBuildInputs = [ vulkan-tools ]; - - VK_ICD_FILENAMES = "${amdvlk}/share/vulkan/icd.d/amd_icd64.json"; - XDG_RUNTIME_DIR = "/tmp"; - - # AMDVLK needs access to /dev/dri/card0 (or another card), but normally it is rw-rw---- - # Change the permissions to be rw for everyone - prepareRunCommands = '' - function reset_perms() - { - # Reset permissions to previous state - for card in /dev/dri/card*; do - sudo ${coreutils}/bin/chmod "0''${cardPerms[$card]}" $card - done - } - - # Save permissions on /dev/dri/card* - declare -A cardPerms - for card in /dev/dri/card*; do - cardPerms[$card]=$(stat -c "%a" $card) - done - - sudo ${coreutils}/bin/chmod o+rw /dev/dri/card* - trap reset_perms EXIT - ''; - - testScript = '' - # Check that there is at least one card with write-access - if ! ls -l /dev/dri/card* | cut -b8-9 | grep -q rw; then - echo 'AMDVLK needs rw access to /dev/dri/card0 or a fitting card, please run `sudo chmod o+rw /dev/dri/card*`' - exit 1 - fi - - vulkaninfo --summary - echo "Checking version" - vulkaninfo --summary | grep '= ${amdvlk.version}' - ''; - - meta = with lib.maintainers; { - maintainers = [ Flakebi ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 8f20ddd0dd3e..1224f7448b39 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -431,6 +431,7 @@ mapAliases { alsaTools = throw "'alsaTools' has been renamed to/replaced by 'alsa-tools'"; # Converted to throw 2024-10-17 alsaUtils = throw "'alsaUtils' has been renamed to/replaced by 'alsa-utils'"; # Converted to throw 2024-10-17 amazon-qldb-shell = throw "'amazon-qldb-shell' has been removed due to being unmaintained upstream"; # Added 2025-07-30 + amdvlk = throw "'amdvlk' has been removed since it was deprecated by AMD. Its replacement, RADV, is enabled by default."; # Added 2025-09-20 angelfish = throw "'angelfish' has been renamed to/replaced by 'libsForQt5.kdeGear.angelfish'"; # Converted to throw 2024-10-17 animeko = throw "'animeko' has been removed since it is unmaintained"; # Added 2025-08-20 ansible_2_14 = throw "Ansible 2.14 goes end of life in 2024/05 and can't be supported throughout the 24.05 release cycle"; # Added 2024-04-11 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 727a3546353b..a1a6b68d5852 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7302,7 +7302,6 @@ with pkgs; # Multi-arch "drivers" which we want to build for i686. driversi686Linux = recurseIntoAttrs { inherit (pkgsi686Linux) - amdvlk intel-media-driver intel-vaapi-driver mesa