Thanks to visit codestin.com
Credit goes to gist.github.com

Skip to content

Instantly share code, notes, and snippets.

@Reiuiji
Reiuiji / nvidia-drivers-340.76-nv-pat.c.patch
Last active August 29, 2015 14:26
Fix for Gentoo nvidia-drivers 340.76 for any linux kernel > 4.0
--- a/kernel/nv-pat.c
+++ b/kernel/nv-pat.c
@@ -35,8 +35,13 @@
unsigned long cr0 = read_cr0();
write_cr0(((cr0 & (0xdfffffff)) | 0x40000000));
wbinvd();
- *cr4 = read_cr4();
- if (*cr4 & 0x80) write_cr4(*cr4 & ~0x80);
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 20, 0)
+ *cr4 = read_cr4();

Keybase proof

I hereby claim:

  • I am reiuiji on github.
  • I am reiuiji (https://keybase.io/reiuiji) on keybase.
  • I have a public key whose fingerprint is 65ED A3E7 D6A8 6EF5 0D26 FBEC 3D62 522F 0147 D3F5

To claim this, I am signing this object:

@Reiuiji
Reiuiji / apf-firewall-kernel.diff
Last active January 2, 2016 21:59
Fixes apf-firewall for kernel 3.8 This is a temp fix Just change the version tag "3.8" to your kernel version to fix the problem with apf-firewall
--- functions-old.apf 2014-01-10 22:14:51.297789887 -0800
+++ functions.apf 2014-01-10 22:17:14.381797135 -0800
@@ -69,17 +69,19 @@
MEXT="o"
elif [ "$KREL" == "2.6" ]; then
MEXT="ko"
-elif [ ! "$KREL" == "2.4" ] && [ ! "$KREL" == "2.6" ]; then
+elif [ "$KREL" == "3.8" ]; then
+ MEXT="ko"
+elif [ ! "$KREL" == "2.4" ] && [ ! "$KREL" == "2.6" ] && [ ! "$KREL" == "3.8" ]; then