3

I have an Ubuntu 18.04 system using Gnome3. I had some problems with my NVIDIA drivers when upgrading from 17.04. After a few iterations of purging and installing nouvea and nvidia proprietary drivers, I finally managed to install the proprietary ones and then switch to using the builtin Intel graphics.

I now notice that I have two Xorg programs running, one owned by gdm and one by my user account, dannas.

$ ps aux | grep Xorg
gdm       1105  187  0.2 263204 35868 tty1     Rl+  07:26   8:49 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/128/gdm/Xauthority -background none -noreset -keeptty -verbose 3
dannas    1476  1.6  1.1 899048 182292 tty2    Sl+  07:26   0:04 /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3

The one owned by gdm consumes lots of cpu.

$ pidstat -p 1105 1 | head
Linux 4.15.0-23-generic (dannas--dell-xp-15)    06/20/2018  _x86_64_    (8 CPU)

07:29:02 AM   UID       PID    %usr %system  %guest   %wait    %CPU   CPU  Command
07:29:03 AM   128      1105   94.00  100.00    0.00    0.00  100.00     7  Xorg
07:29:04 AM   128      1105   99.00  100.00    0.00    0.00  100.00     7  Xorg
07:29:05 AM   128      1105   86.00  100.00    0.00    1.00  100.00     7  Xorg
07:29:06 AM   128      1105   99.00  100.00    0.00    0.00  100.00     7  Xorg
07:29:07 AM   128      1105   86.00  100.00    0.00    0.00  100.00     7  Xorg
07:29:08 AM   128      1105  100.00   99.00    0.00    0.00  100.00     1  Xorg
07:29:09 AM   128      1105   93.00  100.00    0.00    0.00  100.00     1  Xorg

It appears to be reading all zeroes from fd 16.

$ sudo  strace -ttt -p 1105 2>&1 | head
strace: Process 1105 attached
1529472961.641488 read(16, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 40) = 36
1529472961.641525 epoll_wait(4, [{EPOLLIN, {u32=445731056, u64=94777489051888}}], 256, -1) = 1
1529472961.641547 read(16, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 40) = 40
1529472961.641568 epoll_wait(4, [{EPOLLIN, {u32=445731056, u64=94777489051888}}], 256, -1) = 1
1529472961.641588 read(16, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 40) = 29
1529472961.641609 epoll_wait(4, [{EPOLLIN, {u32=445731056, u64=94777489051888}}], 256, -1) = 1
1529472961.641627 read(16, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 40) = 28
1529472961.641647 epoll_wait(4, [{EPOLLIN, {u32=445731056, u64=94777489051888}}], 256, -1) = 1
1529472961.641666 read(16, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 40) = 27

When I attached gdb I didn't see anything in the backtraces besides calls to epoll_wait and read and generic names like, BlockHandler and WaitForSomething and WaitForSomething.

File descriptior 16 is a pipe...

$ sudo ls -l /proc/1105/fd | grep 16
lr-x------ 1 gdm gdm 64 Jun 20 07:27 16 -> pipe:[29836]

Which is connected to the same Xorg program(?).

$ (sudo find /proc -type l | sudo xargs ls -l | fgrep 'pipe:[29836]') 2>/dev/null
lr-x------ 1 gdm  gdm  64 Jun 20 07:27 /proc/1105/fd/16 -> pipe:[29836]
l-wx------ 1 gdm  gdm  64 Jun 20 07:27 /proc/1105/fd/17 -> pipe:[29836]

At the end of the journalctl output I see

Jun 20 07:48:00 dannas--dell-xp-15 /usr/lib/gdm3/gdm-x-session[1103]: (WW) modeset(0): flip queue failed: Permission denied
Jun 20 07:48:00 dannas--dell-xp-15 /usr/lib/gdm3/gdm-x-session[1103]: (WW) modeset(0): Page flip failed: Permission denied
Jun 20 07:48:00 dannas--dell-xp-15 /usr/lib/gdm3/gdm-x-session[1103]: (EE) modeset(0): present flip failed
Jun 20 07:49:00 dannas--dell-xp-15 /usr/lib/gdm3/gdm-x-session[1103]: (WW) modeset(0): flip queue failed: Permission denied
Jun 20 07:49:00 dannas--dell-xp-15 /usr/lib/gdm3/gdm-x-session[1103]: (WW) modeset(0): Page flip failed: Permission denied
Jun 20 07:49:00 dannas--dell-xp-15 /usr/lib/gdm3/gdm-x-session[1103]: (EE) modeset(0): present flip failed

This is the gdm-x-session controlling the Xorg program that is consuming 200% cpu.

Any suggestions on how to proceed with troubleshooting? Is it expected that there should be two Xorg instances? How are the Xorg instances created? Which configuration file controls them?

If I kill that Xorg, then there's only one Xorg left which consumes the normal amount of cpu 1-10% and I can continue using my computer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.