vendor-reset icon indicating copy to clipboard operation
vendor-reset copied to clipboard

Fix build on Kernel v. 6.12

Open mfrischknecht opened this issue 1 year ago • 4 comments

asm/unaligned.h has been moved to linux/unaligned.h since Linux v. 6.12 ^1, which breaks the build of vendor-reset e.g. on NixOS unstable (and likely other distributions, as soon as those switch to 6.12, too).

On my system, the build fails with this error:

/build/source/src/amd/amdgpu/atom.c:32:10: fatal error: asm/unaligned.h: No such file or directory
   32 | #include <asm/unaligned.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/nix/store/lacdcr5zi7w59f8xsq4cfi41mzgc6dcn-linux-6.12-dev/lib/modules/6.12.0/source/scripts/Makefile.build:229: /build/source/src/amd/amdgpu/atom.o] Error 1

mfrischknecht avatar Nov 23 '24 23:11 mfrischknecht

unfortunately this breaks the build on previous kernels, should try to make this change conditional like this: https://github.com/gnif/vendor-reset/blob/084881c6e9e11bdadaf05798e669568848e698a3/src/amd/amdgpu/atom.c#L43

VoodaGod avatar Nov 27 '24 04:11 VoodaGod

@VoodaGod I'm currently out of town, so I've just applied you suggestion through the GitHub mobile interface. I hope that's okay like this. Thanks!

Note: I havent tested this myself yet. I should be able to until friday.

mfrischknecht avatar Nov 27 '24 06:11 mfrischknecht

For completeness' sake: I've also tested building the module with some older Kernels through my NixOS config and had no issues.

I didn't switch to these Kernels and test the functionality, but as there haven't been many logic related changes in the recent past (and I've used the module through multiple of these older Kernel versions myself), I don't anticipate any problems in that regard.

mfrischknecht avatar Dec 02 '24 23:12 mfrischknecht

Kernel 6.12 made it into Debian Stable backports. Had to manually edit the DKMS source for now, can confirm this PR fixes the issue and works for both >=6.12 and <=6.11 kernels. @gnif Can you merge this, please?

kutukvpavel avatar Feb 05 '25 13:02 kutukvpavel

If anyone needs this fix on Arch using the AUR package, I was able to manually add it by updating the pkgbuild file. I started the reinstall using yay --editmenu -S vendor-reset-dkms-git, then entering the editor when prompted, and adding the prepare function to the build, which downloads and applies patches for the two commits in this PR.

prepare() { 
    cd "$srcdir/$_pkgbase" 
     
    wget "https://github.com/gnif/vendor-reset/commit/ab1b34848097587aca1f248958358ddb1dc90917.diff" 
    wget "https://github.com/gnif/vendor-reset/commit/54ffd6a012e7567b0288bc5fcc3678b545bd5aec.diff" 

    patch -p1 < "ab1b34848097587aca1f248958358ddb1dc90917.diff" 
    patch -p1 < "54ffd6a012e7567b0288bc5fcc3678b545bd5aec.diff" 
} 

marcusball avatar May 20 '25 03:05 marcusball

Will a fix be added for >=6.12 builds at some stage? This one is a red mark on the build server. (Without having to edit the build script first)

ipaqmaster avatar Jul 20 '25 12:07 ipaqmaster

I succefully install this version on Proxmox 9 and seem to work correctly

Edit At the end I discovered that vendor-reset never work on my apu Ryzen 5626U. My system was working using vfio and stop to work after the update to 6.14 Kernel versions so I must downgrade to 6.8. I don't know if and how to make this to work with my apu. I try to use AI to help but without success

fcaronte avatar Aug 10 '25 09:08 fcaronte

I succefully install this version on Proxmox 9 and seem to work correctly

Edit At the end I discovered that vendor-reset never work on my apu Ryzen 5626U. My system was working using vfio and stop to work after the update to 6.14 Kernel versions so I must downgrade to 6.8. I don't know if and how to make this to work with my apu. I try to use AI to help but without success

I also encountered such a problem

ZEGEIZI avatar Sep 27 '25 09:09 ZEGEIZI

Actually for me a resolve installing again the 6.8 kernel and set as default, practically as I understand vfio on 6.8 wasn't work for my integrated apu and this is way can be shutdown and wake more time without problems on windows or Linux VM without use vendor-reset, on new kernel instead vfio was able to do the reset but not correctly and so after one working launch the next one is working with glitches UI on the TV screen, when using RDP is okay and GPU is connected correctly, so it has some dirty status after reset and I can't find a way to say to vfio to do nothing after VM wake or shutdown to can try if work as the same as the 6.8 kernel version

I succefully install this version on Proxmox 9 and seem to work correctly

Edit At the end I discovered that vendor-reset never work on my apu Ryzen 5626U. My system was working using vfio and stop to work after the update to 6.14 Kernel versions so I must downgrade to 6.8. I don't know if and how to make this to work with my apu. I try to use AI to help but without success

I also encountered such a problem

fcaronte avatar Sep 29 '25 11:09 fcaronte