Cache results of detecting X and PulseAudio when starting environment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
wslu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Detecting X and PulseAudio takes some time when starting every shell even when it is unlikely that those servers go away between opening new shells.
* The fix is reusing cached info when starting new shells.
[ Test Case ]
* Start X server and PulseAudio server on Windows, the host WSL system
* run:
rm -f $HOME/.
unset DISPLAY
unset PULSE_SERVER
time . /etc/profile.
echo $DISPLAY $PULSE_SERVER
cat $HOME/.
time . /etc/profile.
* Ran all of that again with X server and PulseAudio server turned off
[Regression Potential]
* Wrong implementation of caching logic may break auto detection or cache a wrong result. The test case ensures that auto detection is still working and also checks the cache content.
Discovered regressions:
LP: #1859509 wsl-integration.sh shows error when .cache/ can't be created
LP: #1869878 Space in username breaks wsl integration cache
Related branches
- Sebastien Bacher: Approve
-
Diff: 51 lines (+24/-5)1 file modifieddebian/wsl-integration.sh (+24/-5)
description: | updated |
description: | updated |
description: | updated |
description: | updated |
This bug was fixed in the package wslu - 2.3.2-0ubuntu4
---------------
wslu (2.3.2-0ubuntu4) focal; urgency=medium
* debian/ wsl-integration .sh: Set timeouts for X and PulseAudio detection. config/ wsl/integration -cache. wsl-integration .sh: Use pactl stat instead of pactl info in detection.
This fixes long startup time when detection fails after waiting for long.
(LP: #1855520)
* Cache results of detecting X and sound server in $HOME/.
Reuse results when starting new shells in the same runnig WSL Ubuntu instance.
(LP: #1855898)
* debian/
Pactl stat is slightly faster, ~0.3s vs. ~0.45s with pactl info when running
on WSL1.
-- Balint Reczey <email address hidden> Wed, 11 Dec 2019 15:45:09 +0100