Forum / NoMachine for Linux / Hardware encoder not working on Linux
- This topic has 30 replies, 2 voices, and was last updated 8 months ago by taiziccf.
-
AuthorPosts
-
April 3, 2024 at 10:42 #47621taiziccfParticipant
VAINFO confirms that I have hardware acceleration. But it always get to SW encoding.
Session file shows:
NXAGENT – Version 8.11.3
Copyright (C) 2001, 2024 NoMachine.
See http://www.nomachine.com/ for more information.
Session: Starting session at Tue Apr 2 23:23:27 2024.
Info: Agent running with pid 2303.
Info: Slave server running with pid 2321.
Info: Listening to slave connections on port 12001.
Info: Display running with pid 2322.
Info: Audio server started with pid 2335.
Info: Audio client started with pid 2336.
Info: Display server started with pid 2349.
“The XKEYBOARD keymap compiler (nxkb) reports:”
“> “Warning: Unsupported high keycode 372 for name <I372> ignored
“> ” X11 cannot support keycodes above 255.
“> ” This warning only shows for the first high keycode.
“Errors from nxkb are not fatal to the X server”
Session: Session started at Tue Apr 2 23:23:27 2024.
“The XKEYBOARD keymap compiler (nxkb) reports:”
“> “Warning: Unsupported high keycode 372 for name <I372> ignored
“> ” X11 cannot support keycodes above 255.
“> ” This warning only shows for the first high keycode.
“Errors from nxkb are not fatal to the X server”
Info: Using MIT-SHM extension.
Info: Using SSE3 for screen analysis.
Info: Screen blanking running with pid 2743.
Session: Connected to display server ‘:0’ at ‘Tue Apr 2 23:25:45 2024’.
Session: Connected to events server ‘:0’ at ‘Tue Apr 2 23:25:45 2024’.
Info: Screen capture running with pid 2744.
Info: Screen analysis running with pid 2745.
Info: Using damage extension for screen updates.
Info: Using grab method ‘CopyArea’.
Info: Using screen size 1280×800.
Info: Display server for 106531926F885866D9C467E1AACF071A connected on Tue Apr 2 23:25:45 2024.
Info: Audio server for 106531926F885866D9C467E1AACF071A connected on Tue Apr 2 23:25:45 2024.
Info: Audio client for 106531926F885866D9C467E1AACF071A connected on Tue Apr 2 23:25:45 2024.
Info: RT handler running with pid 2790.
libva info: VA-API version 1.19.0
libva info: User environment variable requested driver ‘iHD’
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
Info: Intel Quick Sync H.264 acceleration is not supported.
Info: Please consider updating your Intel drivers.
Info: Using H.264 software encoder.
Info: Audio reader running with PID 2825.
2303 2825 2024-04-02 23:25:46 383.070 AudioIoPipeWireClientConnection: WARNING! No parameters or invalid ID
Attachments:
April 6, 2024 at 17:26 #47659taiziccfParticipantNow I am getting different error however still no hardware encoding.
NXAGENT – Version 8.11.3
Copyright (C) 2001, 2024 NoMachine.
See http://www.nomachine.com/ for more information.
Session: Starting session at Sun Apr 7 00:24:24 2024.
Info: Agent running with pid 3408.
Info: Slave server running with pid 3419.
Info: Display running with pid 3420.
Info: Listening to slave connections on port 12001.
Info: Audio server started with pid 3430.
Info: Audio client started with pid 3433.
Info: Display server started with pid 3452.
“The XKEYBOARD keymap compiler (nxkb) reports:”
“> “Warning: Unsupported high keycode 372 for name <I372> ignored
“> ” X11 cannot support keycodes above 255.
“> ” This warning only shows for the first high keycode.
“Errors from nxkb are not fatal to the X server”
Session: Session started at Sun Apr 7 00:24:24 2024.
“The XKEYBOARD keymap compiler (nxkb) reports:”
“> “Warning: Unsupported high keycode 372 for name <I372> ignored
“> ” X11 cannot support keycodes above 255.
“> ” This warning only shows for the first high keycode.
“Errors from nxkb are not fatal to the X server”
Info: Using MIT-SHM extension.
Info: Using SSE3 for screen analysis.
Info: Screen blanking running with pid 3697.
Session: Connected to display server ‘:0’ at ‘Sun Apr 7 00:24:27 2024’.
Session: Connected to events server ‘:0’ at ‘Sun Apr 7 00:24:27 2024’.
Info: Screen capture running with pid 3698.
Info: Using damage extension for screen updates.
Info: Screen analysis running with pid 3699.
Info: Using screen size 1056×1116.
Info: Using grab method ‘CopyArea’.
Info: Display server for 04426BCAD6794F28DD6151B000EC70EA connected on Sun Apr 7 00:24:27 2024.
Info: Audio server for 04426BCAD6794F28DD6151B000EC70EA connected on Sun Apr 7 00:24:27 2024.
Info: Audio client for 04426BCAD6794F28DD6151B000EC70EA connected on Sun Apr 7 00:24:27 2024.
Info: RT handler running with pid 3743.
libva info: VA-API version 1.19.0
libva info: User environment variable requested driver ‘iHD’
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_18
libva info: va_openDriver() returns 0
3408 3698 2024-04-07 00:24:28 691.080 QuickSync/QuickSync: WARNING! Failed to set display handle. Error is -17: Device operation failure.
Info: Using H.264 software encoder.
Info: Audio reader running with PID 3791.
3408 3791 2024-04-07 00:24:28 850.763 AudioIoPipeWireClientConnection: WARNING! No parameters or invalid ID
April 11, 2024 at 09:43 #47689BritgirlKeymasterPlease check in /usr/lib/x86_64-linux-gnu if you have the library libmfxhw64.so – if not please create symbolic link to libmfxhw64.so.1 from a shell with:
cd /usr/lib/x86_64-linux-gnu/ sudo ln -s cd libmfxhw64.so.1 libmfxhw64.so
Restart nomachine and try again to see if NoMachine is using Intel’s mfx hardware encoding.
April 12, 2024 at 09:59 #47709taiziccfParticipantI already have it
sudo ln -s libmfxhw64.so.1 libmfxhw64.so
ln: failed to create symbolic link ‘libmfxhw64.so’: File exists
April 12, 2024 at 11:56 #47715BritgirlKeymasterThe next step is to understand if it’s a drivers problem or not. Can you try the package libmfx-tools and encode with its sample encoder? The procedure is here:
https://github.com/Intel-Media-SDK/MediaSDK/wiki/Intel-media-stack-on-Ubuntu
sudo apt-get install libmfx-tools export LIBVA_DRIVER_NAME=iHD wget https://github.com/lu-zero/fate-samples/raw/master/h264-conformance/AUD_MW_E.264 # Encode H.264 stream w/ Low Power encoder on gen9+ (skl+) /usr/share/mfx/samples/sample_encode h264 \ -w 176 -h 144 -f 30 -cqp -qpi 30 -qpp 30 -qpb 30 -qsv-ff \ -i AUD_MW_E.yuv -o encoded_AUD_MW_E.264
April 12, 2024 at 12:56 #47716taiziccfParticipant/usr/share/mfx/samples/sample_encode h264 -w 176 -h 144 -f 30 -cqp -qpi 30 -qpp 30 -qpb 30 -qsv-ff -i AUD_MW_E.264 -o encoded_AUD_MW_E.264
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver ‘iHD’
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
Encoding Sample Version 8.4.27.0
Input file formatYUV420
Output videoAVC
Source picture:
Resolution176x144
Crop X,Y,W,H0,0,176,144
Destination picture:
Resolution176x144
Crop X,Y,W,H0,0,176,144
Frame rate30.00
QPI30
QPP30
QPB30
Gop size256
Ref dist1
Ref number2
Idr Interval0
Target usagebalanced
Memory typevaapi
Media SDK implhw
Media SDK version1.255
Processing started
Frame number: 1
Encoding fps: 4082
Processing finished
Guess is working correctly?
April 12, 2024 at 15:34 #47723taiziccfParticipantlatest session log
NXAGENT – Version 8.11.3
Copyright (C) 2001, 2024 NoMachine.
See http://www.nomachine.com/ for more information.
Session: Starting session at Fri Apr 12 20:14:06 2024.
Info: Agent running with pid 2938.
Info: Slave server running with pid 2949.
Info: Display running with pid 2950.
Info: Listening to slave connections on port 12001.
Info: Audio server started with pid 2962.
Info: Audio client started with pid 2963.
Info: Display server started with pid 2965.
“The XKEYBOARD keymap compiler (nxkb) reports:”
“> “Warning: Unsupported high keycode 372 for name <I372> ignored
“> ” X11 cannot support keycodes above 255.
“> ” This warning only shows for the first high keycode.
“Errors from nxkb are not fatal to the X server”
Session: Session started at Fri Apr 12 20:14:06 2024.
“The XKEYBOARD keymap compiler (nxkb) reports:”
“> “Warning: Unsupported high keycode 372 for name <I372> ignored
“> ” X11 cannot support keycodes above 255.
“> ” This warning only shows for the first high keycode.
“Errors from nxkb are not fatal to the X server”
Info: Using MIT-SHM extension.
Info: Using SSE3 for screen analysis.
Info: Screen blanking running with pid 3210.
Info: Screen capture running with pid 3211.
Session: Connected to display server ‘:0’ at ‘Fri Apr 12 20:14:35 2024’.
Session: Connected to events server ‘:0’ at ‘Fri Apr 12 20:14:35 2024’.
Info: Using damage extension for screen updates.
Info: Screen analysis running with pid 3212.
Info: Using grab method ‘CopyArea’.
Info: Using screen size 1056×1116.
Info: Display server for 56E4998825CCDF05446F19B2805CAB71 connected on Fri Apr 12 20:14:35 2024.
Info: Audio server for 56E4998825CCDF05446F19B2805CAB71 connected on Fri Apr 12 20:14:35 2024.
Info: Audio client for 56E4998825CCDF05446F19B2805CAB71 connected on Fri Apr 12 20:14:35 2024.
Info: RT handler running with pid 3258.
libva info: VA-API version 1.20.0
libva info: User environment variable requested driver ‘iHD’
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
2938 3212 2024-04-12 20:14:36 230.306 QuickSync/QuickSync: WARNING! Failed to set display handle. Error is -17: Device operation failure.
Info: Using H.264 software encoder.
Info: Audio reader running with PID 3316.
April 12, 2024 at 16:02 #47727BritgirlKeymasterThere is a difference in what is printed in the earlier logs and what is printed in the example procedure (#post-47716).
Logs show:
libva info: VA-API version 1.19.0
libva info: Trying to open /opt/intel/mediasdk/lib64/iHD_drv_video.soYour example:
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.soIt’s a different libva version and also a different filepath for the iHD driver.
You should check that you don’t have mixed libva libraries. For example, if you’re using Debian/Ubuntu, from a shell run dpkg -l libva*. What’s the output?
Next, make sure you’re using the iHD driver that is being used in your example, which is
/usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
. A quick way to do that is to rename iHD_drv_video.so which is in/opt/intel/mediasdk/lib64/
to something else, for example:cd /opt/intel/mediasdk/lib64/ mv iHD_drv_video.so iHD_drv_video.so.original
and restart NoMachine. Does that help?
April 12, 2024 at 16:26 #47731taiziccfParticipantI had done this
cd /opt/intel/mediasdk/lib64/
mv iHD_drv_video.so iHD_drv_video.so.original
April 12, 2024 at 16:40 #47736taiziccfParticipanti had done the mv iHD_drv_video.so iHD_drv_video.so.original
but still do not have HW encode even after restart the VM.
just to recap, this ubuntu is a VM running in Proxmox with iGPU passthrough, and i can do HW encoding using Handbrake. the iGPU is located at 01:00:0 instead of usual 00:02:0, does this matter?
April 12, 2024 at 17:06 #47740BritgirlKeymasterThe output you pasted show that ihd is still being loaded from /opt/intel/mediasdk/lib64/iHD_drv_video.so. Try restarting nxserver again. Knowing its proxmox can make a difference yes. What’s the exact distro and display manager your replicating?
April 12, 2024 at 17:34 #47747taiziccfParticipantI had just built the new intel/media-driver from github.
this time is version for VA-API 1.22. but still i don’t have HW encoder, although I am still able to transcode video using HWEncoder by handbrake.
I am using Ubuntu Cinnamon 23.10 with x11. (bear in mind previously even with 22.04, 22.10, 21.04 also not having a working NoMachine hardware encoder.)
below latest vainfo show 1.22.
~/build_media$ vainfo
Trying display: wayland
Trying display: x11
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.20.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics – 24.2.1 (829a706db)
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
April 12, 2024 at 17:38 #47749taiziccfParticipantand i had did the sha256sum for both file and it is identical.
chchia@ubuntu:/opt/intel/mediasdk/lib64$ sha256sum iHD_drv_video.so
ae099cf3cacfade679db75624a99fcdcf2f8c1e3bca753c91ea3f5230600e931 iHD_drv_video.so
chchia@ubuntu:/opt/intel/mediasdk/lib64$ cd /usr/lib/x86_64-linux-gnu/dri/
chchia@ubuntu:/usr/lib/x86_64-linux-gnu/dri$ sha256sum iHD_drv_video.so
ae099cf3cacfade679db75624a99fcdcf2f8c1e3bca753c91ea3f5230600e931 iHD_drv_video.so
April 12, 2024 at 17:40 #47750taiziccfParticipantsudo dpkg -l libva*
Attachments:
April 15, 2024 at 11:47 #47766BritgirlKeymasterAre you still getting the same error when running iHD_drv_video.so from /usr?
QuickSync/QuickSync: WARNING! Failed to set display handle. Error is -17: Device operation failure.
-
AuthorPosts
This topic was marked as solved, you can't post.