Can’t get HW encoding working [Fedora 37, intel UHD P630]

Forum / NoMachine Terminal Server Products / Can’t get HW encoding working [Fedora 37, intel UHD P630]

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #43539
    timo
    Participant

    Hi,

    we’re currently evaluating the Workstation product.
    (nomachine-workstation_8.4.2_1_x86_64.rpm)

    I wasn’t able to enable hardware encoding for a Fedora 37 + intel UHD P630 system.

    Searching the forum I found this thread that I followed thoroughly

    https://forum.nomachine.com/topic/verify-gpu-encoding-used

    What I did:

    dnf install intel-media-sdk intel-media-driver libva libva-utils

    # mkdir -p /opt/intel/mediasdk/lib64/
    # ln -s /usr/lib64/dri/iHD_drv_video.so /opt/intel/mediasdk/lib64/iHD_drv_video.so

    LIBVA_DRIVER_NAME=iHD exported globally

    User nx is added to groups video and render.

    Devices are present

    # ls -la /dev/dri
    total 0
    drwxr-xr-x.  3 root root        100 Mar 22 13:35 .
    drwxr-xr-x. 20 root root       4220 Mar 22 13:35 ..
    drwxr-xr-x.  2 root root         80 Mar 22 13:35 by-path
    crw-rw—-+  1 root video  226,   1 Mar 22 13:35 card1
    crw-rw-rw-.  1 root render 226, 128 Mar 22 13:35 renderD128

    VA-API looks good to me

    # vainfo
    Trying display: wayland
    Trying display: x11
    libva info: VA-API version 1.16.0
    libva info: User environment variable requested driver ‘iHD’
    libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
    libva info: Found init function __vaDriverInit_1_16
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 1.16 (libva 2.16.0)
    vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics – 22.5.4 ()
    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
    VAProfileVC1Simple              :    VAEntrypointVLD
    VAProfileVC1Main                :    VAEntrypointVLD
    VAProfileVC1Advanced            :    VAEntrypointVLD
    VAProfileJPEGBaseline           :    VAEntrypointVLD
    VAProfileJPEGBaseline           :    VAEntrypointEncPicture
    VAProfileH264ConstrainedBaseline:    VAEntrypointVLD
    VAProfileH264ConstrainedBaseline:    VAEntrypointEncSlice
    VAProfileH264ConstrainedBaseline:    VAEntrypointFEI
    VAProfileH264ConstrainedBaseline:    VAEntrypointEncSliceLP
    VAProfileVP8Version0_3          :    VAEntrypointVLD
    VAProfileVP8Version0_3          :    VAEntrypointEncSlice
    VAProfileHEVCMain               :    VAEntrypointVLD
    VAProfileHEVCMain               :    VAEntrypointEncSlice
    VAProfileHEVCMain               :    VAEntrypointFEI
    VAProfileHEVCMain10             :    VAEntrypointVLD
    VAProfileHEVCMain10             :    VAEntrypointEncSlice
    VAProfileVP9Profile0            :    VAEntrypointVLD
    VAProfileVP9Profile2            :    VAEntrypointVLD

    However, according to NoMachine client (8.4.2) the Workstation-Server
    only uses software encoding.

    software encoding

    I guess it’s irrelevant but this is a remote virtual session using an ssh tunnel.
    Desktop version is GNOME.
    On the client side I use Windows 11.

    Which logs would be of help?
    I couldn’t find any hint regarding the encoder.

    Thanks in advance.
    Any help is appreciated.

    #43562
    Britgirl
    Keymaster

    Hello,

    NoMachine supports H.264 hardware acceleration for these types of sessions:

    (i) Connections to the remote physical desktop.
    (ii) Linux virtual desktops without activating the X11 vector graphics mode.
    (iii) Web sessions with support for WebRTC enabled

    From your screenshot I can see that you have X11VG enabled, so this is why it falls back to SW encoding.

    For more information about HW and SW encoding, take a look at the knowledge base article here: https://kb.nomachine.com/AR10K00706

    For information about the X11 vector graphics mode in X-Window virtual desktop
    https://kb.nomachine.com/AR02L00779

    Administrators can disable the X11 vector graphics mode by editing the /usr/NX/etc/node.cfg file. Set:

    ‘AgentX11VectorGraphics 0’

    #43563
    timo
    Participant

    Thanks for the reply.

    So I set

    ‘AgentX11VectorGraphics 0’

    restarted the server and reconnected the client.

    Checking the Server-GUI seems to tell me that X11 vector graphics is not enabled.

    But I still get “SW encoding” on the client.

    Where do I have to look for further information?

    #43567
    Britgirl
    Keymaster

    We’ll need logs from the server (C-../session logs specifically which are from the agent), this is the easiest way to check what’s happening.

    Please follow the instructions here: https://kb.nomachine.com/DT07S00243

    Send any attachments to forum[at]nomachine[dot]com thanks!

    #43622
    timo
    Participant

    Hello,

    did you receive the mail with the logs attached?
    If there is anything missing, please let me know.

    #43633
    Britgirl
    Keymaster

    We received them, thank you, and will be analyzing them as soon as possible.

    #43725
    timo
    Participant

    Hello,

    any news on that one?

    Thanks for your help.

    #43735
    Britgirl
    Keymaster

    Hi timo, sorry for not following up sooner. The logs did not show anything conclusive, so what we would like to do is send you a debug version (which we’re preparing). Would you be willing to try it and extract the logs again?

     

    #43736
    timo
    Participant

    Thanks for your help.

    Yes, will give it a try asap.

    #43862
    Britgirl
    Keymaster

    Logs are being analyzed. Thanks!

    #43866
    Britgirl
    Keymaster

    So, logs show the following:

    4791 5440 2023-04-08 14:53:12 989.801 QsLibraries/QsLibraries: Libraries are not loaded.
    4791 5440 2023-04-08 14:53:12 989.834 QsLibraries/QsLibraries: Loading ‘libva.so’.
    4791 5440 2023-04-08 14:53:12 989.904 QsLibraries/QsLibraries: WARNING! Failed to load ‘libva.so’

    A possible fix for that is to try adding symbolic link libva.so that will link to your libva.so library (which is probably named something like libva.so.1 or libva.so.2).

    1. Find libva.so.X on your system. You can do that using:

    a) find / -name "libva.so*"

    or

    b) ldd $(which vainfo)

    and see where libva.so points

    2. then cd into that directory where libva.so.X is placed, i.e., cd /usr/lib/x86_64-linux-gnu

    3. create symbolink link that will be called libva.so and will point to libva.so.X

    sudo ln -s libva.so.X libva.so

    4. restart nxserver, connect again and see if it works. If not, regather the logs like last time and submit so we can take a look (still from the debug version you installed).

    #43883
    timo
    Participant

    Following your hints I also had to link

    libva-drm.so -> libva-drm.so.2

    Unfortunately, it still doesn’t work and now claims
    Intel Quick Sync H.264 acceleration is not supported

    118288 118918 2023-04-16 10:20:36 167.670 QsLibraries/QsLibraries: Loading ‘libva.so’.
    118288 118918 2023-04-16 10:20:36 168.002 QsLibraries/QsLibraries: ‘libva.so’ library loaded.
    118288 118918 2023-04-16 10:20:36 168.514 QsLibraries/QsLibraries: ‘libva-drm.so’ library loaded.
    118288 118918 2023-04-16 10:20:36 168.609 QsLibraries/QsLibraries: Adding renderer ‘card1’ from /sys/bus/pci/devices/0000:00:02.0/drm.
    118288 118918 2023-04-16 10:20:36 168.617 QsLibraries/QsLibraries: Adding renderer ‘renderD128’ from /sys/bus/pci/devices/0000:00:02.0/drm.
    118288 118918 2023-04-16 10:20:36 168.711 QsLibraries/QsLibraries: Found 15 Intel devices.
    118288 118918 2023-04-16 10:20:36 168.787 QsLibraries/QsLibraries: Trying to open /dev/dri/renderD128.
    libva info: VA-API version 1.18.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
    118288 118918 2023-04-16 10:20:36 171.823 QsLibraries/QsLibraries: Display initialized.
    118288 118918 2023-04-16 10:20:36 171.854 QuickSync/QuickSync: Using 8 cpu cores.
    118288 118918 2023-04-16 10:20:36 172.012 QuickSync/QuickSync: Using provided bitrate of 7053 kbps.
    118288 118918 2023-04-16 10:20:36 172.023 QuickSync/QuickSync: Requesting software session with version 1.10.
    118288 118918 2023-04-16 10:20:36 172.026 QuickSync/QuickSync: Allocating session.
    Info: Intel Quick Sync H.264 acceleration is not supported.
    Info: Please consider updating your Intel drivers.
    118288 118918 2023-04-16 10:20:36 172.819 QuickSync/QuickSync: Closing session.
    118288 118918 2023-04-16 10:20:36 172.830 QuickSync/QuickSync: Releasing threads.
    Info: Using H.264 software encoder.

    The system has the most recent Intel packages installed

    rpm -qa | grep intel

    intel-gpu-firmware-20230310-148.fc38.noarch
    intel-mediasdk-22.6.4-3.fc38.x86_64
    oneVPL-intel-gpu-23.1.3-2.fc38.x86_64
    intel-gmmlib-22.3.5-1.fc38.x86_64
    xorg-x11-drv-intel-2.99.917-55.20210115.fc38.x86_64
    libva-intel-driver-2.4.1-12.20221130gitab755cb.fc38.x86_64
    intel-media-driver-23.1.6-1.fc38.x86_64

    N.B. The same environment with an Intel ARC 380 shows the message.

    Thanks for your help.

    #43890
    Britgirl
    Keymaster

    Regather the logs like last time and submit so we can take a look (still from the debug version you installed).Thanks.

    #43949
    Britgirl
    Keymaster

    Where did you install intel-media-sdk and intel-media-driver from? Was it the official repo or a different one?

    I have sent you another debug library to install. Do the same as before based on this new lib and submit new logs. Thanks for your patience.

    #43954
    timo
    Participant

    Thanks for your help!

    I sent you the new logs.

    All packages are from the official Fedora repositories.

Viewing 15 posts - 1 through 15 (of 22 total)

This topic was marked as solved, you can't post.