OS: Manjaro Linux x86_64
Kernel: 6.6.65-1-MANJARO
DE: Plasma 6.2.4
WM: KWin
CPU: AMD Ryzen 7 4800HS with Radeon Graphics (16) @ 2.900GHz
GPU: NVIDIA GeForce GTX 1660 Ti Mobile
GPU: AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
I have an external 32’’ Acer ED323QURA connected with HDMI to that laptop for over 2.5 years now. The following problem occurs since approx. 1 year.
kwin.sh uses almost 100% usage when the screen is off. It sets my fan speed to max when my external monitor is in sleep mode and when I come back it takes a couple of seconds to get my CPU heat down from almost 70 degrees.
I never used a screen saver in the first place, there were no setup changes.
When the screen is on, nothing abnormal happens. My CPU idles happily around 40-50 degrees and no fan noise.
I must confess, I cannot see kwin.sh though right now I do see kwin_x11 which rarely reaches 1% cpu on a Ryzen 5600G… please check that, perhaps a mis-type.
It might be worth also creating a new User account to verify that these issues are system related, and not User related.
sudo useradd -m test
Set the password ‘test’ for test account
sudo passwd test
Now you can log out and log in to test.
It might be worth reducing the journal spam and then doing a reboot…
I actually have to repeat the command to get a blank journal output:
You should set the environment variable “KWIN_DRM_USE_EGL_STREAMS=1”
The easiest place is to add a file /etc/profile.d/kwin.sh with the line export KWIN_DRM_USE_EGL_STREAMS=1
Verify this is working with the command line tool env after rebooting.
That advice might be very out-of-date by now.
If the script isn’t in the /etc/profile.d/ directory, try running locate kwin.sh to see if it is somewhere else. Otherwise, htop should show the full path of the script.
I also found this 7 year old code snippet on GitHub: kwin.sh · GitHub. Apart from that, not much else on the web refers to a kwin.sh script.
Unless someone here with experience using Nvidia advises otherwise, you might just want to see what happens if you remove the kwin.sh script & reboot. Or you could post the contents of the script here so that it can be examined to see if it is necessary for your system.
What baffled me first was only kwin_x11, no kwin.sh whatsoever.
I then checked my system monitor again and only saw kwin.sh running. But when I clicked it, in the details bar it listed two processes (kwin.sh and kwin_x11) as running.
@scotty65: I think your clues were right, must have been something ancient.
I checked /etc/profile.d/, no entry here.
I then located kwin.sh and found two folders in .config:
/old-autostart-scripts/
/autostart
The timestamps there were 2018 and 2021 respectively.
I made a backup of both files/folders and deleted them, then rebooted. Now my system monitor is clean. The entries in inxi --admin --verbosity=8 --filter --no-host --width stayed the same.
I will go on from there, my guess is it’s solved now.
Sounds good, kudos to @scotty65 for chasing up the script - I thought it would end up a typo… I was going to follow up with an rg -ri kwin.sh > ~/Desktop/kwin.sh.txt but you got it