Compare commits

..

3 commits

Author SHA1 Message Date
b85719077d feat(nix): add ROCm runtime patches for gfx1151
- Added two patches to the ROCm runtime: `rocr-runtime-gfx1151-vgpr.patch` and `rocr-runtime-kernel-stack-size.patch`.
- Fixes compatibility issues, ensures better kernel support, and mitigates potential crashes on older kernels.
2026-02-17 10:40:27 +01:00
00f66d7fd8 feat(amd): add oversteer 2026-02-17 10:40:27 +01:00
fd2c7e1867 feat(amd): add Logitech racing wheel udev rules from oversteer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:40:27 +01:00
2 changed files with 106 additions and 0 deletions

View file

@ -96,6 +96,39 @@
allowUnfree = true; allowUnfree = true;
}; };
channels.unstable.overlays = [
(final: prev: {
rocm-runtime = prev.rocm-runtime.overrideAttrs (prevAttrs: {
patches = (prevAttrs.patches or [ ]) ++ [
(final.fetchpatch {
# [PATCH] hsakmt: bump vgpr count for gfx1151 (#1807) (#1986)
# We apply only the change that adds a GFX_VERSION_GFX1151 define but
# *not* the default vgpr change which causes crashes on old kernels
# This was later partially reverted in # [PATCH] Revert "hsakmt: bump vgpr count for gfx1151 (#1807) (#1986)"
name = "rocr-runtime-gfx1151-vgpr.patch";
url = "https://github.com/ROCm/rocm-systems/commit/09ba45b3f43ec333a84a0ca178fcd1e3ea9400a9.patch";
relative = "projects/rocr-runtime";
includes = [ "libhsakmt/src/libhsakmt.h" ];
hash = "sha256-/V5i+sr88n7fK4yNjR/FpY0ZpiEG5xAD6Oq+9ZOikd4=";
})
(final.fetchpatch {
# [PATCH] hsakmt: Expose and use CWSR and Control stack sizes (#2200)
# Fixes potential mismatches between stack sizes configured in amdgpu kernel module
# and userspace by relying on kernel value when available
# Falls back to hardcoded size based on ISA if kernel is too old. For gfx1151, also prints:
# WARNING: KFD ABI 1.20+ is recommended … This may result in faults, crashes and other application instability
# This allows new kernels to work with this runtime detection mechanism
# Only gfx1151 warns loudly because only it has had the size updated in kernel…
name = "rocr-runtime-kernel-stack-size.patch";
url = "https://github.com/ROCm/rocm-systems/commit/7037a71f311c021974fafd13727dfefd8a1cc79d.patch";
relative = "projects/rocr-runtime";
hash = "sha256-EbDxuEvNu0fyQJZmqq0fbcCdNtaEWUbmyPLvcfqDPjc=";
})
];
});
})
];
homes.modules = with inputs; [ neovim-flake.homeManagerModules.default ]; homes.modules = with inputs; [ neovim-flake.homeManagerModules.default ];
systems.modules.nixos = with inputs; [ systems.modules.nixos = with inputs; [

View file

@ -112,6 +112,7 @@ with lib.metacfg;
vscode vscode
cider-2 cider-2
opencode opencode
oversteer
]; ];
# zram swap with zstd compression for better performance # zram swap with zstd compression for better performance
@ -122,6 +123,78 @@ with lib.metacfg;
services.ratbagd.enable = true; services.ratbagd.enable = true;
# Logitech racing wheel permissions (oversteer)
services.udev.extraRules = ''
# Match Logitech HID devices for racing wheel support
ACTION!="unbind", ACTION!="remove", SUBSYSTEM=="hid", ATTRS{idVendor}=="046d", GOTO="logitech-rules"
GOTO="end"
LABEL="logitech-rules"
DRIVER=="logitech", GOTO="logitech-driver"
DRIVER!="logitech-hidpp-device", GOTO="end"
# Logitech G PRO Racing Wheel for PlayStation and PC
ATTRS{idProduct}=="c268", RUN+="/bin/sh -c 'cd %S%p; chmod 666 range leds/*/brightness; chmod 777 leds/ leds/*'"
# Logitech G PRO Racing Wheel for Xbox One and PC
ATTRS{idProduct}=="c272", RUN+="/bin/sh -c 'cd %S%p; chmod 666 range leds/*/brightness; chmod 777 leds/ leds/*'"
# Logitech G923 Racing Wheel for Xbox One and PC
ATTRS{idProduct}=="c26e", RUN+="/bin/sh -c 'cd %S%p; chmod 666 range leds/*/brightness; chmod 777 leds/ leds/*'"
# Logitech G920 Driving Force Racing Wheel
ATTRS{idProduct}=="c262", RUN+="/bin/sh -c 'cd %S%p; chmod 666 range'"
GOTO="end"
LABEL="logitech-driver"
# Logitech G923 Racing Wheel for PlayStation 4 and PC
ATTRS{idProduct}=="c266", RUN+="/bin/sh -c 'cd %S%p; chmod 666 alternate_modes combine_pedals range gain autocenter spring_level damper_level friction_level ffb_leds peak_ffb_level leds/*/brightness; chmod 777 leds/ leds/*'"
# Logitech G29 Driving Force Racing Wheel
ATTRS{idProduct}=="c24f", RUN+="/bin/sh -c 'cd %S%p; chmod 666 alternate_modes combine_pedals range gain autocenter spring_level damper_level friction_level ffb_leds peak_ffb_level leds/*/brightness; chmod 777 leds/ leds/*'"
# Logitech G27 Driving Force Racing Wheel
ATTRS{idProduct}=="c29b", RUN+="/bin/sh -c 'cd %S%p; chmod 666 alternate_modes combine_pedals range gain autocenter spring_level damper_level friction_level ffb_leds peak_ffb_level leds/*/brightness; chmod 777 leds/ leds/*'"
# Logitech G25 Driving Force Racing Wheel
ATTRS{idProduct}=="c299", RUN+="/bin/sh -c 'cd %S%p; chmod 666 alternate_modes combine_pedals range gain autocenter spring_level damper_level friction_level ffb_leds peak_ffb_level'"
# Logitech Driving Force GT Racing Wheel
ATTRS{idProduct}=="c29a", RUN+="/bin/sh -c 'cd %S%p; chmod 666 alternate_modes combine_pedals range gain autocenter spring_level damper_level friction_level ffb_leds peak_ffb_level'"
# Logitech Driving Force Pro Racing Wheel
ATTRS{idProduct}=="c298", RUN+="/bin/sh -c 'cd %S%p; chmod 666 alternate_modes combine_pedals range gain autocenter spring_level damper_level friction_level ffb_leds peak_ffb_level'"
# Logitech Driving Force Racing Wheel
ATTRS{idProduct}=="c294", RUN+="/bin/sh -c 'cd %S%p; chmod 666 alternate_modes combine_pedals range gain autocenter spring_level damper_level friction_level ffb_leds peak_ffb_level'"
# Logitech Momo Force Racing Wheel
ATTRS{idProduct}=="c295", RUN+="/bin/sh -c 'cd %S%p; chmod 666 combine_pedals range gain autocenter spring_level damper_level friction_level ffb_leds peak_ffb_level'"
# Logitech MOMO Racing USB
ATTRS{idProduct}=="ca03", RUN+="/bin/sh -c 'cd %S%p; chmod 666 combine_pedals range gain autocenter spring_level damper_level friction_level ffb_leds peak_ffb_level'"
# Logitech WingMan Formula Force GP USB
ATTRS{idProduct}=="c293", RUN+="/bin/sh -c 'cd %S%p; chmod 666 combine_pedals range gain autocenter spring_level damper_level friction_level ffb_leds peak_ffb_level'"
# Logitech Racing Wheel USB
ATTRS{idProduct}=="ca04", RUN+="/bin/sh -c 'cd %S%p; chmod 666 combine_pedals range'"
# Logitech WingMan Formula GP
ATTRS{idProduct}=="c20e", RUN+="/bin/sh -c 'cd %S%p; chmod 666 combine_pedals range'"
# Logitech WingMan Formula (Yellow) (USB)
ATTRS{idProduct}=="c202", RUN+="/bin/sh -c 'cd %S%p; chmod 666 range'"
# Logitech Speed Force Wireless
ATTRS{idProduct}=="c29c", RUN+="/bin/sh -c 'cd %S%p; chmod 666 combine_pedals range'"
LABEL="end"
'';
virtualisation = { virtualisation = {
libvirtd.enable = true; libvirtd.enable = true;
docker.enable = true; docker.enable = true;