mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-09 16:18:34 +01:00
amdvlk,nixos/amdvlk: drop
AMDVLK has been deprecated by upstream and has been replaced by RADV. Drop it for 25.11.
This commit is contained in:
parent
63ac62c2e2
commit
a0201020e2
|
|
@ -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 '<nixpkgs>' --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}
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
@ -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:
|
||||
# * <https://github.com/NixOS/nixpkgs/issues/216294>
|
||||
# * <https://github.com/GPUOpen-Drivers/gpurt/issues/5>
|
||||
# * <https://gitlab.archlinux.org/archlinux/packaging/packages/lib32-amdvlk/-/commit/905d9bc2cf4a003b3d367537b5e120d9771cce16>
|
||||
(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 ];
|
||||
};
|
||||
})
|
||||
|
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue