warpme / minimyth2

Distro to make disk-less MythTV appliance
https://github.com/warpme/minimyth2/wiki
69 stars 20 forks source link

Rockchip -- Wayland Black Screen #44

Closed stvhay closed 1 year ago

stvhay commented 1 year ago

Hey @warpme , cool project! I noticed you had a note that you are getting a black screen in Wayland on Rockchip boards. I am also struggling to get these boards working and for me its not even a black screen. Im finding when I launch sway, seatd completely locks up and sway segfaults.

Anyways, thought maybe we could work together to try to figure out what's going on here to see if we can get it working.

warpme commented 1 year ago

Steve, Thx for kind words! Interesting is that with https://github.com/warpme/miniarch i can get nicely working EndeavourOS (EOS) on rk on wayland. This means mm2 kernel (used in miniarch) seems to be working ok with wayland (i tested EOS with KDE DE; you may verify EOS bootstrapping with MiniArch) So maybe archlinux guys added some patches in mesa/wayland for rk to get wayland working? (i doubt)

Currently i don't have idea why the same kernel works ok in EOS and fails in MiniMyth2. In mm2 i'm using:

so.... :-\

stvhay commented 1 year ago

I recently set up buildroot to have wayland provide the libwayland-egl.so and I’m wondering if we need just the gem version of the Mali driver.  Going to try that.

stvhay commented 1 year ago

Let's list out the differences that could exist:

Difference Notes
Who provides libwayland-egl.so ? mali or wayland provided. check if links to blob
Are the GPU drivers compiled with a "hook" ? Check for libmali_hook* in /usr/lib
What is the kernel DDK Check kernel sources MALI_RELEASE_NAME ?= '"g15p0-01eac0"'
What firmware is used? Check SHA256

What I've got:

warpme commented 1 year ago

Steve, I'm a bit lost here....

Situation i have:

  1. single binary having full video stack (drivers/kernel/drm/egl_provider/wayland_display_server/media_player)
  2. aw/aml/rk/api hw

Binary from p.1 gives me ok wayland (ui & playback) on all hw - except: rk As binary is the same - diff is in code which is hw dependent.

So imho i have 2 candidates: drm and egl provider (mesa). I have black screen on rk3328 (mali450), 3399 (t860) and rk3566/3568 (g52). So it is v.low probable that issue is in mesa (i.e. mali450 on s905 plays ok with weston) Looking on weston log - i see absolutely normal log (no errors, standard info entries). All above hints me: most probable root cause is drm.

Now - in my case:

with above i think issue is drm z-order related (i.e. looks to me weston draws to drm plane which is overlaid by other plane thus screen is black)

I will consult this with dev. who write majory of patch code required to get rk drm working with drm-planes media playback...