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

linuxPackages.nvidia_x11: 545.29.02 -> 545.29.06 #269262

Merged
merged 3 commits into from
Nov 28, 2023

Conversation

Kiskae
Copy link
Contributor

@Kiskae Kiskae commented Nov 22, 2023

Description of changes

  • Fixed a regression that prevented setting backlight brightness levels.
  • Fixed a bug that could lead to UI corruption in nvidia-installer on systems with more than one initramfs file per kernel.
  • Fixed a bug that caused games built on the Source 2 engine to hang when running under Xwayland.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Priorities

Add a 👍 reaction to pull requests you find important.

@Kiskae Kiskae marked this pull request as draft November 22, 2023 19:13
@NickCao
Copy link
Member

NickCao commented Nov 22, 2023

And the patch can be dropped?

@Kiskae

This comment was marked as outdated.

@Kiskae
Copy link
Contributor Author

Kiskae commented Nov 22, 2023

@NickCao Yeah, was just waiting for the review to finish before adding that change.

Now we just need to wait for the settings/persistenced sources to be pushed to github.

@ofborg ofborg bot requested a review from NickCao November 22, 2023 22:11
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 101-500 labels Nov 22, 2023
@Kiskae
Copy link
Contributor Author

Kiskae commented Nov 23, 2023

Still waiting for official github releases, but I decided to see if I could convince the fetcher to fall back to nvidia's CDN.

The following code works, but depends on the implementation of fetchFromGithub using fetchzip internally which is kind of cursed:

  src = let 
    cdn = fetchFromGitHub {
      owner = "NVIDIA";
      repo = "nvidia-settings";
      rev = nvidia_x11.settingsVersion;
      inherit sha256;
    };
  in 
  cdn.override {
    urls = cdn.urls ++ [
      "https://download.nvidia.com/XFree86/nvidia-settings/nvidia-settings-${nvidia_x11.settingsVersion}.tar.bz2"
    ];
    url = "";
    # distributions use different compression, force unpack to guess
    extension = "tar.??";
  };

@Kiskae
Copy link
Contributor Author

Kiskae commented Nov 28, 2023

Decided to add CDN fallback for nvidia-settings and nvidia-persistenced. If the source is available on github it will prioritize that release to avoid breaking old releases.

@Kiskae Kiskae marked this pull request as ready for review November 28, 2023 14:25
@NickCao
Copy link
Member

NickCao commented Nov 28, 2023

The hack feels really uncomfortable to me, may we just replace fetchFromGitHub with fetchurl? fetchFromGithub is doing url concatenation under the hood anyway.

@Kiskae
Copy link
Contributor Author

Kiskae commented Nov 28, 2023

That'd be something like:

fetchFromGithubOrNvidia = { owner, repo, rev, ... }@args:
  let
    args' = builtins.removeAttrs args [ "owner" "repo" "rev" ];
    baseUrl = "https://github.com/${owner}/${repo}";
  in
  fetchzip (args' // {
    urls = [
      "${baseUrl}/archive/${rev}.tar.gz"
      "https://download.nvidia.com/XFree86/${repo}/${repo}-${rev}.tar.bz2"
    ];
    # github and nvidia use different compression algorithms,
    #  use an invalid file extension to force detection.
    extension = "tar.??";
  });

@NickCao
Copy link
Member

NickCao commented Nov 28, 2023

And another concern is if their contents do match, which should be the case, but better be safe than sorry.

@Kiskae
Copy link
Contributor Author

Kiskae commented Nov 28, 2023

And another concern is if their contents do match, which should be the case, but better be safe than sorry.

As far as I can tell that is the case for these sources, the open-gpu-kernel-modules don't match because the github mirror contains extra .github files.

If https://github.com/aaronp24/nvidia-versions is still true, those repositories are literally emptied and overwritten with the tarballs from the cdn for each release.

@Kiskae
Copy link
Contributor Author

Kiskae commented Nov 28, 2023

Result of nixpkgs-review pr 269262 run on x86_64-linux 1

113 packages built:
  • bottles
  • bottles-unwrapped
  • gl-gsync-demo
  • gwe
  • heroic
  • linuxKernel.packages.linux_4_19.nvidia_x11
  • linuxKernel.packages.linux_4_19.nvidia_x11.bin
  • linuxKernel.packages.linux_4_19.nvidia_x11.firmware
  • linuxKernel.packages.linux_4_19.nvidia_x11.lib32
  • linuxKernel.packages.linux_4_19.nvidia_x11_beta_open
  • linuxKernel.packages.linux_4_19_hardened.nvidia_x11
  • linuxKernel.packages.linux_4_19_hardened.nvidia_x11.bin
  • linuxKernel.packages.linux_4_19_hardened.nvidia_x11.firmware
  • linuxKernel.packages.linux_4_19_hardened.nvidia_x11.lib32
  • linuxKernel.packages.linux_4_19_hardened.nvidia_x11_beta_open
  • linuxKernel.packages.linux_5_10.nvidia_x11
  • linuxKernel.packages.linux_5_10.nvidia_x11.bin
  • linuxKernel.packages.linux_5_10.nvidia_x11.firmware
  • linuxKernel.packages.linux_5_10.nvidia_x11.lib32
  • linuxKernel.packages.linux_5_10.nvidia_x11_beta_open
  • linuxKernel.packages.linux_5_10_hardened.nvidia_x11
  • linuxKernel.packages.linux_5_10_hardened.nvidia_x11.bin
  • linuxKernel.packages.linux_5_10_hardened.nvidia_x11.firmware
  • linuxKernel.packages.linux_5_10_hardened.nvidia_x11.lib32
  • linuxKernel.packages.linux_5_10_hardened.nvidia_x11_beta_open
  • linuxKernel.packages.linux_5_15.nvidia_x11
  • linuxKernel.packages.linux_5_15.nvidia_x11.bin
  • linuxKernel.packages.linux_5_15.nvidia_x11.firmware
  • linuxKernel.packages.linux_5_15.nvidia_x11.lib32
  • linuxKernel.packages.linux_5_15.nvidia_x11_beta_open
  • linuxKernel.packages.linux_5_15_hardened.nvidia_x11
  • linuxKernel.packages.linux_5_15_hardened.nvidia_x11.bin
  • linuxKernel.packages.linux_5_15_hardened.nvidia_x11.firmware
  • linuxKernel.packages.linux_5_15_hardened.nvidia_x11.lib32
  • linuxKernel.packages.linux_5_15_hardened.nvidia_x11_beta_open
  • linuxKernel.packages.linux_5_4.nvidia_x11
  • linuxKernel.packages.linux_5_4.nvidia_x11.bin
  • linuxKernel.packages.linux_5_4.nvidia_x11.firmware
  • linuxKernel.packages.linux_5_4.nvidia_x11.lib32
  • linuxKernel.packages.linux_5_4.nvidia_x11_beta_open
  • linuxKernel.packages.linux_5_4_hardened.nvidia_x11
  • linuxKernel.packages.linux_5_4_hardened.nvidia_x11.bin
  • linuxKernel.packages.linux_5_4_hardened.nvidia_x11.firmware
  • linuxKernel.packages.linux_5_4_hardened.nvidia_x11.lib32
  • linuxKernel.packages.linux_5_4_hardened.nvidia_x11_beta_open
  • linuxKernel.packages.linux_6_1.nvidia_x11
  • linuxKernel.packages.linux_6_1.nvidia_x11.bin
  • linuxKernel.packages.linux_6_1.nvidia_x11.firmware
  • linuxKernel.packages.linux_6_1.nvidia_x11.lib32
  • linuxKernel.packages.linux_6_1.nvidia_x11_beta_open
  • linuxKernel.packages.linux_hardened.nvidia_x11 (linuxKernel.packages.linux_6_1_hardened.nvidia_x11)
  • linuxKernel.packages.linux_hardened.nvidia_x11.bin (linuxKernel.packages.linux_6_1_hardened.nvidia_x11.bin)
  • linuxKernel.packages.linux_hardened.nvidia_x11.firmware (linuxKernel.packages.linux_6_1_hardened.nvidia_x11.firmware)
  • linuxKernel.packages.linux_hardened.nvidia_x11.lib32 (linuxKernel.packages.linux_6_1_hardened.nvidia_x11.lib32)
  • linuxKernel.packages.linux_hardened.nvidia_x11_beta_open (linuxKernel.packages.linux_6_1_hardened.nvidia_x11_beta_open)
  • linuxKernel.packages.linux_6_5.nvidia_x11
  • linuxKernel.packages.linux_6_5.nvidia_x11.bin
  • linuxKernel.packages.linux_6_5.nvidia_x11.firmware
  • linuxKernel.packages.linux_6_5.nvidia_x11.lib32
  • linuxKernel.packages.linux_6_5.nvidia_x11_beta_open
  • linuxKernel.packages.linux_6_5_hardened.nvidia_x11
  • linuxKernel.packages.linux_6_5_hardened.nvidia_x11.bin
  • linuxKernel.packages.linux_6_5_hardened.nvidia_x11.firmware
  • linuxKernel.packages.linux_6_5_hardened.nvidia_x11.lib32
  • linuxKernel.packages.linux_6_5_hardened.nvidia_x11_beta_open
  • linuxKernel.packages.linux_6_6.nvidia_x11
  • linuxKernel.packages.linux_6_6.nvidia_x11.bin
  • linuxKernel.packages.linux_6_6.nvidia_x11.firmware
  • linuxKernel.packages.linux_6_6.nvidia_x11.lib32
  • linuxKernel.packages.linux_6_6.nvidia_x11_beta_open
  • linuxKernel.packages.linux_latest_libre.nvidia_x11
  • linuxKernel.packages.linux_latest_libre.nvidia_x11.bin
  • linuxKernel.packages.linux_latest_libre.nvidia_x11.firmware
  • linuxKernel.packages.linux_latest_libre.nvidia_x11.lib32
  • linuxKernel.packages.linux_latest_libre.nvidia_x11_beta_open
  • linuxKernel.packages.linux_libre.nvidia_x11
  • linuxKernel.packages.linux_libre.nvidia_x11.bin
  • linuxKernel.packages.linux_libre.nvidia_x11.firmware
  • linuxKernel.packages.linux_libre.nvidia_x11.lib32
  • linuxKernel.packages.linux_libre.nvidia_x11_beta_open
  • linuxKernel.packages.linux_lqx.nvidia_x11
  • linuxKernel.packages.linux_lqx.nvidia_x11.bin
  • linuxKernel.packages.linux_lqx.nvidia_x11.firmware
  • linuxKernel.packages.linux_lqx.nvidia_x11.lib32
  • linuxKernel.packages.linux_lqx.nvidia_x11_beta_open
  • linuxKernel.packages.linux_testing_bcachefs.nvidia_x11
  • linuxKernel.packages.linux_testing_bcachefs.nvidia_x11.bin
  • linuxKernel.packages.linux_testing_bcachefs.nvidia_x11.firmware
  • linuxKernel.packages.linux_testing_bcachefs.nvidia_x11.lib32
  • linuxKernel.packages.linux_testing_bcachefs.nvidia_x11_beta_open
  • linuxKernel.packages.linux_xanmod.nvidia_x11
  • linuxKernel.packages.linux_xanmod.nvidia_x11.bin
  • linuxKernel.packages.linux_xanmod.nvidia_x11.firmware
  • linuxKernel.packages.linux_xanmod.nvidia_x11.lib32
  • linuxKernel.packages.linux_xanmod.nvidia_x11_beta_open
  • linuxKernel.packages.linux_xanmod_latest.nvidia_x11 (linuxKernel.packages.linux_xanmod_stable.nvidia_x11)
  • linuxKernel.packages.linux_xanmod_latest.nvidia_x11.bin (linuxKernel.packages.linux_xanmod_stable.nvidia_x11.bin)
  • linuxKernel.packages.linux_xanmod_latest.nvidia_x11.firmware (linuxKernel.packages.linux_xanmod_stable.nvidia_x11.firmware)
  • linuxKernel.packages.linux_xanmod_latest.nvidia_x11.lib32 (linuxKernel.packages.linux_xanmod_stable.nvidia_x11.lib32)
  • linuxKernel.packages.linux_xanmod_latest.nvidia_x11_beta_open (linuxKernel.packages.linux_xanmod_stable.nvidia_x11_beta_open)
  • linuxKernel.packages.linux_zen.nvidia_x11
  • linuxKernel.packages.linux_zen.nvidia_x11.bin
  • linuxKernel.packages.linux_zen.nvidia_x11.firmware
  • linuxKernel.packages.linux_zen.nvidia_x11.lib32
  • linuxKernel.packages.linux_zen.nvidia_x11_beta_open
  • mangohud
  • mangohud.doc
  • mangohud.man
  • monitor
  • nvfancontrol
  • psensor
  • xpraWithNvenc
  • xpraWithNvenc.dist

@NickCao NickCao merged commit 7bff840 into NixOS:master Nov 28, 2023
6 of 7 checks passed
@Kiskae Kiskae deleted the nvidia/545.29.06 branch November 28, 2023 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants