Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Xorg process taking large amount of memory
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
shuri
n00b
n00b


Joined: 14 Dec 2018
Posts: 24
Location: Finland

PostPosted: Sat Jan 05, 2019 12:12 pm    Post subject: Xorg process taking large amount of memory Reply with quote

Had this for a while; shared memory usage slowly but surely keeps going up by the Xorg process and never gets freed.
Running KDE 5 with systemd and latest stable Xorg.

22h uptime:
Code:
> free -m
              total        used        free      shared  buff/cache   available
Mem:          15790        8019         116        5429        7654        2165
Swap:             0           0           0

After restarting X:
Code:
> free -m
              total        used        free      shared  buff/cache   available
Mem:          15790        6569        6906         150        2313        8895
Swap:             0           0           0

htop:
Code:
ID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command
  560 user     20   0 6516M 4858M 4830M S  0.0 30.8  0:01.29 /usr/libexec/Xorg -nolisten tcp :0 -auth /home/user/.Xauthority vt1
*snip*
  574 user     20   0 6516M 4858M 4830M S  1.0 30.8  4:16.18 /usr/libexec/Xorg -nolisten tcp :0 -auth /home/user/.Xauthority vt1
  559 user     20   0 6516M 4858M 4830M S 22.0 30.8  2h47:20 /usr/libexec/Xorg -nolisten tcp :0 -auth /home/user/.Xauthority
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


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

PostPosted: Sat Jan 05, 2019 12:50 pm    Post subject: Reply with quote

Which graphics chip do you have? Nvidia?
Back to top
View user's profile Send private message
shuri
n00b
n00b


Joined: 14 Dec 2018
Posts: 24
Location: Finland

PostPosted: Sat Jan 05, 2019 1:32 pm    Post subject: Reply with quote

mike155 wrote:
Which graphics chip do you have? Nvidia?

Intel HD Graphics (i915)
I have the x11-drivers/xf86-video-intel driver
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


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

PostPosted: Sun Jan 06, 2019 4:26 pm    Post subject: Reply with quote

It seems that your Xorg processes allocate 4.8 GB of RAM. I agree that this is too much. Xorg uses approx. 200MB on my machines.
  • Did you start any games or programs that use OpenGL and allocate lots of RAM for pixel buffers, etc?

  • You wrote that you use the x11-drivers/xf86-video-intel driver. That driver is a bit outdated and may have issues. Switch to the modesetting driver.

  • You may want to re-read https://wiki.gentoo.org/wiki/Intel and https://wiki.archlinux.org/index.php/intel_graphics. Check your configuration. Intel drivers improved a lot over the last years. Options and 'best pratice' recommendations changed considerabily.
If the hints above don't solve the problem, please post:
  • The output of 'emerge --info'
  • The kernel config (either '.config' or decompress /proc/config.gz and post that file)
  • /etc/X11/xorg.conf and all files in /etc/X11/xorg.conf.d/
  • The log file /var/log/Xorg.0.log
Please use wgetpaste to post large files like the kernel config or /var/log/Xorg.0.log.
Back to top
View user's profile Send private message
marko778
n00b
n00b


Joined: 17 Jan 2019
Posts: 2

PostPosted: Thu Jan 17, 2019 2:17 pm    Post subject: Reply with quote

I'm not going to start another post so I'll tag along,

Got almost the same problem. X over few hours starts using 70% of memory which is stupid.

I got 2 monitors, intel graphics (x11-drivers/xf86-video-intel - 1.99.917.), running last stable version of Xorg.

This is now a big problem since I'm using gentoo as my work OS and we have strict policy of software usage so I can not just go to another KDE or OS, reinsatlling gentoo is not an option for obvious reasons :lol:

Since this is my work station I can not post so many files so if nothing comes out of this I'll try to post the rest.

First time using this forum so sorry for wrong posting, and again sorry for tagging along :) [/code]

htop:
Code:
3908 root       20   0  9.5G 6438M 6430M S  0.0 81.5  0:00.00 │  │  ├─ /usr/bin/X -nolisten tcp -auth /var/run/sddm/{83f35887-322b-4382-a0a6-fa1f9907706e} -background none -noreset -displayfd 17 -seat seat0 vt7
      3907 root       20   0  9.5G 6438M 6430M S  0.0 81.5  0:00.00 │  │  ├─ /usr/bin/X -nolisten tcp -auth /var/run/sddm/{83f35887-322b-4382-a0a6-fa1f9907706e} -background none -noreset -displayfd 17 -seat seat0 vt7
      3906 root       20   0  9.5G 6438M 6430M S  0.0 81.5  0:00.00 │  │  ├─ /usr/bin/X -nolisten tcp -auth /var/run/sddm/{83f35887-322b-4382-a0a6-fa1f9907706e} -background none -noreset -displayfd 17 -seat seat0 vt


emerge --info

Code:
Portage 2.3.51 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-7.3.0, glibc-2.27-r6, 4.14.83-gentoo x86_64)
=================================================================
System uname: Linux-4.14.83-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.6
KiB Mem:     8090120 total,    141108 free
KiB Swap:   10617852 total,   7943420 free
Timestamp of repository gentoo: Thu, 17 Jan 2019 08:30:01 +0000
Head commit of repository gentoo: 7a30fbcfb96f4f850d552a9ec9b1029a9d37d006
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::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.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    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:

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=core2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/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"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US hr_HR"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
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 aalib acl activities alsa amd64 apache2 bluetooth branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative device-mapper dri dts dvd dvdr emboss encode esd exif extras fam fbcon ffmpeg flac fortran freetds gcrypt gd gif glamor gpm gtk iconv java javamail jpeg kde kerberos kipi kwallet lcms ldap libnotify libtirpc lua mad mng mp3 mp4 mpeg mssql multilib mysql ncurses nls nptl odbc ogg opengl openmp pam pango pcre pdf perl phonon php plasma png policykit postgres ppds python qemu qml qt5 readline sasl seccomp semantic-desktop spell sqlite ssh ssl startup-notification subversion svg tcpd tiff truetype tsl udev udisks unicode upower usb vde vhosts vorbis webkit widgets wxwidgets x264 xattr xcb xcomposite xinerama xml xmlprc xv xvid zlib" ABI_X86="64" 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="cgi cgid actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif slotmem_shm so 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 isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en_US hr_HR" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel i915" 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, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


xorg.conf
Code:
Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from data in "/etc/conf.d/gpm"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
EndSection


Section "Device"
    Identifier     "intel"
    Driver         "intel"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


Code:
/etc/X11/xorg.conf.d # ls -ltr
total 12
-rw-r--r-- 1 root root   27 Jan 16 16:56 20opengl.conf
-rw-r--r-- 1 root root 1099 Jan 17 11:18 10-evdev.conf
-rw-r--r-- 1 root root   74 Jan 17 14:54 intel.conf
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


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

PostPosted: Fri Jan 18, 2019 12:17 pm    Post subject: Reply with quote

Hi marko778,

welcome to the Gentoo forums!
  1. Your output of 'emerge --info' shows an Intel i7-2600 CPU. That's a Sandy Bridge CPU, isn't it? According to this article, VIDEO_CARDS should be "intel i965". Change VIDEO_CARDS in /etc/portage/make.conf and run
    Code:
    emerge --update --deep --newuse -av world

  2. The x11-drivers/xf86-video-intel driver is deprecated and may have issues. Switch to the modesetting driver. Look at this article, section 'Modesetting DDX'. Unmerge x11-drivers/xf86-video-intel.

  3. Not related to the problem you reported, but still recommended: you could migrate to libinput. After that, uninstall x11-drivers/xf86-input-evdev and remove all 'InputSection' entries from your xorg.conf.

Mike
Back to top
View user's profile Send private message
sao98021
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2012
Posts: 145
Location: Michigan

PostPosted: Fri Jan 18, 2019 5:40 pm    Post subject: Reply with quote

on my sandybridge (i72670qm) with videocards= intel i965 but without USE='glamor', xf86-video-intel not installed, what is installed is libva-intel-driver xorg is only using 1% of memory.

but i do not have 20-modesetting.conf because this is an optimus sytem (meaning i also have nvidia listed in cards, and that driver installed), and bumblebee uses dummy.conf instead, system is using mesa instead of glamor.

wondering if i should switch to glamor, and somehow getting bumblebee to work with 20-modesetting..

but i guess if its not broken why break it, because everything is still working as expected without xf86-video-intel, and without telling it to load something else, how is this working?

i don't really know lol, but nothing has changed with functionality on either the onboard, or dedicated graphics.. is it still using modesetting ddx even though i don't have any conf file in xorg.conf.d, nor the global glamor use flag,, so it'd just be using mesa instead? this shouldnt be the case because modesetting uses glamor for accel instead of mesa..

but then apparently its functioning as expected even though, no driver is being used.. 8O, and it doesn't use the nvidia driver or card until i tell it to,.

going to chuck it up to bumblebee magic.
Back to top
View user's profile Send private message
marko778
n00b
n00b


Joined: 17 Jan 2019
Posts: 2

PostPosted: Mon Jan 21, 2019 1:35 pm    Post subject: Reply with quote

mike155 wrote:
Hi marko778,

welcome to the Gentoo forums!
  1. Your output of 'emerge --info' shows an Intel i7-2600 CPU. That's a Sandy Bridge CPU, isn't it? According to this article, VIDEO_CARDS should be "intel i965". Change VIDEO_CARDS in /etc/portage/make.conf and run
    Code:
    emerge --update --deep --newuse -av world

  2. The x11-drivers/xf86-video-intel driver is deprecated and may have issues. Switch to the modesetting driver. Look at this article, section 'Modesetting DDX'. Unmerge x11-drivers/xf86-video-intel.

  3. Not related to the problem you reported, but still recommended: you could migrate to libinput. After that, uninstall x11-drivers/xf86-input-evdev and remove all 'InputSection' entries from your xorg.conf.

Mike


Thank you for your response. In make.conf is already writen what you stated about VIDEO_CARDS and these drivers are what was pulled from that.


I managed to solve the problem I had by changing intel.conf into 20-intel.conf in xorg.conf.d and placing
Code:
Section "Files"
        ModulePath "/usr/lib64/xorg/modules"
EndSection

in 20opengl.conf. which was empty prior.

I did this with mindset well the worst thing that could happen is gentoo restart which I was already close but it fixed the problem somehow.

This is now short output of htop for X
and it is stable and not going above 10% with tones of tabs and programs needed for coding and is decresing when something closes.
Code:
3893 root       20   0 1506M  364M  351M S  0.0  4.6  0:00.00 /usr/bin/X


I don't think I managed to actually fix the problem with this, but for now I'll take this state and save your recommendation after this fails (probably next emerge :lol: :lol: )
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