Fedora Linux Support Community & Resources Center
  #1  
Old 19th June 2017, 08:44 PM
Manouk Offline
Registered User
 
Join Date: Jun 2017
Location: United Kingdom
Posts: 1
windows_98_nt_2000chrome
Using VAAPI on a headless server

Hello,

This is my first time posting a question. Usually I am able to figure things out after a couple of days of searching around but I am stuck on this one. Hopefully someone can help me!

I have a headless server and added an NVIDIA GPU. I blacklisted nouveau and install the NVIDIA driver. Then I dragged a monitor to the server, everything seems to be working. Both vainfo and vdpauinfo are super happy and I can encode with ffmpeg.

Now I take the monitor away and login via SSH. Nothing seems to work. I have posted the command I tried below. I understand that there is no X server but I don't really understand how that stops the commands from finding the driver.

Hopefully someone that understand the architecture of this thing can give me a hint to get this working.

Many thanks!

# vainfo

error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 0.39.4
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

# vdpauinfo

vdpauinfo: cannot connect to X server

# ffmpeg -loglevel debug -vaapi_device /dev/dri/renderD128 -i "input.mkv" -vf 'format=nv12,hwupload' -map 0:0 -map 0:1 -threads 8 -aspect 16:9 -y -f matroska -acodec copy -vcodec h264_vaapi -qp 19 -bf 2 "output"

[AVHWDeviceContext @ 0x565421cb0360] Opened VA display via DRM device /dev/dri/renderD128.
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
[AVHWDeviceContext @ 0x565421cb0360] Failed to initialise VAAPI connection: -1 (unknown libva error).
[vaapi @ 0x5654214fe0f0] Failed to create a VAAPI device
Reply With Quote
  #2  
Old 20th June 2017, 01:46 AM
ocratato Offline
Registered User
 
Join Date: Oct 2010
Location: Canberra
Posts: 2,575
linuxfirefox
Re: Using VAAPI on a headless server

Found this page which has a nice diagram of the architecture - which explains why the library needs an X server.
https://en.wikipedia.org/wiki/Video_Acceleration_API
__________________
Has anyone seriously considered that it might be turtles all the way down?
That's very old fashioned thinking.
The current model is that it's holographic nested virtualities of turtles, all the way down.
Reply With Quote
  #3  
Old 20th June 2017, 05:45 AM
nobody Offline
Registered User
 
Join Date: Mar 2012
Location: München, Deutschland
Posts: 840
windows_98_nt_2000chrome
Talking Re: Using VAAPI on a headless server

In the nutshell, what I understood looking into:

[1] Architecture:



[2] Reading the following:

Quote:
Software architecture[edit]

Video Acceleration API (VA API) interface architecture
The current interface is window system independent, so that it can potentially be used with graphics sub-systems other than the DRI (Direct Rendering Infrastructure) in X Window System, such as direct with framebuffer, and it can work with third-party DRM (Direct Rendering Manager) libraries. In a nutshell, it is a scheme to pass various types of data buffers from the application to the GPU for decoding or encoding a compressed bit-stream.
YES, your VA-API is independent, considering the following:

Quote:
"The main motivation for VA-API (Video Acceleration API) is to enable hardware accelerated video decode/encode at various entry-points (VLD, IDCT, Motion Compensation etc.) for the prevailing coding standards today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, H.265/HEVC and VC-1/VMW3)." http://www.freedesktop.org/wiki/Software/vaapi
In other words, VA-API is INDEPENDENT of X11 Server just to manipulate the video streaming (coding/decoding), nothing more.

But for your DP and screen to work, you HAVE TO HAVE X11 Server -> Compositor (to move several/many Xwindows around and show them on the screen).
_______

Let me throw wild guess why, after you removed the monitor, these VA-API I/Fs do not work: probably they need/require (?) monitor's EDID (basic video sync timings for your monitor), so if you return monitor, and reboot, everything (probably) will behave correctly (in regards to VA-APIs), as before.

The trick here is, if monitor's EDID not provided via DDC/CI interface, VA-API is going to (probably ) ask X11 Server to provide back generic EDID.

_nobody_
__________________
I am nobody, and nobody is perfect, therefore I am perfect!

Last edited by nobody; 20th June 2017 at 08:06 AM. Reason: Adding some thoughts for more complete picture
Reply With Quote
  #4  
Old 17th July 2017, 08:54 PM
nobody Offline
Registered User
 
Join Date: Mar 2012
Location: München, Deutschland
Posts: 840
windows_98_nt_2000chrome
Question Re: Using VAAPI on a headless server

Quote:
Originally Posted by Manouk View Post
Now I take the monitor away and login via SSH. Nothing seems to work. I have posted the command I tried below. I understand that there is no X server but I don't really understand how that stops the commands from finding the driver.

Hopefully someone that understand the architecture of this thing can give me a hint to get this working.
Any updates after my previous post?

_nobody_
__________________
I am nobody, and nobody is perfect, therefore I am perfect!
Reply With Quote
Reply

Tags
headless, server, vaapi

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Headless Server glennzo Hardware & Laptops 21 15th September 2008 04:49 PM
Headless Media Server slycker Linux Chat 0 16th November 2007 12:57 AM
Convert Server to Headless turpintti Servers & Networking 2 17th January 2007 01:19 AM


Current GMT-time: 18:58 (Thursday, 27-07-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat