You are not logged in.

#1 2017-04-19 21:22:21

jackjackk
Member
Registered: 2010-07-21
Posts: 39

gnome-shell CPU usage raises to 40% when moving a window

Dear all,
I've installed Gnome w/ Wayland as suggested in the wiki. Everything is up to date. I open a gnome-terminal w/ top sorting by cpu usage (">" then "<"). I keep the gnome-terminal "on top". I move any window in the background. I get the gnome-shell process to raise to >40% of cpu usage. I have an 4+ years old laptop, and this might become inconvenient.
Is this acknowledged by others in the forum? Does anybody know why it happens? Does anybody know of any workaround solution? I've only found spotty information which couldn't help me much so far.

Thanks,

Giacomo

Offline

#2 2017-04-20 07:04:08

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,366

Re: gnome-shell CPU usage raises to 40% when moving a window

I would say you have a problem with hardware acceleration (particularly 2D acceleration) but you should give much more information about your graphic card, drivers used, etc... Is the hardware acceleration working? What's the output of glxinfo (particularly glxinfo | grep -i render). Note that Wayland is not yet very mature AFIAK. I would try Gnome on Xorg in case of problems. 2D acceleration should run reliably on Xorg.

Last edited by olive (2017-04-20 07:04:56)

Offline

#3 2017-04-20 14:11:51

jackjackk
Member
Registered: 2010-07-21
Posts: 39

Re: gnome-shell CPU usage raises to 40% when moving a window

Thanks olive. You're right. Here's some more information.
lspci

00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Zenbook Prime UX31A [1043:1517]
	Flags: bus master, fast devsel, latency 0, IRQ 31
	Memory at f7800000 (64-bit, non-prefetchable) [size=4M]
	Memory at e0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at f000 [size=64]
	[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [a4] PCI Advanced Features
	Kernel driver in use: i915
	Kernel modules: i915

glxinfo

[...]
direct rendering: Yes
[...]
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile 
OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.0.3
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
    GL_3DFX_texture_compression_FXT1, GL_AMD_conservative_depth, 
[...]
OpenGL version string: 3.0 Mesa 17.0.3
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
    GL_3DFX_texture_compression_FXT1, GL_AMD_conservative_depth, 
[...]
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
    GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, 
[...]

so it looks like I should have 2D acceleration on.

Regarding wayland and xorg, what would be the best way to switch from wayland to xorg and try it out?
Thanks,
Giacomo

Offline

#4 2017-04-20 15:20:12

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,366

Re: gnome-shell CPU usage raises to 40% when moving a window

so it looks like I should have 2D acceleration on.

Regarding wayland and xorg, what would be the best way to switch from wayland to xorg and try it out?
Thanks,
Giacomo

You have 3D acceleration. Maybe there is a problem with 2D. I don't use Gnome, but the wiki has extensive information about this. Is this just not an option of the login manager? Normally you can choose your session, just choose Gnome on Xorg.

Last edited by olive (2017-04-20 15:20:42)

Offline

#5 2017-04-20 23:54:28

goumba
Member
From: New Jersey, USA
Registered: 2017-03-31
Posts: 16
Website

Re: gnome-shell CPU usage raises to 40% when moving a window

olive wrote:

Is this just not an option of the login manager? Normally you can choose your session, just choose Gnome on Xorg.

GNOME running under Wayland is listed simply as GNOME when choosing a session from the DM, for X it's "GNOME on XOrg".


FSF Associate Member #12876
"Yeah, well, you know, that's just, like, your opinion, man." - The Dude

Offline

#6 2017-04-21 03:46:38

jackjackk
Member
Registered: 2010-07-21
Posts: 39

Re: gnome-shell CPU usage raises to 40% when moving a window

Trying Xorg was easier than expected: just installed it and changed /etc/gdm/custom.conf as suggested in the wiki (btw the visual feeling is imperceptibly better than wayland, but perhaps it's just habit). The problem seems identical. So it seems not related to the choice of display server, but it narrows down to either the HW/driver, or Gnome/gnome-shell. Would you have any suggestions for other light valid (in 2017) desktop managers? I've been using just Gnome for too long and don't know anything about the current DM landscape.

Thanks,
Giacomo

Last edited by jackjackk (2017-04-21 03:47:47)

Offline

#7 2017-04-21 06:45:22

seth
Member
Registered: 2012-09-03
Posts: 5,030

Re: gnome-shell CPU usage raises to 40% when moving a window

You selected GDM for xorg, that doesn't imply you changed to gnome on xorg at all.
Check the output of "loginctl session-status" and goumba's comment...

Offline

#8 2017-04-21 07:03:21

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,366

Re: gnome-shell CPU usage raises to 40% when moving a window

jackjackk wrote:

Trying Xorg was easier than expected: just installed it and changed /etc/gdm/custom.conf as suggested in the wiki (btw the visual feeling is imperceptibly better than wayland, but perhaps it's just habit). The problem seems identical. So it seems not related to the choice of display server, but it narrows down to either the HW/driver, or Gnome/gnome-shell. Would you have any suggestions for other light valid (in 2017) desktop managers? I've been using just Gnome for too long and don't know anything about the current DM landscape.

Thanks,
Giacomo

Every advice for the Desktop risk at ending as a flamewar. I personally use XFCE. It is relatively lightweight and easily configurable. You can disable the compositor and effects if you like.The look is customizable: basically, you have one or more panel and you add the desired components on it. It is generally compatible with gnome libraries and applets but you need to know yourself what you want (network manager, etc...). You assemble yourself the desired components: this fit with the general idea of Archlinux.Also, the design remains stable: it is well maintained but does not evolve much. This can be seen as an advantage or an inconvenient.

But there are plenty (maybe too much) of other choices (see the wiki). Cinnamon and KDE will likely be as heavy as Gnome. Mate (a fork/continuation of Gnome 2) could also be a choice, but I don't know it. I think it is somewhat similar to Xfce.

Last edited by olive (2017-04-21 07:04:20)

Offline

#9 2017-04-21 17:52:20

jackjackk
Member
Registered: 2010-07-21
Posts: 39

Re: gnome-shell CPU usage raises to 40% when moving a window

Thanks seth and olive.
Indeed I checked with loginctl show-session that Type=x11, as well as that $XDG_SESSION_TYPE was set to x11 (plus that visual perception...). So apparently disabling Wayland in GDM triggers automatically a xorg session. Anyway, problem persists. Perhaps it's not a problem per se, it's just expensive to keep moving around a window. It sounds strange though, especially if I'm the only one experiencing it. Anyway, I'm trying xfce now. Cpu increases as I move windows around for the xorg process, but up to 18%, not 40%. so for the moment I'll keep this as a solution (although I already had to tamper around with xorg.conf to get tear-free scrolling). I wasn't looking to a flamewar at all, but as you recognize there are so many options, that my best choice process would have been a random choice, and so I welcomed any immediate personal experience instead. Indeed xfce is light, and might better fit this 4-years-old laptop. Still I don't know whether that 40% is normal or not.

Best,

Giacomo

Offline

#10 2017-04-23 01:13:19

marcio
Member
Registered: 2010-10-08
Posts: 34

Re: gnome-shell CPU usage raises to 40% when moving a window

Hi, im using gnome-shell 3.22 on wayland in a notebook samsungo ativ book 6, with a i5 3230m and when I do this test, gnome-shell process uses 11% of processor. Running at intel graphics.
I have a desktop with a RX 480 and gnome-shell seems less fluid on it. So some of this performance problemas may be releated with drivers.

Offline

#11 2017-04-23 03:54:08

jackjackk
Member
Registered: 2010-07-21
Posts: 39

Re: gnome-shell CPU usage raises to 40% when moving a window

Thanks marcio for your feedback. As you might be using an Intel card of the same generation as mine, does your system match my lspci above? are you using any specific options with the driver? it's a wild shot, but here are my (untouched) ones:

# systool -m i915 -av

Module = "i915"
[...]
  Parameters:
    alpha_support       = "0"
    disable_display     = "N"
    disable_power_well  = "1"
    edp_vswing          = "0"
    enable_cmd_parser   = "1"
    enable_dc           = "-1"
    enable_dp_mst       = "Y"
    enable_dpcd_backlight= "N"
    enable_execlists    = "0"
    enable_fbc          = "0"
    enable_guc_loading  = "0"
    enable_guc_submission= "0"
    enable_gvt          = "N"
    enable_hangcheck    = "Y"
    enable_ips          = "1"
    enable_ppgtt        = "1"
    enable_psr          = "0"
    enable_rc6          = "3"
    error_capture       = "Y"
    fastboot            = "N"
    force_reset_modeset_test= "N"
    guc_log_level       = "-1"
    inject_load_failure = "0"
    invert_brightness   = "0"
    load_detect_test    = "N"
    lvds_channel_mode   = "0"
    lvds_use_ssc        = "-1"
    mmio_debug          = "0"
    modeset             = "-1"
    nuclear_pageflip    = "N"
    panel_ignore_lid    = "1"
    prefault_disable    = "N"
    reset               = "Y"
    semaphores          = "1"
    use_mmio_flip       = "0"
    vbt_sdvo_panel_type = "-1"
    verbose_state_checks= "Y"
[...]

Also, could it be that the system is using your other (ati) graphics card for 2d acceleration?
Anyway, I couldn't find any procedure to reliably test 2d acceleration. It would help to have sth more programmatical to do benchmarks.

Offline

#12 2017-04-23 06:16:34

seth
Member
Registered: 2012-09-03
Posts: 5,030

Re: gnome-shell CPU usage raises to 40% when moving a window

although I already had to tamper around with xorg.conf to get tear-free scrolling

This will likely be far more related than the kernel module - notably if the driver causes double and busy waits for the vblank signal.

Offline

Board footer

Powered by FluxBB