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

load_pw_modules.sh uses configuration that doesn't exist #6

Open
elboulangero opened this issue Mar 12, 2024 · 1 comment
Open

load_pw_modules.sh uses configuration that doesn't exist #6

elboulangero opened this issue Mar 12, 2024 · 1 comment

Comments

@elboulangero
Copy link
Contributor

While discussing packaging this repo for Debian at https://alioth-lists.debian.net/pipermail/pkg-utopia-maintainers/2024-March/034881.html, there was some feedback from Dylan (maintainer of the pipewire package in Debian):

Some comments about the upstream load_pw_modules.sh

It refers to the Debian wiki which is nice :-) but not sure this is the best reference for pipewire. For example, it uses configuration that doesn't exist, I was asked by upstream to update our wiki about that :-) -- https://wiki.debian.org/PipeWire?action=diff&rev2=49&rev1=48

It is an upstream bug, but I guess they need to refresh their load_pw_modules.sh.

The diff mentioned above is about the removal of default.clock.force-quantum as « force-quantum doesn't exist in context.properties » according to Dylan.

I suppose it wouldn't hurt to run the script load_pw_modules.sh in a console, there should be one (or more) error messages to hint at what needs to be updated.

@elboulangero
Copy link
Contributor Author

elboulangero commented Mar 13, 2024

I dumped the output of load_pw_modules.sh to a log file, there's one error that stands out:

+ pw-cli -m -d load-module libpipewire-module-xrdp sink.node.latency=2048 sink.stream.props={node.name=xrdp-sink} source.stream.props={node.name=xrdp-source}
+ pw-metadata -n settings 0 clock.force-quantum 2048
+ pw-metadata -n settings 0 default.clock.force-quantum 4096
+ pw-metadata -n settings 0 default.clock.quantum 4096
[E][02827.931756] default      | [        pw-cli.c:  445 on_core_error()] remote 0x56110aa7c8e8: error id:68 seq:137 res:-2 (No such file or directory): no global 66
[E][02827.931786] default      | [        pw-cli.c:  445 on_core_error()] remote 0x56110aa7c8e8: error id:0 seq:139 res:-2 (No such file or directory): unknown resource 68 op:7
+ pw-metadata -n settings 0 default.clock.min-quantum 4096
+ pw-metadata -n settings 0 default.clock.rate 44100

Seemingly pw-metadata -n settings 0 default.clock.quantum 4096 returns an error.

However, after that I tried to run the commands above, and this time no error:

┌──(kali㉿kali)-[~]
└─$ pw-metadata -n settings 0 clock.force-quantum 2048
Found "settings" metadata 31
set property: id:0 key:clock.force-quantum value:2048 type:(null)
                                                                                                                            
┌──(kali㉿kali)-[~]
└─$ pw-metadata -n settings 0 default.clock.force-quantum 4096
Found "settings" metadata 31
set property: id:0 key:default.clock.force-quantum value:4096 type:(null)
                                                                                                                            
┌──(kali㉿kali)-[~]
└─$ pw-metadata -n settings 0 default.clock.quantum 4096 
Found "settings" metadata 31
set property: id:0 key:default.clock.quantum value:4096 type:(null)
                                                                                                                            
┌──(kali㉿kali)-[~]
└─$ pw-metadata -n settings 0 default.clock.min-quantum 4096
Found "settings" metadata 31
set property: id:0 key:default.clock.min-quantum value:4096 type:(null)

Maybe there's a race, since as we can see here:

# enable both xrdp-sink ans xrdp-source
$PWCLI -m -d load-module libpipewire-module-xrdp-pipewire sink.node.latency=$QUANTUMVAL sink.stream.props={node.name=xrdp-sink} source.stream.props={node.name=xrdp-source} > /dev/null &
# enable xrdp-sink only
# $PWCLI -m -d load-module libpipewire-module-xrdp-pipewire sink.node.latency=$QUANTUMVAL sink.stream.props={node.name=xrdp-sink} > /dev/null &
# enable xrdp-source only
# $PWCLI -m -d load-module libpipewire-module-xrdp-pipewire source.stream.props={node.name=xrdp-source} > /dev/null &
sleep 1

pw-cli -m -d load-module is called and sent to background, and then we have a sleep 1... So maybe the pw-metadata commands are called too early after that....

I tried a few times to log in and out, and it's not 100% reproducible. Sometimes there's no error, sometimes there are more errors, and the output suggests that, for some reason, we don't get stderr in time, so we don't know which command caused it. Example:

+ pw-cli -m -d load-module libpipewire-module-xrdp sink.node.latency=2048 sink.stream.props={node.name=xrdp-sink} source.stream.props={node.name=xrdp-source}
+ pw-metadata -n settings 0 clock.force-quantum 2048
+ pw-metadata -n settings 0 default.clock.force-quantum 4096
[E][02961.843375] default      | [        pw-cli.c:  445 on_core_error()] remote 0x55d5f9d278e8: error id:69 seq:137 res:-2 (No such file or directory): no global 67
[E][02961.843411] default      | [        pw-cli.c:  445 on_core_error()] remote 0x55d5f9d278e8: error id:0 seq:139 res:-2 (No such file or directory): unknown resource 69 op:7
+ pw-metadata -n settings 0 default.clock.quantum 4096
+ pw-metadata -n settings 0 default.clock.min-quantum 4096
+ pw-metadata -n settings 0 default.clock.rate 44100
+ command -v pactl
+ pactl set-default-sink xrdp-sink
+ pactl set-default-source xrdp-source
+ exit 0
[E][02961.839801] default      | [        pw-cli.c:  445 on_core_error()] remote 0x56110aa7c8e8: error id:69 seq:192 res:-2 (No such file or directory): no global 67
[E][02961.840085] default      | [        pw-cli.c:  445 on_core_error()] remote 0x56110aa7c8e8: error id:0 seq:194 res:-2 (No such file or directory): unknown resource 69 op:7

It's all a bit confusing.

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

No branches or pull requests

1 participant