Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Nvidia Proprietary Driver after archinstall Script with August Arch Linux ISO's #2002

Closed
Cardiacman13 opened this issue Aug 10, 2023 · 35 comments

Comments

@Cardiacman13
Copy link

Hi,

Issue: The August Arch Linux ISO's archinstall script does not install the Nvidia proprietary driver.

Environment:
Arch Linux ISO: version 2023.08.01 (issue persists despite script update but work with july iso)

@Cardiacman13 Cardiacman13 changed the title Missing Nvidia Proprietary Driver in August Arch Linux ISO's after archinstall Script Missing Nvidia Proprietary Driver after archinstall Script with August Arch Linux ISO's Aug 10, 2023
@0xREAVEN
Copy link

Hello, I have exactly the same issue. I noticed after installing KDE and Hyprland that the Nvidia drivers are not installed.

@rein1410
Copy link

I also have this issue. I noticed after installing Arch I tried running apps with DXVK but it doesn't work. So I open my GPU settings and see that I am running nouveau driver (Which I assume that I'm missing proprietary driver).

@lutzseverino
Copy link

Same issue here. Driver is not present after installing.

@dozn
Copy link

dozn commented Sep 19, 2023

The September release seems to have fixed it 🥳

@Torxed
Copy link
Member

Torxed commented Sep 20, 2023

We did not release a new version in September, so either it was a package conflict/issue with the nvidia package or something is still broken, can any of you who commented before dozn verify a second time that it works?

@dozn
Copy link

dozn commented Sep 20, 2023

Interesting, I assumed you released every month alongside the Arch ISOs :D Hope it works for others as well!

@Cardiacman13
Copy link
Author

It's Still broken.

@Torxed
Copy link
Member

Torxed commented Sep 20, 2023

Interesting, I assumed you released every month alongside the Arch ISOs :D Hope it works for others as well!

We tried, but releases have started getting complicated due to the amount of testing that needs to be done.

It's Still broken.

Thanks, I suspected as much.
And in the gfx section, I assume you selected nvidia when asked during DE selection?
Mind submitting hte logs? https://archinstall.readthedocs.io/help/issues.html#log-files

@dozn
Copy link

dozn commented Sep 20, 2023

Figured it out—you never install plain ol' linux-headers

install_session.add_additional_packages(f"{kernel}-headers")

I was using the Zen kernel, so I logged into the regular kernel, no drivers, installed linux-headers, rebooted, and voila!

@Torxed
Copy link
Member

Torxed commented Sep 20, 2023

Oooh, heh.. ignore my stupidity but are they required for the linux kernel as well?
That feels like a nvidia specific bug or change, because IIRC previously (#585) the headers have only been required for non-standard kernels.

If this is the case, maybe the NVIDIA (wiki) should mention this, or maybe it does in a sub-section/link somewhere?

I think we accidentally installed linux-headers by not filtering out the specific headers before: https://github.com/archlinux/archinstall/blame/de9b8d4f0e5852d7b4cd4d06e975a2e466fc00f4/archinstall/lib/profile/profiles_handler.py#L196-L201

Which got reworked to only hit the specific headers in #1847

@dozn
Copy link

dozn commented Sep 20, 2023

The normal nvidia package has linux-headers listed as a dependency (https://archlinux.org/packages/extra/x86_64/nvidia), but nvidia-dkms alone doesn't for whatever reason... probably a bug!

From the NVIDIA docs:

When the installer is run, it will check your system for the required kernel sources and compile the kernel interface. You must have the source code for your kernel installed for compilation to work. On most systems, this means that you will need to locate and install the correct kernel-source, kernel-headers, or kernel-devel package; on some distributions, no additional packages are required.

A comment on #585 (#585 (comment)) also mentioned needing linux-headers, fwiw

Since nvidia depends on nvidia-dkms anyways, perhaps straight-up installing nvidia is the proper choice here? Hopefully someone else who knows better will chime in =b

@Torxed
Copy link
Member

Torxed commented Sep 20, 2023

Humm, those are only make depends. and they tend to not be installed and instead only exist on the build machine (which is then in charge of package the nvidia package as you know it).

@dozn
Copy link

dozn commented Sep 20, 2023

Humm, those are only make depends. and they tend to not be installed and instead only exist on the build machine (which is then in charge of package the nvidia package as you know it).

Right, but doesn't that means the package needs to be installed in order for nvidia-dkms to find the kernel interface and install properly just like the other kernels? I dunno, I'm out of my depth a bit here =b

@Torxed
Copy link
Member

Torxed commented Sep 20, 2023

Not entirely sure to be honest, I'm also out of my depth here.
I figured nvidia-dkms also contains the source for the kernel modules, and gets built against the kernel when a custom kernel is upgraded, thus maintaining compatability.
Whereas nvidia gets pre-built against the current linux-headers/linux version.

Which is why upstream can afford to not require nvidia-dkms for the normal linux package.

The only thing I'm wondering is if there's any harm at all just chucking in the linux-headers if nvidia is installed? There's the obvious issue of the users not having this issue getting upset that we install more things than necessary.

@dozn
Copy link

dozn commented Sep 20, 2023

From the Arch wiki for DKMS:

Install the dkms package and the headers for the target kernel/kernels. For example, for the default linux kernel this would be linux-headers. Other kernels have their own respective headers packages.

Ahh okay, this comment helped:

You install nvidia driver if you’re only using the mainline kernel (aka linux kernel package)
You install nvidia-lts driver if you’re only using the LTS kernel (aka linux-lts kernel package)

If you’re using more than one kernel on your system like linux or linux-lts or linux-zen in any combination, then you have to use nvidia-dkms driver package.

The first two I mentioned are drivers built for only that specific kernel. The nvidia-dkms driver is overall the most versatile if you’re using more than one kernel. Also note, it is a good idea to also download the kernel headers as well with whichever kernel or kernels you’re using, aka linux-headers or linux-lts-headers or linux-zen-headers which will help to properly ensure no issues compiling modules when getting rebuilt during updates. DKMS packages are (re)built for each kernel on package- or kernel upgrade via a pacman hook.

So DKMS means you only need one version of the nvidia driver, instead of a separate one for each kernel (so you'd still need the kernel headers so it can talk to those kernels).

Still weird it's not a dependency for nvidia-dkms 🤷‍♂️

@Torxed
Copy link
Member

Torxed commented Sep 20, 2023

That makes sense.
What we need to do is swap nvidia for nvidia-dkms if multiple kernels are detected.

@dozn
Copy link

dozn commented Sep 20, 2023

I think I understand why it isn't listed as a dependency—it can't tell which headers you would need!

@dozn
Copy link

dozn commented Sep 20, 2023

That makes sense. What we need to do is swap nvidia for nvidia-dkms if multiple kernels are detected.

Or always use nvidia-dkms and just make sure the headers are installed for whichever kernel they use, in case they add more kernels in the future.

@Torxed
Copy link
Member

Torxed commented Sep 20, 2023

In theory that could work, but again, people will follow me with pitchforks if we don't try to stick to the minimal approach which is to install the right package based on detection.

So I think we'll have to check which kernels are installed, and choose the appropriate package based on it.

@dozn
Copy link

dozn commented Sep 20, 2023

As you wish, thanks for the chat ^_^

@Torxed
Copy link
Member

Torxed commented Sep 20, 2023

I appreciate the feedback and it's quite valuable.
It might be that the only sane way is to just install nvidia-dkms, we'll have to think about this one a bit :)

@dozn
Copy link

dozn commented Sep 29, 2023

Just wanted to add that linux-hardened-headers isn't installed either, if the linux-hardened kernel is also selected.

@moritztim
Copy link

If a fix for this isn't going to happen soon, maybe it should be temporarily disabled or have a disclaimer. I've wasted hours on figuring out why the drivers wouldn't work. If it won't work, don't say it will yk.

@moritztim
Copy link

It might be that the only sane way is to just install nvidia-dkms, we'll have to think about this one a bit :)

Perhaps always installing dkms could be a temporary fix at least

@Torxed
Copy link
Member

Torxed commented Oct 28, 2023

If a fix for this isn't going to happen soon, maybe it should be temporarily disabled or have a disclaimer. I've wasted hours on figuring out why the drivers wouldn't work. If it won't work, don't say it will yk.

The thing is that we don't have a way to communicate this through archinstall itself.
So there are no temporary fixes really, and even if we push a new release - that won't be available on older ISO's either. But yes, we need to fix this somehow - although I will flag that it's not as urgent as let's say the partitioning is broken (since this is fixable after the fact).

@Torxed
Copy link
Member

Torxed commented Nov 21, 2023

I've created a "known issues" section on the official docs page.
The docs page has not been pushed yet, but is worked on in #1967.

A proper fix will be issued at some point once we've gathered data on what happens if we "just shove it in there" (which sounds terrible, but without specifying exact hardware that needs this - this is the only way to fix the nvidia issue by the looks of it).

But this should address:

or have a disclaimer.

There's really no way to get messages in to the archinstall TUI at the moment, but the docs is listed on the wiki article and the issues here should be the two most common sources people check for?

@Torxed
Copy link
Member

Torxed commented Nov 21, 2023

Figured it out—you never install plain ol' linux-headers

install_session.add_additional_packages(f"{kernel}-headers")

I was using the Zen kernel, so I logged into the regular kernel, no drivers, installed linux-headers, rebooted, and voila!

Something struck me while re-reading this that should have been obvious from the start perhaps.
But I wonder if everyone in this thread have opted out of the default kernel all together?
Meaning everyone has been running zen, hardened or something else - and never the default kernel?

If so I feel a bit more at ease to "just install" linux-headers at least.

@moritztim
Copy link

nope I've tried with zen and default

@Torxed
Copy link
Member

Torxed commented Nov 21, 2023

Thanks for the quick reply, back to the drawing board hehe.
At least I know linux-headers isn't the only thing missing.

@moritztim
Copy link

moritztim commented Nov 21, 2023

The thing is that we don't have a way to communicate this through archinstall itself.

why not

@moritztim
Copy link

Thanks for the quick reply, back to the drawing board hehe. At least I know linux-headers isn't the only thing missing.

It's been a while and I tried a whole bunch of things but iirc it worked after installing linux-headers on a freshly made installation done through archinstall. I could be wrong tho

@Torxed
Copy link
Member

Torxed commented Nov 21, 2023

The thing is that we don't have a way to communicate this through archinstall itself.

why not

There's many ways of running archinstall, the main issue being support for offline environments. The other big one would be using archinstall as a library where we don't want to push output/communication unless the users call functions specifically.

I mean technically we can, but that would be up for a bigger discussion if we should introduce this.

@moritztim
Copy link

moritztim commented Nov 21, 2023

So there are no temporary fixes really

What about always installing dkms

people will follow me with pitchforks if we don't try to stick to the minimal approach which is to install the right package based on detection.

still better than it just not working at all imo

Torxed added a commit that referenced this issue Nov 22, 2023
* Added nvidia-dkms when installing propri driver to fix #2233, #2214 and #2002

* Forgot class-name infront of NvidiaDKMS
@lutzseverino
Copy link

Did #2241 fix this? Would be interesting to revisit this, it's been a while.

@Cardiacman13
Copy link
Author

Yes it's fix thx :)

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

No branches or pull requests

7 participants