-
-
Notifications
You must be signed in to change notification settings - Fork 640
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
Surface Pro 5: Camera does not work in wireplumber #1208
Comments
Ok, I looked into wireplumber and activated debug logs for the Lua scripts that are failing with |
I have a fix! There were two issues in both wireplumber and libcamera that caused this problem. This overlay will fix both and the other fixes above are not required: {
nixpkgs.overlays = [
(final: prev: {
wireplumber = prev.wireplumber.overrideAttrs (_: {
version = "git";
src = prev.fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "pipewire";
repo = "wireplumber";
rev = "71f868233792f10848644319dbdc97a4f147d554";
hash = "sha256-VX3OFsBK9AbISm/XTx8p05ak+z/VcKXfUXhB9aI9ev8=";
};
});
libcamera = prev.libcamera.overrideAttrs (_: {
postFixup = ''
../src/ipa/ipa-sign-install.sh src/ipa-priv-key.pem $out/lib/libcamera/ipa_*.so
'';
});
})
];
} Beware: overriding libcamera will cause a ton of stuff to be rebuilt. I don't recommend building this on the Surface tablet. It looks like updating wireplumber to the git version fixed only part of the issue, and the other problem was caused by the IPA module signing mechanism in libcamera not liking Nix's fixup phase, which was fixed at some point in nixpkgs but then regressed. In short, libcamera tries to sign the IPA modules during compilation, which I think involves hashing the Anyway: as for the issue with libcamera I opened an issue on nixpkgs NixOS/nixpkgs#351842 and hopefully this fix makes its way in nixpkgs directly soon. For the wireplumber issue, there hasn't been a release with this fix yet so I suppose we can wait for 0.5.7 to eventually come out. I'll keep this issue open until both of those have been fixed upstream. For the moment you can use this overlay :) |
I just installed NixOS with the
nixos-hardware
module on a Surface Pro 5 and neither the camera nor the speaker work out of the box. As discussed in #970 this is caused by an issue with the camera's IPU3 inlibcamera
, which causeswireplumber
to crash and brings audio down with it. There was a workaround proposed in the thread, and it does fix the audio but since it disables the IPU3 kernel module it renders the camera unusable. I need to use the camera on this device so I can't use this workaround.Here is the error returned by wireplumber (when the IPU3 module is not disabled):
The stack trace from GDB says that the segfault is caused by the destructor for
IPAProxyIPU3
.Going from the error messages before the crash, it looks like the IPU3 IPA proxy (whatever that is) cannot be found. This proxy is in
${pkgs.libcamera}/libexec/libcamera/ipu3_ipa_proxy
and is supposed to be loaded at runtime bylibcamera
. The logs come from the constructor forIPAProxyIPU3
, which callsIPAProxy::resolvePath()
to find out where these this file is located.resolvePath()
first checks if the file exists inLIBCAMERA_IPA_PROXY_PATH
, so I tried providing this env variable to wireplumber:And this seems to work. But now I'm running into another error:
The cameras do work with libcamera and I tested this by running
qcam
directly with theLIBCAMERA_IPA_PROXY_PATH
env variable set.So I'm not sure what exactly is happening in wireplumber.
The text was updated successfully, but these errors were encountered: