You are not logged in.

#1 2020-06-09 17:57:38

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 410

Use intel integrated video card to accelerate videos

Hi,
is it possible to use the intel video card integrated in the i7-6700hq cpu to hardware accelerate via va-api videos while keeping the discrete nvidia card always active as a primary card?

Offline

#2 2020-06-09 19:43:42

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,858

Re: Use intel integrated video card to accelerate videos

Afaik you will have to force a program to run on the intel card instead of the nvidia one.

Post 

DRI_PRIME=1 glxinfo -B

If that shows intel or modesetting as renderer, prepending DRI_PRIME=1 to the command for the program.

Last edited by Lone_Wolf (2020-06-09 19:43:55)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2020-06-09 19:56:43

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 410

Re: Use intel integrated video card to accelerate videos

DRI_PRIME=1 glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 4096 MB
    Total available memory: 4096 MB
    Currently available dedicated video memory: 3628 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 950M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 440.82
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 440.82
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 440.82
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Offline

#4 2020-06-09 20:00:00

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,858

Re: Use intel integrated video card to accelerate videos

Not what I expected, output of

$ xrandr --listproviders
$ glxinfo -B

Last edited by Lone_Wolf (2020-06-09 20:00:14)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2020-06-09 20:01:16

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 410

Re: Use intel integrated video card to accelerate videos

xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x1df cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 4 associated providers: 1 name:modesetting

glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 4096 MB
    Total available memory: 4096 MB
    Currently available dedicated video memory: 3590 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 950M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 440.82
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 440.82
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 440.82
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Offline

#6 2020-06-09 20:30:25

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,858

Re: Use intel integrated video card to accelerate videos

So your X does see both cards, but it seems dri_prime autosetup doesn't work .

Try (and post)

$ xrandr --setprovideroffloadsink 1 0
$ DRI_PRIME=1 glxinfo -B

P.S. please use code tags for such outputs, see https://bbs.archlinux.org/help.php#bbcode


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2020-06-09 20:38:32

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 410

Re: Use intel integrated video card to accelerate videos

Lone_Wolf wrote:

So your X does see both cards, but it seems dri_prime autosetup doesn't work .

Try (and post)

$ xrandr --setprovideroffloadsink 1 0
$ DRI_PRIME=1 glxinfo -B

P.S. please use code tags for such outputs, see https://bbs.archlinux.org/help.php#bbcode

I've followed this wiki page https://wiki.archlinux.org/index.php/NV … phics_only so that to use only NVIDIA card which is what I want, but now I would like to use the unused intel card for the specific task of accelerating videos playing in particular using vlc.

Do you still need me to execute the above commands?

Offline

#8 2020-06-09 20:54:21

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,858

Re: Use intel integrated video card to accelerate videos

That setup should allow the intel card to be used.

"xrandr --setprovideroffloadsink 1 0" tells the intel card it should render stuff and then send it to the nvidia card.
The nvidia card then sends the output to the attached screen(s) .

Xorg was recently changed to allow Opensource drivers to use DRI 3 to automatically make the necessary connections.

Try those 2 commands together, if they don't show modesetting as renderer your current X configuration setup requires changes to allow the use of the intel card.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#9 2020-06-09 21:07:18

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 410

Re: Use intel integrated video card to accelerate videos

xrandr --setprovideroffloadsink 1 0

X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  140 (RANDR)
  Minor opcode of failed request:  34 (RRSetProviderOffloadSink)
  Value in failed request:  0x1b8
  Serial number of failed request:  16
  Current serial number in output stream:  17

Offline

#10 2020-06-10 09:58:42

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,858

Re: Use intel integrated video card to accelerate videos

Damn, should have looked better at xrandr --listproviders output .

xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 0 outputs: 0 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x1df cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 4 associated providers: 1 name:modesetting

What I was testing requires the nvidia card to function as a Sink Offload which it can't do.

If you want to have both intel and nvidia functional, you'll have to use one of  he methods where the intel card is the primary one and the nvidia card is used on demand only .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#11 2020-06-10 11:23:52

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 410

Re: Use intel integrated video card to accelerate videos

I understand, but at least in the past those methods have never given me great satisfaction. I hope they have improved in the meantime.

Offline

Board footer

Powered by FluxBB