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

lenovo/thinkpad/t480s: Automatically downgrade kernel to 6.10 #1258

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion lenovo/thinkpad/t480s/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{ lib, ... }:
{
pkgs,
lib,
config,
...
}:

{
imports = [
Expand All @@ -9,4 +14,10 @@
];

services.throttled.enable = lib.mkDefault true;

# There is currently a kernel regression with the psmouse driver. As such, the kernel version is held back to 6.10.
# See https://bugzilla.kernel.org/show_bug.cgi?id=219352
boot.kernelPackages = lib.mkIf (lib.versionAtLeast config.boot.kernelPackages "6.11") (
lib.warn "Linux kernel held back to 6.10 due to regression: https://bugzilla.kernel.org/show_bug.cgi?id=219352" pkgs.linuxPackages_6_10
);
Copy link
Member

Choose a reason for hiding this comment

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

Should we not just warn in this case? The 6.10 kernel might get removed at this point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default kernel right now is 6.6 iirc, so I doubt that's gonna happen.

Copy link
Member

Choose a reason for hiding this comment

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

The kernel package referenced here is 6.10. It's not an lts kernel. But the actual issue of this code is that it's an infinite recursion. You are checking config.boot.kernelPackage while writing to the same option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, this hasn't been tested. TBH I completely forgot about this PR; I somehow forgot to put it on my tracking board after opening it.

}
Loading