-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
fix pipewire portal by removing blocks parameter #711
Conversation
Hi |
Hardware: iGPU on Intel 13th Gen. What is this parameter used for, that I am disabling? |
Number of planes for specific DRM format. RGBx/BGRx formats should have 1 plane. There should be more info about updated DRM mode in the console output, if you run HyperHDR from the command line. And what distribution are you using? BTW if possible, runtime pw_get_library_version should be instead of PW_CHECK_VERSION. But here's where things get complicated. |
It's on NixOS, but that shouldn't really matter because it's the same kernel/mesa/pipewire that everyone is using as well. Here is the full log of HyperHDR:
It seems that also BGRx is used here. |
When this parameter is enabled than pipewire reports the following error: **HyperHDR:** Pipewire: updated parameters 0 Pipewire: core error reported Pipewire: stream reports error 'error alloc buffers: Invalid argument' Pipewire: core reports error 'error alloc buffers: Invalid argument' **Pipewire:** pipewire[1850759]: pw.context: params Spa:Enum:ParamId:Buffers: 1:0 Invalid argument (input param) pipewire[1850759]: pw.context: Object: size 168, type Spa:Pod:Object:Param:Buffers (262148), id Spa:Enum:ParamId:Buffers (5) pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:size (3), flags 00000000 pipewire[1850759]: pw.context: Int 33177600 pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:buffers (1), flags 00000000 pipewire[1850759]: pw.context: Choice: type Spa:Enum:Choice:Range, flags 00000000 28 4 pipewire[1850759]: pw.context: Int 16 pipewire[1850759]: pw.context: Int 2 pipewire[1850759]: pw.context: Int 16 pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:stride (4), flags 00000000 pipewire[1850759]: pw.context: Int 15360 pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:dataType (6), flags 00000000 pipewire[1850759]: pw.context: Choice: type Spa:Enum:Choice:Flags, flags 00000000 20 4 pipewire[1850759]: pw.context: Int 12 pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:blocks (2), flags 00000000 pipewire[1850759]: pw.context: Int 3 pipewire[1850759]: pw.context: params Spa:Enum:ParamId:Buffers: 0:0 Invalid argument (output param) pipewire[1850759]: pw.context: Object: size 216, type Spa:Pod:Object:Param:Buffers (262148), id Spa:Enum:ParamId:Buffers (5) pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:buffers (1), flags 00000000 pipewire[1850759]: pw.context: Choice: type Spa:Enum:Choice:Range, flags 00000000 28 4 pipewire[1850759]: pw.context: Int 2 pipewire[1850759]: pw.context: Int 2 pipewire[1850759]: pw.context: Int 16 pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:blocks (2), flags 00000000 pipewire[1850759]: pw.context: Int 1 pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:size (3), flags 00000000 pipewire[1850759]: pw.context: Int 33177600 pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:stride (4), flags 00000000 pipewire[1850759]: pw.context: Choice: type Spa:Enum:Choice:Range, flags 00000000 28 4 pipewire[1850759]: pw.context: Int 15360 pipewire[1850759]: pw.context: Int 15360 pipewire[1850759]: pw.context: Int 2147483647 pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:align (5), flags 00000000 pipewire[1850759]: pw.context: Int 16 pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:dataType (6), flags 00000000 pipewire[1850759]: pw.context: Choice: type Spa:Enum:Choice:Flags, flags 00000000 20 4 pipewire[1850759]: pw.context: Int 14 pipewire[1850759]: pw.link: (103.0.0 -> 79.0.0) allocating -> error (error alloc buffers: Invalid argument) (ready-ready) This happens with pipewire 1.0.0 and pipewire master.
I tested prebuild v20beta1 on Ubuntu 24.04, it has pipewire 1.0.0. I do not receive the error you described, but DMA also is not reported by Pipewire (EGL is detected correctly), maybe I'm missing something eg. Intel drivers version free or non-free? I have 12th gen Intel. How did you enable Pipewire logging? |
I am using the mesa driver (v23.1.9). I am not enabling specific pipewire logging option (no configuration in /etc at all). Pipewire runs as a systemd user-space service here: journalctl --user -u pipewire -n 1000 -f The same could be probably reproduced by stopping the pipewire process and starting it in a terminal. |
Logs in less are best watched with Before:
After:
And again the full pipewire log (the only interesting event is the error generated by the first command): |
I can potentially also ask someone with an 12 Gen Intel CPU to run hyperhdr on same OS as me. |
If the parameter is not passed, does it break hyperhdr? For me everything seems to work fine. I can see my screen in the webinterface and the ambient lights work. |
We cannot remove it: if we do not use hardware acceleration, we assume that BGRx/RGBx is in a uniform contiguous address space and this condition takes care of it. Without it, memory would be compromised while processing in HyperHDR. With DMA buffers, however, this does not have to be the rule and, as you can see, EGL can deal with it. In fact, other parameters: 'size', 'stride' or 'align' are not needed for EGL, but it's a bit too late for such experiments before a stable release. I will come back to this in the future, but for now I remove 'blocks' if DMA is detected. Verifying the pipewire version does not seem necessary because the described effect was caused by the specific behavior of graphics drivers. I would like to ask you to check if it works for you. BTW what DM and compositor do you use in X? |
KDE/Wayland |
Ok, I've got it. On KDE (kubuntu 24.04), hardware acceleration works immediately on Intel and you don't need to do anything else. I managed to get the same problem as you and this PR fixes the issue. If it works for you too, I think we can merge PR. So KUbuntu with KDE wins here for Intel, on the other hand Ubuntu has also implemented Pipewire protocols for x11 (on KUbuntu/x11 it wont start capturing session). |
Works here. |
Great! Just one more minor correction because Valgrind found jump depends on uninitialised value in spa_video_info and merging. |
Summary
When this parameter is enabled than pipewire reports the following error:
HyperHDR:
Pipewire: updated parameters 0
Pipewire: core error reported
Pipewire: stream reports error 'error alloc buffers: Invalid argument' Pipewire: core reports error 'error alloc buffers: Invalid argument'
Pipewire:
pipewire[1850759]: pw.context: params Spa:Enum:ParamId:Buffers: 1:0 Invalid argument (input param) pipewire[1850759]: pw.context: Object: size 168, type Spa:Pod:Object:Param:Buffers (262148), id Spa:Enum:ParamId:Buffers (5)
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:size (3), flags 00000000
pipewire[1850759]: pw.context: Int 33177600
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:buffers (1), flags 00000000
pipewire[1850759]: pw.context: Choice: type Spa:Enum:Choice:Range, flags 00000000 28 4
pipewire[1850759]: pw.context: Int 16
pipewire[1850759]: pw.context: Int 2
pipewire[1850759]: pw.context: Int 16
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:stride (4), flags 00000000
pipewire[1850759]: pw.context: Int 15360
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:dataType (6), flags 00000000
pipewire[1850759]: pw.context: Choice: type Spa:Enum:Choice:Flags, flags 00000000 20 4
pipewire[1850759]: pw.context: Int 12
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:blocks (2), flags 00000000
pipewire[1850759]: pw.context: Int 3
pipewire[1850759]: pw.context: params Spa:Enum:ParamId:Buffers: 0:0 Invalid argument (output param)
pipewire[1850759]: pw.context: Object: size 216, type Spa:Pod:Object:Param:Buffers (262148), id Spa:Enum:ParamId:Buffers (5)
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:buffers (1), flags 00000000
pipewire[1850759]: pw.context: Choice: type Spa:Enum:Choice:Range, flags 00000000 28 4
pipewire[1850759]: pw.context: Int 2
pipewire[1850759]: pw.context: Int 2
pipewire[1850759]: pw.context: Int 16
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:blocks (2), flags 00000000
pipewire[1850759]: pw.context: Int 1
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:size (3), flags 00000000
pipewire[1850759]: pw.context: Int 33177600
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:stride (4), flags 00000000
pipewire[1850759]: pw.context: Choice: type Spa:Enum:Choice:Range, flags 00000000 28 4
pipewire[1850759]: pw.context: Int 15360
pipewire[1850759]: pw.context: Int 15360
pipewire[1850759]: pw.context: Int 2147483647
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:align (5), flags 00000000
pipewire[1850759]: pw.context: Int 16
pipewire[1850759]: pw.context: Prop: key Spa:Pod:Object:Param:Buffers:BlockInfo:dataType (6), flags 00000000
pipewire[1850759]: pw.context: Choice: type Spa:Enum:Choice:Flags, flags 00000000 20 4
pipewire[1850759]: pw.context: Int 14
pipewire[1850759]: pw.link: (103.0.0 -> 79.0.0) allocating -> error (error alloc buffers: Invalid argument) (ready-ready)
This happens with pipewire 1.0.0 and pipewire master.
What kind of change does this PR introduce? (check at least one)
If changing the UI of web configuration, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing setups:
The PR fulfills these requirements:
Fixes: #xxx[,#xxx]
, where "xxx" is the issue number)To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.
Other information: