Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] X always at 100% cPU
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
feiticeir0
Apprentice
Apprentice


Joined: 13 Jul 2005
Posts: 287
Location: Castelo Branco, Portugal

PostPosted: Sun Jan 19, 2020 11:04 am    Post subject: [SOLVED] X always at 100% cPU Reply with quote

Hello all.
I'm having a problem that, my X is always at 100% CPU utilization and the load average is always high .
This slows down my system, and I don't know what could it be...

Here's a screenshot of top:
https://i.imgur.com/Dta0Ck5.png


And my emerge --info
Code:
nightcrawler ~ # emerge --info
Unavailable repository 'raiagent' referenced by masters entry in '/var/lib/layman/waebbl/metadata/layout.conf'
Portage 2.3.79 (python 3.6.9-final-0, default/linux/amd64/17.1/desktop, gcc-9.2.0, glibc-2.29-r7, 4.19.86-gentoo x86_64)
=================================================================
System uname: Linux-4.19.86-gentoo-x86_64-Intel-R-_Core-TM-_i7-3610QM_CPU_@_2.30GHz-with-gentoo-2.6
KiB Mem:    12177052 total,   7668620 free
KiB Swap:    6291452 total,   6291452 free
Timestamp of repository gentoo: Sat, 18 Jan 2020 15:30:01 +0000
Head commit of repository gentoo: 7bcff1e2634f9774186dae797302c58df8a35443
Head commit of repository sk-overlay: 1181a39d7c3f56c3dbb21454767b3f0517d813f3

sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.9::gentoo
dev-util/cmake:           3.14.6::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.42.1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:

localrepo
    location: /var/db/repos/localrepo
    masters: gentoo

sk-overlay
    location: /usr/local/overlay/sk-overlay
    sync-type: git
    sync-uri: https://c.darenet.org/scriptkitties/overlay.git
    masters: gentoo

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

dotnet
    location: /var/lib/layman/dotnet
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/dotnet.git
    masters: gentoo
    priority: 50

jorgicio
    location: /var/lib/layman/jorgicio
    sync-type: laymansync
    sync-uri: https://github.com/jorgicio/jorgicio-gentoo.git
    masters: gentoo
    priority: 50

sabayon-distro
    location: /var/lib/layman/sabayon-distro
    sync-type: laymansync
    sync-uri: git://github.com/Sabayon/sabayon-distro.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

waebbl
    location: /var/lib/layman/waebbl
    sync-type: laymansync
    sync-uri: https://github.com/waebbl/waebbl-gentoo.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=ivybridge"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=ivybridge"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=ivybridge"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=ivybridge"
GENTOO_MIRRORS="https://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/ http://ftp.rnl.tecnico.ulisboa.pt/pub/gentoo/gentoo-distfiles/ http://ftp.dei.uc.pt/pub/linux/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi aes alsa amd64 apm avx bash-completion berkdb bluetooth branding bzip2 cairo cdda cdparanoia cdr cli consolekit crypt cups cxx dbus dri dri3 dts dvd dvdr emboss encode exif f16c fbcon ffmpeg flac fortran fuse gd gdbm gif gmp gpm gtk gtk3 iconv icu imagemagick inotify ipv6 jpeg lame lcms ldap libnotify libtirpc lm_sensors lzma lzo mad matroska mmx mmxext mng mp3 mp4 mpeg mplayer mtp multilib ncurses networkmanager nls nptl nsplugin offensive ogg opengl openmp pam pango pclmul pcre pdf php png policykit popcnt ppds pulseaudio python readline samba sdl seccomp smp sound spell split-usr sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg syslog tcpd threads tiff truetype udev udisks unicode upnp upnp-av upower usb vaapi vdpau vim-syntax vorbis wifi wxwidgets x264 xattr xcb xcomposite xine xinerama xml xscreensaver xv xvid zip zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput synaptics" KERNEL="linux" L10N="en-US pt-PT" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel i965 nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


what could it be ?

Thank you
_________________
Do It With Rhythm


Last edited by feiticeir0 on Mon Jan 20, 2020 9:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jan 19, 2020 11:34 am    Post subject: Reply with quote

feiticeir0,

Please put /var/log/Xorg.0.log onto a pastebin site. That will tell us what Xorg did at startup.

What does
Code:
glxinfo | head -n6
tell ?
_________________
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
feiticeir0
Apprentice
Apprentice


Joined: 13 Jul 2005
Posts: 287
Location: Castelo Branco, Portugal

PostPosted: Sun Jan 19, 2020 2:17 pm    Post subject: Reply with quote

Hi !
Thank you for the reply

Here's glxinfo:
Code:

glxinfo | head -n6
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:


and Xorg.0.log pastbin:

https://pastebin.com/ZyXUxUZJ
_________________
Do It With Rhythm
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jan 19, 2020 5:40 pm    Post subject: Reply with quote

feiticeir0,

From your log, you have two GPUs.
Code:
[    14.109] (--) PCI:*(0@0:2:0) 8086:0166: ...
[    14.109] (--) PCI: (1@0:0:0) 10de:0de9 ...
Thats an Intel and nVidia.

That means you may have an Optimus graphics system.

Xorg went through the auto GPU detection ..
Code:
[    14.130] (==) Matched intel as autoconfigured driver 0
[    14.130] (==) Matched modesetting as autoconfigured driver 1
[    14.130] (==) Matched fbdev as autoconfigured driver 2
[    14.130] (==) Matched vesa as autoconfigured driver 3

but it didn't offer nouveau for your nVidia graphics.

The log does on to show the modesetting driver in use as
Code:
[    14.130] (II) LoadModule: "intel"
[    14.130] (WW) Warning, couldn't open module intel
[    14.130] (EE) Failed to load module "intel" (module does not exist, 0)
the best driver for your Inter chip set is not installed.

If you have an Optimus graphics system, the Intel part of the setup is correct. You must use the modesetting driver.
What happens next depends on if you have Optimus graphics and what you want to with the nVidia card, if anything.

modesetting may struggle with two 1920x1080 displays as you have.
_________________
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
feiticeir0
Apprentice
Apprentice


Joined: 13 Jul 2005
Posts: 287
Location: Castelo Branco, Portugal

PostPosted: Sun Jan 19, 2020 6:47 pm    Post subject: Reply with quote

Thank you for the reply.

I do have 2 GPUs - Nvidia and Intel HD4000 .

I have bumblebee installed and I followed the wiki to install and configure it.
This only started to happen in a last update of my computer - a couple of weeks ago.

I use the nvidia driver for the occasional gaming. My nvidia card is old - GT230M - So, i only have nvidia until de 390 version. Above versions don't support my card.
From what you've shown me , it's a problem with the intel driver ? I could see if in a emerge clean it got removed...

So, what are my options here ?
_________________
Do It With Rhythm
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2650
Location: Canada

PostPosted: Sun Jan 19, 2020 7:34 pm    Post subject: Reply with quote

feiticeir0 wrote:
Thank you for the reply.

I do have 2 GPUs - Nvidia and Intel HD4000 .

I have bumblebee installed and I followed the wiki to install and configure it.
This only started to happen in a last update of my computer - a couple of weeks ago.

I use the nvidia driver for the occasional gaming. My nvidia card is old - GT230M - So, i only have nvidia until de 390 version. Above versions don't support my card.
From what you've shown me , it's a problem with the intel driver ? I could see if in a emerge clean it got removed...

So, what are my options here ?



You can try to see if intel driver works better than modesetting in your case. See that VIDEO_CARDS in make.conf has 'intel' and does not have i965.
But in my case both intel driver and modesetting one works fine, including with external 1920x1080 monitor (though via HDMI, not VGA). I ended up using modesetting,
since it gave slightly faster return from hybernation (at least according to my perception). But I don't have dual GPU

Nvidia - well, I have to stick to 340 series on my machines :)
Back to top
View user's profile Send private message
grumblebear
Apprentice
Apprentice


Joined: 26 Feb 2008
Posts: 169

PostPosted: Sun Jan 19, 2020 8:19 pm    Post subject: Reply with quote

Most likely that is no driver issue, but one of your applications. Try to disable the rss-glx screensaver. This is what seems so be the cause by looking at your top output.
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2650
Location: Canada

PostPosted: Sun Jan 19, 2020 11:26 pm    Post subject: Reply with quote

grumblebear wrote:
Most likely that is no driver issue, but one of your applications. Try to disable the rss-glx screensaver. This is what seems so be the cause by looking at your top output.


Oh ! Screensavers are notorious for that
Back to top
View user's profile Send private message
feiticeir0
Apprentice
Apprentice


Joined: 13 Jul 2005
Posts: 287
Location: Castelo Branco, Portugal

PostPosted: Mon Jan 20, 2020 9:51 pm    Post subject: Reply with quote

Thank you all for the responses.
I just found out the culprit. It may sound crazy, but I have a theme in XFCE that, every time i select that theme (it was the one I was using), the CPU increases to 100% with X... Having selected another theme, everything is ok, X decreases to 10% of CPU..
How is it possible ?

The responsible theme is Ultimate-Dark-(Flat)-Blue...

I'm going to mark this solved... Thank you
_________________
Do It With Rhythm
Back to top
View user's profile Send private message
0azza0
n00b
n00b


Joined: 16 Sep 2019
Posts: 15

PostPosted: Tue Jan 21, 2020 5:38 am    Post subject: Reply with quote

> How is it possible ?

lots of potential specifics about that .. if you run
Code:
perf top
(or other 'profiling' tools,) you can get an overview of what binary blobs are hogging the most resources and work backwards from there to the code that calls it.


there is a chance that adding a use-flag or maybe a library rebuild or upgrade can fix the theme.. looking at it via profiler is how you can be surgical about where to focus rebuild/upgrade efforts and how to know when to quit trying portage and start writing a patch .... or decide that it just isn't worth it. .. i just blank screen/my X is basically headless - for reasons like the one your having ;)
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 2650
Location: Canada

PostPosted: Tue Jan 21, 2020 6:38 pm    Post subject: Reply with quote

feiticeir0 wrote:
Thank you all for the responses.
I just found out the culprit. It may sound crazy, but I have a theme in XFCE that, every time i select that theme (it was the one I was using), the CPU increases to 100% with X... Having selected another theme, everything is ok, X decreases to 10% of CPU..
How is it possible ?

The responsible theme is Ultimate-Dark-(Flat)-Blue...

I'm going to mark this solved... Thank you



Even 10% is a bit high, if it is in idle state (no window movements, updates). On my machine with KDE/kwin, if
I run top in the terminal and touch nothing, X is using 0.7% CPU. If I move window, it goes up to 2.5-3%. kwin window manager takes
more.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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