Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This device doesn't support hardware accelerated H.264 playback [Linux] #2190

Closed
3 tasks done
Ahmed-E-86 opened this issue Feb 29, 2024 · 8 comments
Closed
3 tasks done

Comments

@Ahmed-E-86
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the nightly release?

  • This issue is present in the nightly release

Describe the Bug

When I try to access my Linux machine from Moonlight on my android phone (version 7.1.2), I get his error message:

This device or ROM doesn't support hardware accelerated H.264 playback.

Output of vainfo:

libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Haswell Mobile - 2.4.1
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
      VAProfileH264MultiviewHigh      :	VAEntrypointVLD
      VAProfileH264MultiviewHigh      :	VAEntrypointEncSlice
      VAProfileH264StereoHigh         :	VAEntrypointVLD
      VAProfileH264StereoHigh         :	VAEntrypointEncSlice
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileJPEGBaseline           :	VAEntrypointVLD

Expected Behavior

No response

Additional Context

No response

Host Operating System

Linux

Operating System Version

Linux Mint 21.3 Cinnamon

Architecture

64 bit

Sunshine commit or version

0.21.0

Package

Linux - AppImage

GPU Type

AMD

GPU Model

AMD Radeon HD 8750M

GPU Driver/Mesa Version

24.0.2

Capture Method (Linux Only)

PipeWire

Config

amd_coder = auto
nv_preset = p4
upnp = disabled
gamepad = x360
qsv_coder = auto
amd_usage = ultralowlatency
resolutions = [
    352x240,
    480x360,
    858x480,
    960x540,
    1280x720,
    1366x768
]
origin_pin_allowed = pc
vt_realtime = enabled
key_rightalt_to_key_win = disabled
amd_preanalysis = disabled
amd_rc = vbr_latency
amd_vbaq = enabled
encoder = vaapi
qsv_preset = medium
fps = [10,30,60]
nv_tune = ull
vt_coder = auto
hevc_mode = 0
nv_rc = cbr
dwmflush = enabled
min_log_level = 2
origin_web_ui_allowed = lan
amd_quality = balanced
vt_software = auto
nv_coder = auto

Apps

{
    "env": {
        "PATH": "$(PATH):$(HOME)\/.local\/bin"
    },
    "apps": [
        {
            "name": "Desktop",
            "image-path": "desktop.png"
        },
        {
            "name": "Low Res Desktop",
            "image-path": "desktop.png",
            "prep-cmd": [
                {
                    "do": "xrandr --output HDMI-1 --mode 960x540",
                    "undo": "xrandr --output HDMI-1 --mode 1366x768"
                }
            ]
        },
        {
            "name": "Steam Big Picture",
            "detached": [
                "setsid steam steam:\/\/open\/bigpicture"
            ],
            "image-path": "steam.png"
        },
        {
            "name": "Heroic Games Launcher",
            "output": "",
            "cmd": "heroic",
            "image-path": "\/usr\/share\/icons\/hicolor\/256x256\/apps\/heroic.png",
            "working-dir": "\/opt\/Heroic\/"
        }
    ]
}

Relevant log output

[2024:02:29:08:43:07]: Info: Sunshine version: 0.21.0
[2024:02:29:08:43:08]: Warning: Couldn't find app image at path [/usr/share/icons/hicolor/256x256/apps/heroic.png]
[2024:02:29:08:43:08]: Error: Couldn't load cuda: -1
[2024:02:29:08:43:08]: Error: Failed to gain CAP_SYS_ADMIN
[2024:02:29:08:43:08]: Info: System tray created
[2024:02:29:08:43:10]: Warning: Couldn't expose some properties for card: /dev/dri/card1
[2024:02:29:08:43:10]: Error: Failed to gain CAP_SYS_ADMIN
[2024:02:29:08:43:10]: Error: Failed to gain CAP_SYS_ADMIN
[2024:02:29:08:43:10]: Error: Couldn't get handle for DRM Framebuffer [95]: Possibly not permitted: do [sudo setcap cap_sys_admin+p sunshine]
[2024:02:29:08:43:10]: Error: Environment variable WAYLAND_DISPLAY has not been defined
[2024:02:29:08:43:10]: Info: Detecting monitors
[2024:02:29:08:43:10]: Info: Detected monitor 0: eDP-1, connected: true
[2024:02:29:08:43:10]: Info: Detected monitor 1: VGA-1, connected: false
[2024:02:29:08:43:10]: Info: Detected monitor 2: HDMI-1, connected: false
[2024:02:29:08:43:10]: Info: Trying encoder [vaapi]
[2024:02:29:08:43:10]: Info: Screencasting with X11
[2024:02:29:08:43:10]: Info: Screencasting with X11
[2024:02:29:08:43:10]: Info: SDR color coding [Rec. 601]
[2024:02:29:08:43:10]: Info: Color depth: 8-bit
[2024:02:29:08:43:10]: Info: Color range: [JPEG]
[2024:02:29:08:43:10]: Info: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so has no function __vaDriverInit_1_0
[2024:02:29:08:43:10]: Info: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so has no function __vaDriverInit_1_0
[2024:02:29:08:43:10]: Error: Couldn't initialize va display: unknown libva error
[2024:02:29:08:43:10]: Info: Screencasting with X11
[2024:02:29:08:43:11]: Info: SDR color coding [Rec. 601]
[2024:02:29:08:43:11]: Info: Color depth: 8-bit
[2024:02:29:08:43:11]: Info: Color range: [JPEG]
[2024:02:29:08:43:11]: Info: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so has no function __vaDriverInit_1_0
[2024:02:29:08:43:11]: Info: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so has no function __vaDriverInit_1_0
[2024:02:29:08:43:11]: Error: Couldn't initialize va display: unknown libva error
[2024:02:29:08:43:11]: Info: Screencasting with X11
[2024:02:29:08:43:11]: Info: SDR color coding [Rec. 601]
[2024:02:29:08:43:11]: Info: Color depth: 8-bit
[2024:02:29:08:43:11]: Info: Color range: [JPEG]
[2024:02:29:08:43:11]: Info: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so has no function __vaDriverInit_1_0
[2024:02:29:08:43:11]: Info: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so has no function __vaDriverInit_1_0
[2024:02:29:08:43:11]: Error: Couldn't initialize va display: unknown libva error
[2024:02:29:08:43:11]: Info: Screencasting with X11
[2024:02:29:08:43:11]: Info: SDR color coding [Rec. 601]
[2024:02:29:08:43:11]: Info: Color depth: 8-bit
[2024:02:29:08:43:11]: Info: Color range: [JPEG]
[2024:02:29:08:43:11]: Info: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so has no function __vaDriverInit_1_0
[2024:02:29:08:43:11]: Info: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so has no function __vaDriverInit_1_0
[2024:02:29:08:43:11]: Error: Couldn't initialize va display: unknown libva error
[2024:02:29:08:43:11]: Info: Encoder [vaapi] failed
[2024:02:29:08:43:11]: Error: Couldn't find any working encoder matching [vaapi]
[2024:02:29:08:43:11]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2024:02:29:08:43:11]: Info: Trying encoder [nvenc]
[2024:02:29:08:43:11]: Info: Screencasting with X11
[2024:02:29:08:43:11]: Info: Screencasting with X11
[2024:02:29:08:43:11]: Error: Couldn't load cuda: -1
[2024:02:29:08:43:11]: Info: Screencasting with X11
[2024:02:29:08:43:11]: Error: Couldn't load cuda: -1
[2024:02:29:08:43:11]: Info: Screencasting with X11
[2024:02:29:08:43:11]: Error: Couldn't load cuda: -1
[2024:02:29:08:43:11]: Info: Screencasting with X11
[2024:02:29:08:43:11]: Error: Couldn't load cuda: -1
[2024:02:29:08:43:11]: Info: Encoder [nvenc] failed
[2024:02:29:08:43:11]: Info: Trying encoder [software]
[2024:02:29:08:43:11]: Info: Screencasting with X11
[2024:02:29:08:43:11]: Info: Screencasting with X11
[2024:02:29:08:43:11]: Info: SDR color coding [Rec. 601]
[2024:02:29:08:43:11]: Info: Color depth: 8-bit
[2024:02:29:08:43:11]: Info: Color range: [JPEG]
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] profile High, level 4.2, 4:2:0, 8-bit
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] frame I:1     Avg QP:11.26  size:  1219
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] mb I  I16..4: 99.9%  0.1%  0.0%
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] 8x8 transform intra:0.1%
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] coded y,uvDC,uvAC intra: 0.1% 0.0% 0.0%
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] i16 v,h,dc,p: 93%  7%  0%  0%
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10%  0% 50%  0%  0%  0%  0%  0% 40%
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0% 56% 44%  0%  0%  0%  0%  0%  0%
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] i8c dc,h,v,p: 100%  0%  0%  0%
[2024:02:29:08:43:11]: Info: [libx264 @ 0x564247ba2e00] kb/s:585.12
[2024:02:29:08:43:11]: Info: 
[2024:02:29:08:43:11]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2024:02:29:08:43:11]: Info: 
[2024:02:29:08:43:11]: Info: Found H.264 encoder: libx264 [software]
[2024:02:29:08:43:11]: Info: Adding avahi service Sunshine
[2024:02:29:08:43:11]: Info: Configuration UI available at [https://localhost:47990]
[2024:02:29:08:43:12]: Info: Avahi service Sunshine successfully established.
@thatsysadmin
Copy link
Contributor

thatsysadmin commented Feb 29, 2024

This is a your phone issue, not a Sunshine issue from what I can tell. You may be SOL though; I don't think Moonlight Android has anyway to force software decoding unless someone knows something that I don't.

What phone/Android device do you have by any chance? If you're using something like LineageOS or Calyx; that would be helpful to know, including if you're on a stock ROM that's rooted.

@Ahmed-E-86
Copy link
Author

Ahmed-E-86 commented Feb 29, 2024

This is a your phone issue, not a Sunshine issue from what I can tell. You may be SOL though; I don't think Moonlight Android has anyway to force software decoding unless someone knows something that I don't.

What phone/Android device do you have by any chance? If you're using something like LineageOS or Calyx; that would be helpful to know, including if you're on a stock ROM that's rooted.

I use Lenovo A5000 (Android 5.0.2), and I installed LineageOS 14.1 (Android 7.1.2), which is pretty stable so far. The device is not rooted. What does SOL stand for?

@thatsysadmin
Copy link
Contributor

SOL means "Sum Out of Luck".

LineageOS never officially supported the A5000, so you may have to talk to whoever built and ported that ROM for you (Possibly @Parrot043 ?). Either way, that MediaTek MT6582 that is contained inside should support H.264 in hardware, so I think it's LineageOS that's giving you issues with not exposing or supporting hardware H.264.

@Ahmed-E-86
Copy link
Author

Ahmed-E-86 commented Mar 1, 2024

SOL means "Sum Out of Luck".

LineageOS never officially supported the A5000, so you may have to talk to whoever built and ported that ROM for you (Possibly @Parrot043 ?). Either way, that MediaTek MT6582 that is contained inside should support H.264 in hardware, so I think it's LineageOS that's giving you issues with not exposing or supporting hardware H.264.

You may be right, but how come 'Steam Link' runs without any issues?

@thatsysadmin
Copy link
Contributor

It's a totally different app. Steam Link is closed source, so we don't know if it's falling back to software decoding, but if one app can't hit the APIs nessary to run hardware decode, than other apps probably won't be able to as well.

@Originalimoc
Copy link

Not related but your host is encoding using software encoder though even you have intel iGPU and an AMD dGPU? You're using a Sunshine build with VA-API version that's not compatible with the installed display video driver.

@gschintgen
Copy link
Contributor

I think this should be closed as it's a client side issue.

As for the VA-API hardware encoding issue with Sunshine's AppImage, there's a separate issue for that: #2409.

@ReenigneArcher
Copy link
Member

@gschintgen thanks! I've noticed you've been active and helping a lot. I often don't have time to review everything, so that is greatly appreciated!

Would you be interested in being on our "team"? There's no obligation to be any more active than you are currently. We have a hidden discord channel where we can discuss issues, coding questions, roadmap, etc behind the scenes.

@ReenigneArcher ReenigneArcher closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants