You are not logged in.

#1 2017-06-08 07:20:55

leong
Member
Registered: 2013-03-08
Posts: 22

multiple Xorg processes after launching emacs

Hi,
I have a problem that recently appeared and which involves Xorg and emacs. When emacs starts, it creates extra Xorg processes which are consuming a lot of cpu (see
htop ouput)

1  [                                                                      0.0%]   5  [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%]
2  [                                                                      0.0%]   6  [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%]
3  [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%]   7  [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%]
4  [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%]   8  [                                                                      0.0%]
      Mem[||||||||||||||||||||||||||||||                                 1.18G/7.68G]   Tasks: 98, 169 thr; 5 running
      Swp[                                                                  0K/3.91G]   Load average: 3.30 1.73 1.63 
                                                                                        Uptime: 00:51:31
PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command          
5097 ot        20   0  556M  119M   99M R 133.  1.5  1h09:38 │           └─ Xorg -nolisten tcp :0 vt1 -auth /tmp/serverauth.ftKwPr1zRb
5104 ot        20   0  556M  119M   99M S  0.0  1.5  0:03.31 │            ├─ Xorg -nolisten tcp :0 vt1 -auth /tmp/serverauth.ftKwPr1zRb
5100 ot        20   0  556M  119M   99M R 133.  1.5 17:26.27 │            ├─ Xorg -nolisten tcp :0 vt1 -auth /tmp/serverauth.ftKwPr1zRb
5099 ot        20   0  556M  119M   99M R  0.0  1.5 17:12.20 │            ├─ Xorg -nolisten tcp :0 vt1 -auth /tmp/serverauth.ftKwPr1zRb
5098 ot        20   0  556M  119M   99M R  0.0  1.5 17:06.11 │            └─ Xorg -nolisten tcp :0 vt1 -auth /tmp/serverauth.ftKwPr1zRb

This is not systematic : some emacs instances do not create any such problem. I see no reason for this. Does someone do ?
Just in case that would matter, emacs is launched as a systemd unit (see https://wiki.archlinux.org/index.php/Em … stemd_unit and the unit file is

~/.config/systemd/user/emacs.service
[Unit]
Description=Emacs: the extensible, self-documenting text editor

[Service]
Type=forking
ExecStart=/usr/bin/emacs --daemon
ExecStop=/usr/bin/emacsclient --eval "(kill-emacs)"
Restart=always

[Install]
WantedBy=default.target

L

Offline

#2 2017-06-08 07:37:50

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,410

Re: multiple Xorg processes after launching emacs

Those aren't processes, those are seperate threads (X itself would prevent X from accessing the same display anyway)

https://unix.stackexchange.com/question … ss-than-ps

As for why Xorg uses so much CPU, what are you doing in your emacs instances, if those are what cause the load? Do you have hardware acceleration enabled?

Offline

#3 2017-06-10 06:03:47

leong
Member
Registered: 2013-03-08
Posts: 22

Re: multiple Xorg processes after launching emacs

Emacs is my default editor

$ echo $EDITOR
emacs --daemon

It is also configured as the editor in many application config files (mutt, yaourt, ...). I also launch emacs manually. I know it can do so many things, but my exclusive use of emacs is for text typing (mail, latex, coding)

The Xorg issue is undoubtedly triggered by emacs launches. It looks like a random event: it will eventually appear at some time during my working session, but I can't relate it to some specific uses of emacs.

Do you have hardware acceleration enabled?

I'm not sure to understand what this actually means. I have libva-intel-driver installed and vainfo returns

$ vainfo                       
libva info: VA-API version 0.40.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_40
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.40 (libva )
vainfo: Driver version: Intel i965 driver for Intel(R) Sandybridge Mobile - 1.8.2
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264StereoHigh         :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc
 $

Offline

#4 2017-06-10 12:29:07

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,320

Re: multiple Xorg processes after launching emacs

Means: please post your xorg log ;-)

Offline

#5 2017-06-10 13:46:36

leong
Member
Registered: 2013-03-08
Posts: 22

Re: multiple Xorg processes after launching emacs

OK! The problem just happened right now (today 15:31:ss) as a result of lauching emacs.
Here is the journalctl -r output

-- Logs begin at Wed 2014-06-04 07:53:06 CEST, end at Sat 2017-06-10 15:30:01 CEST. --
juin 10 15:30:01 PC13110 CROND[14361]: (root) CMD (/usr/local/maldetect/maldet --mkpubpaths >> /dev/null 2>&1)
juin 10 15:27:06 PC13110 org.gtk.vfs.Daemon[11242]: fusermount: failed to access mountpoint /run/user/1000/gvfs: Permission denied
juin 10 15:27:00 PC13110 kernel: pci_bus 0000:01: Allocating resources
juin 10 15:27:00 PC13110 kernel: pci_bus 0000:0b: Allocating resources
juin 10 15:27:00 PC13110 kernel: pci_bus 0000:0a: Allocating resources
juin 10 15:27:00 PC13110 kernel: pci_bus 0000:04: Allocating resources
juin 10 15:27:00 PC13110 kernel: pci_bus 0000:03: Allocating resources
juin 10 15:27:00 PC13110 kernel: pci_bus 0000:02: Allocating resources
juin 10 15:27:00 PC13110 systemd-logind[553]: Lid opened.
juin 10 15:26:43 PC13110 ntpd[799]: new interface(s) found: waking up resolver
juin 10 15:26:43 PC13110 ntpd[799]: Listen normally on 4 wlp3s0 192.168.0.12:123
juin 10 15:26:40 PC13110 kernel: wlp3s0: associated
juin 10 15:26:40 PC13110 kernel: wlp3s0: RX AssocResp from 90:4c:e5:54:81:da (capab=0x411 status=0 aid=3)
juin 10 15:26:40 PC13110 kernel: wlp3s0: associate with 90:4c:e5:54:81:da (try 1/3)
juin 10 15:26:40 PC13110 kernel: iwlwifi 0000:03:00.0 wlp3s0: disabling HT/VHT due to WEP/TKIP use
juin 10 15:26:40 PC13110 kernel: wlp3s0: authenticated
juin 10 15:26:40 PC13110 kernel: wlp3s0: send auth to 90:4c:e5:54:81:da (try 1/3)
juin 10 15:26:40 PC13110 kernel: wlp3s0: authenticate with 90:4c:e5:54:81:da

And the most recent Xorg.log file (last modified today

X.Org X Server 1.19.3
Release Date: 2017-03-15
[  2580.728] X Protocol Version 11, Revision 0
[  2580.728] Build Operating System: Linux 4.9.11-1-ARCH x86_64 
[  2580.728] Current Operating System: Linux PC13110 4.11.3-1-ARCH #1 SMP PREEMPT Sun May 28 10:40:17 CEST 2017 x86_64
[  2580.728] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=22c9f67e-be2f-42a5-8fc1-551fdea50cd9 rw quiet
[  2580.728] Build Date: 07 April 2017  05:42:48PM
[  2580.728]  
[  2580.728] Current version of pixman: 0.34.0
[  2580.728] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[  2580.728] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  2580.728] (==) Log file: "/var/log/Xorg.8.log", Time: Sat Jun 10 07:43:02 2017
[  2580.728] (++) Using config file: "/etc/bumblebee/xorg.conf.nvidia"
[  2580.728] (++) Using config directory: "/etc/bumblebee/xorg.conf.d"
[  2580.728] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  2580.728] (==) ServerLayout "Layout0"
[  2580.728] (==) No screen section available. Using defaults.
[  2580.728] (**) |-->Screen "Default Screen Section" (0)[  2580.728] (**) |   |-->Monitor "<default monitor>"
[  2580.728] (==) No device specified for screen "Default Screen Section".
	Using the first device section listed.
[  2580.728] (**) |   |-->Device "DiscreteNvidia"
[  2580.728] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[  2580.728] (**) Option "AutoAddDevices" "false"
[  2580.728] (**) Option "AutoAddGPU" "false"
[  2580.728] (**) Not automatically adding devices
[  2580.728] (==) Automatically enabling devices
[  2580.728] (**) Not automatically adding GPU devices
[  2580.728] (==) Automatically binding GPU devices
[  2580.728] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  2580.728] (==) FontPath set to:
	/usr/share/fonts/misc/,
	/usr/share/fonts/TTF/,
	/usr/share/fonts/OTF/,
	/usr/share/fonts/Type1/,
	/usr/share/fonts/100dpi/,
	/usr/share/fonts/75dpi/
[  2580.728] (++) ModulePath set to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules"
[  2580.728] (==) |-->Input Device "<default pointer>"
[  2580.728] (==) |-->Input Device "<default keyboard>"
[  2580.728] (==) The core pointer device wasn't specified explicitly in the layout.
	Using the default mouse configuration.
[  2580.728] (==) The core keyboard device wasn't specified explicitly in the layout.
	Using the default keyboard configuration.
[  2580.728] (II) Loader magic: 0x822d60
[  2580.728] (II) Module ABI versions:
[  2580.728] 	X.Org ANSI C Emulation: 0.4
[  2580.728] 	X.Org Video Driver: 23.0
[  2580.728] 	X.Org XInput driver : 24.1
[  2580.728] 	X.Org Server Extension : 10.0
[  2580.729] (--) using VT number 1
[  2580.729] (II) systemd-logind: logind integration requires -keeptty and -keeptty was not provided, disabling logind integration
[  2580.730] (II) xfree86: Adding drm device (/dev/dri/card0)
[  2580.730] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[  2580.732] (--) PCI:*(0:1:0:0) 10de:0dfa:1028:14a3 rev 161, Mem @ 0xec000000/16777216, 0xe0000000/134217728, 0xe8000000/33554432, I/O @ 0x00007000/128, BIOS @ 0x?????
???/524288
[  2580.733] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[  2580.733] (II) LoadModule: "glx"
[  2580.733] (II) Loading /usr/lib/nvidia/xorg/libglx.so
[  2580.737] (II) Module glx: vendor="NVIDIA Corporation"
[  2580.737] 	compiled for 4.0.2, module version = 1.0.0
[  2580.737] 	Module class: X.Org Server Extension
[  2580.737] (II) NVIDIA GLX Module  381.22  Thu May  4 00:17:15 PDT 2017
[  2580.737] (II) LoadModule: "nvidia"
[  2580.738] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[  2580.738] (II) Module nvidia: vendor="NVIDIA Corporation"
[  2580.738] 	compiled for 4.0.2, module version = 1.0.0
[  2580.738] 	Module class: X.Org Video Driver
[  2580.738] (II) LoadModule: "mouse"
[  2580.738] (WW) Warning, couldn't open module mouse
[  2580.738] (II) UnloadModule: "mouse"
[  2580.738] (II) Unloading mouse
[  2580.738] (EE) Failed to load module "mouse" (module does not exist, 0)
[  2580.738] (II) LoadModule: "kbd"
[  2580.738] (WW) Warning, couldn't open module kbd
[  2580.738] (II) UnloadModule: "kbd"
[  2580.738] (II) Unloading kbd
[  2580.738] (EE) Failed to load module "kbd" (module does not exist, 0)
[  2580.738] (II) NVIDIA dlloader X Driver  381.22  Wed May  3 23:53:41 PDT 2017
[  2580.738] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[  2580.739] (II) Loading sub module "fb"
[  2580.739] (II) LoadModule: "fb"
[  2580.739] (II) Loading /usr/lib/xorg/modules/libfb.so
[  2580.739] (II) Module fb: vendor="X.Org Foundation"
[  2580.739] 	compiled for 1.19.3, module version = 1.0.0
[  2580.739] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  2580.739] (II) Loading sub module "wfb"
[  2580.739] (II) LoadModule: "wfb"
[  2580.739] (II) Loading /usr/lib/xorg/modules/libwfb.so
[  2580.739] (II) Module wfb: vendor="X.Org Foundation"
[  2580.739] 	compiled for 1.19.3, module version = 1.0.0
[  2580.739] 	ABI class: X.Org ANSI C Emulation, version 0.4
[  2580.739] (II) Loading sub module "ramdac"
[  2580.739] (II) LoadModule: "ramdac"
[  2580.739] (II) Module "ramdac" already built-in
[  2580.740] (II) NVIDIA(0): Creating default Display subsection in Screen section
	"Default Screen Section" for depth/fbbpp 24/32
[  2580.740] (==) NVIDIA(0): Depth 24, (==) framebuffer bpp 32
[  2580.740] (==) NVIDIA(0): RGB weight 888
[  2580.740] (==) NVIDIA(0): Default visual is TrueColor
[  2580.740] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)
[  2580.740] (**) NVIDIA(0): Option "ProbeAllGpus" "false"
[  2580.740] (**) NVIDIA(0): Option "UseEDID" "false"
[  2580.740] (**) NVIDIA(0): Option "UseDisplayDevice" "none"
[  2580.740] (**) NVIDIA(0): Enabling 2D acceleration
[  2580.740] (**) NVIDIA(0): Ignoring EDIDs
[  2580.740] (**) NVIDIA(0): Option "UseDisplayDevice" set to "none"; enabling NoScanout
[  2580.740] (**) NVIDIA(0):     mode
[  2581.691] (II) NVIDIA(0): NVIDIA GPU Quadro 1000M (GF108GL) at PCI:1:0:0 (GPU-0)
[  2581.691] (--) NVIDIA(0): Memory: 2097152 kBytes
[  2581.691] (--) NVIDIA(0): VideoBIOS: 70.08.54.00.01
[  2581.691] (II) NVIDIA(0): Detected PCI Express Link width: 16X
[  2581.691] (II) NVIDIA(0): Validated MetaModes:
[  2581.691] (II) NVIDIA(0):     "NULL"
[  2581.691] (II) NVIDIA(0): Virtual screen size determined to be 640 x 480
[  2581.691] (WW) NVIDIA(0): Unable to get display device for DPI computation.
[  2581.691] (==) NVIDIA(0): DPI set to (75, 75); computed from built-in default
[  2581.691] (--) Depth 24 pixmap format is 32 bpp
[  2581.691] (II) NVIDIA: Using 12288.00 MB of virtual memory for indirect memory
[  2581.691] (II) NVIDIA:     access.
[  2581.706] (II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
[  2581.707] (II) NVIDIA(0):     may not be running or the "AcpidSocketPath" X
[  2581.707] (II) NVIDIA(0):     configuration option may not be set correctly.  When the
[  2581.707] (II) NVIDIA(0):     ACPI event daemon is available, the NVIDIA X driver will
[  2581.707] (II) NVIDIA(0):     try to use it to receive ACPI event notifications.  For
[  2581.707] (II) NVIDIA(0):     details, please see the "ConnectToAcpid" and
[  2581.707] (II) NVIDIA(0):     "AcpidSocketPath" X configuration options in Appendix B: X
[  2581.707] (II) NVIDIA(0):     Config Options in the README.
[  2581.731] (II) NVIDIA(0): Setting mode "NULL"
[  2581.737] (==) NVIDIA(0): Disabling shared memory pixmaps
[  2581.737] (==) NVIDIA(0): Backing store enabled
[  2581.737] (==) NVIDIA(0): Silken mouse enabled
[  2581.737] (==) NVIDIA(0): DPMS enabled
[  2581.737] (WW) NVIDIA(0): Option "NoLogo" is not used
[  2581.737] (II) Loading sub module "dri2"
[  2581.737] (II) LoadModule: "dri2"
[  2581.737] (II) Module "dri2" already built-in
[  2581.737] (II) NVIDIA(0): [DRI2] Setup complete
[  2581.737] (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
[  2581.737] (--) RandR disabled
[  2581.739] (II) Initializing extension GLX
[  2581.739] (II) Indirect GLX disabled.
[  2581.823] (II) LoadModule: "mouse"
[  2581.823] (WW) Warning, couldn't open module mouse
[  2581.823] (II) UnloadModule: "mouse"
[  2581.823] (II) Unloading mouse
[  2581.823] (EE) Failed to load module "mouse" (module does not exist, 0)
[  2581.823] (EE) No input driver matching `mouse'
[  2581.823] (II) Falling back to input driver `libinput'
[  2581.823] (II) LoadModule: "libinput"
[  2581.823] (II) Loading /usr/lib/xorg/modules/input/libinput_drv.so
[  2581.825] (II) Module libinput: vendor="X.Org Foundation"
[  2581.825] 	compiled for 1.19.3, module version = 0.25.1
[  2581.825] 	Module class: X.Org XInput Driver
[  2581.825] 	ABI class: X.Org XInput driver, version 24.1
[  2581.825] (II) Using input driver 'libinput' for '<default pointer>'
[  2581.825] (**) Option "CorePointer" "on"
[  2581.825] (**) <default pointer>: always reports core events
[  2581.825] (EE) PreInit returned 2 for "<default pointer>"
[  2581.825] (II) UnloadModule: "libinput"
[  2581.825] (II) LoadModule: "kbd"
[  2581.826] (WW) Warning, couldn't open module kbd
[  2581.826] (II) UnloadModule: "kbd"
[  2581.826] (II) Unloading kbd
[  2581.826] (EE) Failed to load module "kbd" (module does not exist, 0)
[  2581.826] (EE) No input driver matching `kbd'
[  2581.826] (II) Falling back to input driver `libinput'
[  2581.826] (II) Using input driver 'libinput' for '<default keyboard>'
[  2581.826] (**) Option "CoreKeyboard" "on"
[  2581.826] (**) <default keyboard>: always reports core events
[  2581.826] (EE) PreInit returned 2 for "<default keyboard>"
[  2581.826] (II) UnloadModule: "libinput"
[  2581.832] (II) config/udev: Adding input device Power Button (/dev/input/event4)
[  2581.832] (II) AutoAddDevices is off - not adding device.
[  2581.833] (II) config/udev: Adding input device Video Bus (/dev/input/event12)
[  2581.833] (II) AutoAddDevices is off - not adding device.
[  2581.833] (II) config/udev: Adding input device Video Bus (/dev/input/event11)
[  2581.833] (II) AutoAddDevices is off - not adding device.
[  2581.833] (II) config/udev: Adding input device Power Button (/dev/input/event2)
[  2581.833] (II) AutoAddDevices is off - not adding device.
[  2581.833] (II) config/udev: Adding input device Lid Switch (/dev/input/event1)
[  2581.833] (II) AutoAddDevices is off - not adding device.
[  2581.834] (II) config/udev: Adding input device Sleep Button (/dev/input/event3)
[  2581.834] (II) AutoAddDevices is off - not adding device.
[  2581.834] (II) config/udev: Adding drm device (/dev/dri/card0)
[  2581.834] (II) xfree86: Adding drm device (/dev/dri/card0)
[  2581.834] (EE) /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied
[  2581.834] (II) config/udev: Adding input device HDA Intel PCH Mic (/dev/input/event8)
[  2581.834] (II) AutoAddDevices is off - not adding device.
[  2581.834] (II) config/udev: Adding input device HDA Intel PCH Dock Line Out (/dev/input/event9)
[  2581.834] (II) AutoAddDevices is off - not adding device.
[  2581.834] (II) config/udev: Adding input device HDA Intel PCH Headphone (/dev/input/event10)
[  2581.834] (II) AutoAddDevices is off - not adding device.
[  2581.835] (II) config/udev: Adding input device HDA Digital PCBeep (/dev/input/event6)
[  2581.835] (II) AutoAddDevices is off - not adding device.
[  2581.835] (II) config/udev: Adding input device HDA Intel PCH Dock Mic (/dev/input/event7)
[  2581.835] (II) AutoAddDevices is off - not adding device.
[  2581.835] (II) config/udev: Adding input device AT Translated Set 2 keyboard (/dev/input/event0)
[  2581.835] (II) AutoAddDevices is off - not adding device.
[  2581.835] (II) config/udev: Adding input device AlpsPS/2 ALPS DualPoint Stick (/dev/input/event13)
[  2581.835] (II) AutoAddDevices is off - not adding device.
[  2581.835] (II) config/udev: Adding input device AlpsPS/2 ALPS DualPoint Stick (/dev/input/mouse0)
[  2581.835] (II) AutoAddDevices is off - not adding device.
[  2581.836] (II) config/udev: Adding input device AlpsPS/2 ALPS DualPoint TouchPad (/dev/input/event14)
[  2581.836] (II) AutoAddDevices is off - not adding device.
[  2581.836] (II) config/udev: Adding input device AlpsPS/2 ALPS DualPoint TouchPad (/dev/input/mouse1)
[  2581.836] (II) AutoAddDevices is off - not adding device.
[  2581.836] (II) config/udev: Adding input device Dell WMI hotkeys (/dev/input/event5)
[  2581.836] (II) AutoAddDevices is off - not adding device.
[  2608.304] (II) NVIDIA(GPU-0): Deleting GPU-0
[  2608.309] (II) Server terminated successfully (0). Closing log file.

Offline

#6 2017-06-10 14:52:39

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,320

Re: multiple Xorg processes after launching emacs

There's a bumblebee config, vainfo says "Intel i965 driver for Intel(R) Sandybridge Mobile" and yet the server loads the nvidia blob exclusively.
Is this a wayland session with an attempt to use the other chip on xwayland?

Offline

#7 2017-06-10 16:50:55

leong
Member
Registered: 2013-03-08
Posts: 22

Re: multiple Xorg processes after launching emacs

My apologies! I picked the most recent xorg log file in my last post, which is Xorg.8.log, created and owned by bumblebee. So I guess it is quite normal that it shows no intel driver. The Xorg.0.log is

[    18.125] 
X.Org X Server 1.19.3
Release Date: 2017-03-15
[    18.126] X Protocol Version 11, Revision 0
[    18.126] Build Operating System: Linux 4.9.11-1-ARCH x86_64 
[    18.126] Current Operating System: Linux PC13110 4.11.3-1-ARCH #1 SMP PREEMPT Sun May 28 10:40:17 CEST 2017 x86_64
[    18.126] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=22c9f67e-be2f-42a5-8fc1-551fdea50cd9 rw quiet
[    18.126] Build Date: 07 April 2017  05:42:48PM
[    18.126]  
[    18.126] Current version of pixman: 0.34.0
[    18.126] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    18.126] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    18.127] (==) Log file: "/var/log/Xorg.0.log", Time: Sat Jun 10 17:13:28 2017
[    18.131] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    18.131] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    18.133] (==) No Layout section.  Using the first Screen section.
[    18.133] (==) No screen section available. Using defaults.
[    18.133] (**) |-->Screen "Default Screen Section" (0)
[    18.133] (**) |   |-->Monitor "<default monitor>"
[    18.134] (==) No device specified for screen "Default Screen Section".
	Using the first device section listed.
[    18.134] (**) |   |-->Device "Intel Graphics"
[    18.134] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[    18.134] (==) Automatically adding devices
[    18.134] (==) Automatically enabling devices
[    18.134] (==) Automatically adding GPU devices
[    18.134] (==) Automatically binding GPU devices
[    18.134] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    18.140] (==) FontPath set to:
	/usr/share/fonts/misc/,
	/usr/share/fonts/TTF/,
	/usr/share/fonts/OTF/,
	/usr/share/fonts/Type1/,
	/usr/share/fonts/100dpi/,
	/usr/share/fonts/75dpi/
[    18.140] (==) ModulePath set to "/usr/lib/xorg/modules"
[    18.140] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[    18.141] (II) Loader magic: 0x822d60
[    18.141] (II) Module ABI versions:
[    18.141] 	X.Org ANSI C Emulation: 0.4
[    18.141] 	X.Org Video Driver: 23.0
[    18.141] 	X.Org XInput driver : 24.1
[    18.141] 	X.Org Server Extension : 10.0
[    18.142] (++) using VT number 1
[    18.142] (--) controlling tty is VT number 1, auto-enabling KeepTty
[    18.146] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
[    18.147] (II) xfree86: Adding drm device (/dev/dri/card0)
[    18.148] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[    18.148] (II) xfree86: Adding drm device (/dev/dri/card1)
[    18.149] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 12 paused 0
[    18.152] (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules"
[    18.152] (**) OutputClass "nvidia" setting /dev/dri/card0 as PrimaryGPU
[    18.155] (--) PCI: (0:0:2:0) 8086:0126:1028:04a3 rev 9, Mem @ 0xed400000/4194304, 0xd0000000/268435456, I/O @ 0x00008000/64, BIOS @ 0x????????/131072
[    18.155] (--) PCI:*(0:1:0:0) 10de:0dfa:1028:14a3 rev 161, Mem @ 0xec000000/16777216, 0xe0000000/134217728, 0xe8000000/33554432, I/O @ 0x00007000/128, BIOS @ 0x????????/524288
[    18.155] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    18.155] (II) LoadModule: "glx"
[    18.158] (II) Loading /usr/lib/nvidia/xorg/libglx.so
[    18.213] (II) Module glx: vendor="NVIDIA Corporation"
[    18.213] 	compiled for 4.0.2, module version = 1.0.0
[    18.213] 	Module class: X.Org Server Extension
[    18.214] (II) NVIDIA GLX Module  381.22  Thu May  4 00:17:15 PDT 2017
[    18.215] (II) LoadModule: "intel"
[    18.216] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[    18.220] (II) Module intel: vendor="X.Org Foundation"
[    18.220] 	compiled for 1.19.3, module version = 2.99.917
[    18.220] 	Module class: X.Org Video Driver
[    18.220] 	ABI class: X.Org Video Driver, version 23.0
[    18.220] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
	i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
	915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
	Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
	GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[    18.220] (II) intel: Driver for Intel(R) HD Graphics
[    18.220] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[    18.220] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[    18.221] (II) intel(G0): Using Kernel Mode Setting driver: i915, version 1.6.0 20170123
[    18.221] (II) intel(G0): SNA compiled from 2.99.917-772-gc72bb27a
 

I have a hybrid intel/nvidia laptop and I have both drivers (xf86-video-intel+nvidia+mesa+nvidia-utils) installed, as well as bumblebee. bumblebeed service is enabled (start at boot) and configured according to https://wiki.archlinux.org/index.php/Bumblebee

/etc/bumblebee/bumblebee.conf
# Configuration file for Bumblebee. Values should **not** be put between quotes

## Server options. Any change made in this section will need a server restart
# to take effect.
[bumblebeed]
# The secondary Xorg server DISPLAY number
VirtualDisplay=:8
# Should the unused Xorg server be kept running? Set this to true if waiting
# for X to be ready is too long and don't need power management at all.
KeepUnusedXServer=false
# The name of the Bumbleblee server group name (GID name)
ServerGroup=bumblebee
# Card power state at exit. Set to false if the card shoud be ON when Bumblebee
# server exits.
TurnCardOffAtExit=false
# The default behavior of '-f' option on optirun. If set to "true", '-f' will
# be ignored.
NoEcoModeOverride=false
# The Driver used by Bumblebee server. If this value is not set (or empty),
# auto-detection is performed. The available drivers are nvidia and nouveau
# (See also the driver-specific sections below)
Driver=
# Directory with a dummy config file to pass as a -configdir to secondary X
XorgConfDir=/etc/bumblebee/xorg.conf.d

## Client options. Will take effect on the next optirun executed.
[optirun]
# Acceleration/ rendering bridge, possible values are auto, virtualgl and
# primus.
Bridge=auto
# The method used for VirtualGL to transport frames between X servers.
# Possible values are proxy, jpeg, rgb, xv and yuv.
VGLTransport=proxy
# List of paths which are searched for the primus libGL.so.1 when using
# the primus bridge
PrimusLibraryPath=/usr/lib/primus:/usr/lib32/primus
# Should the program run under optirun even if Bumblebee server or nvidia card
# is not available?
AllowFallbackToIGC=false


# Driver-specific settings are grouped under [driver-NAME]. The sections are
# parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
# detection resolves to NAME).
# PMMethod: method to use for saving power by disabling the nvidia card, valid
# values are: auto - automatically detect which PM method to use
#         bbswitch - new in BB 3, recommended if available
#       switcheroo - vga_switcheroo method, use at your own risk
#             none - disable PM completely
# https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods

## Section with nvidia driver specific options, only parsed if Driver=nvidia
[driver-nvidia]
# Module name to load, defaults to Driver if empty or unset
KernelDriver=nvidia
PMMethod=auto
# colon-separated path to the nvidia libraries
LibraryPath=/usr/lib/nvidia:/usr/lib32/nvidia:/usr/lib:/usr/lib32
# comma-separated path of the directory containing nvidia_drv.so and the
# default Xorg modules path
XorgModulePath=/usr/lib/nvidia/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia

## Section with nouveau driver specific options, only parsed if Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau

Offline

#8 2017-06-10 17:22:08

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,320

Re: multiple Xorg processes after launching emacs

Ok thanks, however the cause is more likely a race between emacs and your WM on the size of the emacs window.
(Hey, I didn't ask for HW acceleration ;-)

Thus
a) which WM
b) can you make emacs spike Xorg w/o any WM?
c) try xev -id <wid of emacs window> and see whether there's some event flood

Offline

#9 2017-06-10 18:31:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,410

Re: multiple Xorg processes after launching emacs

Well i was going more along the lines of mesa and  OpenGL and friends when I mentioned hardware acceleration.  Also something to try, is simply using the modesetting driver, I wouldn't put it past xf86-video-intel to mess something up here.

Offline

#10 2017-06-12 15:40:32

leong
Member
Registered: 2013-03-08
Posts: 22

Re: multiple Xorg processes after launching emacs

seth wrote:

Thus
a) which WM
b) can you make emacs spike Xorg w/o any WM?
c) try xev -id <wid of emacs window> and see whether there's some event flood

a) openbox 3.6.1-3
b) I dont know if this is correct: I have X running on display :0. I change to tty2 and login (no X) and then run

sudo xinit emacs $* -- :3 

and right after, I have the 4 Xorg threads appearing in the table of processes, but without such high CPU values. Starting xterm in the same way (instead of emacs) does not show the extra Xorg threads.
c)

$ xev -id 0x2c0011f

EnterNotify event, serial 18, synthetic NO, window 0x2c0011f,
    root 0xbe, subw 0x2c00123, time 19036754, (103,427), root:(555,448),
    mode NotifyNormal, detail NotifyNonlinearVirtual, same_screen YES,
    focus NO, state 16

KeymapNotify event, serial 18, synthetic NO, window 0x0,
    keys:  4294967170 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   

LeaveNotify event, serial 18, synthetic NO, window 0x2c0011f,
    root 0xbe, subw 0x2c00123, time 19046497, (-29,580), root:(423,601),
    mode NotifyNormal, detail NotifyNonlinearVirtual, same_screen YES,
    focus NO, state 16

EnterNotify event, serial 18, synthetic NO, window 0x2c0011f,
    root 0xbe, subw 0x2c00123, time 19047345, (14,558), root:(466,579),
    mode NotifyNormal, detail NotifyNonlinearVirtual, same_screen YES,
    focus NO, state 16

KeymapNotify event, serial 18, synthetic NO, window 0x0,
    keys:  4294967230 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   

LeaveNotify event, serial 18, synthetic NO, window 0x2c0011f,
    root 0xbe, subw 0x2c00123, time 19048376, (-10,588), root:(442,609),
    mode NotifyNormal, detail NotifyNonlinearVirtual, same_screen YES,
    focus NO, state 16

FocusIn event, serial 18, synthetic NO, window 0x2c0011f,
    mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 18, synthetic NO, window 0x0,
    keys:  4294967230 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   

ColormapNotify event, serial 18, synthetic NO, window 0x2c0011f,
    colormap 0x2c0011e, new NO, state ColormapInstalled

<+ plenty of similar lines>

Looks like normal output,... or may be not?

V1del wrote:

Also something to try, is simply using the modesetting driver, I wouldn't put it past xf86-video-intel to mess something up here.

I have nvidia and nvidia-utils uninstalled, blumbebeed stoped and disabled, just relying on xf86-video-intel+mesa. I'm still having the emacs-xorg problem

Offline

#11 2017-06-12 16:48:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,320

Re: multiple Xorg processes after launching emacs

<+ plenty of similar lines>

That's no very good information, but I get ColormapNotify and ConfigureNotify events on focus change *only* - emacs should not create any events if you leave it alone (focused or not) and PropertyNotify events when typing.
If emacs is in a race about its size, you'll get tons of ConfigureNotify events. Tons of ColormapNotify events seem like a bug in emacs that is maybe triggered by some specific feature (I don't use emacs, I chose Linux as my OS ;-P )

Offline

#12 2017-06-12 18:09:37

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,410

Re: multiple Xorg processes after launching emacs

leong wrote:

I have nvidia and nvidia-utils uninstalled, blumbebeed stoped and disabled, just relying on xf86-video-intel+mesa. I'm still having the emacs-xorg problem

Yes that's what I mean, remove xf86-video-intel it really likes to break in all sorts of interesting ways. Xorg has a built in modesetting DDX and xf86-video-intel has been pretty much ditched in favor for it, there haven't been any real changes in 3 years. And the few changes that make it in seem prone to breakage

Last edited by V1del (2017-06-12 18:11:04)

Offline

#13 2017-06-13 09:31:08

leong
Member
Registered: 2013-03-08
Posts: 22

Re: multiple Xorg processes after launching emacs

seth wrote:

That's no very good information, but I get ColormapNotify and ConfigureNotify events on focus change *only* - emacs should not create any events if you leave it alone (focused or not) and PropertyNotify events when typing.

Apologies once again. The xev output comes from moving the mouse and clicking around. Inactive emacs window does not output anything

Offline

#14 2017-06-13 09:49:00

leong
Member
Registered: 2013-03-08
Posts: 22

Re: multiple Xorg processes after launching emacs

V1del wrote:
leong wrote:

I have nvidia and nvidia-utils uninstalled, blumbebeed stoped and disabled, just relying on xf86-video-intel+mesa. I'm still having the emacs-xorg problem

Yes that's what I mean, remove xf86-video-intel it really likes to break in all sorts of interesting ways. Xorg has a built in modesetting DDX and xf86-video-intel has been pretty much ditched in favor for it, there haven't been any real changes in 3 years. And the few changes that make it in seem prone to breakage

That must be something else. I also removed (uninstalled) the xf86-video-intel driver. That way I think I only use the Xorg built in driver. Now with no active window, Xorg uses more than 50-60% of the CPU

Offline

#15 2017-06-13 15:28:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,320

Re: multiple Xorg processes after launching emacs

Now with no active window, Xorg uses more than 50-60% of the CPU

"No active" means "no visible" or just "no focused"?
Are you absolutely sure this is related to emacs?
Do you always get several X11 threads when running emacs?
Did you try a non-rootless X server?

Offline

Board footer

Powered by FluxBB