Summary: | With highlight windows turned on, there's sometimes extremely rapid flickering when hovering over window preview of task manager windows | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Adam Fontenot <adam.m.fontenot+kde> |
Component: | Task Manager and Icons-Only Task Manager widgets | Assignee: | Plasma Bugs List <plasma-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | cwo.kde, kde, kdedev, nate, postix, qydwhotmail, tomblackwhite |
Priority: | NOR | Keywords: | accessibility |
Version First Reported In: | 6.3.5 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=469983 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
screencast of issue (60fps flicker - possible epilepsy trigger)
screencast of the issue (alt-tab + non-flickering version) |
Description
Adam Fontenot
2025-05-28 05:58:01 UTC
I was unable to reproduce this on a system with Plasma built from git-master, an integrated AMD GPU and " focus follows mouse" - Qt 6.8. To be fair, you did say this was only reproducible sometimes. I also tested with Neon Testing, which has Qt 6.9.0 I'll leave this open for further investigation >See the screencast.
I think something went missing.
There's not much we can act on here in the present form. If you can find some more concrete steps please roepen.
There will be a change for 6.5 that uses the newer version of that window, so hopefully that will help.
Created attachment 181875 [details]
screencast of issue (60fps flicker - possible epilepsy trigger)
Sorry, I had originally recorded a screencast and intended to include it, but the video was worthless because the flickering was so rapid that Spectacle couldn't capture it. I'm adding a video I took with my phone. Is this enough information to re-open the issue? It's a real problem with KWin that I face every day. It may be hard to reproduce (though I'm happy to help) but I have no doubt others are affected.
Something else I've noticed from paying more attention to this recently is that the flicker seems to be visible in the thumbnail as well sometimes.
I was able to reproduce it once, in a couple of minutes of trying (until all the flickering from the regular effect started giving me a headache...). Haven't managed to do it again, much less find reproduction steps that work. Marking confirmed, since cwo was able to reproduce Repro'd with 6.4. Could also reproduce without focus follows mouse, so that's not the cause. It's interesting that the flickering for me is always between the desktop wallpaper and the hovered window. I wonder if the way KWin implements the effect is by doing the "hide all windows" action when the cursor leaves a thumbnail, and then immediately showing the window for the newly hovered thumbnail. That seems to be the best explanation I can think of for the weird effect here. Sometimes the strobe even gets "stuck" on the desktop and I see the wallpaper for 4-5 seconds while hovering over a window thumbnail preview. I've also noticed that the faster you move between the two window previews, the more common the issue seems to be. The longer it takes to draw a window, the more likely it is to see an issue with that window. (All based on very subjective judgments of course.) The flicker loop might be KWin getting confused about whether the desktop or the active window is on top, and switching between them, since the cursor is active over the thumbnail. That's just a guess on my part though. Side note: but I find even the minimal "intended" flickering caused by the margin between the window thumbnails pretty irritating. I wonder if that gap might be closed and whether doing so could end up fixing this issue indirectly. Additional suggestion for others who'd like to reproduce this: 1. Maximize three windows of the same application on the same virtual desktop, with no other windows open on that desktop. 2. Alternate between hovering the thumbnail previews for the windows in the icons-only task manager with your cursor. If you ever see a brief flash of your desktop wallpaper or an inactive window which is not one of the two you switched between, you're seeing some version of this issue, because the effect has been tricked into briefly showing the wrong thing before painting the right thing over it. I see both of these very frequently, even when flickering doesn't result. I think this is probably easier to reproduce. Actually, I'm even able to reproduce this part of the issue with *other* ways of switching between window previews, including hovering the preview cards for separate windows in the "Icons and Text" task manager and even alt-tabbing between windows! I see a brief flash of either the desktop or an unrelated window after the setup instructions above. I've never gotten strobing with one of these methods though, so it never occurred to me to report it. Can others confirm? This is probably downstream of a more general KWin bug. I'm not sure what causes the effect to sometimes strobe between the right and wrong previews, but figuring out why it *ever* shows the wrong thing and fixing that would probably resolve the issue. Created attachment 182600 [details]
screencast of the issue (alt-tab + non-flickering version)
I managed to record the alt-tab issue with Spectacle (see attachment). Reproducing this is the same as above: just open three maximized windows on a virtual desktop and toggle between them with alt-tab. Hold alt once you press alt-tab and tab back and forth between two windows with tab and shift-tab.
Assuming this is a KWin bug, I'd be immensely grateful to anyone who could reproduce it and suggest how to report it. Should I move this bug to KWin or treat this (flickering in the task manager preview) as a separate issue and open one for KWin specific to the flash of content during the preview?
Showing the desktop briefly while moving between two windows in a group is a known issue - when the mouse is travelling between the two, there's a zone where the effect is cancelled (as the mouse isn't over any thumbnail). Showing the wrong window (or more precisely, turning the effect off despite hovering over something) is also a known issue when moving quickly - in some situations, the handler for the pointer leaving the first thumbnail is handled after the handler for starting the effect on the newly hovered window, so is immediately cancelled. (This is particularly easy to trigger if previews are disabled) I had a workaround/fix for these a while ago, but couldn't find someone to do a code review. I haven't tried the patch in a few months, but it seems to still apply cleanly and probably still works: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2816. These issues shouldn't cause a flicker while hovering over a thumbnail, and shouldn't apply to the alt-tab switcher, so these are new (or another existing bug in the task switcher case, I haven't checked) . And from a quick testing it seems I can't reproduce the alt-tab one (but I usually have the effect firmly disabled on both). (In reply to cwo from comment #9) > Showing the desktop briefly while moving between two windows in a group is a > known issue - when the mouse is travelling between the two, there's a zone > where the effect is cancelled (as the mouse isn't over any thumbnail). Thank you for providing feedback! I think this is wrong? The dead zone between the two preview widgets reverts to showing the active window for me, not the desktop. The very brief flash of the desktop seems unexpected. "Canceling the effect" in between the widgets is expected (if irritating) - if you view the video, I think you'll see what I mean in that the desktop is shown despite a window being active. > Showing the wrong window (or more precisely, turning the effect off despite > hovering over something) is also a known issue when moving quickly - in some > situations, the handler for the pointer leaving the first thumbnail is > handled after the handler for starting the effect on the newly hovered > window, so is immediately cancelled. (This is particularly easy to trigger > if previews are disabled) I think maybe I'm misunderstanding this part. When I said it shows the wrong window, I mean that it shows the *third* window described in the reproduction steps. That doesn't make sense to me because the handler for the cursor leaving the thumbnail shouldn't trigger this window being shown, since it's not the active window *or* one of the two windows being toggled between in this case. This isn't shown in the video - when I captured it I was only seeing the issue where the desktop is flashed briefly. > I had a workaround/fix for these a while ago, but couldn't find someone to > do a code review. I haven't tried the patch in a few months, but it seems to > still apply cleanly and probably still works: > https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2816. I think I'm going to try your patch just to see if it fixes any of my issues, if it will still compile against the 6.4 branch. Yeah, if all the windows are maximized then showing the background should be a separate issue. If I look very closely, I can also see an unrelated window pop up for about a frame on the task switcher (most notable if there's a clear color difference between that window and the two others. Not sure what that is about, I suspect a kwin thing. (In reply to cwo from comment #11) > Yeah, if all the windows are maximized then showing the background should be > a separate issue. > > If I look very closely, I can also see an unrelated window pop up for about > a frame on the task switcher (most notable if there's a clear color > difference between that window and the two others. Not sure what that is > about, I suspect a kwin thing. Yep, that's what I'm thinking. And I think it's related to this issue, because generally the flicker I see is between whatever window I'm hovering over and the background. You can see this in the original 60fps flicker video attachment. Moreover, I rebuilt the Arch Linux plasma-desktop package (6.4.0) after applying your patch and rebooted, and I still see this issue where the desktop is shown when moving the cursor between the window previews in the task manager. When you say that you can see an unrelated window pop up, that's on your own system? It's reassuring that you're able to reproduce that. Do you think all these issues are ultimately in how KWin is compositing the windows for the previews? I think an issue should probably be reported in wherever the source of the problem is, but it's not totally clear to me if that's KWin or if there are really separate issues with the task manager, alt-tab switcher, etc etc. If you have any advice that would be terrific! Also curious if you're able to reproduce the issue with the desktop when toggling between active previews for *maximized* windows in the task manager. (In reply to Adam Fontenot from comment #12) > Moreover, I rebuilt the Arch Linux plasma-desktop package > (6.4.0) after applying your patch and rebooted, and I still see this issue > where the desktop is shown when moving the cursor between the window > previews in the task manager. Yeah, that's what I thought. > When you say that you can see an unrelated window pop up, that's on your own > system? It's reassuring that you're able to reproduce that. Yes. > Do you think all > these issues are ultimately in how KWin is compositing the windows for the > previews? I have no idea. > Also curious if you're able to reproduce the issue with the desktop when > toggling between active previews for *maximized* windows in the task manager. I haven't seen that, only the unrelated window, but I might not have set the reproduction steps correctly and usually have the effect disabled as I find it confusing and it can give me headaches, so I haven't done too much testing. |