Bug 479781 - Switching between windows is slow in some cases
Summary: Switching between windows is slow in some cases
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: tabbox (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6, wayland-only
Depends on:
Blocks:
 
Reported: 2024-01-14 01:24 UTC by Piotr Mierzwinski
Modified: 2024-03-14 23:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
System Settings - Task Switcher (63.00 KB, image/png)
2024-01-30 02:47 UTC, Piotr Mierzwinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Mierzwinski 2024-01-14 01:24:26 UTC
SUMMARY
Recently I experienced freezing of Plasma after several switching of windows. I have not to say that it was very frustrating and annoying. It happened twice at one day.
I started konsole with two tabs.
I started Firefox with many opened tabs (20-30) with YouTube partially playing and paused them. In one moment I one of them was playing and I switched by Alt+Tab (quick, so without showing widget with thumbnails). Memory utilized in ~50-60%.
I observed that switching started work slow (1 sec.and more wait between presented the window - to be used), and after one of the switching Plasma just freeze. Even no mouse cursor was present in the screen. To back to work I could only restart sddm or PC by text terminal (after Ctrl+Alt+F4).


STEPS TO REPRODUCE
1. Start konsole and open 2 tabs (on with mc)
2. Start Firefox with 20-30 tabs with paused video, i.e. YouTube
3. Play one video and start to quick switching between Firefox and konsole

OBSERVED RESULT
slow switching, and in some cases freezing of Plasma

EXPECTED RESULT
switching should work fast, and for sure Plasma should not freeze in result of it

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.91.90
KDE Frameworks Version: 5.248
Qt Version: 6.6.1
Windowing system: Wayland

CPU: 8 × 11th Gen Intel® Core™ i7-1185G7 @ 3.00GHz
GP:  Mesa Intel® Xe Graphics  [TigerLake-LP GT2 [Iris Xe Graphics] (rev 01)]

ADDITIONAL INFORMATION
In tests I used system (Neon) installed on HDD. Not sure if this does matter.
Comment 1 Nate Graham 2024-01-16 23:26:31 UTC
The slowdown could be caused by high system resource utilization. But when the total freeze happened, were you switching away from a full-screen window or full-screen video, by any chance?
Comment 2 Piotr Mierzwinski 2024-01-20 00:56:19 UTC
I only switched by Alt+Tab (quick, without hold this shortcut) and had not any window as fullsceen, also video wasn't full screen mode.
Resources were not yet fully utilized. And IMHO "high system resource utilization" should not lead to Plasma freezing.

Today I switched between KMail and Konsole and didn't observe such effect. The same when I switched Firefox (this site opened) and konsole. Similar Konsole and Dolphin. (memory utilization ~47%)

BTW. I'm not sure why widget of "task switcher" is always showing, even I press shortcut very quickly. I think this  slowdown task switching. I would expect to see it only when I invoke shortcut and hold Alt key. Now pressing Tab I can switch to other, visible as thumbnail, window.
Comment 3 Nate Graham 2024-01-23 19:13:35 UTC
Are you using the Thumbnail Grid switcher? If so, does the issue go away if you change to the Large Icons switcher?
Comment 4 Piotr Mierzwinski 2024-01-30 02:47:34 UTC
Created attachment 165335 [details]
System Settings - Task Switcher

I use "Compact" switcher.
Comment 5 Vlad Zahorodnii 2024-02-06 15:32:31 UTC
Is the issue still reproducible if you disable "Highlight Window" effect? You may need to uncheck "Exclude internal effects" in Desktops Effects
Comment 6 Piotr Mierzwinski 2024-02-22 21:43:04 UTC
(In reply to Vlad Zahorodnii from comment #5)
> Is the issue still reproducible if you disable "Highlight Window" effect?
> You may need to uncheck "Exclude internal effects" in Desktops Effects

I cannot find effect neither "Highlight Window" nor "Exclude internal effects" in Desktops Effects.
BTW. 
Recently I didn't meet issue I reported, only I meet some lags in response of KDE/Plasma application like very long time waiting for KMail settings window (~5 sec.) or when I click very at the first time into Kicker I need to wait couple seconds to get its window.
As I mentioned I use HDD, so maybe this is the cause.
Comment 7 Nate Graham 2024-02-23 21:30:36 UTC
JFYI the "Highlight Window" setting is on the Task Switcher page, not the Desktop Effects page.
Comment 8 Bug Janitor Service 2024-03-09 03:46:55 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Piotr Mierzwinski 2024-03-14 23:47:01 UTC
(In reply to Nate Graham from comment #7)
> JFYI the "Highlight Window" setting is on the Task Switcher page, not the
> Desktop Effects page.

I suppose it calls "Show selected window", because any "Highlight Window" I don't see in mentioned page.
BTW. Fortunately till now didn't experience again reported issue, so I close this bug report.