-
Notifications
You must be signed in to change notification settings - Fork 310
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
Windows window constantly losing focus and flickering #443
Comments
@FireFoxAhri, thanks for reporting the issue. For diagnostics purpose, would you please disable Linux GUI support by adding below to .wslconfig (refer https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure-global-options-with-wslconfig), and if the problem persist? thanks! [wsl2] |
After set this option. I don't faced the issue. My typical usage of WSL is VS Code remote WSL and compile and debug C/C++ projects. Then I delete the config the problem comes again quickly. |
@FireFoxAhri, thanks for additional info, by looking at your weston.log, it looks weston (WSLg's wayland compositor) is keep restarting, (while it shouldn't case the focus lost in Windows side, but) I would like to know why it's restarting first. Do you see any core dumps are created at /mnt/wslg/dumps? thanks! |
@hideyukn88 ,Thanks for helping to solve this problem. the Intel one is my working PC. So I need to wait until Monday to see it. Sorry for the inconvenience. I'll try to see if I can reproduce in my home PC, It happens rarely than Intel one. |
core.zip |
@FireFoxAhri, thanks for sharing the core dump with me. I looked at the dump and confirmed this is fixed by microsoft/weston-mirror#39, and the fix is a part of https://github.com/microsoft/wslg/releases/tag/v1.0.28 release. Thanks! |
Guys, I am suffering from the same thing - it's impossible to work as the focus is being stolen by the mstsc process spawned by wslhost. Looking at my Windows update I see I have last installed "Windows Subsystem for Linux WSLg Preview - 1.0.26" on Oct 29. Is the solution to disable it and wait for 1.0.28? |
This issue makes the Greenshot screen capture utility non-functional. I only see the problem with systems that have a NVIDIA GPU. On my laptop, if I disable the NVIDIA GPU and only use the Intel GPU, Greenshot works fine. Disabling WSLg works fine for all GPU's. |
maybe it's a dump question, but how can i install the 1.0.28 prerelease edition? |
The installer is just a MSI file. So, a simple double click may do the trick 🤞 |
After installing the 1.0.28 prerelease version I'm not able to reproduce the error. |
I experienced a similar problem with 1.0.26 on Win11 22000.348: My GPU is AMD RX 6700 XT with driver 21.11.3. EDIT: Have not noticed this problem since installing 1.0.28 prerelease. |
Temporary fix, until the issue is resolved, is unfortunately to disable WSLg as per: https://github.com/MicrosoftDocs/wsl/blob/main/WSL/wsl-config.md#options-for-wslconfig Edit
The shutdown and restart wsl2. |
Unfortunately, this problem still persists on WSLg v1.0.32 on Windows 11 build 22598 and renders my computer unusable. This does not happen immediately after I fire up WSL, for instance, but after some time, all windows keep losing focus repeatedly every few seconds. The problem goes away when I forcibly shut down WSL or set |
@hideyukn88 No, in my case, there's no folder named |
@amzon-ex, if you disable WSLg by .wslconfig, then you won't have that folder. But once you reenable it, and when you encounter the window focus issue, I hope there will be dumps created in that folder, thanks! |
After installing 1.0.28 prerelease I can confirm the flickering issue goes away. However, the high CPU usage remains. Like most reports on here WSL2 (Vmmem) goes along fine and then suddenly blows up. I however can replicate the issue, so hopefully that helps. It happens without fail once I load Affinity Designer (installed through the Windows store). In fact that seems to be only thing that sets it off. I can go weeks of daily WSL2 usage with no issues, then shortly after loading Affinity Designer my Vmmem CPU usages goes from <3% to at least 25%. Also of note, if I shutdown my WSL instance then re-start it the CPU kicks up again. The only way stop the high CPU usage once it starts is a computer restart. :( So in my case something else must be started up when I load Affinity Designer. Maybe what needs to be tracked down to solve this issue? |
I encountered this issue today when using any image editor. Even MSPaint. I'll try disabling wslgui. But that's going to hinder my workflow quite a bit :c |
The latest WSLg release is 1.0.33, please install it from aka.ms/wslstorepage, and try it, thanks! |
Hey @hideyukn88 ... Thanks for pinging me on this. I've been testing WSLg 1.0.33 all day today and so far so good! Which is excellent news. Thanks again! |
Thanks very much! I switched to Console Host, saved and closed. Then
switched back to Windows Terminal, saved and closed. It seems to be working
now.
…On Fri, Sep 2, 2022 at 7:36 PM badabing2005 ***@***.***> wrote:
Try this, it worked for me.
Open Terminal and go to settings.
Change the Default terminal application from Windows Console Host to Windows
Terminal
It worked for me, I personally like the Windows Terminal tabbed
application better.
But even switching back to Windows Console Host kept on working, perhaps
some relevant setting got reset.
Give it a shot.
Good luck.
—
Reply to this email directly, view it on GitHub
<#443 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADGVZZLYZEFVNPM5IFZARJTV4KTRXANCNFSM5DWLICIQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Unfortunately the issue has returned today.
…On Fri, Sep 2, 2022 at 8:19 PM Sivan Koren ***@***.***> wrote:
Thanks very much! I switched to Console Host, saved and closed. Then
switched back to Windows Terminal, saved and closed. It seems to be working
now.
On Fri, Sep 2, 2022 at 7:36 PM badabing2005 ***@***.***>
wrote:
> Try this, it worked for me.
> Open Terminal and go to settings.
> Change the Default terminal application from Windows Console Host to Windows
> Terminal
> It worked for me, I personally like the Windows Terminal tabbed
> application better.
> But even switching back to Windows Console Host kept on working, perhaps
> some relevant setting got reset.
> Give it a shot.
> Good luck.
>
> —
> Reply to this email directly, view it on GitHub
> <#443 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADGVZZLYZEFVNPM5IFZARJTV4KTRXANCNFSM5DWLICIQ>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
Hi @sivan-koren, if the issue occurs without WSL enabled, please report the issue at https://github.com/microsoft/terminal/issues, thanks! |
When starting wsl (with wslg), the active window also loses focus. I don't know if this has the same cause. |
I think that is a different issue. Launch Terminal |
Faced the same issue on a new box of Win11. weston restarts on and on and case flickering. |
@aflyhorse, if you are experiencing the issue with WSL from Store, please share the core file from /mnt/wslg/dumps, thanks! |
I'm having this issue on a fresh Win11 machine.
The |
Addendum: when I start e.g. gedit in this state, no window appears as expected, but at least I get this error:
|
@raist246, would you please share weston.log and stderr.log from /mnt/wslg? thanks! |
@hideyukn88 While in the error state, I set my wslconfig to use systemd in the boot section and after a reboot the issue disappeared. So I'm sorry that I cannot reproduce this and provide log files. I will post those files if this re-appears. Also, I'll check on another PC if I can enter this state by re-doing what I did on my machine. Thanks! |
@@hideyukn88 The issue just reappeared after a reboot (so this seems a bit random to me), here are the log files:
stderr.log:
|
I have the same issue, but I'm running under citrix, which looks like the issue being looked at in #901. |
I'm encountering this issue when copying a bitmap from Infinity Photo. It does not happen when copying a bitmap with Faststone Capture. When I run |
This indicates that you are running very old version of WSL, please update WSL from aka.ms/wslstorepage, thanks! |
Thanks for the quick reply!
Do I need to uninstall this first? |
@eightbit, you do not need to uninstall previous WSL, and no need to reinstall docker containers, thanks! |
@hideyukn88 That worked. Thanks a ton! |
There is a terminal issue that references to here. Unless one sets guiapplications=false, the terminal window loses focus right after launch. The terminal issue has been closed as a duplicate of this, but even despite running the most recent WSL, the issue persists. WSL version: 1.2.0.0 |
same here with a fresh Ubuntu install on wsl2.
|
I have the same issue as mentioned by @rommeswi and @olaf-k, The issue only occurs with wslg in Windows Terminal (but works as expected when
|
Same here using powershell. Very annoying!!!!
|
Same issue for me after installing the latest WSL on a new machine using Accessing Windows 10 VM via Citrix
adding |
Same issue just started happening for me.
|
Thanks for reporting the issue, this is known issue and there are several root causes, some fixes are underway, some is understood, but no fix, and there might be unknowns. Below is cut & paste from what I posted at other issue. Currently there is a few known issues can lead this situation. 1: If you have Citrix application installed, this applies to any Microsoft remote desktop software usage including WSLg, Citrix has KB published at https://support.citrix.com/article/CTX107825/how-to-disable-citrix-api-hooks-on-a-perapplication-basis. We have possible solution for this from Microsoft side, currently it's estimated to be released as WSL update by end of August. 2: Your organization deployed certain group policies to block remote desktop connection from your local computer. One of the most common policies we are aware of is, RDP signing requirement policy, when it is enabled, msrdc.exe for WSLg failed and enter restarting loop silently. This is because RDP file used with WSLg is not signed by Microsoft or any certificate your local computer trust. (Given WSLg is open source project, currently there is difficulties to have Microsoft signed RDP file). We are actively working with related groups within Microsoft to have solution, but not yet at this point. 3: There is another group policy let silently fail remote desktop connection, which we are not aware of. If your local computer is managed by your organization and experiencing this issue, please share the output from reg QUERY "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /S. 4: If none of above, there is some unknown things happen in WSLg VM, this case, we will need dumps/logs from /mnt/wslg/dumps or /mnt/wslg/*.log. If you hesitate to share files directly at here. please submit file via Feedback Hub. and let us know the feedback ID. (Note: these folders are clean up at every WSL startup, thus files need to be captured while active WSL instance is experiencing the issue). 5: There is one known issue causing WSLg compositor in Linux (weston) during handshake with msrdc.exe, which is tracked by #901. 6: at last, in order to mitigate this issue, #1082 is submitted. If there is any question, feel free to post question here, thanks! |
I don't use Citrix.
How can I see if this policy impacts me?
See attached. pulseaudio.log
|
Confirming this on a fresh Win10. disabling GUIs is not really a solution to the problem. |
Update: The issue was being caused from a enterprise policy registry entry. |
Environment
Steps to reproduce
It appears itself sometime after using WSL, even don't start a wslg window.
Then the window with focus will constantly losing focus. E.g. Windows Terminal, The title bar is flickering showing it is losing focus and gaining focus. But I can't type any word into it. Only a quick Mouse click and type can input one char into terminal. After input wsl --shutdown then everything is normal.
VID_20210909_135128.mp4
VID_20210909_135320.mp4
WSL logs:
/mnt/wslg
You can access the wslg logs using explorer at:
\\wsl$\<Distro-Name>\mnt\wslg
(e.g.:\\wsl$\Ubuntu-20.04\mnt\wslg
)versions.txt
Expected behavior
All is OK.
Actual behavior
After using WSL. Windows is unable to use.
The text was updated successfully, but these errors were encountered: