microsoft / wslg

Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios
MIT License
9.9k stars 296 forks source link

GUI Programs clipboard goes out of sync randomly (after HOURS to 2 days of usage) #1202

Open divinity76 opened 4 months ago

divinity76 commented 4 months ago

Windows Version

Observed on both Windows 10 and Windows 11. Microsoft Windows [Version 10.0.19045.4046]

WSL Version

0.0.0.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.133.1-microsoft-standard-WSL2

Distro Version

observed on both Ubuntu 22.04 and Ubuntu 24.04 pre-release

Other Software

XFCE4-terminal, Gedit, SmartGit, multiple versions across both Ubuntu 22.04 and 24.04 on both Windows 10 and Windows 11, any GUI/xserver program seems to be affected

Repro Steps

Use any xserver GUI program for 2 days, for example xfce4-terminal or gedit, and it should happen (sometimes it takes a few hours of usage, sometimes it takes 2 days before it happens)

Expected Behavior

Clipboard should stay in sync with Windows clipboard, regardless of how long that program runs.

Actual Behavior

After "a while" (anywhere from a few hours to 2 days), the WSL GUI program's clipboard will stop syncing with Windows.

When the issue does trigger, a workaround is to run

/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command "Get-Clipboard" | sudo xclip -selection primary

Just running it once will somehow make the sync work again, for hours up to 2 days. The "sudo" is important, it will not restore clipboard syncing without sudo.

This has been observed on Ubuntu 22.04 on both Windows 10 and Windows 11, and Ubuntu 24.04-beta on Windows 10.

Diagnostic Logs

No response

craigloewen-msft commented 4 months ago

Moving to the WSLg Repo!