rigaya / QSVEnc

QSVによる高速エンコードの性能実験
http://rigaya34589.blog135.fc2.com/blog-category-10.html
Other
314 stars 28 forks source link

--device doesnt work under linux properly #172

Closed Feierkuula closed 2 months ago

Feierkuula commented 1 year ago

Hello, i was using this command on Ubuntu 22.10 with recent compiled qsvenc, intel etc

qsvencc -i --device 2 --icq 28 --quality best -c av1 --vpp-colorspace hdr2sdr=hable --output-depth 10 -o test.mkv

however the device 2 does not work, it will encode on 1st GPU instead, but on 2st GPU, i can see that GPU process had been created, but working at 0% load, but on 1st GPU, the video encoding works there instead.

I have 2x A380 in my system.

rigaya commented 1 year ago

I'm sorry but I haven't got a system with 2 Intel GPUs with Linux installed, so --device is tested only with Windows.

How did you check that the 1st GPU is used with --device 2? (Did the log showed that the app was trying to run on 1st GPU?)

Furthermore, what will qsvencc --check-device show?

For example, it will show like below on Windows...

QSVEncC64.exe --check-device
Device #1: Intel Arc A380 Graphics
Device #2: Intel UHD Graphics 770
Feierkuula commented 1 year ago

Hello, i saw it with the tool intel_gpu_top that it is utilizied on 1st GPU instead.

The output of the qsvencc --check-device is:

qsvencc --check-device libva info: VA-API version 1.21.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function vaDriverInit_1_21 libva info: va_openDriver() returns 0 libva info: VA-API version 1.21.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function vaDriverInit_1_21 libva info: va_openDriver() returns 0 libva info: VA-API version 1.21.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function vaDriverInit_1_21 libva info: va_openDriver() returns 0 libva info: VA-API version 1.21.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function vaDriverInit_1_21 libva info: va_openDriver() returns 0 libva info: VA-API version 1.21.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function vaDriverInit_1_21 libva info: va_openDriver() returns 0 libva info: VA-API version 1.21.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so libva info: Found init function vaDriverInit_1_21 libva info: va_openDriver() returns 0 Device #1: Intel Graphics [0x56a5] Device #2: Intel Graphics [0x56a5]

My Specs:

Environment Info OS : Ubuntu Mantic Minotaur (development branch) (6.5.0-5-generic) x64 CPU: AMD Ryzen 9 5950X 16-Core Processor (16C/32T) RAM: Used 31438 MB, Total 32001 MB GPU: Intel Graphics / Driver : Intel iHD driver for Intel(R) Gen Graphics - 23.3.4 (a999b6ba3)

I am planning to buy 3rd Intel ARC A380 GPU, cause under Linux its all working well today.

rigaya commented 1 year ago

Hello, i saw it with the tool intel_gpu_top that it is utilizied on 1st GPU instead.

I see.

The output of the qsvencc --check-device

Seems like the 2nd GPU is recognized but not used?

I'm not sure if I can solve this out ( as I have not got an actual system to check), but the debug log might be a hint. Would you please run command below and share test.mkv.log.txt?

qsvencc -i test -c av1 --output-depth 10 -o test.mkv --log-level debug --log test.mkv.log.txt

Feierkuula commented 1 year ago

Seems like the 2nd GPU is recognized but not used?

Yes, that is correct, i think its because of the duplicate hardware name id's

I have attached 2 files, one without --device and one with --device 2 device.log.txt device2.log.txt

rigaya commented 1 year ago

Thank you for the log.

It seems like it's trying to use 2nd GPU but not successful as the internal code of the app does not support 2nd GPU on linux VA.

I'm currently cannot say whether I can support this or not, as haven't got a system with 2 Intel GPUs with Linux installed (as I said earlier).

rigaya commented 1 year ago

I have added device selection support on Linux systems in QSVEnc 7.49, should be able to select device properly.

Please have a try.

Feierkuula commented 1 year ago

Thank you, i tried it. The fix work as excepted including HDR2SDR on their GPUs seperated.

rigaya commented 1 year ago

Thank you for confirming.

I have confirmed for 2 device only, and not confirmed if it also works fine with 3 device, but I think it will with QSVEnc 7.49.

Feierkuula commented 1 year ago

I understand, i will order 3rd Intel GPU and will test it for you in the next weeks.

rigaya commented 2 months ago

I'll close this issue, as update has been already applied to QSVEnc.