Bug 106519 - Is it normal that the 4K video on the Vega 56 GPU played with loud turbine noise, 200% load of the desktop Core i7 CPU and at the same time playable with jerks and dropping frames?
Summary: Is it normal that the 4K video on the Vega 56 GPU played with loud turbine no...
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/AMDgpu (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-14 20:59 UTC by mikhail.v.gavrilov
Modified: 2018-10-09 19:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
htop and xsensors (836.42 KB, image/png)
2018-05-14 20:59 UTC, mikhail.v.gavrilov
no flags Details
Video in Totem player (3.26 MB, image/png)
2018-05-14 21:00 UTC, mikhail.v.gavrilov
no flags Details
mpv verbose info (6.81 KB, text/plain)
2018-05-15 21:12 UTC, mikhail.v.gavrilov
no flags Details
mpv verbose info for h264 (12.10 KB, text/plain)
2018-05-15 21:17 UTC, mikhail.v.gavrilov
no flags Details
mpv vp9 (7.49 KB, text/plain)
2018-05-24 03:44 UTC, mikhail.v.gavrilov
no flags Details
mpv h264 (12.78 KB, text/plain)
2018-05-24 03:45 UTC, mikhail.v.gavrilov
no flags Details
Xorg.0.log (80.02 KB, text/plain)
2018-08-06 15:57 UTC, mikhail.v.gavrilov
no flags Details

Description mikhail.v.gavrilov 2018-05-14 20:59:00 UTC
Created attachment 139566 [details]
htop and xsensors

Is it normal that the 4K video on the Vega 56 GPU played with loud turbine noise, 200% load of the desktop Core i7 CPU and at the same time playable with jerks and dropping frames?

$ mpv --hwdec=vaapi Downloads/WE\ GOT\ INTEL\'S\ PROTOTYPE\ GRAPHICS\ CARD.webm 
Playing: Downloads/WE GOT INTEL'S PROTOTYPE GRAPHICS CARD.webm
 (+) Video --vid=1 (*) (vp9 3840x2160 29.970fps)
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
VO: [gpu] 3840x2160 yuv420p
V: 00:00:19 / 00:14:44 (2%) Dropped: 24


Exiting... (Quit)
Comment 1 mikhail.v.gavrilov 2018-05-14 21:00:01 UTC
Created attachment 139567 [details]
Video in Totem player
Comment 2 mikhail.v.gavrilov 2018-05-14 21:00:18 UTC
$ inxi -bM
System:    Host: localhost.localdomain Kernel: 4.17.0-0.rc3.git4.1.fc29.x86_64 x86_64 bits: 64
           Desktop: Gnome 3.29.1 Distro: Fedora release 29 (Rawhide)
Machine:   Device: desktop System: Gigabyte product: Z87M-D3H serial: N/A
           Mobo: Gigabyte model: Z87M-D3H serial: N/A UEFI: American Megatrends v: F11 date: 08/12/2014
Battery    hidpp__0: charge: N/A condition: NA/NA Wh
CPU:       Quad core Intel Core i7-4770 (-MT-MCP-) speed/max: 3790/3900 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Vega 10 XT [Radeon RX Vega 64]
           Display Server: wayland (X.org 119999.5 ) drivers: modesetting,fbdev,vesa
           Resolution: 3840x2160@59.98hz
           OpenGL: renderer: Radeon RX Vega (VEGA10, DRM 3.25.0, 4.17.0-0.rc3.git4.1.fc29.x86_64, LLVM 6.0.0)
           version: 4.5 Mesa 18.1.0-rc3
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
Drives:    HDD Total Size: 16241.0GB (19.6% used)
Info:      Processes: 429 Uptime: 1 day Memory: 16145.4/32037.0MB Client: Shell (bash) inxi: 2.3.56
Comment 3 Christian König 2018-05-15 07:09:40 UTC
> $ mpv --hwdec=vaapi Downloads/WE\ GOT\ INTEL\'S\ PROTOTYPE\ GRAPHICS\
> CARD.webm 
> Playing: Downloads/WE GOT INTEL'S PROTOTYPE GRAPHICS CARD.webm
>  (+) Video --vid=1 (*) (vp9 3840x2160 29.970fps)
> Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object
> file: No such file or directory

"--hwdec=vaapi" and "Failed to open VDPAU backend"? Could it be that you have a setting which says to use VDPAU for displaying?
Comment 4 mikhail.v.gavrilov 2018-05-15 19:33:12 UTC
Today (In reply to Christian König from comment #3)
> > $ mpv --hwdec=vaapi Downloads/WE\ GOT\ INTEL\'S\ PROTOTYPE\ GRAPHICS\
> > CARD.webm 
> > Playing: Downloads/WE GOT INTEL'S PROTOTYPE GRAPHICS CARD.webm
> >  (+) Video --vid=1 (*) (vp9 3840x2160 29.970fps)
> > Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object
> > file: No such file or directory
> 
> "--hwdec=vaapi" and "Failed to open VDPAU backend"? Could it be that you
> have a setting which says to use VDPAU for displaying?

This morning on my distribution (Fedora 29) a lot of packages was upgraded.
After this upgrade, CPU load while playing 4K VP9 videos was decreased in two times.
And most importantly, the GPU was stop heated like it was yesterday. (1-2 LED only glow during playing video) And disappeared dropped frames.

But:
1) Error message "Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory" are still out. I am also want to say that I not touched settings and don't know why mpv want load libvdpau_nvidia.so library. May be you can help in where I can check this settings.

2) Problem was gone only in mpv and Firefox (I am not checking another players), but Totem still working as yesterday (GPU overheating, on the video card all LED are glow + 200% CPU and more ...)

3) On Firefox and mpv I was note that happens new problem. This issue in desyncing video and audio. The video is always late.

4) CPU loading during playing video was decreases in two times in some applications as I said above, but I am curious about 100% CPU load it normal or too much? I read somewhere that somebody's said that CPU load must does not exceed 30% on the mobile CPU with IGPU during playing 4K video. It's true?
Comment 5 mikhail.v.gavrilov 2018-05-15 20:02:16 UTC
5) Opera browser still working as yesterday (GPU overheating, on the video card all LED are glow + 200% CPU and more ...)
Comment 6 mikhail.v.gavrilov 2018-05-15 21:12:26 UTC
Created attachment 139580 [details]
mpv verbose info
Comment 7 mikhail.v.gavrilov 2018-05-15 21:14:07 UTC
(In reply to mikhail.v.gavrilov from comment #6)
> Created attachment 139580 [details]
> mpv verbose info

[vd] Using software decoding.
looks like hardware acceleration not used when playing VP9 video it's pity.
Comment 8 mikhail.v.gavrilov 2018-05-15 21:17:53 UTC
Created attachment 139581 [details]
mpv verbose info for h264
Comment 9 mikhail.v.gavrilov 2018-05-15 21:19:04 UTC
(In reply to mikhail.v.gavrilov from comment #8)
> Created attachment 139581 [details]
> mpv verbose info for h264

[vd] Using software decoding.
Also hardware acceleration not used for h264 why?

$ gst-inspect-1.0 vaapi
Plugin Details:
  Name                     vaapi
  Description              VA-API based elements
  Filename                 /usr/lib64/gstreamer-1.0/libgstvaapi.so
  Version                  1.14.0
  License                  LGPL
  Source module            gstreamer-vaapi
  Source release date      2018-03-19
  Binary package           gstreamer-vaapi
  Origin URL               http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer

  vaapimpeg2dec: VA-API MPEG2 decoder
  vaapih264dec: VA-API H264 decoder
  vaapivc1dec: VA-API VC1 decoder
  vaapih265dec: VA-API H265 decoder
  vaapipostproc: VA-API video postprocessing
  vaapidecodebin: VA-API Decode Bin
  vaapisink: VA-API sink
  vaapih265enc: VA-API H265 encoder
  vaapih264enc: VA-API H264 encoder

  9 features:
  +-- 9 elements
Comment 10 Christian König 2018-05-16 08:05:41 UTC
Please provide the output of vainfo.
Comment 11 mikhail.v.gavrilov 2018-05-16 15:59:24 UTC
(In reply to Christian König from comment #10)
> Please provide the output of vainfo.

$ vainfo
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Mesa Gallium driver 18.1.0-rc3 for Radeon RX Vega (VEGA10, DRM 3.25.0, 4.17.0-0.rc4.git2.1.fc29.x86_64, LLVM 6.0.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc
Comment 12 Christian König 2018-05-23 10:56:58 UTC
(In reply to mikhail.v.gavrilov from comment #11)
> (In reply to Christian König from comment #10)
> > Please provide the output of vainfo.
> 
> $ vainfo
> libva info: VA-API version 1.1.0
...

At least of hand that looks like it should work.

Not the slightest idea what's going wrong here, but it must be something specific to your system.

Maybe try different combination of mpv parameters. E.g. explicitly specify which hw decoding and which output driver to use.
Comment 13 mikhail.v.gavrilov 2018-05-24 03:44:57 UTC
Created attachment 139726 [details]
mpv vp9
Comment 14 mikhail.v.gavrilov 2018-05-24 03:45:28 UTC
Created attachment 139727 [details]
mpv h264
Comment 15 mikhail.v.gavrilov 2018-05-24 03:49:01 UTC
> Maybe try different combination of mpv parameters. E.g. explicitly specify which hw decoding and which output driver to use.

I added output parameter but nothing is changed. Hardware acceleration neither used in VP9 nor H264.

[vd] Container reported FPS: 29.970030
[vd] Codec list:
[vd]     vp9 - Google VP9
[vd]     vp9_v4l2m2m (vp9) - V4L2 mem2mem VP9 decoder wrapper
[vd]     libvpx-vp9 (vp9) - libvpx VP9
[vd]     vp9_cuvid (vp9) - Nvidia CUVID VP9 decoder
[vd] Opening video decoder vp9
[vd] Looking at hwdec vp9-vaapi...
[vo/opengl] Loading hwdec driver 'vaapi-egl'
[vo/opengl] Loading failed.
[vo/opengl] Loading hwdec driver 'cuda-nvdec'
[vo/opengl/cuda-nvdec] Failed to load CUDA symbols
[vo/opengl] Loading failed.
[vo/opengl] Loading hwdec driver 'vdpau-glx'
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vo/opengl/vdpau-glx] Error when calling vdp_device_create_x11: 1
[vo/opengl] Loading failed.
[vd] Could not create device.
[vd] Using software decoding.
[vd] Detected 8 logical cores.
[vd] Requesting 9 threads for decoding.
[vd] Selected video codec: vp9 (Google VP9)



[vd] Container reported FPS: 23.976025
[vd] Codec list:
[vd]     h264 - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[vd]     h264_v4l2m2m (h264) - V4L2 mem2mem H.264 decoder wrapper
[vd]     h264_qsv (h264) - H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration)
[vd]     h264_cuvid (h264) - Nvidia CUVID H264 decoder
[vd] Opening video decoder h264
[vd] Looking at hwdec h264-vaapi...
[vo/opengl] Loading hwdec driver 'vaapi-egl'
[vo/opengl] Loading failed.
[vo/opengl] Loading hwdec driver 'cuda-nvdec'
[vo/opengl/cuda-nvdec] Failed to load CUDA symbols
[vo/opengl] Loading failed.
[vo/opengl] Loading hwdec driver 'vdpau-glx'
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vo/opengl/vdpau-glx] Error when calling vdp_device_create_x11: 1
[vo/opengl] Loading failed.
[vd] Could not create device.
[vd] Using software decoding.
[vd] Detected 8 logical cores.
[vd] Requesting 9 threads for decoding.
[vd] Selected video codec: h264 (H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10)
Comment 16 Alex Deucher 2018-05-24 04:31:54 UTC
vega10 does not support VP9.
Comment 17 mikhail.v.gavrilov 2018-05-24 17:06:01 UTC
(In reply to Alex Deucher from comment #16)
> vega10 does not support VP9.
Here https://www.phoronix.com/scan.php?page=news_item&px=AMD-VP9-VAAPI-VCN
I am here that AMD Posts VP9 VA-API Video Acceleration For Gallium3D this is 	
lie?


Anyway H264 should work, right?
Here in mpv issue tracker mention that vaapi for AMD is so buggy:
https://github.com/mpv-player/mpv/issues/5852#issuecomment-391785043


It possible to fix?
Comment 18 Alex Deucher 2018-05-24 17:16:06 UTC
(In reply to mikhail.v.gavrilov from comment #17)
> (In reply to Alex Deucher from comment #16)
> > vega10 does not support VP9.
> Here https://www.phoronix.com/scan.php?page=news_item&px=AMD-VP9-VAAPI-VCN
> I am here that AMD Posts VP9 VA-API Video Acceleration For Gallium3D this is
> 
> lie?
> 

VP9 is supported on Raven.

> 
> Anyway H264 should work, right?
> Here in mpv issue tracker mention that vaapi for AMD is so buggy:
> https://github.com/mpv-player/mpv/issues/5852#issuecomment-391785043
> 
> 
> It possible to fix?

H.264 works fine.  Not sure what's happening with your system.
Comment 19 mikhail.v.gavrilov 2018-05-24 17:24:58 UTC
(In reply to Alex Deucher from comment #18)
> H.264 works fine.  Not sure what's happening with your system.

Which info needed?
Comment 20 mikhail.v.gavrilov 2018-05-24 21:21:29 UTC
(In reply to Alex Deucher from comment #18)
> 
> H.264 works fine.  Not sure what's happening with your system.

It turns out I was running the old version of mpv and not the new one which was advised build from the master branch.

Now I see that acceleration work from verbose output.
But now I able reproduce issue https://bugs.freedesktop.org/show_bug.cgi?id=106430 also in mpv player which first I met in Totem player when install gstreamer1-vaapi package for first time.
Comment 21 mikhail.v.gavrilov 2018-08-05 13:14:48 UTC
Alex, 

I noticed that VAAPI does not work in X11 clients, and the output of vainfo under the Xorg session gives the following result:

$ vainfo 
libva info: VA-API version 1.2.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit

What is this problem here?


$ inxi -bM
System:    Host: localhost.localdomain Kernel: 4.18.0-0.rc7.git1.1.fc29.x86_64 x86_64 bits: 64 
           Desktop: Gnome 3.29.90 Distro: Fedora release 29 (Rawhide) 
Machine:   Type: Desktop System: Gigabyte product: Z87M-D3H v: N/A serial: <root required> 
           Mobo: Gigabyte model: Z87M-D3H serial: <root required> UEFI: American Megatrends v: F11 
           date: 08/12/2014 
CPU:       Quad Core: Intel Core i7-4770 type: MT MCP speed: 3713 MHz min/max: 800/3900 MHz 
Graphics:  Card-1: Advanced Micro Devices [AMD/ATI] Vega 10 XT [Radeon RX Vega 64] driver: amdgpu v: kernel 
           Display: x11 server: Fedora Project X.org 11.0 driver: fbdev,modesetting,vesa 
           resolution: 3840x2160~60Hz 
           OpenGL: renderer: Radeon RX Vega (VEGA10 DRM 3.26.0 4.18.0-0.rc7.git1.1.fc29.x86_64 LLVM 6.0.1) 
           v: 4.5 Mesa 18.1.5 
Network:   Card-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 
Drives:    Local Storage: total: 14.80 TiB used: 4.23 TiB (28.6%) 
Info:      Processes: 467 Uptime: 1h 09m Memory: 31.29 GiB used: 20.91 GiB (66.8%) Shell: bash inxi: 3.0.20
Comment 22 Michel Dänzer 2018-08-06 09:21:09 UTC
Please attach the corresponding Xorg log file.
Comment 23 mikhail.v.gavrilov 2018-08-06 15:57:27 UTC
Created attachment 140983 [details]
Xorg.0.log
Comment 24 Michel Dänzer 2018-08-14 11:13:56 UTC
From the Xorg log file:

[ 14346.273] (EE) modeset(0): [DRI2] No driver mapping found for PCI device 0x1002 / 0x687f
[ 14346.273] (EE) modeset(0): Failed to initialize the DRI2 extension.

This should be fixed in the xserver 1.20.1 release.

Also, this wouldn't have happened with xf86-video-amdgpu, the recommended Xorg driver for our GPUs.
Comment 25 mikhail.v.gavrilov 2018-08-16 15:18:29 UTC
(In reply to Michel Dänzer from comment #24)
> Also, this wouldn't have happened with xf86-video-amdgpu, the recommended
> Xorg driver for our GPUs.

1) This package is absent in Fedora
# dnf search xf86-video-amdgpu
Last metadata expiration check: 0:16:19 ago on Thu 16 Aug 2018 07:52:28 PM +05.
No matches found.

2) I am already sitting under Wayland for a long time. The XWayland it is pain of Xorg legacy until all programs are rewritten under Wayland.
Comment 26 Cristian Ciupitu 2018-10-09 19:04:41 UTC
For what it's worth, the name of the Xorg driver package is xorg-x11-drv-amdgpu on Fedora.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.