Xorg High CPU Usage

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
Ozymandias18
Level 1
Level 1
Posts: 2
Joined: Mon Jul 23, 2018 5:05 am

Xorg High CPU Usage

Post by Ozymandias18 » Sat Aug 25, 2018 2:05 pm

I dunno what happened. I also don't know what are the screenshots or text to send for diagnostic. I can post that later if you told me what to send because I don't have any clue what's going on with my laptop.
I have Samsung Series 9 with 4GB RAM and i7 cpu.
At random times, the CPU usage will rise and it will make the laptop laggy. When I check the System Monitor, I always see Xorg on the top eating up 80 - 100% of CPU.
I noticed that this will happen when I scroll down to fast, or if I watch a video on youtube, or clicking a button in Chrome, moving a window etc.
Although I can get the performance back after I log out and log in again, it is such a pain.
I hope you can help on this .Thank you.

User avatar
Tater
Level 1
Level 1
Posts: 21
Joined: Sun Sep 16, 2018 9:28 am
Location: PEBCAK

Re: Xorg High CPU Usage

Post by Tater » Mon Sep 24, 2018 8:35 am

I am afraid I don't have any answers for you, I found your post because I am trying to sort out 100% CPU usage on my Mint 18.1 install. One of my main culprits is xorg which is taking 33% to 60% of CPU. My browsers are eating up a lot, even in "safe mode". Simply scrolling will spike CPU usage to the max.

Did you install the new kernel that showed up in the updater? I'm getting suspicious that I need to learn how to revert updates. You post has been languishing for a month. Hopefully someone who knows linux better will help.
It isn't what I don't know that troubles me.

Currently brutalizing Linux Mint 18.1 18.3 Mate on a Dell Latitude D830 Intel Core 2 Duo T7250 / 2 GHz w/ 2 GB 4 GB Ram and 80 GB HDD

Authorized Molasses Functionality™ Dealer

User avatar
karlchen
Level 19
Level 19
Posts: 9336
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Xorg High CPU Usage

Post by karlchen » Mon Sep 24, 2018 9:00 am

Hello, Tater.

Please, open a terminal window. Execute the commandline

Code: Select all

inxi -Fxz
exactly as it has been typed here. Mark the complete screen output, which inxi displays. Paste it in your next reply, please. This will give us a concise overview of your system and should help get an idea, why Xorg causes extremely high CPU usage.

Best regards,
Karl
Image
Linux Mint 18.1 64-bit Cinnamon Desktop, Total Commander 9.21a 64-bit
Ubuntu 18.04.1 32-bit Mate Desktop, Total Commander 9.21a 32-bit
Windows? - 1 window in every room

Hoser Rob
Level 12
Level 12
Posts: 4214
Joined: Sat Dec 15, 2012 8:57 am

Re: Xorg High CPU Usage

Post by Hoser Rob » Mon Sep 24, 2018 9:23 am

Ozymandias18 wrote:
Sat Aug 25, 2018 2:05 pm
I dunno what happened. I also don't know what are the screenshots or text to send for diagnostic.....
viewtopic.php?f=17&t=83444

User avatar
Tater
Level 1
Level 1
Posts: 21
Joined: Sun Sep 16, 2018 9:28 am
Location: PEBCAK

Re: Xorg High CPU Usage

Post by Tater » Mon Sep 24, 2018 7:24 pm

karlchen wrote:
Mon Sep 24, 2018 9:00 am
Hello, Tater.

Please, open a terminal window. Execute the commandline

Code: Select all

inxi -Fxz
exactly as it has been typed here. Mark the complete screen output, which inxi displays. Paste it in your next reply, please. This will give us a concise overview of your system and should help get an idea, why Xorg causes extremely high CPU usage.

Best regards,
Karl
Karl, I have reverted back to kernel 4.4.0-54 from 4.4.0-135 which helped a little. There were other updates that I installed around the same time, I'm not sure which. I can now at least post from Linux. It is very laggy and slow. Xorg has been being greedy and so have any browsers I have tried to run. It seems any application I start immediately grabs 100% utilization.

Before I reverted back to the old kernel I was watching CPU utilization go from 75% of both cores with an idle web browser open then jump to 100% both cores when I rolled the scroll wheel two clicks... It was kind of entertaining in a morbid way.

It definitely has to be fixed. Here is the output:
System: Host: D830 Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: MATE 1.16.2 (Gtk 3.18.9-1ubuntu3.3)
Distro: Linux Mint 18.1 Serena
Machine: System: Dell (portable) product: Latitude D830
Mobo: Dell model: 0HN341 Bios: Dell v: A15 date: 01/04/2010
CPU: Dual core Intel Core2 Duo T7300 (-MCP-) cache: 4096 KB
flags: (lm nx sse sse2 sse3 ssse3 vmx) bmips: 7977
clock speeds: max: 2001 MHz 1: 800 MHz 2: 800 MHz
Graphics: Card: Intel Mobile GM965/GL960 Integrated Graphics Controller (primary)
bus-ID: 00:02.0
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
Resolution: 1680x1050@60.00hz, 1920x1080@60.00hz
GLX Renderer: Mesa DRI Intel 965GM
GLX Version: 2.1 Mesa 11.2.0 Direct Rendering: Yes
Audio: Card-1 Intel 82801H (ICH8 Family) HD Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture v: k4.4.0-53-generic
Network: Card-1: Broadcom NetXtreme BCM5755M Gigabit Ethernet PCI Express
driver: tg3 v: 3.137 bus-ID: 09:00.0
IF: enp9s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Card-2: Intel PRO/Wireless 3945ABG [Golan] Network Connection
driver: iwl3945 v: in-tree:s bus-ID: 0c:00.0
IF: wlp12s0 state: up mac: <filter>
Drives: HDD Total Size: 80.0GB (14.7% used)
ID-1: /dev/sda model: ST980813AS size: 80.0GB
Partition: ID-1: / size: 72G used: 9.1G (14%) fs: ext4 dev: /dev/sda1
ID-2: swap-1 size: 2.13GB used: 0.01GB (0%) fs: swap dev: /dev/sda5
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 57.0C mobo: N/A
Fan Speeds (in rpm): cpu: N/A
Info: Processes: 181 Uptime: 58 min Memory: 806.5/1990.7MB
Init: systemd runlevel: 5 Gcc sys: 5.4.0
Client: Shell (bash 4.3.481) inxi: 2.2.35
It isn't what I don't know that troubles me.

Currently brutalizing Linux Mint 18.1 18.3 Mate on a Dell Latitude D830 Intel Core 2 Duo T7250 / 2 GHz w/ 2 GB 4 GB Ram and 80 GB HDD

Authorized Molasses Functionality™ Dealer

User avatar
Tater
Level 1
Level 1
Posts: 21
Joined: Sun Sep 16, 2018 9:28 am
Location: PEBCAK

Re: Xorg High CPU Usage

Post by Tater » Tue Sep 25, 2018 5:32 am

This morning when I got up I decided to do an experiment. I booted the D830 and accessed a shared file on my windows box. I started a terminal running 'top'. I fired up Ashens and the Quest for the Gamechild in VLC. It played smoothly for about 5 minutes using about 60% of CPU. Around the 5 minute mark the CPU utilization shot up to around 120% for xplayer and the video stopped then jerkily started and the stopped, etc. I closed VLC.

I figured this would be a useful data point. Cold boot, only networking and a terminal running. Within 5 minutes of running full length film in a video player the CPU utilization goes high. Right now as I type this in Firefox with just two tabs to linuxmint.com open, CPU is 79% 'Web Content' and 30% 'firefox' and I'm just typing this.

I'm not sure how much CPU utilization is normal Xorg, but I can get it up over 50% just moving this browser window left and right twice. I can get it over 30% just scrolling up and down on this post. Edit to add: I just found I can get it over 50% by running my mouse in circles.

Another oddity that came to mind is that before the slowdown (Mind you I just installed Linux Mint for the first time a week and a half ago. We are not talking about a system that has been running stable for a long time.) I had noticed that memory usage was, to my mind, excessive. All 2 gb of physical memory was being reported as in use and about half of the virtual memory was being used. Now, with Molasses Functionality™, System Monitor shows the opposite. And it shows it eerily consistently. As in, I've seen wavier window glass. As in, I am not buying what it is selling.

I will have 4 gb of memory in my mailbox later today that I want to install, but I don't know whether that should wait until my other issues are resolved first.
It isn't what I don't know that troubles me.

Currently brutalizing Linux Mint 18.1 18.3 Mate on a Dell Latitude D830 Intel Core 2 Duo T7250 / 2 GHz w/ 2 GB 4 GB Ram and 80 GB HDD

Authorized Molasses Functionality™ Dealer

User avatar
Tater
Level 1
Level 1
Posts: 21
Joined: Sun Sep 16, 2018 9:28 am
Location: PEBCAK

Re: Xorg High CPU Usage

Post by Tater » Tue Sep 25, 2018 5:52 pm

Weeeelllllll. Remember that old chestnut from the olden days that "memory solves all problems"?

I received the 4 gb of RAM in my mail today. I was frustrated and thinking that I was going to uninstall every program I had installed since I started and then, if that didn't work, nuke the OS and reinstall it. So installing the RAM and seeing what would happen seemed pretty tame.

I installed the RAM and ran the BIOS diagnostics on it. Then I booted the Laptop. I then opened Firefox and 'top' in a terminal. CPU usage was reasonable and there were no lags. The memory shows in 'top' and showed it is only using about 1 gb. I loaded up a long video on Youtube and had no heavy CPU usage and no problems playing. I then loaded up Ashens in VLC, since that is now my test video, and it is running right now as I type this and cut and paste this:
Tasks: 201 total, 3 running, 198 sleeping, 0 stopped, 0 zombie
%Cpu(s): 36.1 us, 2.5 sy, 0.0 ni, 47.5 id, 13.7 wa, 0.0 hi, 0.2 si, 0.0 st
KiB Mem : 4036800 total, 1535984 free, 886448 used, 1614368 buff/cache
KiB Swap: 2084860 total, 2084860 free, 0 used. 2650660 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3851 D830 20 0 1883952 200768 65240 R 56.8 5.0 10:48.30 xplayer
1480 root 20 0 345436 58676 21264 S 7.3 1.5 3:08.93 Xorg
4122 D830 20 0 1189588 142876 68124 S 3.0 3.5 0:17.10 vivaldi-bin
4268 D830 20 0 1184980 144160 73672 S 3.0 3.6 0:24.15 vivaldi-bin
1883 D830 20 0 466012 27672 21992 S 1.7 0.7 0:17.85 marco
2338 D830 20 0 569900 36720 28356 R 1.7 0.9 0:05.59 mate-termi+
1982 D830 9 -11 574596 13556 10364 S 1.0 0.3 0:37.59 pulseaudio
1960 D830 20 0 516000 25864 21224 S 0.7 0.6 0:02.55 wnck-applet
3954 D830 20 0 1053044 169252 108272 S 0.7 4.2 0:18.26 vivaldi-bin
4088 D830 20 0 883540 149196 53400 S 0.7 3.7 0:12.37 vivaldi-bin
1824 D830 20 0 1162600 24284 20040 S 0.3 0.6 0:01.39 mate-setti+
1954 D830 20 0 1212188 58084 32860 S 0.3 1.4 0:03.88 caja
2359 D830 20 0 41936 3788 3136 R 0.3 0.1 0:07.19 top
3947 root 20 0 0 0 0 S 0.3 0.0 0:00.86 kworker/0:0
1 root 20 0 119736 6008 4116 S 0.0 0.1 0:02.07 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.14 ksoftirqd/0


all without lag. What I don't understand is why. The memory usage did not seem to indicate any swap file use by the system. Where was the need for all the CPU utilization coming from? Why was the system not managing the memory efficiently? Before the memory upgrade Vivaldi would be using 60 to 150 % of the CPU all by itself. The movie would not be playing, because it was using 120% after the first few minutes?

So, "memory solves all problems". But what if the limit on this laptop had been 2 gb not 4 gb? Or the new 4 gb of memory hadn't been just $26? I'm very curious as to what it is with Linux Mint Mate that it couldn't deal with 'only' 2 gb of ram. Something is broken with either my install, or the distro, if the system couldn't manage itself well enough to actually work as a PC on 2 gb of RAM.

But to the future reader of this thread: Memory solves all problems. And if you can't add memory... Maybe someone can chime in and make a suggestion. But I'm thinking a lighter weight distro. But I also found posts saying Linux Mint will run on half a gig of RAM...
It isn't what I don't know that troubles me.

Currently brutalizing Linux Mint 18.1 18.3 Mate on a Dell Latitude D830 Intel Core 2 Duo T7250 / 2 GHz w/ 2 GB 4 GB Ram and 80 GB HDD

Authorized Molasses Functionality™ Dealer

Post Reply

Return to “Hardware Support”