[KERNEL]custom kernel build with treaks (2020.03.07 v6.8.3|5.5.8|4.19.108|NAVI|VEGA|NFSv4|R8125|Zen2)


Recommended Posts

Hi I just build a kernel to support X570 motherboard (mine is msi x570 ace) and latest AMD Ryzen 2 3000 family CPU.

6.8.3 is out, here is the new kernel and some tweaks:

  • Add Vega Reset Patch
  • Add Navi Reset Patch
  • Enable NFSv4 in kernel(God damned, we finnaly get nfsv4 to work)
  • Add R8125 out tree driver.
  • AMD onboard audio/usb controller flr patch.
  • Provide two version (linux-5.5.8 and linux-4.19.108) in case of bug. Notice that linux-4.19.108 still don't have AMD Zen 2 suppport.

 

Download url can be found in the latest comments.

 

For those who want to use NFSv4:

NFSv4 have some change compared to v2/v3, it must have root share and the nfs-utils version can't handle it well.You must add this script to UserScript Plugin triggered when array start:

#!/bin/bash
# Add NFSv4 root
echo '"/mnt/user/" -async,no_subtree_check,fsid=0 *(sec=sys,rw,insecure,anongid=100,anonuid=99,all_squash,crossmnt)' >> /etc/exports
# Load configuration
exportfs -ra
# Tunning
mkdir -p /var/lib/nfs/v4recovery
sed -i 's@/usr/sbin/rpc.nfsd 8@/usr/sbin/rpc.nfsd 32@g' /etc/rc.d/rc.nfsd
# Restart Services
/etc/rc.d/rc.nfsd restart

And if you have trouble mount nfsv4, you can specify mount vers=3 on client.

image.thumb.png.60e6c4c93a9591fc2419f2cfa2a506b7.png

image.thumb.png.9d51cab2895e33c1deec609187250115.png

 

 

 

Edit at 2020.01.31

 

The procedure of compiling kernel(you can compile it in other linux distribute or linux VMs):

 

  1. download kernel sources from kernel.org, notice that should be same or related version of unraid(like 4.19.94 which 6.8.2 used)
  2. unarchive the kernel source zip, like kernel-4.19.94/
  3. copy the patches and .config (important!) from unraid server which located at /usr/src (like /usr/src/linux-4.19.94-Unraid/) to step 2 source directory
  4. (Optional) copy custom patches like navi patches or others to source directory too
  5. apply patches: find . -type f -iname '*.patch' -print0|xargs -n1 -0 patch -p 1 -i
  6. use old config : make oldconfig
  7. compile the kernel and modules: make -j5 bzImage; make -j5; make -j5 modules
  8. installing the modules, then you can find the module directory in /lib/modules: sudo make modules_install
  9. Copy the kernel image: cp sources/linux-4.19.94/arch/x86_64/boot/bzImage releases/6.8.2-4.19.94/bzimage
  10. (Optional) ThirdParty modules compiling (like nic r8125 outtree driver):
    1. enter the thirdparty driver directory
    2. compile the module: make -C /lib/modules/4.19.94-Unraid//build M=(pwd)/src modules
    3. install the module to direcotry: sudo make -C /lib/modules/4.19.94-Unraid/build M=(pwd)/src INSTALL_MOD_DIR=kernel/drivers/net/ethernet/realtek/ modules_install
    4. you can check whether the module exists in /lib/modules/4.19.94-Unraid/kernel/drivers/net/ethernet/realtek/
  11. archive the modules to bzimage: mksquashfs /lib/modules/4.19.94-Unraid/ releases/4.19.94/bzmodules -keep-as-directory -noappend
  12. Then you get the bzimage and bzmodules, copy it to unraid server: /boot/

 

Edited by Leoyzen
  • Like 12
Link to comment

Just sad that Linux-Server.io doesn't incorporate this to the Unraid-NVIDIA plugins they create, that would make it so much easier.   I don't want to compile anything, and don't want to lose my Hardware Transcoding that is possible with the Unraid-NVIDIA build, so i'm stuck until LimeTech upgrade the Kernel on the regular Unraid I suppose.

Link to comment
15 hours ago, sturmstar said:

Hi! Do I have to replace the Kernel or is it possible to rename them - and add it to the Unraid startmenu?

 

Thanks ... never done this before, that's why I'm asking

First, rename bzimage and bzmodules in /boot to backup the stock kernel;

Then unzip the archive to /boot/

Finally reboot your machine.

 

I try to add an entry in startmenu but I don't know how to specify the bzmodule to load

  • Thanks 1
Link to comment

Wanted to post this here in case anyone else is thinking of going down the same rabbit hole as I did relating to using this kernel & getting hardware transcoding in Plex on a 9th gen Intel.

 

First - the good!

The kernel works great -- I've had no issues with it. I have a 9700k, and the iGPU is recognized and loads fine. No issues there. I can pass it to the intel gpu tools docker container and it's recognized without issue.

 

The bad...

Plex's transcoder doesn't support 9th gen intels with hardware transcoding on Linux. They're working on supporting it though. See - https://forums.plex.tv/t/hardware-accelerated-streaming-not-working-i9-9900k/446150/2

Link to comment
  • 4 weeks later...

Today I had time to test the newest Bios which is available for my x470 gigabyte board - still the pci vfio bug bug. 

 

But then I tried your custom kernel - and with ACS Override downstream enabled - it works like a charm! Thank you so much.

 

Seems now I depend on your custom kernels until this is fixed from unraid-side - because I don't think there will be any further changes in the bioses...

 

So - please keep up the good work - and I hope you provide us with these versions until it is not needed anymore.

 

Thanks again and best regards!

Link to comment

I'm running a MSI X470 Gaming Plus with a 3600X.  Is this fix necessary to get GPU pass through working in any capacity?  I've tried ROM edit method for passing a Nvidia GPU, but had no luck.  Tomorrow when my second GPU arrives, I will give that a try.

 

*****EDIT******

I was able to get GPU pass though working on board without this fix.  So anyone else using MSI, probably won't need them.

Edited by Marc_G2
Link to comment

Some people claim that the bug was resolved with their latest bios versions. In my case it wasn't resolved with it. 

I have a Gigabyte Aourus x470 gaming with latest bios f42d - but the bug remained, I couldn't start a single VM with Gpu passthrough.

 

After using the custom kernel it works.

 

So in your case I would simply try if it works out of the box with latest bios. If it doesn't work you can still try and use the custom kernel.

Link to comment
16 hours ago, phat_cow said:

I wonder if this can fix my Error code 43 for my gpu passthrough.

Try and see, maybe work maybe not work, I dont know.

On 9/21/2019 at 5:28 PM, sturmstar said:

Today I had time to test the newest Bios which is available for my x470 gigabyte board - still the pci vfio bug bug. 

 

But then I tried your custom kernel - and with ACS Override downstream enabled - it works like a charm! Thank you so much.

 

Seems now I depend on your custom kernels until this is fixed from unraid-side - because I don't think there will be any further changes in the bioses...

 

So - please keep up the good work - and I hope you provide us with these versions until it is not needed anymore.

 

Thanks again and best regards!

glad to hear that.

 

On 8/26/2019 at 7:54 AM, Pducharme said:

@Leoyzen Would you be able to create a version with the Unraid NVIDIA too ?  so it can be use with both the sensors and the Nvidia Transcoding.

No, I tried but it seem to complex for me, because there isn't any steps or tutorial to compile the nvidia module. Sorry.

 

 

BTW, I've built a 5.2.14 kernel lately with those update:

  1. with zenpower build-in, somebody said it is accurate than k10temp
  2. vega reset bug patch from Vega 10 and 12 reset application
  3. navi reset bug patch from Navi Reset Kernel Patch
  4. some ALSA HDA crackled patch for X570 from here and here

but I don't have neither vega or navi card to test with, so if somebody interested in, let me know.

Also, ** this kernel may influence by these bug **: 

I will update when limetech release newest patches until unRaid 6.8+(which use 5.2.x+ kernel).

Edited by Leoyzen
Link to comment
On 9/23/2019 at 7:54 AM, Leoyzen said:

Try and see, maybe work maybe not work, I dont know.

glad to hear that.

 

No, I tried but it seem to complex for me, because there isn't any steps or tutorial to compile the nvidia module. Sorry.

 

 

BTW, I've built a 5.2.14 kernel lately with those update:

  1. with zenpower build-in, somebody said it is accurate than k10temp
  2. vega reset bug patch from Vega 10 and 12 reset application
  3. navi reset bug patch from Navi Reset Kernel Patch
  4. some ALSA HDA crackled patch for X570 from here and here

but I don't have neither vega or navi card to test with, so if somebody interested in, let me know.

Also, ** this kernel may influence by these bug **: 

I will update when limetech release newest patches until unRaid 6.8+(which use 5.2.x+ kernel).

 

@Leoyzen Just a question then.   When LimeTech will release a 6.8 with the 5.2.x kernel, and I assume "LinuxServer.io" update their Unraid-NVIDIA version,  Will we be able to just add all the patches you mentioned on top of the new version ?  I mean the Zenpower, Vega reset patch, navi reset path, other fixes, etc. 

Link to comment

Hi! As I mentinoed in my own thread

I tried your customized kernel on my Ryzen 3000 build with an Asus Strix x570 E-Gaming but there I just got an error warning "incompatible md version" and the array won't start. Does it mean the signature of the two adjusted file? The custom kernel provides just MD5 signature but on my unRAID boot-stick I have SHA256 signatures for the "bzimage" and "bzmodules"...

 

Otherwise at first I am done with unRAID so far. I just hope that the next updates fixes the issues..

Link to comment
17 hours ago, cap089 said:

Hi! As I mentinoed in my own thread

I tried your customized kernel on my Ryzen 3000 build with an Asus Strix x570 E-Gaming but there I just got an error warning "incompatible md version" and the array won't start. Does it mean the signature of the two adjusted file? The custom kernel provides just MD5 signature but on my unRAID boot-stick I have SHA256 signatures for the "bzimage" and "bzmodules"...

 

Otherwise at first I am done with unRAID so far. I just hope that the next updates fixes the issues..

What version unraid do you have? The kernel only works for unRaid 6.7.2.

Link to comment
On 8/21/2019 at 12:45 AM, Leoyzen said:

First, rename bzimage and bzmodules in /boot to backup the stock kernel;

Then unzip the archive to /boot/

Finally reboot your machine.

 

I try to add an entry in startmenu but I don't know how to specify the bzmodule to load

I'm running a Gigabyte X570 and Ryzen 3900X and I want to monitor my CPU temps. When I go into the /boot folder in Krusader. I see no files....

Link to comment

Just want to let you know this also allows me to passthrough on an x470 platform which doesn't yet have the ABBA bios update:

 

MSI x470 Carbon running the Sep9 2019 bios update, booting in Legacy+UEFI

The patched kernel seen above.

Ryzen 3900x

Saphire rx 480 and a VBIOS file from tech powerup ending(Sapphire.RX480.8192.160921.rom), and has to be in a secondary slot, not the primary.

Link to comment
On 9/29/2019 at 11:30 PM, phat_cow said:

I'm running a Gigabyte X570 and Ryzen 3900X and I want to monitor my CPU temps. When I go into the /boot folder in Krusader. I see no files....

I removed the USB from the machine and modified the files on a laptop. The /boot folder would just be the root of the USB key.

Link to comment
On 8/13/2019 at 12:23 AM, Leoyzen said:

Hi I just build a kernel to support X570 motherboard (mine is msi x570 ace) and latest AMD Ryzen 2 3000 family CPU.

The kernel version is 5.2.7 with AMD patches from AMD Ryzen 3000 series - Linux support and virtualization.

Fix:

  1. x570 pci vfio bug
  2. AMD Ryzen CPU suppport for k10temp
  3. newest nct6775 driver for most X570 sensors(many mb use nct6797 as SUPER/IO)
  4. Realtek r8125 NIC driver
  5. and other features comes with linux-kernel-5.2.7( such as coffeelake igpu support and etc.

The board sensors works fine (nct6775 and k10temp).

You can use it also for whom has problem (such as driver not support by  4.19.56 which unraid current used)  to see if it helps.

 

The unraid works fine for me but I'm not garuantee works for all of you, TAKE YOUR OWN RISK to use the kernel.

(PS: I try to backport AMD and sensors support for the kernel Unraid 6.7 used but failed)

 

If you have problem with this kernel, comment below and I'll see if I can give help

image.thumb.png.60e6c4c93a9591fc2419f2cfa2a506b7.png

image.thumb.png.9d51cab2895e33c1deec609187250115.png

 

Attempting to give your kernel a whirl! I attempted to compile my own for testing but ran into issues that I'm still trying to solve where GCC appears broken using your script. However when I use your kernel I get an error about an "incompatible md version". Which version of unRAID was your kernel built for? 6.7 hasn't worked for me and I'd really like to get this working! I now have an AMD processor in my server and swarm would be awesome with a project I'm working. If we can prove this out perhaps we can get Limetech onboard with the proper modules and it could trickle down to the NVIDIA guys :D

 

Thanks!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.