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

nixos/ipu6: Don't build out-of-tree driver for kernels that have it #331747

Merged
merged 1 commit into from
Aug 4, 2024

Conversation

shlevy
Copy link
Member

@shlevy shlevy commented Aug 2, 2024

Description of changes

The ipu6 drivers are in-tree as of Linux 6.10, so we can stop building them for newer kernels

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.

@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 Aug 2, 2024
@shlevy shlevy added backport release-24.05 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/` and removed 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 Aug 2, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Aug 2, 2024
@flokli
Copy link
Contributor

flokli commented Aug 2, 2024

Do we want to remove them from the attrset alltogether too?

I can still try to build linuxPackages_latest.ipu6-drivers, and it throws a lot of build errors. Should probably only be available for kernels that don't have it in-tree.

pkgs/top-level/linux-kernels.nix seems to have a bunch of if lib.versionOlder kernel.version "x.y" then callPackage ../os-specific/linux/something { } else null;.

@shlevy
Copy link
Member Author

shlevy commented Aug 2, 2024

@flokli Done

@shlevy shlevy merged commit a9f862f into NixOS:master Aug 4, 2024
25 checks passed
@shlevy shlevy deleted the ipu6-upstream branch August 4, 2024 13:12
Copy link
Contributor

github-actions bot commented Aug 4, 2024

Successfully created backport PR for release-24.05:

@flokli
Copy link
Contributor

flokli commented Aug 4, 2024

@shlevy I was just about to test this out, but unfortunately v4l2-relayd-ipu6.service doesn't seem to come up again:


× v4l2-relayd-ipu6.service - Streaming relay for v4l2loopback using GStreamer
     Loaded: loaded (/etc/systemd/system/v4l2-relayd-ipu6.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sun 2024-08-04 16:25:50 EEST; 1min 58s ago
 Invocation: 0e2c6407e7fb490b964a120dc6c3215a
    Process: 69115 ExecStartPre=/nix/store/qhbqvknp0b1a330f4kbkjnq3smij1hbb-unit-script-v4l2-relayd-ipu6-pre-start/bin/v4l2-relayd-ipu6-pre-start (code=exited, status=1/FAILURE)
    Process: 69126 ExecStopPost=/nix/store/zv3qyvvkv82a9dg59261yjzm2c8jrr3i-unit-script-v4l2-relayd-ipu6-post-stop/bin/v4l2-relayd-ipu6-post-stop (code=exited, status=1/FAILURE)

Aug 04 16:25:50 x1 systemd[1]: v4l2-relayd-ipu6.service: Scheduled restart job, restart counter is at 5.
Aug 04 16:25:50 x1 systemd[1]: v4l2-relayd-ipu6.service: Start request repeated too quickly.
Aug 04 16:25:50 x1 systemd[1]: v4l2-relayd-ipu6.service: Failed with result 'exit-code'.
Aug 04 16:25:50 x1 systemd[1]: Failed to start Streaming relay for v4l2loopback using GStreamer.

Looking at the logs, maybe the naming did change, or this is otherwise incompatible? How do I test this?

@shlevy
Copy link
Member Author

shlevy commented Aug 5, 2024

Ack, I’m traveling without my personal ipu6 laptop this week, will look into this when I get back.

@matejc
Copy link
Contributor

matejc commented Aug 13, 2024

For me it fails with:

Aug 13 16:10:15 nixcode v4l2-relayd-ipu6-pre-start[15383]: failed to create device: Inappropriate ioctl for device

when pre-start is doing:

v4l2loopback-ctl add -x 1 ....

I can also confirm that this produces the same error:

sudo v4l2loopback-ctl add

I have tried to unload and load the v4l2loopback the module and still same issue. Other observations: I do have /dev/video0 to /dev/video32 and all in between for some reason. Also... I am running on kernel 6.10.3

@matejc
Copy link
Contributor

matejc commented Aug 14, 2024

We might need to update v4l2loopback https://github.com/umlaeute/v4l2loopback/tags
Our one is 12.7 which is two years back and there has been 3 versions released since then

@flokli
Copy link
Contributor

flokli commented Aug 14, 2024

Sent a bump for v4l2loopback #334573.

With this, at least the service doesn't crash anymore. If I select the loopback device in the browser, I see the following in the logs:

Aug 14 12:06:41 x1 pipewire[3035]: spa.v4l2: '/dev/video0' VIDIOC_REQBUFS Invalid argument
Aug 14 12:06:41 x1 pipewire[3035]: pw.port: 0x55625008def0: negotiate buffers on node: -22 (Invalid argument)
Aug 14 12:06:41 x1 pipewire[3035]: pw.port: 0x55625008def0: state ready -> error (can't negotiate buffers on port)
Aug 14 12:06:41 x1 pipewire[3035]: pw.link: (195.0.0 -> 351.0.0) allocating -> error (can't negotiate buffers on port) (error-ready)

The camera still doesn't work, but it feels like a step into the right direction.

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: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants