-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
treewide: big opengl cleanups #320228
treewide: big opengl cleanups #320228
Conversation
It's dead, Jim.
b68060a
to
034628c
Compare
Manual build probably requires updating |
Yep, forgot to commit all the renames. Should be there now. |
- rename hardware.opengl to hardware.graphics - remove hardware.opengl.driSupport, which does nothing - remove hardware.opengl.setLdLibraryPath, which should never be done - rename hardware.opengl.driSupport32Bit to hardware.graphics.enable32Bit - lost of small docs / formatting cleanups
imports = [ | ||
(lib.mkRenamedOptionModule [ "services" "xserver" "vaapiDrivers" ] [ "hardware" "opengl" "extraPackages" ]) | ||
(lib.mkRemovedOptionModule [ "hardware" "opengl" "s3tcSupport" ] "S3TC support is now always enabled in Mesa.") | ||
(lib.mkRemovedOptionModule [ "hardware" "opengl" "driSupport"] "The setting can be removed.") |
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.
We should probably mention, that this was a no-op in the first place
I am not sure that "graphics" is a good name in this case. |
|
The idea would be to have I also take issue with I agree that Additionally, uninformed users should never need to be touching these. A typical desktop user for instance should only have to enable a desktop session and/or Steam and those would in turn enable the accelerator APIs typically required for those use-cases. I won't block on this as this is already an improvement over the status quo and I've clearly not found the priority to produce code for my preferred options API but please consider my design choices and why I made them. |
Really the problem with separating the options like what you're proposing is that Mesa is all of those at the same time, and Mesa is what most people will be running. Technically, we could separate OpenGL, OpenCL, Vulkan, VAAPI etc lookup paths, since they're symlinks anyway, and just link the right manifests into place, but that feels like a lot of work for questionable gain? |
Not quite and that's an issue. It's a geat implementation of most of the most critical and useful acceleration APIs but by far not all of them. I love mesa but I don't think it's a good idea to equate it with hardware acceleration as a whole. There is a world outside of Mesa and it does not support every accel API under the sky and that's an issue if you center your NixOS options around everything being mesa. Think CUDA, ROCm, oneAPI etc. or even just alternative implementations of the APIs mesa supports for which there are valid use-cases.
That is true but enforcing that through the design of the NixOS options is the wrong way of achieving that IMO. Ensuring the user has the most sensible drivers installed should be handled through use-case-driven sane defaults.
You don't have to do but designing it like that leaves you the option to should that become relevant. In my initial implementation I still threw them into Speaking of which, I had a draft with some progress somewhere with some more notes and discussion but I'm having a really hard time finding it. I'll link it here when I find it. |
Found it: #141803 (comment) |
I do really like your draft. I'll see if I can muster the spoons to actually try implementing it, because it does not seem too difficult now... |
I'll defer to @Atemu on this matter. I removed most of the references of opengl from packaging concerns, module re-design I like their direction, and looks like the related information was already brought up. |
OK, let's just send this, and I'll try a more ambitious cleanup over the weekend. |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-24.05
git worktree add -d .worktree/backport-320228-to-release-24.05 origin/release-24.05
cd .worktree/backport-320228-to-release-24.05
git switch --create backport-320228-to-release-24.05
git cherry-pick -x 951601ccab7c3e8f9afa3ed78f2046863e6fa81d 98cef4c27326d0f9e521654441929c1c7c64f8e9 1e3c610b8442bb22be3ca39542894f16d3c94d5c |
Definitely not. |
What about |
It's not really just GPUs, but anyway, I'll have a PR with a more granular approach to this eventually. |
Is there a reason not to? Due to nixos-hardware not being versioned, about time we get bug reports from stable users. |
It's an API break. We don't do those on stable releases. nixos-hardware should just use the old options for now, and remove the removed ones. |
Oh, not sure how I missed this. This is great and indeed long overdue, thank you @K900! Regarding the naming, I think |
Why was |
AFAICT because the last driver relying on this terrible hack was removed (AMDGPU-PRO). It should receive a What's your use-case? |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
- Follow changes of [#320228] [#320228]: NixOS/nixpkgs#320228
NixOS/nixpkgs#320228 removed the `hardware.opengl.setLdLibraryPath` option, which was required for the `legacy_340` NVIDIA driver to work properly (NixOS/nixpkgs#120602). The machine which needed the `legacy_340` driver is no longer in use for quite some time, so there is no way to test any possible fixes; just drop the obsolete option.
Description of changes
This is long overdue.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.