AMD GPU: Difference between revisions
CarlenWhite (talk | contribs) m Fix headers |
CarlenWhite (talk | contribs) New section: System Hang with Vega Graphics |
||
| Line 40: | Line 40: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
head /sys/class/drm/*/status | head /sys/class/drm/*/status | ||
</syntaxhighlight> | |||
=== System Hang with Vega Graphics (and select GPUs) === | |||
Currently on the latest kernel/mesa (currently 6.13 and 24.3.4 respectively), Vega integrated graphics (and other GPUs like the RX 6600<ref>https://bbs.archlinux.org/viewtopic.php?pid=2224147#p2224147</ref>) will have a possibility to hang due to context-switching between Graphics and Compute.<ref>https://bbs.archlinux.org/viewtopic.php?id=301798</ref> There are currently two sets of patches to choose between stability or speed that can be applied: [https://github.com/SeryogaBrigada/linux/commits/v6.13-amdgpu amdgpu-stable] and [https://github.com/SeryogaBrigada/linux/commits/v6.13-amdgpu-testing amdgpu-testing]. | |||
See [[Linux Kernel#Patching a single In-tree kernel module]], keep in mind how to make [https://stackoverflow.com/a/23525893 patch diffs from commits from GitHub], and consider this example configuration:<syntaxhighlight lang="nix"> | |||
{ config, pkgs, ... }: | |||
let | |||
amdgpu-kernel-module = pkgs.callPackage ./packages/amdgpu-kernel-module.nix { | |||
# Make sure the module targets the same kernel as your system is using. | |||
kernel = config.boot.kernelPackages.kernel; | |||
}; | |||
# linuxPackages_latest 6.13 | |||
amdgpu-stability-patch = pkgs.fetchpatch { | |||
name = "amdgpu-stability-patch"; | |||
url = "https://github.com/torvalds/linux/compare/ffd294d346d185b70e28b1a28abe367bbfe53c04...SeryogaBrigada:linux:4c55a12d64d769f925ef049dd6a92166f7841453.diff"; | |||
hash = "sha256-q/gWUPmKHFBHp7V15BW4ixfUn1kaeJhgDs0okeOGG9c="; | |||
}; | |||
/* | |||
# linuxPackages_zen 6.12 | |||
amdgpu-stability-patch = pkgs.fetchpatch { | |||
name = "amdgpu-stability-patch-zen"; | |||
url = "https://github.com/zen-kernel/zen-kernel/compare/fd00d197bb0a82b25e28d26d4937f917969012aa...WhiteHusky:zen-kernel:bd7822bb10068aaec994773824d20c7ea0fcff94.diff"; | |||
hash = "sha256-bMT5OqBCyILwspWJyZk0j0c8gbxtcsEI53cQMbhbkL8="; | |||
}; | |||
*/ | |||
/* | |||
# linuxPackages_zen 6.13 | |||
amdgpu-stability-patch = pkgs.fetchpatch { | |||
name = "amdgpu-stability-patch-zen"; | |||
url = "https://github.com/zen-kernel/zen-kernel/compare/acf7be8d0b380ee50c857967fdfc487b9e373ea8...WhiteHusky:zen-kernel:472a5b899b6859618d74020ec07985565ebb8a8c.diff"; | |||
hash = "sha256-q/gWUPmKHFBHp7V15BW4ixfUn1kaeJhgDs0okeOGG9c="; | |||
}; | |||
*/ | |||
in | |||
{ | |||
# amdgpu instability with context switching between compute and graphics | |||
# https://bbs.archlinux.org/viewtopic.php?id=301798&p=16 | |||
boot.extraModulePackages = [ | |||
(amdgpu-kernel-module.overrideAttrs (_: { | |||
patches = [ | |||
amdgpu-stability-patch | |||
]; | |||
})) | |||
]; | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||