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
[WIP] nvidia-firmware: init at 325.15 - calling all nvidia users #25075
Conversation
Is your nouveau module getting loaded in the initrd? If so, you probably need to include the firmwares there as well. |
Regarding inclusion in |
@edolstra, I don't think so as the firmware is extracted from the binary driver, so I would imagine that it is loaded as part of the nvidia driver being loaded. But in any case, I'll test that out. @dezgeg, is there some magic to loading the firmware files into the initrd? I've tried the following but it simply causes the kernel to panic during boot: {
boot.initrd.prepend = [
"${pkgs.firmwareLinuxNvidia}/lib/firmware/nouveau/*"
];
} Do I need to make a cpio archive or something? edit: The odd thing is, that if I do not add the package to |
I guess it's easier to debug by first getting it to work outside of initrd. |
@dezgeg, sure, but how do I get it to delay loading the module? |
cf33f68
to
08bfc29
Compare
SDDM still doesn't stay open. Not sure if it's a problem with the driver or something else. https://gist.github.com/jansol/3c88efb903bec9df3e578b942eb82eff |
So X is segfaulting. Can you try with the modesetting X driver instead of nouveau (ref item 1)? |
With that it works and vdpauinfo output matches what's mentioned here! |
@fpletz, any thoughts/commens on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@peterhoeg Sorry for the late response. Code looks fine to me, but can't test as I don't own nvidia graphics hardware.
@fpletz I need to map the remaining models but I obviously cannot test those as I only have on card (and @jansol another). Do you have any preferences regarding how we handle that? Should we simply not map those because we cannot test them or put a massive disclaimer in the documentation? How have you handled firmware for hardware you cannot test in the past? |
I would support just adding the full mapping while testing as the things go and documenting what is known. After all, we don't test Linux kernel updates on everything we can find before pushing to master. |
Hm, in addition to GK107 I have a GM108, what would I need to do to test there? |
@7c6f434c, you need to map the gm108 to the correct chip name and then add a call to I unfortunately do not know which file to map to for the gm108. |
Do I understand correctly that you just map the entry outside the parenthesis to the entry inside the parenthesis? |
Indeed it is, BUT in this case we don't have any of the firmware files for the NV110 family so I don't know if that's a case of them being called something else. In my case (GK107), it was exactly what I did: We have the following firmware files available: But looking at the dates of the release, the Maxwell cards were released after the driver version we're using. I'll see if we can find a newer one. |
The firmware is now located in This way we don't inadvertently use the this firmware. If |
I guess NV110 is just old enough to be different.
|
I've got a GTX-285 which uses NVA0, if you can find the firmware for that one. I also have a 560 Ti SLI system, which is either NVC8 or (more likely) NVCE, but it is down at the moment; if no one else can test that firmware, I should have it up enough for testing by the end of May. |
I've added support for GTX-285 - can you give it a go please? |
Brief update, I'm working on a proper nixos module for this which should make things much nicer to work with. |
(triage) Any progress on this? |
Well, it works - someone just need to write the module. I personally don't use the nvidia card any longer as it was just too much trouble and the onboard intel gfx are fine for my case. |
Hello, I was actually working on trying to write this myself before I found this pull request, I'd like to take it the rest of the way to getting merged, but I was wondering where I should look for information on converting it to a module? Sorry if this is obvious, I'm still new to Nix. |
Hi,
I was actually working on trying to write this myself before I found this
pull request, I'd like to take it the rest of the way to getting merged,
but I was wondering where I should look for information on converting it
to a module?
Basically, the option that are outlined in the first post need to be set via a module. We already have https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/hardware/video/nvidia.nix which is where it should be put.
Sorry if this is obvious, I'm still new to Nix.
Nothing to apologize for.
… |
Might also make sense to get #49703 merged first. |
Thank you for your contributions.
|
I'll get this done. |
@zyradyl did you get any further with updating the nvidia module by chance? |
@peterhoeg I have some changes that I use in my machine at: https://github.com/afrepues/nixpkgs/tree/nvidia-firmware Feel free to incorporate whatever you find useful. |
I marked this as stale due to inactivity. → More info |
What is the status of this PR? @peterhoeg have you finish it so it could be reviewed? |
What is the status of this PR? @peterhoeg have you finish it so it could be reviewed?
I gave up on nvidia and bought an AMD GPU which works perfectly. The only thing missing is just to wrap the manual steps in a module.
|
Motivation for this change
The nouveau driver requires firmware blobs from nvidia in order to enable proper acceleration on some cards (mine's a GK107).
This PR adds support for fetching and extracting the firmware which then needs to be included in the configuration. In order to test this out, you need to do the following:
modesetting
driver in configuration.nix:vdpauinfo
to the global environment (you can also just use nix-env -i) which we will need later:vdpauinfo
to trigger the loading and check in the journal that there are no errors:vdpauinfo journalctl -b | grep -i nouveau
vdpauinfo
should also tell you that you have acceleration:vdpauinfo | head -n 30 display: :0 screen: 0 API version: 1 Information string: G3DVL VDPAU Driver Shared Library version 1.0 Video surface: name width height types ------------------------------------------- 420 16384 16384 NV12 YV12 422 16384 16384 UYVY YUYV 444 16384 16384 Y8U8V8A8 V8U8Y8A8 Decoder capabilities: name level macbs width height ---------------------------------------------------- MPEG1 0 65536 4096 4096 MPEG2_SIMPLE 3 65536 4096 4096 MPEG2_MAIN 3 65536 4096 4096 H264_BASELINE 41 65536 4096 4096 H264_MAIN 41 65536 4096 4096 H264_HIGH 41 65536 4096 4096 VC1_SIMPLE 1 65536 4096 4096 VC1_MAIN 2 65536 4096 4096 VC1_ADVANCED 4 65536 4096 4096 MPEG4_PART2_SP 3 65536 4096 4096 MPEG4_PART2_ASP 5 65536 4096 4096 DIVX4_QMOBILE --- not supported --- DIVX4_MOBILE --- not supported --- DIVX4_HOME_THEATER --- not supported ---
Should this be part of "enableAllFirmware" ?
meta.hydraPlatforms
is blanked out as we cannot redistribute the firmware blobs.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)