I’ve got a dilemma. I recently bought an X1 Carbon Gen 12. Nice looking laptop and great keyboard.
I also recently decided to make the switch to ZFS. My main desktop will hopefully follow at some point but for now my server will run with it as well as the laptop.
Being as the Gen 12 is still quite new it needs a relatively new kernel. Unfortunately, NixOS has just dropped support for 6.10 and ZFS doesn’t yet support 6.11.
Until this situation changes is there a way I can run a newer kernel than the current 6.6 LTS? I’ve seen that ZFS 2.2.6 has some experimental support for 6.11. How would I enable this? Or would it be better to try the new rc2 branch and if so how would I enable that? An override no doubt but anything else needed for that?
Honestly the best thing to do right now is to pin your own kernel version and run 6.10. Yes, this means compiling your own kernel, but messing with experimental ZFS releases is probably not a good idea.
It worked! Overrode linux_6_6 with version 6.10.14 and now I have brightness controls and display is recognized.
It didn’t seem to need compiling. At least it didn’t seem to take very long to rebuild my config.
The unfortunate truth in this is that ZFS is an out-of-tree module and as such, will always lag behind major version releases. Your choice is to either use the stable kernel or start maintaining an overlay for the ZFS kernel package. Since you do not want the LTS kernel on your laptop, you can use this overlay:
Huh, yea, for some reason that still evaluates to a cached build on the latest unstable. I guess none of its dependencies in nixpkgs have changed since it was removed, so it’s still the same derivation as before the removal? Dunno
Please don’t do this. The value of config.boot.kernelPackages.zfs.meta.broken is false for linuxKernel but true for linuxKernel_latest. What you’re doing right now is better served by setting zfs.meta.broken to false.
As for why the “please don’t do this”, zfs-2.2.6 isn’t compatible with linux_6_11 and therefore you might encounter corruption issues, which is why doing so isn’t recommended. You’re using an incompatible version of the Linux kernel with the ZFS version included in nixpkgs. Better upgrade the ZFS version to a supported one with v6.11.
Edit: I noticed you are using the 6.10 (and not 6.11) kernel. This is fine.
Yea, the zfs nix expressions will correctly set the broken flag if they try to use an unsupported kernel, as long as @PhilT sets the version argument for the kernel override truthfully. If the zfs derivation isn’t marked broken and causing an eval error, it is a fully supported kernel and there is no issue. What they’ve done is completely fine