How can I reduce the CPU usage of X/LightDM?

16,349

Solution 1

/usr/bin/X :0 -auth /var/run/lightdm/root/:0...

That isn't lightdm, but the X server which is essential to having a GUI on any Linux.

It shouldn't constantly use 12% of CPU, but CPU use should go up and down depending on the amount of "activity" that you are performing on your desktop.

To try the options suggested by @drake01's eHow Link, you must create a new file in /usr/share/X11/xorg.conf.d. For example:

  1. sudo nano /usr/share/X11/xorg.conf.d/99-mycputweaks.conf
  2. Insert:

    Section "Screen"
    Option "RenderAccel" "True"
    Option "DisableGLXRootClipping" "True"
    Option "DamageEvents" "True"
    Option "UseEvents" "True"
    EndSection
    
  3. Save, exit and reboot (or restart X from a virtual terminal).

You may also want to try Jupiter, a power-management applet designed specially for netbooks to try to improve your battery life. (available from PPA).

Solution 2

Old thread, I know, but I got a serious issue with high cpu usage coming from /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none that led to an unbearable desktop performance (on a desktop computer). No attempt to solve this was successful (new video driver, new kernel, xorg.conf edit,... even a fresh install)!

BUT: The reason for high cpu usage was that the PCI-network card and the video card used the same IRQ. There was a line in /var/log/syslog that said "Disabling IRQ #16". After checking /proc/interrupts I saw that both nvidia (video card) and eth0 (NIC) were on the same interrupt (in my case IRQ #16).

So, what I did was just to put my network card into another PCI-slot. Done.

This thread http://www.linuxquestions.org/questions/slackware-14/disabling-irq-16-a-879964/page3.html brought the solution.

I hope this helps someone!

Solution 3

X server has to run over the linux kernel to provide support for GUI i.e. for xfce in xubuntu, gnome in ubuntu, kde in kubuntu etc. So it has to run all the time while you have a gui running. I personally never faced the high X-server cpu usage on working machines, but a web search returns the link: http://www.ehow.com/how_7609862_reduce-cpu-usage-xorg.html See if it helps.

Share:
16,349

Related videos on Youtube

Sir Whiteout
Author by

Sir Whiteout

Physicist, martial artist, musician.

Updated on September 18, 2022

Comments

  • Sir Whiteout
    Sir Whiteout over 1 year

    Running Xubuntu 12.04 on a netbook (Lenovo S10), the lightdm process which runs in the background takes up constantly a precious 12% of the CPU. Besides, this consumes a considerable amount of energy, and the battery life already isn't that good.

    The process I am referring to is shown in htop as this command:

        /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none
    

    Why is this process necessary? Is there a way to reduce its processor usage?

  • Sir Whiteout
    Sir Whiteout almost 12 years
    Thanks for clearing the confusion; so this is not the lightdm process, but the X server itself. I followed the above link, but there is no file /etc/X11/xorg.conf on which to apply the changes. Is there an equivalent to this file in Xubuntu?
  • ImaginaryRobots
    ImaginaryRobots almost 12 years
    xubuntu and ubuntu no longer ship an xorg.conf file by default - everything is auto-configured. If you create one, it will be used and will override (replace?) the defaults.
  • thw24
    thw24 about 11 years
    Thanks for the advice, The Lord of Time. I hope it's better now.
  • Wilf
    Wilf over 9 years
    Note, those options to stop X from loading (on my box anyways) - what is each option supposed to do?
  • Munchies
    Munchies about 6 years
    this broke my X couldn't boot anymore. Linux Mint 18.3.