WSL2 self-heal: symlink the pulse socket WSLg actually creates - #5
Open
shavalejames-blip wants to merge 1 commit into
Open
WSL2 self-heal: symlink the pulse socket WSLg actually creates#5shavalejames-blip wants to merge 1 commit into
shavalejames-blip wants to merge 1 commit into
Conversation
PortAudio's ALSA pulse plugin looks for the socket at the standard XDG runtime path regardless of $PULSE_SERVER, but WSLg only creates one at /mnt/wslg/PulseServer. Without this symlink, audio playback crashes the process outright instead of failing cleanly. The tmpfs dir resets every reboot, so this re-links on every launch. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015QgYjuW3CoTZVuvJPo1eBk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$PULSE_SERVER, but WSLg only creates one at/mnt/wslg/PulseServer. Without a symlink, audio playback crashes the process outright ("terminate called ... dumped core") instead of failing cleanly.run.shnow re-links/run/user/$UID/pulse/nativeto/mnt/wslg/PulseServeron every launch (the tmpfs runtime dir resets each reboot), only when needed.Test plan
bash -n run.shpassesnativesymlink) and confirmed the heal snippet recreates it correctlysounddevice(used bymouth.py/ears.py) can query devices and play a tone with no crash🤖 Generated with Claude Code
https://claude.ai/code/session_015QgYjuW3CoTZVuvJPo1eBk