6 Commits
Author SHA1 Message Date
95cdd1cf31 Collect WSLg logs and crash dumps in collect-wsl-logs.ps1 (#40913)
* Collect WSLg logs in collect-wsl-logs.ps1

Gather WSLg graphical/audio logs into a wslg/ folder of the log archive:
weston.log, pulseaudio.log, wlog.log, stderr.log and versions.txt from
/mnt/wslg, plus crash dumps from %TEMP%\wsl-crashes (and legacy
/mnt/wslg/dumps). Logs are copied inside WSL as the uid=0 user so binary
dumps are preserved and root-only logs like pulseaudio.log are readable.

Document WSLg log collection and analysis in CONTRIBUTING.md,
doc/docs/debugging.md, and a new .github/copilot/wslg-logs.md guide,
including references to the microsoft/wslg repository.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Pass WSLg dest path as sh argument to handle quotes safely

Addresses PR review: a destination path containing a single quote
(e.g. C:\Users\O'Connor\...) would break the single-quoted sh -c string.
Pass the path as $1 and reference it via "$1" inside the script instead.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address review: timeout, --system, and gate WSLg dumps behind -Dump

- Collect WSLg logs inside a background job with a 60s timeout so a
  wedged WSL service cannot hang log collection.
- Use wsl.exe --system to reach /mnt/wslg, which works even when the
  default distro is WSL1 or is not running, and runs as the wslg user
  that owns the logs (removes the id -nu 0 super-user detection).
- Only collect WSLg crash dumps (/mnt/wslg/dumps and %TEMP%\wsl-crashes)
  when -Dump is passed, since users may not expect dumps by default.

Docs updated accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Use --system --user root for WSLg log collection

Run the WSLg collection as root in the system distro so root-owned logs
are guaranteed readable, removing ambiguity about required privileges.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* collect-wsl-logs: address WSLg review feedback

- Trim wslpath output before the null/whitespace check
- Explain the sh -c arg0/\ idiom used to pass the destination safely
- Lower the WSLg collection timeout from 60s to 20s

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* collect-wsl-logs: use New-Item -Force for the wslg folder instead of mkdir -p

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-07-09 09:34:00 -07:00
Blue 901cb9c134 Run the documentation pipeline when doc/ is edited + various rendering fixes (#40931)
* Run the documentation pipeline when doc/ is edited + various rendering fixes

* Fix inverted condition
2026-06-28 06:43:01 -07:00
Ben HillisandBen Hillis 8c220dc083 Fix grammar, typos, and formatting in docs and source (#14286)
* Fix localization text, Intune capitalization, ADMX indentation, unused import

- distributions/validate.py: Remove unused 'import base64'
- en-US/en-GB Resources.resw: Fix word order 'the list distribution' -> 'the distribution list' in MessageCouldFetchDistributionList
- en-US/en-GB Resources.resw: Remove trailing space from MessageCorruptedDistroRegistration value
- intune/en-US/WSL.adml: Fix 'For Linux' -> 'for Linux' capitalization (5 occurrences) to match official product name
- intune/WSL.admx: Fix inconsistent 3-space indent to 4-space on AllowWSL1 and CustomKernelUserSettingConfigurable policies

* Fix grammar, typos, and formatting in docs and source code

- WmiService.h: Fix duplicated word 'of of' -> 'is of' in WQL comment
- drvfs.md: Fix 'which tell' -> 'which tells' (subject-verb agreement), double space, second 'tell' -> 'tells'
- systemd.md: Fix 'tries synchronizes' -> 'tries to synchronize'
- wslhost.exe.md: Fix 'processes terminates' -> 'process terminates'
- boot-process.md: Add missing 'in' preposition, fix C:/ -> C:\, fix lowercase 'linux' to 'Linux' (4 occurrences), fix misplaced parenthesis
- init.md: Fix double space before hvsocket backtick
- session-leader.md: Fix heading level ## -> ### to match sibling section
- CONTRIBUTING.md: Fix double period after bold security notice
- debugging.md: Fix missing word 'be' in 'can enabled', fix 'process' -> 'processes'
- index.md: Add missing period at end of sentence
- technical-documentation/index.md: Fix 'API's' -> 'APIs' (remove incorrect apostrophe)
- relay.md: Fix lowercase 'linux' to 'Linux' (3 occurrences)
- localhost.md: Fix lowercase 'linux' to 'Linux'
- plan9.md: Fix lowercase 'linux' to 'Linux'

* update errormessages testcase

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-03-03 18:13:59 -08:00
Ben HillisandBen Hillis 87ed36a1e4 diagnostics: combine wprp files in a single one with profiles (#14048)
* diagnostics: combine wprp files in a single one with profiles

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2026-01-14 09:26:46 -08:00
Jerry Jones 3524feba77 grammar docfixes (#13314) 2025-07-31 08:19:42 -07:00
WSL Team 697572d664 Initial open source commit for WSL.
Many Microsoft employees have contributed to the Windows Subsystem for Linux, this commit is the result of their work since 2016.

The entire history of the Windows Subsystem for Linux can't be shared here, but here's an overview of WSL's history after it moved to it own repository in 2021:

Number of commits on the main branch: 2930
Number of contributors: 31

Head over https://github.com/microsoft/WSL/releases for a more detailed history of the features added to WSL since 2021.
2025-05-15 12:09:45 -07:00