FS#49865 - Xlib unstable when decoding video with or without VDPAU and with any browser.

Attached to Project: Arch Linux
Opened by Hikari (51334) - Monday, 27 June 2016, 07:35 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 21 July 2016, 02:42 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:


Additional info: Running Arch on this computer for 4 years without problems. It started about two months ago that playing videos either with flash of html5 starts to pile up system load, suddenly jumping say 0.7 to 1.3, then 2.5, 4.3... until the entire system hangs. Once the web browser is closed, the CPU use percentage drops within a few seconds but the system remains unbearably slow until system load drops below 1.0 or so. Even such things as "ps -A" lag terribly, and even restarting the computer results in a very slow boot some times.

I do not see any unusual io with iotop, any unusual ram with atop or htop and the only thing that shows high cpu is the web browser. I have tried chromium, opera and Firefox. Tried OSS, alsa and pulse. Tried just X without DE. Monitored processes and could not find an even trigger. Played with different cpu governors and IO schedulers. No big difference.

Initially started with html5 videos on youtube, and after following wiki, WebM VP8 and VP9 were disabled in chromium and Firefox with no noticeable difference. Then VDPAU libraries were installed and enabled with no noticeable difference either. Some times the system crashes entirely and computer powers down.

Steps to reproduce: Watch videos on youtube for an hour or so. or visit http://putlocker.is/watch-brazil-online-free-putlocker.html and watch for about 20 minutes.

vlc causes similar issues when playing video with vdpau enabled. System doesn't hang but cpu starts to pile up.

* config and/or log files etc.
Default settings.

* package version(s)
=== Versions and system info ===

X.Org X Server 1.18.3
Release Date: 2016-04-04
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.5.1-1-ARCH x86_64
Current Operating System: Linux xephir 4.6.2-1-ARCH #1 SMP PREEMPT Wed Jun 8 08:40:59 CEST 2016 x86_64
Build Date: 03 June 2016 07:28:24AM

Current version of pixman: 0.34.0

+------------------------------------------------------+
| NVIDIA-SMI 340.96 Driver Version: 340.96 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 NVS 3100M Off | 0000:01:00.0 N/A | N/A |
| N/A 69C P12 N/A / N/A | 155MiB / 511MiB | N/A Default |
+-------------------------------+----------------------+----------------------+

CPU Info:
------------------
vendor_str : `GenuineIntel'
vendor id : 0
brand_str : `Intel(R) Core(TM) i7 CPU M 640 @ 2.80GHz'
family : 6 (06h)
model : 5 (05h)
stepping : 5 (05h)
ext_family : 6 (06h)
ext_model : 37 (25h)
num_cores : 2
num_logical: 4
tot_logical: 4
L1 D cache : 32 KB
L1 I cache : 32 KB
L2 cache : 256 KB
L3 cache : 4096 KB
L4 cache : -1 KB
L1D assoc. : 8-way
L2 assoc. : 8-way
L3 assoc. : 16-way
L4 assoc. : -1-way
L1D line sz: 64 bytes
L2 line sz : 64 bytes
L3 line sz : 64 bytes
L4 line sz : -1 bytes
SSE units : 128 bits (non-authoritative)
code name : `Arrandale (Core i7)'
features : fpu vme de pse tsc msr pae mce cx8 apic mtrr sep pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni pclmul dts64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 syscall xd popcnt aes rdtscp lm lahf_lm constant_tsc
This task depends upon

Closed by  Doug Newgard (Scimmia)
Thursday, 21 July 2016, 02:42 GMT
Reason for closing:  Fixed
Comment by Hikari (51334) - Monday, 27 June 2016, 07:50 GMT
libva info: va_getDriverName() returns 0
libva info: User requested driver 'v"dpau"'
libva info: Trying to open /usr/lib/dri/v"dpau"_drv_video.so
libva info: va_openDriver() returns -1
NOT SANDBOXED
Vector smash protection is enabled.
[fresh] [error] [NP] caught Xlib error 8
[fresh] [error] [NP] caught Xlib error 8
[fresh] [error] [NP] caught Xlib error 171
[fresh] [error] [NP] caught Xlib error 171
[fresh] [error] ppb_graphics3d_create, glXMakeCurrent failed
[fresh] [error] ppb_graphics3d_create, glXMakeCurrent failed
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: User requested driver 'v"dpau"'
libva info: Trying to open /usr/lib/dri/v"dpau"_drv_video.so
libva info: va_openDriver() returns -1
NOT SANDBOXED
Vector smash protection is enabled.
[fresh] [error] [NP] caught Xlib error 8
[fresh] [error] [NP] caught Xlib error 8
[fresh] [error] [NP] caught Xlib error 171
[fresh] [error] [NP] caught Xlib error 171
[fresh] [error] ppb_graphics3d_create, glXMakeCurrent failed
[fresh] [error] ppb_graphics3d_create, glXMakeCurrent failed
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: User requested driver 'v"dpau"'
libva info: Trying to open /usr/lib/dri/v"dpau"_drv_video.so
libva info: va_openDriver() returns -1
NOT SANDBOXED
Vector smash protection is enabled.
[fresh] [error] [NP] caught Xlib error 8
[fresh] [error] [NP] caught Xlib error 8
[fresh] [error] [NP] caught Xlib error 171
[fresh] [error] [NP] caught Xlib error 171
[fresh] [error] ppb_graphics3d_create, glXMakeCurrent failed
[fresh] [error] ppb_graphics3d_create, glXMakeCurrent failed
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: User requested driver 'v"dpau"'
libva info: Trying to open /usr/lib/dri/v"dpau"_drv_video.so
libva info: va_openDriver() returns -1
NOT SANDBOXED
Vector smash protection is enabled.
[fresh] [error] [NP] caught Xlib error 8
[fresh] [error] [NP] caught Xlib error 8
[fresh] [error] [NP] caught Xlib error 171
[fresh] [error] [NP] caught Xlib error 171
[fresh] [error] ppb_graphics3d_create, glXMakeCurrent failed
[fresh] [error] ppb_graphics3d_create, glXMakeCurrent failed
Comment by AK (Andreaskem) - Monday, 27 June 2016, 15:55 GMT
Why does it say v"dpau" [sic]? For me (admittedly, I do not have Nvidia drivers), it just says

libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: User requested driver 'vdpau'
libva info: Trying to open /usr/lib/dri/vdpau_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0

Do you have LIBVA_DRIVER_NAME set?
Comment by Hikari (51334) - Monday, 27 June 2016, 16:12 GMT
Oh, sure I do. It was automatically detected, but VDPAU_DRIVER and LIBVA_DRIVER_NAME were set accordingly nevertheless.
I've followed the wiki successfully: https://wiki.archlinux.org/index.php/Hardware_video_acceleration
Comment by AK (Andreaskem) - Monday, 27 June 2016, 17:05 GMT
"libva info: va_openDriver() returns -1" would mean that hardware decoding does not work. What did you set for VDPAU_DRIVER and LIBVA_DRIVER_NAME? What is the output if you unset both variables? Does it still happen when everything is auto-detected?

What is the output of vdpauinfo, vainfo?
Comment by Hikari (51334) - Friday, 01 July 2016, 01:04 GMT
You are absolutely right. I made a typo, sorry :(

Although, without vpau the lag mentioned does happen, so still valid? Should I close and open one for Xlib?

Thank you.
Comment by AK (Andreaskem) - Monday, 04 July 2016, 17:03 GMT
I guess your problem is still valid. I am not sure if Xlib is really the culprit, though. I am certainly not the perfect guy to help you but since nobody else has offered any ideas, I might as well ask a few more questions:

Does anything show up in your kernel logs when this happens? Xorg logs? .xsession-errors?
Are your CPU/GPU temperatures okay?
What kind of file / stream are you usually playing in VLC when it happens? Does VLC show any error messages?
Did you set any driver options in your X config?
Comment by Hikari (51334) - Thursday, 21 July 2016, 02:13 GMT
Ok, the problem is gone after upgrading X to:

X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.5.4-1-ARCH x86_64

--------------------------------------------------
Then I did:

rm /usr/bin/nvidia-settings
rm /usr/share/applications/nvidia-settings.desktop
rm /usr/share/man/man1/nvidia-settings.1.gz
rm /usr/share/pixmaps/nvidia-settings.png

pacman -R nvidia-settings nvidia-340xx-utils
pacmatic -Sc nvidia-340xx-utils

nvidia-xconfig

--------------------------------------------------

# Then added the following to /usr/X11/xorg.conf and restarted.
Section "Module"
Load "glx"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "int10"
Load "type1"
Load "vbe"
Load "evdev"
EndSection

Loading...