Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
high CPU load from X with intel graphics
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jyoung
Apprentice
Apprentice


Joined: 20 Mar 2007
Posts: 225

PostPosted: Mon Dec 02, 2019 6:26 pm    Post subject: high CPU load from X with intel graphics Reply with quote

Hi Folks,

I'm running XFCE on a machine with intel graphics, and I'm getting a fairly high cpu load on X, usually 15-20%. I also sometimes get a high cpu load from xfwm4, which XFCE forums suggest is an issue with the graphics driver.

I've been working from this wiki

wiki.gentoo.org/wiki/Intel

But no luck so far. Any thoughts?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44193
Location: 56N 3W

PostPosted: Mon Dec 02, 2019 6:42 pm    Post subject: Reply with quote

jyoung,

Please post your
Code:
lspci -nnk
so thot we can see your hardware.

Put your /var/log/Xorg.0.log onto a pastebin site, so we can see what Xorg does when it starts.
Put your dmesg output onto a pastebin, so we can check for missing firmware, among other things.

Lastly, you kernel .config on a pastebin would be good in case you need to change it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jyoung
Apprentice
Apprentice


Joined: 20 Mar 2007
Posts: 225

PostPosted: Mon Dec 02, 2019 7:07 pm    Post subject: Reply with quote

I've posted those items. The one weird thing I'm seeing is in Xorg.0.log, an error which is repeated too many times for pastebin which says

Code:

[    76.313] (EE) modeset(0): Failed to get GBM bo for flip to new front.
[    76.313] (EE) modeset(0): present flip failed


dmesg output
www.pastebin.com/U8kBtAiQ


/var/log/Xorg.0.log
www.pastebin.com/CDBLNS4i

lspci -nnk
www.pastebin.com/br6SZNTv

/usr/src/linux/.config
www.pastebin.com/KiwEwZDj
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1728
Location: Frankfurt, Germany

PostPosted: Mon Dec 02, 2019 8:09 pm    Post subject: Reply with quote

The lines below in dmesg look suspicious:
Code:
[    1.013449] i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_04.bin failed with error -2
[    1.013452] i915 0000:00:02.0: Failed to load DMC firmware i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
[    1.014181] [drm] Reducing the compressed framebuffer size. This may lead to less power savings than a non-reduced-size. Try to increase stolen memory size if available in BIOS.
Back to top
View user's profile Send private message
*_-=Banana=-_*
Apprentice
Apprentice


Joined: 21 May 2004
Posts: 207
Location: Germany

PostPosted: Mon Dec 02, 2019 8:18 pm    Post subject: Reply with quote

have a look here: https://wiki.gentoo.org/wiki/Intel#Firmware
There is a section which show an error like the one in the dmesg about the failed bin to load
_________________
My personal space
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44193
Location: 56N 3W

PostPosted: Mon Dec 02, 2019 8:36 pm    Post subject: Reply with quote

jyoung,

This is your system mounting root read only. That's fine. Its the timestamp that is of interest.
Code:
[    4.548500] EXT2-fs (sda7): error: couldn't mount because of unsupported optional features (2c0)
[    4.552710] EXT4-fs (sda7): mounted filesystem with ordered data mode. Opts: (null)


Earlier it tries to load firmware.
Code:
[    1.013449] i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_04.bin failed with error -2
[    1.013452] i915 0000:00:02.0: Failed to load DMC firmware i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.

As that firmware load is before root is mounted it fails unless its built into the kernel. More on that later.

It appears that you don't have the WiFi regulatory datbase installed.
Code:
[    8.897658] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    8.897660] cfg80211: failed to load regulatory.db

as that is after root is mounted, it suggests that you don't have linux-firmware installed.

You are using i915drmfb for your console driver.
Code:
[    1.105752] Console: switching to colour frame buffer device 320x90
[    1.123740] i915 0000:00:02.0: fb0: i915drmfb frame buffer device

Thats good. It suggests that your kernel is correct in the drm department.
Firmware is not required for that.

Xorg goes straight to the modeset video driver. The log is missing the list of preferred drivers that the auto detect produces.
The intel driver is normally top of the list with modeset second.
modeset relies on
Code:
[    73.573] (**) modeset(0): Option "AccelMethod" "glamor"
for any acceleration.
That Option keyword says its in a configuration file somewhere.

This Red Hat Bug suggests using
Code:
Option "PageFlip" off
but that will be ugly.
Normally, Xorg draws in one pixel buffer while another is being read to to the display. A "PageFlip" occurs in the blank time between frames.
The buffers are swapped then so there are no visual artefacts.
WIth PageFlip off, Xorg draws in the buffer on display. You will see 'tearing'.

lspci looks mostly harmless.
Code:
00:14.2 Signal processing controller [1180]: Intel Corporation 200 Series PCH Thermal Subsystem [8086:a2b1]
    Subsystem: Dell 200 Series PCH Thermal Subsystem [1028:07a3]
00:16.0 Communication controller [0780]: Intel Corporation 200 Series PCH CSME HECI #1 [8086:a2ba]
    Subsystem: Dell 200 Series PCH CSME HECI [1028:07a3]
These devices should have kernel drivers.

Looking at your kernel, the path names of built in firmware go in
Code:
CONFIG_EXTRA_FIRMWARE=""

When you edit that field with make menuconfig, a new entry will become visible.
Its all on the Wiki
You will need linux-firmware to provide the firmware before you build it into the kernel.

Code:
# CONFIG_INTEL_PCH_THERMAL is not set
is needed for
Code:
00:14.2 Signal processing controller [1180]: Intel Corporation 200 Series PCH Thermal Subsystem [8086:a2b1]

I can't find the other kernel option.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jyoung
Apprentice
Apprentice


Joined: 20 Mar 2007
Posts: 225

PostPosted: Mon Dec 02, 2019 9:54 pm    Post subject: Reply with quote

linux-firmware was installed a while ago, but I'd missed the firmware lines .config

Code:
CONFIG_EXTRA_FIRMWARE="i915/skl_dmc_ver1_27.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"


And intel thermal:

Code:
CONFIG_INTEL_PCH_THERMAL=y


But I'm still getting some issues with loading the firmware:
Code:
[    1.013182] i915 0000:00:02.0: Direct firmware load for i915/kbl_dmc_ver1_04.bin failed with error -2
[    1.013185] i915 0000:00:02.0: Failed to load DMC firmware i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.


And the cpu load from X is still very high.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44193
Location: 56N 3W

PostPosted: Mon Dec 02, 2019 10:14 pm    Post subject: Reply with quote

jyoung,

Code:
i915/kbl_dmc_ver1_04.bin
is in my /lib/firmware.
Its missing from your kernel
Code:
CONFIG_EXTRA_FIRMWARE="i915/skl_dmc_ver1_27.bin"
list.
CONFIG_EXTRA_FIRMWARE is a space separated list of files to include in the kernel relative to CONFIG_EXTRA_FIRMWARE_DIR=
The driver is still looking for i915/kbl_dmc_ver1_04.bin, it won't use i915/skl_dmc_ver1_27.bin.

You can try the intel driver if you wish.
modeset has no hardware acceleration.

The kernel Option I couldn't find is
Code:
CONFIG_INTEL_MEI_ME
Thats the out of band remote management interface on your chipset.
Its best left off unless you know you need it. Its a corporate thing with security holes.

You also need CONFIG_I2C_I801 for your
Code:
00:1f.4 SMBus [0c05]: Intel Corporation 200 Series/Z370 Chipset Family SMBus Controller [8086:a2a3]

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jyoung
Apprentice
Apprentice


Joined: 20 Mar 2007
Posts: 225

PostPosted: Mon Dec 02, 2019 11:01 pm    Post subject: Reply with quote

I'm unclear on what the different files in /lib/firmware/i915 mean. The intel graphics wiki suggests the skl files, but you're using the kbl files?

The intel driver does seem like a good choice. I initially moved away from it because the intel graphics wiki said that it has been slowly deprecating, but I think I want the hardware acceleration. It would just a change to the configuration in xorg.config.d, yes?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44193
Location: 56N 3W

PostPosted: Mon Dec 02, 2019 11:13 pm    Post subject: Reply with quote

jyoung,

The driver works out the files it needs and tries to load them.
When they are missing it complains in dmesg with the file name that failed to load.
I'm just copying file names from your dmesg.

There is a downside. It may want several files but it will only tell you about one at a time per driver.

Quote:
It would just a change to the configuration in xorg.config.d

If you already have intel in your VIDEO_CARDS, then yes.

If support for the driver is not installed, you need to add it. The kernel supports both as is.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jyoung
Apprentice
Apprentice


Joined: 20 Mar 2007
Posts: 225

PostPosted: Tue Dec 03, 2019 4:09 am    Post subject: Reply with quote

I'm still getting a high load on X.

I have
Code:
VIDEO_CARDS="intel i965"


The dmesg output has changed, but still producing a firmware error:
Code:
dmesg | grep firmware
[    0.135774] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    1.013599] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[    8.431110] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2


My xorg.conf.d/20-intel.conf file is the same as the wiki:
Code:
Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    Option      "AccelMethod"    "sna"
EndSection
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1728
Location: Frankfurt, Germany

PostPosted: Tue Dec 03, 2019 4:23 am    Post subject: Reply with quote

Quote:
Code:
[    1.013599] [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)

That's much better !

Quote:
Code:
[    8.431110] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2

That's probably your wifi driver, not your graphics driver. :-)

Quote:
My xorg.conf.d/20-intel.conf file is the same as the wiki:
Code:
Section "Device"
    Identifier  "Intel Graphics"
    Driver      "intel"
    Option      "AccelMethod"    "sna"
EndSection

You may want to switch to the modesetting driver, which is now the default driver on newer Intel graphics chipsets for Gentoo:
Code:
Section "Device"
    Identifier  "Intel Graphics"
    Driver      "modesetting"
    Option      "AccelMethod"    "glamor"
    Option      "DRI"            "3"
EndSection

Please look at: https://wiki.gentoo.org/wiki/Intel#Modesetting_DDX. Don't forget to enable USE flag 'glamor' (as shown in the Wiki article) and to run 'emerge --ask --changed-use --deep @world' after you enabled the USE flag 'glamor'.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44193
Location: 56N 3W

PostPosted: Tue Dec 03, 2019 11:42 am    Post subject: Reply with quote

mike155,

modesetting and glamour is where we came from. I didn't check DDX though.

Code:
[    8.431110] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
is indeed wifi related.
However, 8.431110 seconds is well after root is mounted and linux-firmware is installed which provides regulatory.db and regulatory.db.p7s so I don't understand why that doesn't load.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jyoung
Apprentice
Apprentice


Joined: 20 Mar 2007
Posts: 225

PostPosted: Tue Dec 03, 2019 4:50 pm    Post subject: Reply with quote

As an experiment, I just now tried swapping the intel configuration file in xorg.conf.d for the modesetting file (both copied from the wiki). It seemed worth trying again since some of the firmware issues are resolved. But, the load from X seems to be about the same, around 15-20%. Just to confirm, that's kind of high, right? I'm just running a web browser and a terminal. It does get down into the few percent when I'm not doing anything, but when I move the mouse around it spikes.
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1728
Location: Frankfurt, Germany

PostPosted: Tue Dec 03, 2019 5:28 pm    Post subject: Reply with quote

I have a machine with an Intel Ivy Bridge CPU (4 cores) and on chip GPU. I use the Intel modesetting driver.

Below is what I see. I started Firefox, LibreOffice and a terminal window. 'top' is running in the terminal window.
  • When I do nothing, top reports a 'load average' between 0.05 and 0.1 and 99.9% 'CPU idle'.

  • When I start to move the mouse around over the LibreOffice window, the 'load average' increases to 0.2, 'CPU idle' goes down to 98% and I see that the 'soffice.bin' process consumes 5% CPU.

  • When I start to move the mouse around over the Firefox window, the 'load average' increases to 0.2, 'CPU idle' goes down to 98% and I see that the 'firefox' process consumes 10% CPU.
Everything is alright if you get a similar result. :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44193
Location: 56N 3W

PostPosted: Tue Dec 03, 2019 5:46 pm    Post subject: Reply with quote

jyoung,

Install x11-apps/mesa-progs if you don't have it.
That provides glxgears which is pretty to look at but not much use for anything else.
It also provides glxinfo, which will tell about your direct renderering, that might me very interesting.

What does
Code:
glxinfo | head -n10
tell?
We mostly care about
Code:
direct rendering: Yes


If yours says No there, are you a member of the video group?
You normal user needs access to the files in /dev/dri/

Without that, you get indirect rendering which is very slow.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jyoung
Apprentice
Apprentice


Joined: 20 Mar 2007
Posts: 225

PostPosted: Tue Dec 03, 2019 11:31 pm    Post subject: Reply with quote

No clues on those two threads. The normal user is in video, and
Code:
glxinfo | head -n10


returns

Code:

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_no_error,
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness,
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample,
    GLX_EXT_create_context_es2_profile, GLX_EXT_create_context_es_profile,


When I did this test, I was running (or trying to run) the modesetting driver.
Back to top
View user's profile Send private message
jyoung
Apprentice
Apprentice


Joined: 20 Mar 2007
Posts: 225

PostPosted: Fri Dec 06, 2019 7:47 pm    Post subject: Reply with quote

I just rebooted with the intel configuration file in xorg.conf.d, and the results were about the same. What's the best way to get more information from/about the driver in use, or from X?

Code:
grep EE /var/log/Xorg.0.log
doesn't return anything
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum