You are not logged in.

#1 2022-06-25 16:24:29

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

[SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

I recently switched to GNOME from KDE because the latter was giving me too many headaches with touchscreen / stylus.
Now I am faced with this:

/usr/bin/gnome-shell constantly uses something like 5% of my CPU and whenever there is virtually any mouse input (cursor or scroll) it gets up to 30 to 60%.

The machine has 32GB of memory and a i7-1065G7 CPU @ 1.30GHz with 4x2 cores. So please don't dismiss this as "its just how inefficient GNOME is".

What I have tried:

- pacman -Syu
- Xorg and Wayland GNOME Sessions (Problem is in both)
- I entirely disabled all GNOME extensions (Not just individually but extensions in general)
- I have turned of animations
- I have set the scaling of Fonts to 1,00 (Tweak tool)
- I have removed everything from autostart
- I have set the mouse polling rate (mousepoll=4) as described https://wiki.archlinux.org/title/Mouse_ … g_interval
- Use the touchpad and internal keyboard instead of my bluetooth peripherals and turned bluetooth off

I have done a cold boot after all of the above.
I have checked the cpu load with thop in different terminal emulators (terminator, alacritty) and using the gnome system monitor.
Nothing has had any affect. I start the system, sign in, launch some monitoring tool and as soon as I move the cursor, my cpu load goes apeshit.

Last edited by LoNaAleim (2022-06-30 21:21:04)

Offline

#2 2022-06-26 08:02:54

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

I pocked around some more and discovered that apparently my gnome-shell uses software-rendering:

glxinfo|egrep "OpenGL vendor|OpenGL renderer"
OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 13.0.1, 256 bits)

There is also this suspicious output of `/us/bin/gnome-shell` in my journal:

Jun 26 09:44:53 ANUBIS gnome-shell[997]: Running GNOME Shell (using mutter 42.2) as a Wayland display server
Jun 26 09:44:53 ANUBIS gnome-shell[997]: Device '/dev/dri/card0' prefers shadow buffer
Jun 26 09:44:54 ANUBIS gnome-shell[997]: Added device '/dev/dri/card0' (i915) using atomic mode setting.
Jun 26 09:44:54 ANUBIS gnome-shell[997]: MESA-LOADER: failed to open i965: /usr/lib/dri/i965_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
Jun 26 09:44:54 ANUBIS gnome-shell[997]: failed to load driver: i965
Jun 26 09:44:54 ANUBIS gnome-shell[997]: kmsro: driver missing
Jun 26 09:44:54 ANUBIS gnome-shell[997]: Failed to initialize accelerated iGPU/dGPU framebuffer sharing: Not hardware accelerated
Jun 26 09:44:54 ANUBIS gnome-shell[997]: libEGL warning: MESA-LOADER: failed to open i965: /usr/lib/dri/i965_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
Jun 26 09:44:54 ANUBIS gnome-shell[997]: libEGL warning: MESA-LOADER: failed to open i965: /usr/lib/dri/i965_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
Jun 26 09:44:54 ANUBIS gnome-shell[997]: Created gbm renderer for '/dev/dri/card0'
Jun 26 09:44:54 ANUBIS gnome-shell[997]: Boot VGA GPU /dev/dri/card0 selected as primary

This is not the only instance of GPU acceleration not working on my machine, but as war as I can tell, the relevant drivers are installed:

A ~ pacman -Qs intel
local/intel-gmmlib 22.1.3-1
    Intel Graphics Memory Management Library
local/intel-gpu-tools 1.26-1
    Tools for development and testing of the Intel DRM driver
local/intel-media-driver 22.4.3-1
    Intel Media Driver for VAAPI — Broadwell+ iGPUs
local/intel-ucode 20220510-1
    Microcode update files for Intel CPUs
local/libmfx 22.4.2-1
    Intel Media SDK dispatcher library
local/libva-intel-driver 2.4.1-2
    VA-API implementation for Intel G45 and HD Graphics family
local/libva-utils 2.14.0-1
    Intel VA-API Media Applications and Scripts for libva
local/tbb 2021.5.0-1
    High level abstract threading library

A ~ pacman -Qs mesa
local/glu 9.0.2-3
    Mesa OpenGL utility library
local/mesa 22.1.2-1
    An open-source implementation of the OpenGL specification
local/mesa-utils 8.5.0-2
    Essential Mesa utilities

Offline

#3 2022-06-26 08:27:33

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

Okay, as hinted at in https://wiki.archlinux.org/title/OpenGL, I set

MESA_LOADER_DRIVER_OVERRIDE=iris

for the gnome shell process, by appending it to /etc/environment.
Note for anyone else reading this: iris is not necessarily the right driver for you, read aformentioned article!

And the gnome issues as well as some others are gone.

So I guess the underlying issue was that mesa chose the wrong driver for my GPU? Is that something I should report somewhere upstream? Any Idea how to further investigate that?

I will wait for someone to reply to my last inquiry for a day or two and close it if noone has an idea.

Last edited by LoNaAleim (2022-06-26 08:28:27)

Offline

#4 2022-06-28 08:26:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,927

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

Your problem is/was that you already have that variable set somewhere to prefer the i965 driver (likely during the initial transition period a few years ago) and you are now setting it again to the "correct" iris driver. Find out where you originally already changed that variable and remove both of the assignments

Online

#5 2022-06-28 12:06:18

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

Hey V1del,

thanks for the suggestion, but checking whether that variable was set anywhere was one of the first things I did.
Looking at this excerpt from my shell:

A ~ env | grep MESA
MESA_LOADER_DRIVER_OVERRIDE=iris           # Its set because my shell inherited it from /etc/environment
A ~ unset MESA_LOADER_DRIVER_OVERRIDE      # lets remove it
A ~ env | grep MESA                        # Jup, its gone
A ~ vlc                                    # Vlc will use mesa, which tries to load the wrong driver now
VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)
[00005571a4028640] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
libGL error: MESA-LOADER: failed to open i965: /usr/lib/dri/i965_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: i965
libGL error: MESA-LOADER: failed to open i965: /usr/lib/dri/i965_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: i965
[00005571a402a1a0] main playlist: playlist is empty
A ~ export MESA_LOADER_DRIVER_OVERRIDE=iris # Adding override back to my env
A ~ vlc                                     # And the warnings are gone because mesa now uses iris
VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)
[000056114b87d640] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[000056114b87f1a0] main playlist: playlist is empty

I am quite confident that mesa selects the incorrect driver for my GPU, unless there is another place (i.e. not the env var)  where I can configure the driver overload. Would you know any other such place? I couldn't find anything.

Last edited by LoNaAleim (2022-06-28 12:14:43)

Offline

#6 2022-06-28 14:45:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,927

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

hmm that's weird, I thought all the ones that should get covered by iris got converted by now to use that as the default? Sounds like a mesa bug, processor is definitely new enough that it shouldn't even consider i965 by default.

Last edited by V1del (2022-06-28 14:47:28)

Online

#7 2022-06-28 15:33:11

seth
Member
Registered: 2012-09-03
Posts: 57,599

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

While irrelevant to wayland, is this w/ xf86-video-intel or the modesetting driver?

Offline

#8 2022-06-30 16:49:57

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

xf86-video-intel Is not installed, if that answers your question, seth.

Offline

#9 2022-06-30 16:56:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,927

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

Maybe up to selecting the wrong libva driver or so? What happens if you remove libva-intel-driver and only keep intel-media-driver ?

Online

#10 2022-06-30 18:22:11

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

I uninstalled libva-intel-driver and rebooted, but the behavior remains:

A ~ env | grep MESA
MESA_LOADER_DRIVER_OVERRIDE=iris
A ~ vlc
VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)
[000055e987ece640] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[000055e987ed01a0] main playlist: playlist is empty
A ~ unset MESA_LOADER_DRIVER_OVERRIDE
A ~ vlc
VLC media player 3.0.17.4 Vetinari (revision 3.0.13-8-g41878ff4f2)
[000055730bc07640] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
libGL error: MESA-LOADER: failed to open i965: /usr/lib/dri/i965_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: i965
libGL error: MESA-LOADER: failed to open i965: /usr/lib/dri/i965_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
libGL error: failed to load driver: i965
[000055730bc091a0] main playlist: playlist is empty
A ~ pacman -Qs intel
local/intel-gmmlib 22.1.3-1
    Intel Graphics Memory Management Library
local/intel-gpu-tools 1.26-1
    Tools for development and testing of the Intel DRM driver
local/intel-media-driver 22.4.3-1
    Intel Media Driver for VAAPI — Broadwell+ iGPUs
local/intel-ucode 20220510-1
    Microcode update files for Intel CPUs
local/libmfx 22.4.2-1
    Intel Media SDK dispatcher library
local/libva-utils 2.14.0-1
    Intel VA-API Media Applications and Scripts for libva
local/tbb 2021.5.0-1
    High level abstract threading library
local/vulkan-intel 22.1.2-1
    Intel's Vulkan mesa driver

Offline

#11 2022-06-30 19:43:46

seth
Member
Registered: 2012-09-03
Posts: 57,599

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

strace glxinfo -B |& grep open

- maybe we'll see some interesting config file - obviously ~/.drirc could be interesting (no idea whether you can select the driver there)

Offline

#12 2022-06-30 21:19:39

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

Got me!

 strace glxinfo -B |& grep open 

produced nothing.

But ~/.drirc contained:

<driconf>
  <device driver="loader" kernel_driver="i915">
    <option name="dri_driver" value="i965" />
  </device>
</driconf>

The moment I saw it, I remembered creating it... half a year ago.

So V1del's intuition was right, I set it somewhere and forgot about it.

Thanks guys! Closing!

Offline

#13 2022-06-30 21:52:23

seth
Member
Registered: 2012-09-03
Posts: 57,599

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

Great, but ftr

strace glxinfo -B |& grep open produced nothing.

isn't possible - unless

type strace

Offline

#14 2022-07-01 08:08:50

LoNaAleim
Member
Registered: 2020-05-20
Posts: 29

Re: [SOLVED] GNOME Shell: Abnormal CPU usage on mouse input.

Indeed I had somehow removed strace from my system without noticing.
Probably by accident when doing some housekeeping after switching DEs.

Cheers!

Last edited by LoNaAleim (2022-07-01 08:09:07)

Offline

Board footer

Powered by FluxBB