[Libva] Use libva as user without X
Thomas Scheuermann
scheuermann at barco.com
Wed Oct 8 02:30:19 PDT 2014
Hi,
how can I use libva as non-root user on a system without X running?
If I run vainfo as a non-root user, I get
$ vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 0.35.1
libva info: va_getDriverName() returns 1
libva error: va_getDriverName() failed with operation
failed,driver_name=i965
vaInitialize failed with error code 1 (operation failed),exit
If I do the same as root, I get
# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 0.35.1
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.35 (libva 1.3.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile -
1.3.2
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAProfileJPEGBaseline : VAEntrypointVLD
The difference is in the ioctl to /dev/dri/card0. As non-root user I get:
ioctl(3, 0xc0406400, 0x14786c0) = 0
ioctl(3, 0xc0406400, 0x14786c0) = 0
ioctl(3, 0x80046402, 0x7fffe00d6300) = 0
ioctl(3, 0xc0286405, 0x7fffe00d6260) = 0
ioctl(3, 0xc0286405, 0x7fffe00d6260) = -1 EINVAL (Invalid argument)
futex(0x7f549de7a0ec, FUTEX_WAKE_PRIVATE, 2147483647) = 0
ioctl(3, 0x40046411, 0x7fffe00d62e0) = -1 EACCES (Permission denied)
write(2, "libva info: va_getDriverName() r"..., 41libva info:
va_getDriverName() returns 1
) = 41
write(2, "libva error: va_getDriverName() "..., 78libva error:
va_getDriverName() failed with operation failed,driver_name=i965
) = 78
but as root I get:
ioctl(3, 0xc0406400, 0x10656c0) = 0
ioctl(3, 0xc0406400, 0x10656c0) = 0
ioctl(3, 0x80046402, 0x7fff4a5b24b0) = 0
ioctl(3, 0xc0286405, 0x7fff4a5b2410) = 0
write(2, "libva info: va_getDriverName() r"..., 41libva info:
va_getDriverName() returns 0
) = 41
geteuid() = 0
getuid() = 0
write(2, "libva info: Trying to open /usr/"..., 75libva info: Trying to
open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
) = 75
Regards,
Thomas
This message is subject to the following terms and conditions: MAIL DISCLAIMER<http://www.barco.com/en/maildisclaimer>
More information about the Libva
mailing list