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

tuxedo-keyboard: fix compilation for kernel 6.10 and 6.11 #336633

Merged
merged 8 commits into from
Nov 5, 2024

Conversation

Keksgesicht
Copy link
Contributor

@Keksgesicht Keksgesicht commented Aug 22, 2024

Description of changes

It seems like the tuxedo-keyboard has moved to GitLab a little time ago. Thus, I changed the source git the new GitLab URL and updated the version number. This also fixes a bug when compiling with Kernel 6.10.

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Aug 22, 2024
@ofborg ofborg bot requested a review from blanky0230 August 22, 2024 23:57
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 11-100 labels Aug 22, 2024
@K900
Copy link
Contributor

K900 commented Aug 25, 2024

Please change the commit message format to fit the guidelines in CONTRIBUTING.md

@K900
Copy link
Contributor

K900 commented Aug 25, 2024

Also, it may be worth renaming the package to fit its presumably now extended scope?

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Sep 3, 2024
@Keksgesicht Keksgesicht force-pushed the master branch 2 times, most recently from 66c5da9 to 19cd864 Compare September 3, 2024 21:55
@ofborg ofborg bot added 8.has: clean-up 8.has: package (new) This PR adds a new package labels Sep 3, 2024
@Keksgesicht
Copy link
Contributor Author

I also renamed the related config options to the new scope of the tuxedo driver. I hope this is ok.

@Keksgesicht
Copy link
Contributor Author

There are already commit in the new upstream repo to fix compile errors with kernel 6.11. Thus, I will most likely provide a follow up pull request the coming days to update this driver to version 4.6.3.

@Keksgesicht Keksgesicht changed the title fix compilation of tuxedo-keyboard for kernel 6.10 tuxedo-keyboard: fix compilation for kernel 6.10 Sep 4, 2024
@@ -488,7 +488,7 @@ in {

rust-out-of-tree-module = if lib.versionAtLeast kernel.version "6.7" then callPackage ../os-specific/linux/rust-out-of-tree-module { } else null;

tuxedo-keyboard = if lib.versionAtLeast kernel.version "4.14" then callPackage ../os-specific/linux/tuxedo-keyboard { } else null;
tuxedo-driver = if lib.versionAtLeast kernel.version "4.14" then callPackage ../os-specific/linux/tuxedo-driver { } else null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you renamed the package here, could you add an alias to block at line 608, in-case someone didn't use the module.
Something like this:

tuxedo-keyboard = self.tuxedo-drivers;

@MinerSebas MinerSebas mentioned this pull request Sep 18, 2024
13 tasks
@Keksgesicht Keksgesicht force-pushed the master branch 2 times, most recently from f5a12de to a7b81bf Compare September 20, 2024 20:42
Copy link
Contributor

@MinerSebas MinerSebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still works on my Pulse Gen 1.

@Keksgesicht
Copy link
Contributor Author

Now it also runs with kernel 6.11 on my Aura 15 Gen1.

@Keksgesicht Keksgesicht changed the title tuxedo-keyboard: fix compilation for kernel 6.10 tuxedo-keyboard: fix compilation for kernel 6.10 and 6.11 Sep 21, 2024
@Keksgesicht Keksgesicht force-pushed the master branch 2 times, most recently from c3395c6 to 22dba23 Compare September 25, 2024 19:17
@Keksgesicht
Copy link
Contributor Author

@blanky0230 What do you think? As you are the maintainer could you review my changes please so it's clear to committers in what state this is?

@h7x4 h7x4 mentioned this pull request Sep 28, 2024
13 tasks
Copy link
Member

@blanky0230 blanky0230 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hate to nitpick catching up with reviews this late but: Since the manufacturer's repo is named "tuxedo-drivers" (plural), I think the corresponding linuxPackage and nixosModule in nixpkgs should share the same name in order to minimize the possibility for mix-ups and user's confusion in the future.

Other than that this PR is looking good to me 👍

@Keksgesicht
Copy link
Contributor Author

@chmanie looks fine so far. You could test if the Fn keys control the brightness. If your DM/WM does not comply with that and your InfintyBook has also only a "white" keyboard backlight, you maybe have to do this instead: #336633 (comment)

For the failed temperature reading I am not sure whether this driver or a generic one for the Intel or AMD platform provides this sensor. Try running sensors-detect of the lm-sensors package and look into /etc/sysconfig/lm_sensors afterwards. Then add them to boot.kernelModules and see whether this ERROR from tailord goes away.

@Keksgesicht
Copy link
Contributor Author

So, I rebased and fixed a merge conflict because someone added some system76 things above of my changes in pkgs/top-level/linux-kernels.nix. I even updated the package to the newest upstream version.

Is there something else I have to do? How do I get the attention of a committer to merge this?

@xaverdh
Copy link
Contributor

xaverdh commented Oct 23, 2024

The Failed reading the current temperature error occurs on startup for me as well, and used to with the old module as well. I think it's race condition with the driver and not something we can fix.

@xaverdh
Copy link
Contributor

xaverdh commented Oct 23, 2024

cc @SuperSandro2000

@ofborg ofborg bot requested a review from blanky0230 October 23, 2024 17:22
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4779

@ClockGen
Copy link

@K900 can you please check this PR.

@WhiteBlackGoose
Copy link
Member

@Keksgesicht I tried what you said (with the new commit):

    nixpkgs = {
      type = "github";
      owner = "NixOS";
      repo = "nixpkgs";
      ref = "master";
      rev = "fa957fa9d827c2bf471acdf00c89806cec47926b";
    };

Sadly I'm getting the same error:

error: builder for '/nix/store/ms8133zszndd33if81x0vv8y5d70i8y1-tuxedo-keyboard-6.11.5-3.2.14.drv' failed with exit code 2;
       last 10 log lines:
       > /build/source/./src/uniwill_keyboard.h:1259:19: error: initialization of 'void (*)(struct platform_device *)' from incompatible pointer type 'int (*)(struct platform_device *)' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wincompatible-pointer-types-Werror=incompatible-pointer-types8;;]
       >  1259 |         .remove = uniwill_keyboard_remove,
       >       |                   ^~~~~~~~~~~~~~~~~~~~~~~
       > /build/source/./src/uniwill_keyboard.h:1259:19: note: (near initialization for 'platform_driver_uniwill.<anonymous>.remove')

@WhiteBlackGoose
Copy link
Member

setting it directly to your fork worked though:

    nixpkgs = {
      type = "github";
      owner = "Keksgesicht";
      repo = "nixpkgs";
      ref = "master";
      rev = "8972df5e5ace61612feec3d88b8d768b041dc664";
    };

@wegank wegank added the 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people label Nov 4, 2024
@ofborg ofborg bot requested a review from xaverdh November 4, 2024 23:21
@wegank wegank added the 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package label Nov 5, 2024
@SuperSandro2000 SuperSandro2000 merged commit a4e9a2f into NixOS:master Nov 5, 2024
28 checks passed
@papanito
Copy link

so now that it's merged to master, how we can use it? Or better when will be in unstable?

@xaverdh
Copy link
Contributor

xaverdh commented Nov 10, 2024

so now that it's merged to master, how we can use it? Or better when will be in unstable?

The unstable channel just advanced a few hours ago, so it should be there already.

@xaverdh
Copy link
Contributor

xaverdh commented Nov 10, 2024

by the way thanks for merging this @SuperSandro2000 ❤️

@xaverdh xaverdh mentioned this pull request Nov 10, 2024
13 tasks
Keksgesicht added a commit to Keksgesicht/nixos-config that referenced this pull request Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: clean-up 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 11-100 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approvals: 3+ This PR was reviewed and approved by three or more reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.