惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
V
Vulnerabilities – Threatpost
W
WeLiveSecurity
P
Privacy International News Feed
Cyberwarzone
Cyberwarzone
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
The Last Watchdog
The Last Watchdog
V2EX - 技术
V2EX - 技术
Schneier on Security
Schneier on Security
B
Blog RSS Feed
N
News and Events Feed by Topic
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
云风的 BLOG
云风的 BLOG
L
Lohrmann on Cybersecurity
小众软件
小众软件
T
Threat Research - Cisco Blogs
F
Full Disclosure
P
Palo Alto Networks Blog
Latest news
Latest news
Scott Helme
Scott Helme
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Recent Announcements
Recent Announcements
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Register - Security
The Register - Security
J
Java Code Geeks
The Cloudflare Blog
美团技术团队
博客园 - 【当耐特】
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tor Project blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Security Latest
Security Latest
S
Securelist
Webroot Blog
Webroot Blog
博客园 - 三生石上(FineUI控件)
P
Privacy & Cybersecurity Law Blog
N
Netflix TechBlog - Medium
C
Check Point Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
H
Help Net Security
I
InfoQ
L
LINUX DO - 热门话题

AUR Newest Packages

AUR (en) - xcute AUR (en) - wallrift AUR (en) - smolvm-git AUR (en) - smolvm-bin AUR (en) - android-cli AUR (en) - rs-top AUR (en) - rudo-bin AUR (en) - marmalade-bin AUR (en) - clawx-appimage AUR (en) - echomusic-appimage AUR (en) - vermouth AUR (en) - mautrix-telegram-bin AUR (en) - ketesa AUR (en) - clawd-on-desk-bin AUR (en) - rebased-bin AUR (en) - oxideterm-bin AUR (en) - shed-sh AUR (en) - quillscribe AUR (en) - haus-bin AUR (en) - stably-orca-bin AUR (en) - reflection AUR (en) - emerald-legacy-launcher-git AUR (en) - kwim AUR (en) - omarchy-emacs AUR (en) - pentest-ghostwriter AUR (en) - papagaia AUR (en) - outport-bin AUR (en) - carton-appimage AUR (en) - veila-git AUR (en) - veila-bin AUR (en) - vigil-baseline AUR (en) - byedroid AUR (en) - rpi-imager-git-non-root AUR (en) - python-fastapi-sso AUR (en) - zeed-bin AUR (en) - dwl-git-azerty AUR (en) - libspatialaudio-git AUR (en) - libspatialaudio AUR (en) - opennow AUR (en) - rotki AUR (en) - kapi-bin AUR (en) - classfi-git AUR (en) - giff-git AUR (en) - budget-tracker-bin AUR (en) - budget-tracker AUR (en) - codebase-memory-mcp-bin AUR (en) - codebase-memory-mcp-bin AUR (en) - tasks-bin AUR (en) - ruri-git AUR (en) - gitmun-bin AUR (en) - python-cozempic AUR (en) - vim-prosession AUR (en) - paintfe-bin AUR (en) - paintfe AUR (en) - drop-bin AUR (en) - tritium-launcher-bin AUR (en) - solidc-git AUR (en) - paseo-desktop-bin AUR (en) - dota2-minify-bin AUR (en) - yt-dvr AUR (en) - enneagram AUR (en) - excalidraw-desktop-bin AUR (en) - binaryobjectscanner-bin AUR (en) - openring-rs AUR (en) - openring-rs-bin AUR (en) - brave-origin-beta-bin AUR (en) - whisper.cpp-cuda-bin AUR (en) - libggml-cuda-bin AUR (en) - revdiff AUR (en) - tdesktop-nolimit AUR (en) - cert-checker AUR (en) - yaak-cli AUR (en) - yaak-cli-bin AUR (en) - deez-notes-bin AUR (en) - goosestation-libretro AUR (en) - whispers-cuda-bin AUR (en) - kei AUR (en) - foxguard AUR (en) - hyprlogin-git AUR (en) - kebiki AUR (en) - runex AUR (en) - ikuai-cli AUR (en) - whispers-bin AUR (en) - pipeweaver-app AUR (en) - pipeweaver AUR (en) - agentop-bin AUR (en) - cosmic-ext-connected-git AUR (en) - kwin-dual-mode AUR (en) - skwd-daemon AUR (en) - ter-music-cn AUR (en) - mesen-ce-git AUR (en) - elio-bin AUR (en) - keyboard-chattering-fix-git AUR (en) - qtkeychain-qt5 AUR (en) - gesturecontrol AUR (en) - sharey AUR (en) - ouijit-bin AUR (en) - usque-bin AUR (en) - twig-bin AUR (en) - ascendara-bin
AUR (en) - pulse-autoconf
2026-06-16 · via AUR Newest Packages

hgabreu commented on 2024-01-19 16:24 (UTC)

Thank you, I'll give it a try.

eomanis commented on 2024-01-19 01:14 (UTC)

@hgabreu I have since migrated my audio setup to PipeWire, which incidentally got rid of some audio glitches, some GNOME Shell audio settings integration glitches, and which improved latency. Also, a "Main sink" is no longer required; in PipeWire the echo cancellation module can read the audio it should cancel directly from the default/fallback audio output. Very convenient.

The linked wiki section and the one below it cover functionality analogous to the EchoCancellation and EchoCancellationWithSourcesMix pulse-autoconf presets, respectively, and can be achieved without any user-space daemon running all the time. (The 2nd setup requires a manual once-after-pc-startup user interaction in Helvum which one could probably automate with some extra Wireplumber configuration, but I did not bother.)

Is that an option for you as well? I mean, sooner or later PulseAudio will start suffering from bit rot or desktop integration issues anyway, whereas PipeWire might very well be the go-to audio subsystem for years to come.

One more thing to consider: With pulse-autoconf I was reluctant to use the EchoCancellationWithSourcesMix all the time because it requires multiple loopbacks, which I suspect make the CPU work more.

In contrast, the analogous PipeWire setup does not require loopbacks, and because of that I have it enabled all the time with no ill effects on the CPU. Also, no loopbacks = no latency when playing into the sound effects sink, which I appreciate.

To get you started, I have these packages installed now:

gst-plugin-pipewire
helvum
lib32-libpipewire
lib32-pipewire
libpipewire
libwireplumber
pipewire
pipewire-alsa
pipewire-audio
pipewire-docs
pipewire-pulse
qemu-audio-pipewire
wireplumber

hgabreu commented on 2024-01-16 16:13 (UTC) (edited on 2024-01-16 16:13 (UTC) by hgabreu)

I've just updated pulseaudio from 16.1-7 to 17.0-1 The sink_main doesn't show up anymore, and I get the following on the logs:

Jan 16 09:58:36 . pulseaudio[1480]: No remapping configured, proceeding nonetheless!
Jan 16 09:58:36 . pulse-autoconf[14326]: Failure: No such entity
Jan 16 09:58:36 . pulseaudio[1480]: No such source.
Jan 16 09:58:36 . pulseaudio[1480]: Failed to load module "module-loopback" (argument: "latency_msec=60 max_latency_msec=100 adjust_time=6 source=src_ec sink=sink_mix"): initialization failed.
Jan 16 09:58:36 . pulse-autoconf[14328]: Failure: Module initialization failed
Jan 16 09:58:36 . pulse-autoconf[1247]:  WARN  A "pactl load-module" call failed with exit code 1. Further arguments: module-loopback latency_msec=60 max_latency_msec=100 adjust_time=6 source=src_ec sink=sink_mix
Jan 16 09:58:36 . pulseaudio[1480]: No such sink.
Jan 16 09:58:36 . pulseaudio[1480]: Failed to load module "module-loopback" (argument: "latency_msec=60 max_latency_msec=100 adjust_time=6 source=sink_fx.monitor sink=sink_main"): initialization failed.
Jan 16 09:58:36 . pulse-autoconf[14330]: Failure: Module initialization failed
Jan 16 09:58:36 . pulse-autoconf[1247]:  WARN  A "pactl load-module" call failed with exit code 1. Further arguments: module-loopback latency_msec=60 max_latency_msec=100 adjust_time=6 source=sink_fx.monitor sink=sink_main

hedgepigdaniel commented on 2023-08-24 02:46 (UTC)

Thanks for the fix, it works now without any overrides!

eomanis commented on 2023-08-14 09:59 (UTC) (edited on 2023-08-14 10:31 (UTC) by eomanis)

Yeah, it's weird that it worked - maybe systemd wasn't enforcing those rules properly until recently?

I think you are right about systemd not enforcing these rules on my system, which is why it works for me and not for you. Log excerpt from my system:

Aug 13 19:52:10 my-system (autoconf)[1046]: pulse-autoconf.service: Failed to set up user namespacing for unprivileged user, ignoring: Operation not permitted

This seems to be because I have unprivileged user namespaces disabled on my system.

You have found a bug in pulse-autoconf.service that makes it not work as intended when user namespaces are enabled, which is the default on Arch Linux. I shall fix that bug, but it will take a week or two because I am currently otherwise busy.

Thank you for notifying me even though I still do not have a proper bug tracker 👍

The fix to pulse-autoconf.service might look like this:

[Service]

# Provide access to the configuration files of pulse-autoconf
ReadOnlyPaths=/usr/lib/pulse-autoconf
ReadOnlyPaths=/etc/pulse-autoconf
ReadOnlyPaths=/run/pulse-autoconf
ReadOnlyPaths=%h/.config/pulse-autoconf

# Provide access to the configuration files of PulseAudio, because pactl might need to read them
ReadOnlyPaths=/usr/lib/pulse
ReadOnlyPaths=/etc/pulse
ReadOnlyPaths=/run/pulse
ReadOnlyPaths=%h/.config/pulse

# The directory where pulse-autoconf creates its instance lock file
ReadWritePaths=/run/user/%U/pulse-autoconf

# The path to the PulseAudio UNIX socket
ReadWritePaths=/run/user/%U/pulse/native

Maybe it will work if you put that into your systemd drop-in file.

hedgepigdaniel commented on 2023-08-14 00:40 (UTC)

Yeah, it's weird that it worked - maybe systemd wasn't enforcing those rules properly until recently?

Here's a configuration that seems to work (ReadWritePaths doesn't work with ProtectHome apparently):

$ cat /etc/systemd/user/pulse-autoconf.service.d/protect-home-no.conf
[Service]
ReadWritePaths=
ProtectHome=tmpfs
BindPaths=%t/pulse %E/pulse

eomanis commented on 2023-08-13 19:51 (UTC) (edited on 2023-08-13 21:16 (UTC) by eomanis)

Edit

No, scratch that, it is correct. pulse-autoconf creates its lock file there.


Uh, maybe I messed up in pulse-autoconf.service.

Pretty sure,

ReadWritePaths=/run/user/%U/pulse-autoconf

should instead be

ReadWritePaths=/run/user/%U/pulse

I.e. it should whitelist access to the PulseAudio daemon's UNIX socket.

But why did that ever work then?

eomanis commented on 2023-08-13 19:37 (UTC) (edited on 2023-08-13 19:44 (UTC) by eomanis)

Edit

You have a /home/dcal/.config/pulse/daemon.conf PulseAudio user-level configuration file. I do not think I thought about this when I wrote pulse-autoconf.service. Maybe the pactl call from within the pulse-autoconf.service sees it, but is not allowed to read it, and crashes.

You seem to be implying that the fact that the Requires or After configuration points to pulseaudio.service means that the pulse-autoconf service would therefore have access to the directories /run/user/<pid>/pulse, ~/.config/pulse, etc.

Not what I meant. Your log makes me suspect that your /usr/bin/pulseaudio process (the PulseAudio daemon) is trying to start "within" pulse-autoconf.service, instead of in its own pulseaudio.service where it belongs. And as you have found out pulse-autoconf.service is pretty well locked down so that pulse-autoconf may only do what it needs to do, to satisfy the principle of least privilege.

When pulse-autoconf.service is started, this is what should happen:

  1. systemd is told to start pulse-autoconf.service (in the systemd --user context)
  2. systemd notices the Requires= and After=pulseaudio.socket
  3. systemd "starts" pulseaudio.socket, which creates a systemd-managed UNIX socket file at /run/user/1000/pulse/native
  4. systemd runs the /usr/bin/pulse-autoconf executable
  5. /usr/bin/pulse-autoconf calls pactl to do its things
  6. pactl attempts to connect to the PulseAudio daemon through the (systemd-managed) UNIX socket file
  7. systemd notices the connection attempt, "pauses" pactl for a short time, and starts pulseaudio.service, which runs /usr/bin/pulseaudio
  8. systemd "hands over" the UNIX socket file to the /usr/bin/pulseaudio process
  9. pactl resumes operation and "talks" to /usr/bin/pulseaudio through the UNIX socket file

When all that is done, /usr/bin/pulse-autoconf should be running "in" pulse-autoconf.service, and /usr/bin/pulseaudio should be running "in" pulseaudio.service. /usr/bin/pulse-autoconf should then "talk" to /usr/bin/pulseaudio through the UNIX socket file, using pactl.

On your machine it looks like something goes wrong at step 6 or 7. When your pactl is called for the first time from within pulse-autoconf.service, it (possibly) does not find the UNIX socket file. Therefore pactl thinks "Huh, the PulseAudio daemon is not running, I will start one myself", but this did not work out because pulse-autoconf.service is locked down in such a way that nobody in there may create a UNIX socket at that path. And this is where your error log comes from.

hedgepigdaniel commented on 2023-08-10 04:09 (UTC)

Good idea, I've done the override configuration file and that works. It looks like this:

[Service]
ProtectHome=no
ReadWritePaths=

I had to also disable ReadWritePaths, otherwise I think that turns on ProtectHome or something similar aswell.

I don't understand what you mean about the pulse daemon? I do have the systemd --user units pulse-autoconf.service pulseaudio.socket and pulseaudio.service running and enabled.

You seem to be implying that the fact that the Requires or After configuration points to pulseaudio.service means that the pulse-autoconf service would therefore have access to the directories /run/user/<pid>/pulse, ~/.config/pulse, etc. I can't find anything in the systemd docs to indicate that? It seems to me that the ProtectHome=yes is not affected by Requires/After, and is operating as intended, preventing pulse-autoconf from accessing those directories and therefore discovering the PID of the pulseaudio daemon and connecting to it.

eomanis commented on 2023-08-08 12:34 (UTC)

@hedgepigdaniel

It seems like the pulseaudio/pulse daemon is being started within the reduced-permission systemd --user service context of pulse-autoconf.service. This should not happen; the pulse daemon should run within its own pulseaudio.service systemd --user service context, and to ensure this the pulse-autoconf.service file contains these dependencies:

[Unit]
Requires=pulseaudio.socket
After=pulseaudio.socket

I do not know why on your system these dependencies have no effect. You have a workaround that seems to function, but I cannot tell what else will break for the pulse daemon if it is being run within the pulse-autoconf.service context, so your mileage may vary until you find a proper fix.

Until then you can override ProtectHome without having to edit the package-supplied .service file with a systemd unit drop-in by placing this text file at /etc/systemd/user/pulse-autoconf.service.d/protect-home-no.conf:

[Service]
ProtectHome=no