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
Port of linux-surface/linux-surface Kernel patches to NixOS #221
Conversation
7ca578e
to
df6cc91
Compare
ci errors look unrelated. |
I try to fix CI in #222 |
d8d67c6
to
f4e9166
Compare
acc076d
to
3b08c07
Compare
… the patches and firmware binaries. Add MS Surface Kernel patches from github.com/linux-surface/linux-surface Add MS Surface Firmware from github.com/linux-surface/linux-surface Add MS Surface Hardware config from github.com/linux-surface/linux-surface Tie-together the Microsoft Surface .nix files Set to use explicit version of Linux (5.4.7) - Add the config for Linux 5.4.7 Add kernel 5.4.11 Add kernel 5.4.13 Remove unsupported patches Revert to kernel 5.4.7 for now - Problems initialising touchscreen & pen Add kernel 5.4.15 and 5.4.16 Build kernel 5.4.16, instead Add kernel 5.4.22 Update the patches for kernel 5.4 Placeholder for Linux kernel 5.5 Copy the IPTS kernel patch from the 5.5 dir to the 5.4 dir. Conversation on https://gitter.im/linux-surface/community suggested this would reenable IPTS on 5.4: ----- @matrixbot Feb 29 15:33 hpfr Blaž Hrastnik (Gitter): thanks for the mention. mexisme (Gitter) finally, someone who actually knows Nix and isn't just a config nerd writing proper NixOS Surface configs! I am stuck on 4.19 at the moment because IPTS is now a proper reverse-engineered kernel driver (https://github.com/linux-surface/intel-precise-touch) instead of just a blob package, and I haven't had time to look at how to package that for Nix. If you're on 5.5, are you just not using IPTS? Would love to help out on packaging that for NixOS hpfr also, development conversations seem to happen more at #linux-surface on freenode, which you can connect to with matrix via https://matrix.to/#/!OXIGGPCpnzaNVeGtCA:matrix.org if you don't like IRC clients @matrixbot Feb 29 15:39 hpfr Also, I'm not using jakeday's patches, I'm using the more recent ones from the linux-surface/linux-surface repo, but yeah, for 4.19, so they're a bit different from the 5.x patchsets. afaik 4.19 is still supported because it's the last LTS release that supports the "official" IPTS blob before Linux made changes that required reverse engineering a driver that didn't use GuC submission (I'm just quoting here, I have no idea what that is haha) @matrixbot Feb 29 19:27 Blaž > now a proper reverse-engineered kernel driver Should be similar to before, we just offer it as a patch Blaž https://github.com/linux-surface/linux-surface/blob/master/patches/5.5/0007-ipts.patch Blaž Anyway I'm keeping an eye out on your NixOS builds since I'm thinking about giving it a try @matrixbot Feb 29 19:32 Blaž Currently running Arch but using nix as a way to manage development environments for various projects @matrixbot Mar 01 10:41 hpfr Blaž: well shoot is that patch all that’s necessary for building in-tree? It does all the things the linux-surface/intel-precise-touch repo does? Dorian Stoll @StollD Mar 01 12:56 Yes Just adds all the files from the repo to drivers/input/touchscreen and adds the necessary glue to drivers/input/touchscreen/{Makefile, Kconfig} @matrixbot Mar 02 09:13 hpfr Dorian Stoll (Gitter): oof. Could’ve been on 5.4+ all this time! Move kernnel *.nix packages under their respective kernel dirs Use lib.mkDefault Update to kernel 5.4.24 Update to kernel 5.5.8 Typo Drivers are modules by default Revert to 5.4.24 until can fix the config failures
- Delete the derivatives for 5.5.8, 5.9.2 and 5.10.4 - Nix build for kernel 5.10.2 - Update the kernel config for 5.10.4
3b08c07
to
c400fde
Compare
7ab160f
to
1275995
Compare
- NOTE: The file is left, due to an incoming PR to fix for ath10k firmware not loading correctly on Surface Go range.
1275995
to
fc3efdc
Compare
FYI: issue #107346 appears to affect my building this in 20.09; builds fine in unstable. |
I've refactored the commit history in my branch to try to help with review. There is a
If it's acceptable, I'd rather do those in follow-up PRs, but not sure whether that makes it OK to merge this into the main branch as is? |
Fine with me. |
Looks good to me if #221 (comment) #221 (comment) and #221 (comment) is addressed. |
- This will be worked on independently, and hopefully added to nixpkgs, instead.
This is an update and partial rewrite of the initial port of the linux-surface patches to NixOS, and replaces #170.
This specific PR intends to focus only on the Kernel patches, not any of the other fixes (e.g. ath10k firmware for Surface Go) or support binaries (e.g.
iptsd
ordtx
).It defaults to kernel 5.10.2, which includes initial support for the built-in WebCam.
The support matrix from the upstream repo is here: