SUMMARY Maximize animation does not work when using Aurorae themes on Wayland. Switching to Breeze makes it work properly again. STEPS TO REPRODUCE 1. Switch to an Aurorae theme 2. Minimize/Maximize a window a few dozen times OBSERVED RESULT The animation plays rarely, and most of the times it doesn't play at all. This was tested with the Qogir Aurorae theme and Plastik. EXPECTED RESULT The Maximize animation should play 100% of the times. SOFTWARE/OS VERSIONS Linux: KDE Plasma Version: 5.20.80 (plasma-desktop git) KDE Frameworks Version: 5.79 Qt Version: 5.15.2 ADDITIONAL INFORMATION Built from git master today. Everything from KWin down to plasma-desktop is built from master. Commit built on plasma-desktop is a274b24e29feebdfac16d7ae262a21cf14710896, commit built on KWin is 68a7daff58a4f34c48f0cb23ed0b49d04d255934
Created attachment 134725 [details] qdbus org.kde.KWin /KWin supportInformation
Video of the issue: https://www.youtube.com/watch?v=HS4vYuRlL1I
If you try to replicate this issue, this *might* work sometimes, then out of nowhere the effect will stop playing completely, then start again. Try using your computer for 10 minutes or so with an Aurorae theme on Wayland, and you ought to hit it.
Cannot reproduce. I wonder if kwin has a huge frame drop. Can you reduce the animation speed in the system settings?
(In reply to Vlad Zahorodnii from comment #4) > Cannot reproduce. > > I wonder if kwin has a huge frame drop. Can you reduce the animation speed > in the system settings? I tried the minimum speed and the minimize animation still only played around 1/4th of the times I tried. There's a lot of frame drops on KWin Wayland master, but this doesn't seem to be a frame drop here, as even with the minimum animation speed the minimize animation is instant. Thing is, like one in 10 times it would *actually* play, so I know it's *active*. This does NOT happen with Breeze, so for me it looks to be Aurorae-specific, but I could repro it with basically any aurorae theme, all the time. I tried on 5.20.5 and the maximize animation plays fine 100% of the times.
Also for CSD windows it also plays 100% of the times. It's only when the window is decorated by Aurorae.
(In reply to David Rubio from comment #5) > (In reply to Vlad Zahorodnii from comment #4) > > Cannot reproduce. > > > > I wonder if kwin has a huge frame drop. Can you reduce the animation speed > > in the system settings? > > I tried the minimum speed and the minimize animation still only played > around 1/4th of the times I tried. > I put the animation at the slowest notch. Besides systemsettings5 crashing inmediatly after that (report coming...) the animation definitely wasn't playing. Sometimes it would, and it would be unsufferably slow (as you would expect from it being set at the slowest speed), but when it didn't play Maximize was instant.
Reverting: kwayland-server: f67daa0711584058a8fefda76e898fe58d53ace7 kwin: 26b249061ee49dacc29320f93984de3d35012e1f to those commit hashes makes this issue dissapear.
The problem is that aurorae decoration engine is inefficient. KWin gets the data from a texture where Aurorae composites the decoration and uploads it to another decoration texture atlas. Performance-wise, that's not good. By delaying compositing, we just made it more easier to miss the next vblank. Perhaps, we should increase the latency policy to "extremely high" to work around this bug until the performance hog is properly fixed.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/589
(In reply to Vlad Zahorodnii from comment #9) > The problem is that aurorae decoration engine is inefficient. KWin gets the > data from a texture where Aurorae composites the decoration and uploads it > to another decoration texture atlas. Performance-wise, that's not good. By > delaying compositing, we just made it more easier to miss the next vblank. > Perhaps, we should increase the latency policy to "extremely high" to work > around this bug until the performance hog is properly fixed. I did set it to extremely high (well, as high as it went), and the problem is still there, just less so. It's just really annoying, but I don't think that much people use Aurorae, thankfully? :P I just can't live without the theme I've used for so many years, but that's me.
(In reply to David Rubio from comment #11) > (In reply to Vlad Zahorodnii from comment #9) > > The problem is that aurorae decoration engine is inefficient. KWin gets the > > data from a texture where Aurorae composites the decoration and uploads it > > to another decoration texture atlas. Performance-wise, that's not good. By > > delaying compositing, we just made it more easier to miss the next vblank. > > Perhaps, we should increase the latency policy to "extremely high" to work > > around this bug until the performance hog is properly fixed. > > I did set it to extremely high (well, as high as it went), and the problem > is still there, just less so. It's just really annoying, but I don't think > that much people use Aurorae, thankfully? :P > > I just can't live without the theme I've used for so many years, but that's > me. Weirdly enough, double-clicking the titlebar plays the animation just fine 90% of the times, but clicking the "maximize" button barely plays it at all. Dunno what sort of difference that'd even make.
Okay, I closed the merge request. I wonder if switching to the cubic easing curve has something to do with this "bug." (kwin drops a lot of frames because aurorae is inefficient). In Plasma <= 5.20.x, the maximize effect uses the linear easing curve, while in 5.21.x, it is going to use the cubic easing curve.
I find it really weird that the animation works only if I double click the titlebar, but clicking the maximize button does absolutely nothing. I tried reverting the cubic animation curve and that didn't do it either. Video: https://youtu.be/9prO3kiB6-w
On my machine, the maximize animation is choppy no matter where I click.
(In reply to Vlad Zahorodnii from comment #15) > On my machine, the maximize animation is choppy no matter where I click. The animation is definitely choppy even when double-clicking. When I click the maximize button the animation outright doesn't play at all for some cursed reason (setting it to the slowest animation speed notch still plays it instantly instead of it taking forever). I'd blame the theme but it works before 507.
> setting it to the slowest animation speed notch still plays Make sure that you don't have AnimationDurationFactor in your kwinrc file.
Created attachment 134863 [details] kwinrc (In reply to Vlad Zahorodnii from comment #17) > > setting it to the slowest animation speed notch still plays > Make sure that you don't have AnimationDurationFactor in your kwinrc file. I don't. I'm attaching my kwinrc. Anything odd in here?
I don't see anything suspicious in your kwinrc file.
Created attachment 134879 [details] hotspot When I maximize/restore a window, kwin spends a reasonable amount of time decoding png images. This is odd...
I use the following https://store.kde.org/p/1191690/ aurorae theme.
Created attachment 134881 [details] ftrace The first 100-150ms of the maximize animation are very crucial, but it looks like kwin spends most of that time updating the contents of the aurorae decoration.
This is interesting: 11:27:17.632 Plasma::FrameItemNode::updateTexture QSize(1392, 1011) "decoration-center" 1 It's rendering the middle of the frame (the part that no-one can see) at absolutely massive resolutions, with the slowest of all 3 FrameSVGItemNode paths.
Turns out the center is still visible slightly in the top. We can't just disable it. It's fixable with a oneline in the theme, adding an element with the ID hint-tile-center. I can't think of any super easy fix plasma side.
Git commit 2d1994e06691e79c4754d60634fb5c8b3e9f4e02 by Vlad Zahorodnii. Committed on 15/01/2021 at 13:26. Pushed by vladz into branch 'master'. aurorae: Make direct connection to maximizedChanged signal If the maximizedChanged connection is queued, several configure events will be sent. If the client acks the first configure event and later on acks the second one, the maximize animation will be cancelled due to "unexpected" geometry change. Based on the code, there is no clear reason why the connection is queued in the first place. M +1 -1 plugins/kdecorations/aurorae/src/aurorae.cpp https://invent.kde.org/plasma/kwin/commit/2d1994e06691e79c4754d60634fb5c8b3e9f4e02
@David Rubio Can you please check whether 2d1994e0669 made things better?
(In reply to Vlad Zahorodnii from comment #26) > @David Rubio Can you please check whether 2d1994e0669 made things better? It fixes it for me. Also the maximize animation is way smoother for some weird reason. But yeah, that fixed the issue for what I could test (by spamming the maximize button like 30 times)
(In reply to David Edmundson from comment #24) > Turns out the center is still visible slightly in the top. We can't just > disable it. > > It's fixable with a oneline in the theme, adding an element with the ID > hint-tile-center. I can't think of any super easy fix plasma side. Would that element have to be empty or does it need to contain something?
Best answer is to copy plasma-framework/ dialogs/background.svg It has <rect style="opacity:1;fill:#ff6600;fill-opacity:1;stroke:none" id="hint-tile-center" width="5" height="5" x="0" y="904.36218" /> But ultimately we're just looking for any element matching the ID.
(In reply to David Rubio from comment #27) > It fixes it for me. Also the maximize animation is way smoother for some > weird reason. > > But yeah, that fixed the issue for what I could test (by spamming the > maximize button like 30 times) Thanks, that's great. I'll create a generic bug report to track performance issues in Aurorae and close this one.
(In reply to Vlad Zahorodnii from comment #30) > (In reply to David Rubio from comment #27) > > It fixes it for me. Also the maximize animation is way smoother for some > > weird reason. > > > > But yeah, that fixed the issue for what I could test (by spamming the > > maximize button like 30 times) > > Thanks, that's great. I'll create a generic bug report to track performance > issues in Aurorae and close this one. Thanks you very much.