-
Notifications
You must be signed in to change notification settings - Fork 822
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
WSLg generates a large number of RdClientAutoTrace files #10216
Comments
Some potentially relevant elements: |
It's devastating my poor 512GB SSD is full just three days after I removed the files. |
my current solution is to have a scheduled task that deletes those files periodically. I am doing it for wsl as well as for some outlook trace files that also have the same behaviour. Script here: |
Temporary solution, turn off support for GUI applications in WSL:
https://github.com/microsoft/wslg#wslg-system-distro |
I've added this to my .wslconfig but it didn't help |
Same issue here, seems like compiled version of RD Client has a bug:
Update: Upon looking into the trace log I found that "EnableMSRDCTelemetry" is missing within registry. I may have fixed the issue by installing Microsoft Remote Desktop MSI (not sure if that works with the AppStore version) followed by system reboot. The error logs for now stopped spamming the RdClientAutoTrace directory. You can get it here: https://go.microsoft.com/fwlink/?linkid=2068602 |
I discovered I had this issue last night, my 500GB SSD was filled in less than an hour when I walked away from my PC. I tried updating the RD Client as #10216 (comment) mentioned above and that did not fix it for me. What did fix it for me was adding the following line to
My WSL version output if it's helpful:
Last time I know it was working was about a week ago if that's helpful. |
I came up with a simple solution that doesn't require disabling guiApplications:
|
I just had to delete over 100gb of these files. This needs to be fixed asap. |
No side effects. Those files are all tracing logs. |
I have the same issue, my disk consumed almost all of the usable space overnight. |
I deleted following option out of my .wslgconfig (%UserProfile%.wslgconfig) Now it runs perfect. |
Is it ok to do this? im just asking will it corrupt my wsl? |
It won't. I have used this trick for several weeks and didn't encounter any issue. |
Ok thanks. |
I'm wondering what leads this to fix it for you... 🤔 |
I tested it. Seems to not have any issues up to now. |
Just noticed my system drive was full. Came across this post and deleted 384GB of ETL files! |
That problem fill my disk. and cursor loading blinking. Fixing temporary: cmd>wsl --shutdown
|
Hopefully the below can be used in the interim.. Stop-WSLAndCleanRdClientAutoTrace -RepoOwner 'microsoft' -RepoName 'WSL' -IssueNumber 10216 function Stop-WSLAndCleanRdClientAutoTrace {
<#
.SYNOPSIS
Stops all WSL processes and cleans up the RdClientAutoTrace directory if a specific GitHub issue is still open.
.DESCRIPTION
This function checks the status of a specified GitHub issue. If the issue is open, it proceeds to shut down all WSL instances, stop the LxssManager service, delete the RdClientAutoTrace directory, and create a dummy file to prevent future logging. Requires administrative privileges to run.
.PARAMETER RepoOwner
The owner of the GitHub repository.
.PARAMETER RepoName
The name of the GitHub repository.
.PARAMETER IssueNumber
The number of the GitHub issue to check.
.EXAMPLE
Stop-WSLAndCleanRdClientAutoTrace -RepoOwner 'microsoft' -RepoName 'WSL' -IssueNumber 10216
Checks the status of GitHub issue #10216. If open, applies the workaround to stop WSL processes and clean the RdClientAutoTrace directory.
#>
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string]$RepoOwner,
[Parameter(Mandatory = $true)]
[string]$RepoName,
[Parameter(Mandatory = $true)]
[int]$IssueNumber
)
# Function to check the status of a GitHub issue
function Check-GitHubIssueFixed {
param (
[string]$RepoOwner,
[string]$RepoName,
[int]$IssueNumber
)
$issueApiUrl = "https://api.github.com/repos/$RepoOwner/$RepoName/issues/$IssueNumber"
try {
$issue = Invoke-RestMethod -Uri $issueApiUrl -Headers @{Accept = 'application/vnd.github.v3+json'}
return $issue.state -eq 'closed'
}
catch {
Write-Warning "Failed to check GitHub issue status. Error: $_"
return $false
}
}
# Ensure the function is running with administrative privileges
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Error "This function requires administrative privileges. Please run PowerShell as an administrator."
return
}
# Check if the GitHub issue is fixed
$issueFixed = Check-GitHubIssueFixed -RepoOwner $RepoOwner -RepoName $RepoName -IssueNumber $IssueNumber
if (-not $issueFixed) {
Write-Host "The GitHub issue is still open. Applying the workaround..."
# Shutdown all instances of WSL
wsl --shutdown
# Stop the LxssManager service
Get-Service LxssManager | Stop-Service -Force -ErrorAction Stop
# Define the target directory and file paths
$tempPath = [System.Environment]::ExpandEnvironmentVariables('%temp%\DiagOutputDir')
$targetDir = Join-Path -Path $tempPath -ChildPath "RdClientAutoTrace"
$dummyFile = Join-Path -Path $tempPath -ChildPath "RdClientAutoTrace.txt"
# Delete the RdClientAutoTrace directory if it exists
if (Test-Path -Path $targetDir) {
Remove-Item -Path $targetDir -Recurse -Force -ErrorAction Stop
}
# Ensure the DiagOutputDir directory exists
if (-not (Test-Path -Path $tempPath)) {
New-Item -ItemType Directory -Path $tempPath | Out-Null
}
# Create a dummy RdClientAutoTrace file
New-Item -ItemType File -Path $dummyFile | Out-Null
# Rename the dummy file to RdClientAutoTrace (without .txt extension)
Rename-Item -Path $dummyFile -NewName ($dummyFile -replace '\.txt$','') -ErrorAction Stop
Write-Host "WSL processes stopped and RdClientAutoTrace directory handled."
}
else {
Write-Host "The GitHub issue has been resolved. No need to apply the workaround."
}
} |
Just deleted ~100 gigs of this garbage from the last week and applied the workaround. This needs to be fixed. |
|
Bump. When this is triggered, it wears down SSDs, causes system drive to fill up and WSL to stutter like mad. This is a major regression and it looks like wasn't so much as acknowledged by m$. |
the error that causes the trace file to be created also un-focused me, which is an inconvenience for some fullscreen games that minimize when unfocused; a solution i found was to run a GUI app in the background with explorer closed (maybe not needed?), this no longer caused the random un-focusings and creation of log files |
You didn't delete |
Windows Version
10.0.x
WSL Version
0.58.3.0 - now
Are you using WSL 1 or WSL 2?
Repro Steps
The details can be found at the discussion #8486
we think this should be an issue.
Expected Behavior
do nothing
Actual Behavior
wsl generates a lot of RdClientAutoTrace files that take up so much disk space.
The text was updated successfully, but these errors were encountered: