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

Draft: NEEDS HELP surface: linux 6.12.19 -> 6.12.21 #1436

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matthiasdotsh
Copy link
Contributor

Description of changes

Starting with linux 6.12.20 kernel bumps are failing.

# Sorry, my nixos config isn't public yet.
sudo nixos-rebuild switch --flake .#surface-pro9 

last lines from nix log /nix/store/dvikj3jr164y07ffrz8j88d81c9f53mh-linux-6.12.21.drv (nothing special before)

  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp1_execution.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp1_transition.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp2_execution.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp2_transition.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/amdgpu_isp.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/isp_v4_1_0.o
  CC [M]  drivers/gpu/drm/amd/amdgpu/isp_v4_1_1.o
  LD [M]  drivers/gpu/drm/amd/amdgpu/amdgpu.o
  AR      drivers/gpu/built-in.a
make[2]: *** [../scripts/Makefile.build:478: drivers] Error 2
make[1]: *** [/build/linux-6.12.21/Makefile:1944: .] Error 2
make: *** [../Makefile:224: __sub-make] Error 2

Could someone who also has a surface please try if it works for him or does someone have an idea how to get more debug infos?

Things done
  • Tested the changes in your own NixOS Configuration
  • Tested the changes end-to-end by using your fork of nixos-hardware and
    importing it via <nixos-hardware> or Flake input

@matthiasdotsh matthiasdotsh marked this pull request as draft March 31, 2025 19:08
@8bitbuddhist
Copy link
Contributor

8bitbuddhist commented Apr 1, 2025

@matthiasdotsh I'm currently testing a PR for kernel 6.13.6. At some point a new patch was added, so maybe that's causing your build error

Edit: Wait nevermind, the patch is only for 6.13

@matthiasdotsh
Copy link
Contributor Author

I'm currently testing a PR for kernel 6.13.6

Is it working? I tried with 6.13.8 but got a similar error.

@8bitbuddhist
Copy link
Contributor

8bitbuddhist commented Apr 2, 2025

I'm currently testing a PR for kernel 6.13.6

Is it working? I tried with 6.13.8 but got a similar error.

I'm getting a conflict with the hardware.ipu6 module that I'm looking into, but otherwise it's all working as expected. Here's my branch: https://code.8bitbuddhism.com/aires/nixos-hardware/src/branch/surface/kernel-6.13.6

In your commit, the only thing I could see that might be problematic is that repos.nix is pointing to rev 6.13.6 instead of 6.13.8

image

@matthiasdotsh
Copy link
Contributor Author

but otherwise it's all working as expected. Here's my branch: https://code.8bitbuddhism.com/aires/nixos-hardware/src/branch/surface/kernel-6.13.6

Mh, I compiled your code and it works on my system. I'll have to take another look at what exactly the differences are compared to my 6.13. branch. I tested with 6.13.6 before and got the same errors as with 6.13.8.

I'm not sure if it wouldn't be better to stay on the lts kernel (6.12.) (because I'm using zfs and there is always some delay until they support new kernels).

@8bitbuddhist
Copy link
Contributor

but otherwise it's all working as expected. Here's my branch: https://code.8bitbuddhism.com/aires/nixos-hardware/src/branch/surface/kernel-6.13.6

Mh, I compiled your code and it works on my system. I'll have to take another look at what exactly the differences are compared to my 6.13. branch. I tested with 6.13.6 before and got the same errors as with 6.13.8.

I'm not sure if it wouldn't be better to stay on the lts kernel (6.12.) (because I'm using zfs and there is always some delay until they support new kernels).

100% agree, there are a lot of modules that still don't support 6.13. Maybe we could make 6.12 the default and include 6.13 as an option? Something like linux-surface_default and linux-surface_latest?

@matthiasdotsh
Copy link
Contributor Author

Mh, I compiled your code and it works on my system. I'll have to take another look at what exactly the differences are compared to my 6.13. branch.

Ok, I looked into my 6.13. branch, downgraded it to 6.13.6 and now it works.

I'm now building 6.13.8.

@8bitbuddhist Do you have enough resources to try the 6.12.21 kernel from this PR?

I'm not sure if it wouldn't be better to stay on the lts kernel (6.12.) (because I'm using zfs and there is always some delay until they support new kernels).

100% agree, there are a lot of modules that still don't support 6.13. Maybe we could make 6.12 the default and include 6.13 as an option? Something like linux-surface_default and linux-surface_latest?

I really like the idea and would be super happy to help. However, I might need some assistance.

@8bitbuddhist
Copy link
Contributor

I think the problem is that linux-surface hasn't released any packaged kernels past 6.12.7, so if we try to change repos.nix to pull a version other than what's listed in their releases, the build will fail. Or, it will just update the package version without actually updating the kernel. AFAIK the only way to use a different kernel version is to update this variable and run build-linux-surface.py. There's work being done to update the kernel version automatically, but it's still a draft PR.

In the meantime, the only way (I think) we'd be able to use kernel versions other than the releases is to use an overlay and run the entire build process from start to finish. I could be wrong though - I'm still figuring this out 😅

@matthiasdotsh
Copy link
Contributor Author

I think the problem is that linux-surface hasn't released any packaged kernels past 6.12.7, so if we try to change repos.nix to pull a version other than what's listed in their releases, the build will fail. Or, it will just update the package version without actually updating the kernel.

Are you sure about this?

Most PRs that have updated the Surface kernel here in nixos-hardware in the past have only updated the version and sha256 in microsoft/surface/common/kernel/linux-surface/default.nix.

I'm pretty sure that this worked, as uname -a was always reporting the new kernel version.
My understanding has always been that we are more or less only using the patches from the linux-surface project.

So there might be a change in the upstream kernel version that now require some adjustments in the linux-surface project?

@8bitbuddhist
Copy link
Contributor

I think the problem is that linux-surface hasn't released any packaged kernels past 6.12.7, so if we try to change repos.nix to pull a version other than what's listed in their releases, the build will fail. Or, it will just update the package version without actually updating the kernel.

Are you sure about this?

Most PRs that have updated the Surface kernel here in nixos-hardware in the past have only updated the version and sha256 in microsoft/surface/common/kernel/linux-surface/default.nix.

I'm pretty sure that this worked, as uname -a was always reporting the new kernel version. My understanding has always been that we are more or less only using the patches from the linux-surface project.

So there might be a change in the upstream kernel version that now require some adjustments in the linux-surface project?

Nope, I'm not sure 😆 I'm still learning how this all works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants