Skip to content

Fixes for kernel 6.19 and 7.1 - #17

Open
MichelBoucey wants to merge 2 commits into
archlinux-jerry:masterfrom
MichelBoucey:master
Open

Fixes for kernel 6.19 and 7.1#17
MichelBoucey wants to merge 2 commits into
archlinux-jerry:masterfrom
MichelBoucey:master

Conversation

@MichelBoucey

@MichelBoucey MichelBoucey commented Apr 5, 2026

Copy link
Copy Markdown
Contributor
  • Since Linux kernel 6.19.6-arch1-1, nvidia-340xx 340.108-39 doesn't build no more. A function, in_irq is no more declared (at least explicitly) :
os-interface.c: In function ‘os_is_isr’:
os-interface.c:222:13: error: implicit declaration of function ‘in_irq’ [-Wimplicit-function-declaration]
  222 |     return (in_irq());

I found that some others have replaced this function by this one, in_hardirq (https://pastebin.com/Rhdy9KHe) and it works.

So, this PR:

  • Add 0020-kernel-6.19.patch, to make this replacement.
  • Add 0021-kernel-7.0.patch (thanks R3n4n).
  • Modify .SRCINFO and PKGBUILD accordingly.
  • Bump pkgrel to 41 (nvidia-340xx 340.108-41)

N.B. :Since, I have made more than 12 kernel updates, up to 7.1.2-arch3-1, without issue.

@coolDudeRude

Copy link
Copy Markdown

@MichelBoucey great work, the kernel module builds fine. However, facing issues with kitty 0.46.2, with frozen window and rainbow border. I think we should also look into porting debian's patches for 340xx, that should fix a lot of issues. For example, for in_irq fix see https://salsa.debian.org/nvidia-team/nvidia-graphics-drivers/-/commit/98430045a70e74ee1da9976626891679b8fe627a

@MichelBoucey

MichelBoucey commented Apr 12, 2026

Copy link
Copy Markdown
Contributor Author

@coolDudeRude Thank you for your feedback and useful informations.

I didn't know that "in_hardirq() was added in v5.11-rc1 (2020-12-15) to replace in_irq()". Quite a long time in IT world indeed.

As terminal, I'm using Alacritty in Xmonad without issue.

I'm not a c developper, so I'm quite limited, but, perhaps, it would be a (small) enhancement to implement the very simple function wrapper nv_in_hardirq (0076-backport-nv_in_hardirq-changes-from-580.119.02.patch) in the (next) patch to "fall back to in_irq() for older kernels that don't have in_hardirq()". I can do that.

@MichelBoucey

Copy link
Copy Markdown
Contributor Author

@coolDudeRude I've implemented this enhancement on this branch. And I am currently running this version on my machine. You can try. But I don't think it will fix your kitty issue, but who knows...

@coolDudeRude

coolDudeRude commented Apr 15, 2026

Copy link
Copy Markdown

@MichelBoucey great! I'll check it out.

I do agree, that this won't solve the kitty issue. However there are 2 issues with kitty, one is segfault, and one I'm currently experiencing. The segfault is caused because of libnvidia-tls.so which is what libGL.so also depends on (see: https://bbs.archlinux.org/viewtopic.php?id=311487&p=2). This can be solved by linking libnvidia-tls.so with libpthread using patchelf instead of libGL.so.

patchelf --add-needed /usr/lib/libpthread.so.0 /usr/lib/nvidia/libnvidia-tls.so

This should resolve most of the segfault related issues. But can't seem to figure out the frozen window issue...

I'll test 340xx with debian's patches, let's see if the issue can be resolved. 🤞

@MichelBoucey

Copy link
Copy Markdown
Contributor Author

I have modified the commit bound to this PR to add the enhancement.

@MichelBoucey

MichelBoucey commented May 10, 2026

Copy link
Copy Markdown
Contributor Author

@isjerryxiao There is now two patches to fix this driver, currently, up to Linux kernel 7.1.2-arch3-1. Thanks to R3n4n for the last one. Version bumped to 41 (nvidia-340xx-dkms 340.108-41).

@MichelBoucey MichelBoucey changed the title Fix for kernel 6.19 Fixes for kernel 6.19 and 7.0 May 11, 2026
@sandibabsel

Copy link
Copy Markdown

@MichelBoucey how to install on kernel 7.0?

@MichelBoucey MichelBoucey changed the title Fixes for kernel 6.19 and 7.0 Fixes for kernel 6.19 and 7.1 Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants