public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Wayland and CPU load
@ 2024-09-05  6:32 Peter Humphrey
  2024-09-05  7:50 ` Michael
  2024-09-05 15:08 ` Peter Humphrey
  0 siblings, 2 replies; 15+ messages in thread
From: Peter Humphrey @ 2024-09-05  6:32 UTC (permalink / raw
  To: gentoo-user

Greetings,

Has anyone else seen grossly excessive CPU load since adopting the new Wayland 
way of doing things? /Top/ is showing 1300% going on kwin_wayland and the 
whole of the rest going on plasmashell.

I need hardly say this doesn't make a responsive system.

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-05  6:32 [gentoo-user] Wayland and CPU load Peter Humphrey
@ 2024-09-05  7:50 ` Michael
  2024-09-05 12:47   ` Peter Humphrey
  2024-09-05 15:08 ` Peter Humphrey
  1 sibling, 1 reply; 15+ messages in thread
From: Michael @ 2024-09-05  7:50 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 917 bytes --]

On Thursday 5 September 2024 07:32:21 BST Peter Humphrey wrote:
> Greetings,
> 
> Has anyone else seen grossly excessive CPU load since adopting the new
> Wayland way of doing things? /Top/ is showing 1300% going on kwin_wayland
> and the whole of the rest going on plasmashell.

Ouch!  No, this is definitely excessive.  This is what I have here on a 
Wayland Plasma desktop, with gkrellm, kmail, a text editor and a couple of 
terminals running:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                       
 4257 michael   -2   0 4812308 226288 156940 S   0.7   0.3   0:06.62 
kwin_wayland                                  
 4640 michael   20   0  193240  30508  24576 S   0.7   0.0   0:02.58 gkrellm           


> I need hardly say this doesn't make a responsive system.

Quite so.  Dare I ask if you're observing this on a system running NVidia 
graphics?

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-05  7:50 ` Michael
@ 2024-09-05 12:47   ` Peter Humphrey
  2024-09-05 14:43     ` Peter Humphrey
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Humphrey @ 2024-09-05 12:47 UTC (permalink / raw
  To: gentoo-user

On Thursday 5 September 2024 08:50:39 BST Michael wrote:
> On Thursday 5 September 2024 07:32:21 BST Peter Humphrey wrote:
> > Greetings,
> > 
> > Has anyone else seen grossly excessive CPU load since adopting the new
> > Wayland way of doing things? /Top/ is showing 1300% going on kwin_wayland
> > and the whole of the rest going on plasmashell.
> 
> Ouch!  No, this is definitely excessive.  This is what I have here on a
> Wayland Plasma desktop, with gkrellm, kmail, a text editor and a couple of
> terminals running:
> 
>   PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
> 4257 michael   -2   0 4812308 226288 156940 S   0.7   0.3   0:06.62
> kwin_wayland
>  4640 michael   20   0  193240  30508  24576 S   0.7   0.0   0:02.58 gkrellm
> > I need hardly say this doesn't make a responsive system.
> 
> Quite so.  Dare I ask if you're observing this on a system running NVidia
> graphics?

No, it's this:

00:02.0 VGA compatible controller: Intel Corporation Raptor Lake-P [Iris Xe 
Graphics]

The box is a 16-thread i5 with 32GB.

I notice though that the core temp is steady at 60C, so it looks as though 
it's running back-to-back NOPs, because any real load would have it near 90C 
and the fan running hard.

Oh, and a reboot makes no difference. Perhaps I should start recompiling 
things...

V-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-05 12:47   ` Peter Humphrey
@ 2024-09-05 14:43     ` Peter Humphrey
  2024-09-05 19:00       ` Peter Humphrey
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Humphrey @ 2024-09-05 14:43 UTC (permalink / raw
  To: gentoo-user

On Thursday 5 September 2024 13:47:29 BST I wrote:

> ... Perhaps I should start recompiling things...

After an emerge -e1 kwayland plasma-workspace and a reboot, kwin_wayland is 
down to 20-60% CPU and plasma_shell is barely visible in /top/.

Much improved, but it still isn't right.

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-05  6:32 [gentoo-user] Wayland and CPU load Peter Humphrey
  2024-09-05  7:50 ` Michael
@ 2024-09-05 15:08 ` Peter Humphrey
  2024-09-05 16:27   ` Michael
  1 sibling, 1 reply; 15+ messages in thread
From: Peter Humphrey @ 2024-09-05 15:08 UTC (permalink / raw
  To: gentoo-user

On Thursday 5 September 2024 07:32:21 BST I wrote:

> Has anyone else seen grossly excessive CPU load since adopting the new
> Wayland way of doing things? /Top/ is showing 1300% going on kwin_wayland
> and the whole of the rest going on plasmashell.

Another thing: the plasma system is not preserving my desktops between 
sessions. Well, firefox and 3 x gkrellm all reappear, but on the first desktop, 
not where I put them. 3 x konsole, dolphin, kmail, korganiser: none of these 
restart.

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-05 15:08 ` Peter Humphrey
@ 2024-09-05 16:27   ` Michael
  0 siblings, 0 replies; 15+ messages in thread
From: Michael @ 2024-09-05 16:27 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 925 bytes --]

On Thursday 5 September 2024 16:08:36 BST Peter Humphrey wrote:
> On Thursday 5 September 2024 07:32:21 BST I wrote:
> > Has anyone else seen grossly excessive CPU load since adopting the new
> > Wayland way of doing things? /Top/ is showing 1300% going on kwin_wayland
> > and the whole of the rest going on plasmashell.
> 
> Another thing: the plasma system is not preserving my desktops between
> sessions. Well, firefox and 3 x gkrellm all reappear, but on the first
> desktop, not where I put them. 3 x konsole, dolphin, kmail, korganiser:
> none of these restart.

I observed there were a quite a few .desktop files with changed content, 
according to etc-update.  Perhaps you need to run etc-update if you haven't 
done so already.

However, I find some window management irregularities on KDE 6 compared to KDE 
5, as per my other post today.  Perhaps these such functionality will improve 
as the code base matures.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-05 14:43     ` Peter Humphrey
@ 2024-09-05 19:00       ` Peter Humphrey
  2024-09-05 21:29         ` Michael
  2024-09-05 22:14         ` Mark Knecht
  0 siblings, 2 replies; 15+ messages in thread
From: Peter Humphrey @ 2024-09-05 19:00 UTC (permalink / raw
  To: gentoo-user

On Thursday 5 September 2024 15:43:00 BST Iwrote:
> On Thursday 5 September 2024 13:47:29 BST I wrote:
> > ... Perhaps I should start recompiling things...
> 
> After an emerge -e1 kwayland plasma-workspace and a reboot, kwin_wayland is
> down to 20-60% CPU and plasma_shell is barely visible in /top/.
> 
> Much improved, but it still isn't right.

It came back again, so I ran a complete -e, rebooted, recompiled the kernel 
again and rebooted again.

It's all back as it was - no CPU cycles left for anything else but wayland and 
plasam-shell.

How to debug this?

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-05 19:00       ` Peter Humphrey
@ 2024-09-05 21:29         ` Michael
  2024-09-05 23:21           ` Peter Humphrey
  2024-09-05 22:14         ` Mark Knecht
  1 sibling, 1 reply; 15+ messages in thread
From: Michael @ 2024-09-05 21:29 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1299 bytes --]

On Thursday 5 September 2024 20:00:12 BST Peter Humphrey wrote:
> On Thursday 5 September 2024 15:43:00 BST Iwrote:
> > On Thursday 5 September 2024 13:47:29 BST I wrote:
> > > ... Perhaps I should start recompiling things...
> > 
> > After an emerge -e1 kwayland plasma-workspace and a reboot, kwin_wayland
> > is
> > down to 20-60% CPU and plasma_shell is barely visible in /top/.
> > 
> > Much improved, but it still isn't right.
> 
> It came back again, so I ran a complete -e, rebooted, recompiled the kernel
> again and rebooted again.
> 
> It's all back as it was - no CPU cycles left for anything else but wayland
> and plasam-shell.
> 
> How to debug this?

At a simple level you can check this file for any obvious problem:

~/.local/share/sddm/wayland-session.log

Your symptom could be related to software rendering used by the kwin 
compositor, as opposed to OpenGL.  Mesa with appropriate USE flags should 
provide what your graphics need.  Have a look in kinfocenter, or run:

qdbus6 org.kde.KWin /KWin supportInformation

and check the section under Compositor, Compositor Type is not showing Xrender 
or software rendering.

Beyond this I think you're into compiling stuff with debugging symbols and 
trying to understand where code fails:

https://community.kde.org/KWin/Debugging

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-05 19:00       ` Peter Humphrey
  2024-09-05 21:29         ` Michael
@ 2024-09-05 22:14         ` Mark Knecht
  1 sibling, 0 replies; 15+ messages in thread
From: Mark Knecht @ 2024-09-05 22:14 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]

On Thu, Sep 5, 2024 at 12:00 PM Peter Humphrey <peter@prh.myzen.co.uk>
wrote:
>
> On Thursday 5 September 2024 15:43:00 BST Iwrote:
> > On Thursday 5 September 2024 13:47:29 BST I wrote:
> > > ... Perhaps I should start recompiling things...
> >
> > After an emerge -e1 kwayland plasma-workspace and a reboot,
kwin_wayland is
> > down to 20-60% CPU and plasma_shell is barely visible in /top/.
> >
> > Much improved, but it still isn't right.
>
> It came back again, so I ran a complete -e, rebooted, recompiled the
kernel
> again and rebooted again.
>
> It's all back as it was - no CPU cycles left for anything else but
wayland and
> plasam-shell.
>
> How to debug this?
>
> --
> Regards,
> Peter.

If you are running systemd then you can try

systemd-cgtop

which should identify what slice, if any, is using lots of CPU.

If you were interested in exploring more deeply you might
be able to create a control group that Wayland could run
inside of to limit resources or possible identify what
part of Wayland is getting out of control

[-- Attachment #2: Type: text/html, Size: 1398 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-05 21:29         ` Michael
@ 2024-09-05 23:21           ` Peter Humphrey
  2024-09-06  0:33             ` Peter Humphrey
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Humphrey @ 2024-09-05 23:21 UTC (permalink / raw
  To: gentoo-user

On Thursday 5 September 2024 22:29:14 BST Michael wrote:

> At a simple level you can check this file for any obvious problem:
> 
> ~/.local/share/sddm/wayland-session.log
> 
> Your symptom could be related to software rendering used by the kwin
> compositor, as opposed to OpenGL.  Mesa with appropriate USE flags should
> provide what your graphics need.  Have a look in kinfocenter, or run:
> 
> qdbus6 org.kde.KWin /KWin supportInformation
> 
> and check the section under Compositor, Compositor Type is not showing
> Xrender or software rendering.

I think I know what it is: the kernel's list of firmware blobs is empty. I 
don't know where they all went, but it shouldn't be too hard to find them.

> Beyond this I think you're into compiling stuff with debugging symbols and
> trying to understand where code fails:
> 
> https://community.kde.org/KWin/Debugging

Thanks to those who helped.

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-05 23:21           ` Peter Humphrey
@ 2024-09-06  0:33             ` Peter Humphrey
  2024-09-06  9:10               ` Michael
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Humphrey @ 2024-09-06  0:33 UTC (permalink / raw
  To: gentoo-user

On Friday 6 September 2024 00:21:31 BST Peter Humphrey wrote:

> I think I know what it is: the kernel's list of firmware blobs is empty. I
> don't know where they all went, but it shouldn't be too hard to find them.

Indeed it was so. Now fixed and working fine.

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-06  0:33             ` Peter Humphrey
@ 2024-09-06  9:10               ` Michael
  2024-09-06  9:45                 ` Peter Humphrey
  0 siblings, 1 reply; 15+ messages in thread
From: Michael @ 2024-09-06  9:10 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 736 bytes --]

On Friday 6 September 2024 01:33:04 BST Peter Humphrey wrote:
> On Friday 6 September 2024 00:21:31 BST Peter Humphrey wrote:
> > I think I know what it is: the kernel's list of firmware blobs is empty. I
> > don't know where they all went, but it shouldn't be too hard to find them.
> 
> Indeed it was so. Now fixed and working fine.

Without all requisite firmware for your graphics the Kwin compositor will fall 
back to software rendering.  As you've experienced without hardware 
acceleration Kwin will eat up CPU cycles.

Emerging sys-kernel/linux-firmware and configuring your system to use it fixes 
the problem by providing the necessary code for the graphics card to do the 
heavy lifting:

https://wiki.gentoo.org/wiki/Intel

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-06  9:10               ` Michael
@ 2024-09-06  9:45                 ` Peter Humphrey
  2024-09-06 10:41                   ` Michael
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Humphrey @ 2024-09-06  9:45 UTC (permalink / raw
  To: gentoo-user

On Friday 6 September 2024 10:10:47 BST Michael wrote:
> On Friday 6 September 2024 01:33:04 BST Peter Humphrey wrote:
> > On Friday 6 September 2024 00:21:31 BST Peter Humphrey wrote:
> > > I think I know what it is: the kernel's list of firmware blobs is empty.
> > > I
> > > don't know where they all went, but it shouldn't be too hard to find
> > > them.
> > 
> > Indeed it was so. Now fixed and working fine.
> 
> Without all requisite firmware for your graphics the Kwin compositor will
> fall back to software rendering.  As you've experienced without hardware
> acceleration Kwin will eat up CPU cycles.
> 
> Emerging sys-kernel/linux-firmware and configuring your system to use it
> fixes the problem by providing the necessary code for the graphics card to
> do the heavy lifting:

Yes, I know, and I had it set up from when I acquired the machine. The mystery 
is why it was missing from my two most recent kernels.

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-06  9:45                 ` Peter Humphrey
@ 2024-09-06 10:41                   ` Michael
  2024-09-06 11:30                     ` Peter Humphrey
  0 siblings, 1 reply; 15+ messages in thread
From: Michael @ 2024-09-06 10:41 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1268 bytes --]

On Friday 6 September 2024 10:45:26 BST Peter Humphrey wrote:
> On Friday 6 September 2024 10:10:47 BST Michael wrote:
> > On Friday 6 September 2024 01:33:04 BST Peter Humphrey wrote:
> > > On Friday 6 September 2024 00:21:31 BST Peter Humphrey wrote:
> > > > I think I know what it is: the kernel's list of firmware blobs is
> > > > empty.
> > > > I
> > > > don't know where they all went, but it shouldn't be too hard to find
> > > > them.
> > > 
> > > Indeed it was so. Now fixed and working fine.
> > 
> > Without all requisite firmware for your graphics the Kwin compositor will
> > fall back to software rendering.  As you've experienced without hardware
> > acceleration Kwin will eat up CPU cycles.
> > 
> > Emerging sys-kernel/linux-firmware and configuring your system to use it
> > fixes the problem by providing the necessary code for the graphics card to
> 
> > do the heavy lifting:
> Yes, I know, and I had it set up from when I acquired the machine. The
> mystery is why it was missing from my two most recent kernels.

You could have inadvertently cleaned this package from your /var/lib/portage/
world, or unmerged it for some reason.  Worth noting, dmesg would have 
complained it can't find this & that firmware.

Either way, problem solved.  :-)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [gentoo-user] Wayland and CPU load
  2024-09-06 10:41                   ` Michael
@ 2024-09-06 11:30                     ` Peter Humphrey
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Humphrey @ 2024-09-06 11:30 UTC (permalink / raw
  To: gentoo-user

On Friday 6 September 2024 11:41:03 BST Michael wrote:

> You could have inadvertently cleaned this package from your
> /var/lib/portage/ world, or unmerged it for some reason. 

No, nothing like that. The sources and config files were all present, but the 
extra_firmware entries had been deleted. I know I'm getting a bit old for all 
this, but how can I inadvertently remove something I know should stay put?

> Worth noting, dmesg would have complained it can't find this & that firmware.

That's what put me on to it.

> Either way, problem solved.  :-)

Indeed.

-- 
Regards,
Peter.





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-09-06 11:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-05  6:32 [gentoo-user] Wayland and CPU load Peter Humphrey
2024-09-05  7:50 ` Michael
2024-09-05 12:47   ` Peter Humphrey
2024-09-05 14:43     ` Peter Humphrey
2024-09-05 19:00       ` Peter Humphrey
2024-09-05 21:29         ` Michael
2024-09-05 23:21           ` Peter Humphrey
2024-09-06  0:33             ` Peter Humphrey
2024-09-06  9:10               ` Michael
2024-09-06  9:45                 ` Peter Humphrey
2024-09-06 10:41                   ` Michael
2024-09-06 11:30                     ` Peter Humphrey
2024-09-05 22:14         ` Mark Knecht
2024-09-05 15:08 ` Peter Humphrey
2024-09-05 16:27   ` Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox