Navi Reset Kernel Patch

Hi,

PSA: Currently as of 10.11.2019 and Kernel 5.3.8 the Patch is included into Manjaro stable. If you use Manjaro with the 5.3. Kernel the Patch is already included!

These threads from the Manjaro forum explained it for me:


I have done a self compilation of the Kernel the first time myself for this patch. It is not much work on Manjaro and Arch in general.

  1. Find the correct sources: First you clone the repositories of the kernel source for the kernel you want to use from here: https://gitlab.manjaro.org/packages/core. So in this page I would recommend you go into the linux53 branch and then hit the blue clone-button and copy the “Clone via https”-link. You need the package “git” installed on your system.

  2. Clone the code: Use the terminal navigate to a folder of your choice and run “git clone https://gitlab.manjaro.org/packages/core/linux53.git”. You will have a new linux53 folder. These are the sources for the 5.3 Manjaro Kernel.

  3. Copy the code from the Navi patch into a file in the linux53 folder and name it navi.patch or something like this.

  4. Create a SHA256 Checksum of the “navi.patch” file with "shasum -a 256 and keep the checksum it generates

  5. Open the PKGBUILD file in the linux53 folder in a text editor:

  6. Change the line _kernelname=-MANJARO to something like _kernelname=-VFIO. You do this because it makes it easier to see that you use your patched Kernel when yo run uname -u and also avoids the case that when Manjaro publishes a newer kernel version that yours will be replaced with a newer but unpatched version.

  7. At the beginning of the file there is a list of files beginning with “source=(” and then listing all the files. At the End behind “‘0013-bootsplash.patch’” create an additional line before the braces close with ‘navi.patch’ or whatever you named your patch file.

  8. Directly below the sources part in the PKGBUILD file is the “sha256sums=(”-part with the sha256 checksums. Because you added the navi.patch as the last file in the sources section you need to add the checksum you generated here as the last checksum before the braces close in the same manner.

At this point the PKGBUILD will know about your patch and can verify it with the checksum you generated. Now we need to apply it.

  1. Behind the end of the

    patch -Np1 -i “${srcdir}/vfs-ino.patch”

lines add an additional line like this:

  patch -Np1 -i "${srcdir}/navi.patch"`
  1. Save and apply your edits

  2. Install manjaro-tools-pkg sudo pacman -S manjaro-tools-pkg

  3. outside of the linux53 folder run buildpkg -p linux53

  4. The compilation takes 2 hours for me -> wait

  5. in the terminal cd /var/cache/manjaro-tools/pkg/stable/x86_64 your new kernel and it’s header will be there

  6. Install both with sudo pacman -U <kernelfilename> <headerfilename>

  7. Reboot and choose your new kernel in the grub menu by holding shift while booting

  8. ?

  9. Profit

Edit: I wanted to add that packages you install from the Arch User Repository (AUR) on Arch or Manjaro are being build in the same way. You should familiarize yourselfs with the build steps because you can verify and edit alls the software from the AUR if you understand buildpkg.

Edit2: Currently as of 10.11.2019 and Kernel 5.3.8 the Patch is included into Manjaro stable. If you use Manjaro with the 5.3. Kernel the Patch is already included!

6 Likes