FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.35k stars 72 forks source link

Issue with Wayland on Fedora 34 #85

Closed abhijangda closed 2 years ago

abhijangda commented 2 years ago

Hi,

I have been using UxPlay for a while but suddenly after some recent updates on Fedora 34, UxPlay is not working. Here is more information:

OS: Fedora 34 (Kernel: 5.16.18-100.fc34.x86_64) Display Environment: KDE Plasma 5.24.3 running on Wayland UxPlay version: git commit bdf8f7aecfbe114b3a953298274d0cc3cfd7572b

Build Process:

cd UxPlay
mkdir build
cd build
cmake ..
make -j

Start process using build/uxplay

Error (MAC address is removed):

using system MAC address XX:XX:XX:XX:XX:XX
Initialized server socket(s)
DtsGetHWFeatures: Create File Failed
DtsGetHWFeatures: Create File Failed
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed
uxplay: ../src/wayland-client.c:2312: wl_proxy_set_queue: Assertion `proxy->display == queue->display' failed.
Aborted (core dumped)

Would be great if you could look into it.

Thank you

fduncanh commented 2 years ago

I suppose you are using

uxplay -vs waylandsink

?

also

export GST_DEBUG=2

before running uxplay to see any GStreamer errors.

Google for

DtsGetHWFeatures: Create File Failed

seems to show a long history of this with fedora.

abhijangda commented 2 years ago

Here is the output with GST_DEBUG=2

GST_DEBUG=2 ./uxplay -vs waylandsink
using system MAC address 24:4b:fe:c8:6e:95
Initialized server socket(s)
DtsGetHWFeatures: Create File Failed
DtsGetHWFeatures: Create File Failed
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed
0:00:00.266696799 17360      0x265af00 ERROR                 bcmdec gstbcmdec.c:875:gst_bcm_dec_change_state:<bcmdec0> dev open failed -1
0:00:00.266716075 17360      0x265af00 ERROR                 bcmdec gstbcmdec.c:876:gst_bcm_dec_change_state:<bcmdec0> dev open failed...ret GST_STATE_CHANGE_FAILURE
0:00:00.266730671 17360      0x265af00 WARN               decodebin gstdecodebin2.c:2365:connect_pad:<decodebin0> Couldn't set bcmdec0 to READY
0:00:00.266792201 17360      0x265af00 ERROR                 bcmdec gstbcmdec.c:2374:bcmdec_del_shmem:<bcmdec0> bcmdec_del_shmem:deleted shmem segment ...
0:00:00.355259657 17360      0x265af00 WARN              vaapiblend gstvaapiblend.c:184:gst_vaapi_blend_initialize:<vaapiblend0> VPP does not support global alpha blending
uxplay: ../src/wayland-client.c:2312: wl_proxy_set_queue: Assertion `proxy->display == queue->display' failed.
Aborted (core dumped)
fduncanh commented 2 years ago

You seem to have gstreamer1.0-vaapi (the name may be a bit different on fedora). vaapi is for hardware acceleration on intel graphics.

Try uxplay -avdec -vs waylandsink

the -avdec should enforce software video decoding and stop vaapi being used.
or just uninstall gstreamer-vaapi. It seems to be broken with wayland.

rpm -qa | grep vaapi
should identify the vaapi package.

In any case, your issues are something to do with intel graphics hardware decoding.

I have no idea why bcmdec is being mentioned. why is some broadcom device being used ?????

OK I think I see, Gstreamer is looking for various hardware decoders It looked for a broadcom one and didnt find one. Then it moved on to look for vaapi. maybe you have it, maybe not.

In any case, you system seems to be looking for a working hardware decoder, and is failing

DtsGetHWFeatures: Create File Failed
Running DIL (3.22.0) Version
DtsDeviceOpen: Opening HW in mode 0
DtsDeviceOpen: Create File Failed

perhaps the permissions for writing some file got removed

-avdec will probably fix your issue by stopping the search for hardware decoders.

/********************************************************************
 * Copyright(c) 2008 Broadcom Corporation.
 *
 *  Name: gstbcmdec.c
 *
 *  Description: Broadcom 70012 decoder plugin
abhijangda commented 2 years ago

Thanks. Yes, adding -avdec solved the issue. My system is an AMD Ryzen 4500U. I do not know why was VAAPI installed. Thanks for your help. It works pretty well now.