Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Xorg severe freezing lag spikes external monitors
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
grot
n00b
n00b


Joined: 17 Dec 2014
Posts: 33

PostPosted: Thu Jan 29, 2015 10:30 am    Post subject: [Solved] Xorg severe freezing lag spikes external monitors Reply with quote

Howdy, I would appreciate help on this one

I feel like this one must have been asked before, but I've had a real hard time finding it.. hope it's simple.

I have installed xorg-server and I'm running openbox, systemd-less and dbus-less (actually, I'm installing dbus as I write this.. might need skype asap).

Laptop: optimus, nvidia 760M gtx, I'm pretty sure the intel chip is a 4600 HD... 4th gen, anyways. I have taken ZERO steps towards enabling Optimus - just trying to get Intel running right atm

Xorg seizes up for about 10 seconds and then slows down to refreshing every 5 seconds or so at certain times when I play video on a second monitor.

The freezes happen under the follwing conditions:
-video is played on a second "display" region
-more than half of the video is playing in the second "display" region

The freezes do NOT happen when:
-more than half of the video is playing on the laptop's internal monitor/"display" region, including the part of the video playing in a separate screenspace (and therefore partially on another monitor)
-if a monitor shares screenspace with the internal monitor, no freezing will occur and the video will play fine on both displays

If I run 'top' right now, Xorg is not eating up the processor, and my fans are pretty much idling, so I can tell the video card is also not being eaten alive. I tried to take a logs though while the error was occurring with
<code>
top -p [vlc/X pid] | grep [vlc/X] > [vlc/X].stress.log
</code>

However, this failed - I guess the logs would get wiped when X froze? The one time I did get a log, it looked something like this:

Code:

cat vlc.stress.log
[%CPU   %MEM  TIME]
39.5  0.9   0:14.58 vlc
22.3  0.9   0:15.25 vlc
25.0  0.9   0:16.00 vlc
20.0  0.9   0:16.60 vlc
20.0  0.9   0:17.20 vlc
12.0  0.9   0:17.56 vlc
25.3  1.0   0:18.32 vlc
 6.7  1.0   0:18.52 vlc
 1.3  1.0   0:18.56 vlc
 1.3  1.0   0:18.60 vlc
 1.0  1.0   0:18.63 vlc
 1.3  1.0   0:18.67 vlc
 1.3  1.0   0:18.71 vlc
 1.0  1.1   0:18.74 vlc
 1.3  1.1   0:18.78 vlc
 1.3  1.1   0:18.82 vlc
104.1  1.1   0:21.95 vlc
26.3  1.0   0:22.74 vlc
19.0  1.0   0:23.31 vlc
18.3  1.0   0:23.86 vlc
20.3  1.0   0:24.47 vlc
10.6  1.0   0:24.79 vlc
10.6  1.0   0:25.11 vlc
12.6  1.0   0:25.49 vlc


I killed vlc before returning to xorg, so I'm not exactly sure what caused that dip or spike

from /proc/config.gz

Code:

CONFIG_MTRR=y
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y
CONFIG_AGP_SIS=m
CONFIG_AGP_VIA=m
CONFIG_INTEL_GTT=y
CONFIG_VGA_ARB=y
#CONFIG_VGA_SWITCHEROO is not set

CONFIG_DRM=y
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_KMS_FB_HELPER=y
CONFIG_DRM_LOAD_EDID_FIRMWARE=y # I tried this both enabled and disabled


Using both xrandr AND /etc/X11/xorg.conf.d/10-settings.conf to set monitors cause this error. I was hoping setting [Driver "intel"] in xorg.conf would fix my "device"

<code>
cat /etc/X11/xorg.conf.d/10-setup.conf
Section "Device"
Identifier "trio"
Driver "intel"
Option "Monitor-eDP1" "eDP screen"
Option "Monitor-HDMI1" "HDMI screen"
Option "Monitor-VGA1" "VGA screen"
EndSection
Section "Monitor"
Identifier "VGA screen"
Option "LeftOf" "HDMI screen"
EndSection
Section "Monitor"
Identifier "HDMI screen"
EndSection
Section "Monitor"
Identifier "eDP screen"
Option "RightOf" "HDMI screen"
EndSection
</code>

glxinfo returns the same thing whether I use xorg to set [Driver "intel"] or not:

<code>
glxinfo | grep -i vendor
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
OpenGL vendor string: Intel Open Source Technology Center
</code>

Here is Xorg.0.log from before I ran the test launches and after a few test launches (I am switching to a terminal to kill vlc each time). Doesn't look interesting at all to me.

Code:

[ 27531.307] (**) PS/2 Generic Mouse: (accel) acceleration factor: 2.000
[ 27531.307] (**) PS/2 Generic Mouse: (accel) acceleration threshold: 4
[ 27531.307] (II) config/udev: Adding input device PS/2 Generic Mouse (/dev/input/mouse0)
[ 27531.307] (**) PS/2 Generic Mouse: Applying InputClass "joystick-all"
[ 27531.307] (II) No input driver specified, ignoring this device.
[ 27531.307] (II) This device may have been added with another device file.
[ 27531.307] (II) config/udev: Adding input device PC Speaker (/dev/input/event7)
[ 27531.307] (**) PC Speaker: Applying InputClass "joystick-all"
[ 27531.307] (II) No input driver specified, ignoring this device.
[ 27531.307] (II) This device may have been added with another device file.
[ 27531.368] (II) intel(0): EDID vendor "HWP", prod id 10500
[ 27531.368] (II) intel(0): Using EDID range info for horizontal sync
[ 27531.368] (II) intel(0): Using EDID range info for vertical refresh
[ 27531.368] (II) intel(0): Printing DDC gathered Modelines:
[ 27531.368] (II) intel(0): Modeline "1600x900"x0.0  108.00  1600 1624 1704 1800  900 901 904 1000 +hsync +vsync (60.0 kHz eP)
[ 27531.368] (II) intel(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[ 27531.368] (II) intel(0): Modeline "640x480"x0.0   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[ 27531.368] (II) intel(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz e)
[ 27531.368] (II) intel(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[ 27531.368] (II) intel(0): Modeline "1280x720"x60.0   74.48  1280 1336 1472 1664  720 721 724 746 -hsync +vsync (44.8 kHz e)
[ 27531.368] (II) intel(0): Modeline "1280x1024"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz e)
[ 27531.368] (II) intel(0): Modeline "1440x900"x0.0  106.50  1440 1520 1672 1904  900 903 909 934 -hsync +vsync (55.9 kHz e)
[ 27531.368] (II) intel(0): Modeline "1600x900"x60.0  119.00  1600 1696 1864 2128  900 901 904 932 -hsync +vsync (55.9 kHz e)
[ 27531.419] (II) intel(0): resizing framebuffer to 3840x1080
[ 27531.419] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (0, 0), rotation normal
[ 27531.440] (II) intel(0): switch to mode 1600x900@60.0 on pipe 1 using VGA1, position (0, 0), rotation normal
[ 27531.460] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (0, 0), rotation normal
[ 27531.480] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (1920, 0), rotation normal
[ 27531.548] (II) intel(0): resizing framebuffer to 5440x1080
[ 27531.552] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (1920, 0), rotation normal
[ 27531.600] (II) intel(0): switch to mode 1600x900@60.0 on pipe 1 using VGA1, position (0, 0), rotation normal
[ 27531.620] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (0, 0), rotation normal
[ 27531.640] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (3520, 0), rotation normal
[ 27531.650] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (1600, 0), rotation normal
[ 36108.057] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (3520, 0), rotation normal
[ 36108.290] (II) intel(0): switch to mode 1600x900@60.0 on pipe 1 using VGA1, position (0, 0), rotation normal
[ 36108.350] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (1600, 0), rotation normal
[ 44603.202] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (3520, 0), rotation normal
[ 44603.440] (II) intel(0): switch to mode 1600x900@60.0 on pipe 1 using VGA1, position (0, 0), rotation normal
[ 44603.500] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (1600, 0), rotation normal
[ 45210.719] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (3520, 0), rotation normal
[ 45210.950] (II) intel(0): switch to mode 1600x900@60.0 on pipe 1 using VGA1, position (0, 0), rotation normal
[ 45211.010] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (1600, 0), rotation normal
[ 48948.360] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 48973.578] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 48973.578] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (3520, 0), rotation normal
[ 48973.590] (II) intel(0): switch to mode 1600x900@60.0 on pipe 1 using VGA1, position (0, 0), rotation normal
[ 48973.610] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (1600, 0), rotation normal
[ 48973.696] setversion 1.4 failed: Permission denied
[ 48983.590] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 50407.324] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 50407.324] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (3520, 0), rotation normal
[ 50407.340] (II) intel(0): switch to mode 1600x900@60.0 on pipe 1 using VGA1, position (0, 0), rotation normal
[ 50407.360] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (1600, 0), rotation normal
[ 50417.860] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 50442.684] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 50442.684] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (3520, 0), rotation normal
[ 50442.700] (II) intel(0): switch to mode 1600x900@60.0 on pipe 1 using VGA1, position (0, 0), rotation normal
[ 50442.720] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (1600, 0), rotation normal
[ 50462.540] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 50480.572] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 50480.572] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (3520, 0), rotation normal
[ 50480.590] (II) intel(0): switch to mode 1600x900@60.0 on pipe 1 using VGA1, position (0, 0), rotation normal
[ 50480.610] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (1600, 0), rotation normal
[ 50501.270] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 50622.460] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 50622.460] (II) intel(0): switch to mode 1920x1080@59.9 on pipe 0 using eDP1, position (3520, 0), rotation normal
[ 50622.480] (II) intel(0): switch to mode 1600x900@60.0 on pipe 1 using VGA1, position (0, 0), rotation normal
[ 50622.500] (II) intel(0): switch to mode 1920x1080@60.0 on pipe 2 using HDMI1, position (1600, 0), rotation normal
[ 50635.500] (II) AIGLX: Suspending AIGLX clients for VT switch



make.conf - what I wonder about here is I set 'xinerama' as a USE flag
--edit: I recompiled with xinerama USE flag disabled and emerge -uDNa world and the issue is not resolved


Code:

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="-geoloc steamruntime -acl threads udev acpi -accessibility bindist mmx sse sse2 sse3 ssse3 sse4 X alsa crypt cryptsetup dvd xinerama -introspection -gtk -qt4 -systemd -*kit -policykit -cosolekit -dbus -pulseaudio -gnome -avahi"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"

#MAKEOPTS="-j9 -l8"
MAKEOPTS="-j5"
EMERGE_DEFAULT_OPTS="--jobs=9 --load-average=8"
ACCEPT_KEYWORDS="amd64"

INPUT_DEVICES="evdev synaptics joystick"
VIDEO_CARDS="intel i965"

#PORTDIR="/usr/portage"
#PKGDIR="${PORTDIR}/packages"
#DISTDIR="${PORTDIR}/distfiles"

PORTAGE_ELOG_CLASSES="info warn error log qa"
PORTAGE_ELOG_SYSTEM="save"

GRUB_PLATFORMS="efi-64"

ACCEPT_LICENSE="Oracle-BCLA-JavaSE"

source /var/lib/layman/make.conf





I might as well also note that alsa doesn't cut out when xorg is, so I don't think it's an audio issue. I could be wrong, but I'm not sure how to check >>


Any sort of guidance would be appreciated.. thanks





edit.. used the wrong code tag brackets, rofl.. i'll fix the big one


Last edited by grot on Fri Jan 30, 2015 8:16 pm; edited 2 times in total
Back to top
View user's profile Send private message
grot
n00b
n00b


Joined: 17 Dec 2014
Posts: 33

PostPosted: Fri Jan 30, 2015 2:07 am    Post subject: Reply with quote

Interestingly, HTML5 video plays fine in firefox on all screens.

smplayer and vlc both crash on the external screens. The issue must be with a shared library between them?

I finished emerge --ask --emptytree world just now, and the issue persists, so it doesn't appear to be a compiling error.

I might try out a different WM/DE and see what happens, but I'm really enjoying openbox
Back to top
View user's profile Send private message
grot
n00b
n00b


Joined: 17 Dec 2014
Posts: 33

PostPosted: Fri Jan 30, 2015 3:12 am    Post subject: Reply with quote

Just installed enlightenment, and vlc is working fine on all screens.

I'll have to look into the difference between how the two hand output.. does anybody have a recommendation of where to start?

I'm was very happy with the all of the streamlined options that openbox makes available.. I hear good things about enlightenment, but the base looks pretty silly. I would much rather turn features on as I want them than spend time turning them off.

edit: moving to i3, which I'll probably be okay with long-term, but I appreciated the framework that openbox had set up. Although there are some tiling wm features that I'm sure i3 will have that I was worried openbox might not have.. we'll see.
Back to top
View user's profile Send private message
grot
n00b
n00b


Joined: 17 Dec 2014
Posts: 33

PostPosted: Fri Jan 30, 2015 8:15 pm    Post subject: Reply with quote

I found that dmesg had some very useful output. After running glxgears on xfce, it had a lot of lines that said:

[timestamp] [drm] GPU HANG: ecode -1:0x00000000, reason: Kicking stuck wait on blitter ring, action: continue

Which led me to this bug
https://bugs.freedesktop.org/show_bug.cgi?id=82081

The solution was to upgrade my Intel driver to at least 2.99.903 (I picked 2.99.916 for no good reason):

echo "=x11-drivers/xf86-video-intel-2.99.916 ~amd64" >> /etc/portage/package.accept_keywords
emerge --ask =xf86-intel-driver-2.99.916



I find it very curious that enlightenment (E20, to be exact) ran glxgears fine at 60fps... it was slow though at times, although it also segfaulted, so I'm not sure if it's slowness was due to the intel driver or not. I think E20 uses dbus, but I can't imagine what dbus might have to do with opengl rendering. Also, lxde had the lag, and iirc, lxde uses dbus - but I think it only uses dbus for simple things like notifications?

I also find it interesting that I never had this issue on Arch linux - so I wonder which Intel driver was being installed by pacman.

Final question - is dmesg a part of dbus or related to it? If it is, would there be a way to find this error message without using dbus? I'm really just curious.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Fri Jan 30, 2015 8:34 pm    Post subject: Reply with quote

dmesg prints kernel messages, it has absolutely nothing to do with dbus.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
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