Rpi5 and waveshare display

*nix specific usage questions
mcpat
New Cone
New Cone
Posts: 7
Joined: 03 Jan 2024 12:35

Rpi5 and waveshare display

Postby mcpat » 03 Jan 2024 12:52

Hi,

I try to get my waveshare display running with latest rasbian on my rpi5. Compilation works and everything is working on HDMI, but I don't have any idea how to get my display working.

Acc. to this https://forums.raspberrypi.com/viewtopi ... 8#p2170664, I have this 'config.txt' parts

Code: Select all

# Enable DRM VC4 V3D driver dtoverlay=vc4-kms-v3d max_framebuffers=2 # waveshare 1.3in - 240x240pixel - SKU19650 dtoverlay=mipi-dbi-spi,speed=32000000 dtparam=compatible=wavesku19650\0panel-mipi-dbi-spi dtparam=write-only,cpha,cpol dtparam=width=240,height=240,width-mm=23,height-mm=23 dtparam=reset-gpio=23,dc-gpio=25,backlight-gpio=24
I can see the console on the display, and if I start cvlc nothing happens on the display. HDMI is working well... I tried really much parameters, but everything fails. MPV is working, but want vlc...

Code: Select all

mcpat@rpi5:/opt/videos $ mpv --drm-connector=help Available connectors for card 0 (/dev/dri/card2): SPI-1 (connected) Available connectors for card 1 (/dev/dri/card1): HDMI-A-1 (disconnected) HDMI-A-2 (disconnected) Available connectors for card 2 (/dev/dri/card0): Cannot retrieve DRM resources: Operation not supported
and I get this output with 'drmdevice':

Code: Select all

root@rpi5:/opt/videos# drmdevice --- Checking the number of DRM device available --- --- Devices reported 3 --- --- Retrieving devices information (PCI device revision is ignored) --- device[0] +-> available_nodes 0x01 +-> nodes | +-> nodes[0] /dev/dri/card2 +-> bustype 0002 | +-> platform | +-> fullname /axi/pcie@120000/rp1/spi@50000/panel@0 +-> deviceinfo +-> platform +-> compatible wavesku19650 panel-mipi-dbi-spi --- Opening device node /dev/dri/card2 --- --- Retrieving device info, for node /dev/dri/card2 --- device[0] +-> available_nodes 0x01 +-> nodes | +-> nodes[0] /dev/dri/card2 +-> bustype 0002 | +-> platform | +-> fullname /axi/pcie@120000/rp1/spi@50000/panel@0 +-> deviceinfo +-> platform +-> compatible wavesku19650 panel-mipi-dbi-spi device[1] +-> available_nodes 0x05 +-> nodes | +-> nodes[0] /dev/dri/card0 | +-> nodes[2] /dev/dri/renderD128 +-> bustype 0002 | +-> platform | +-> fullname /axi/v3d@2000000 +-> deviceinfo +-> platform +-> compatible brcm,2712-v3d --- Opening device node /dev/dri/card0 --- --- Retrieving device info, for node /dev/dri/card0 --- device[1] +-> available_nodes 0x05 +-> nodes | +-> nodes[0] /dev/dri/card0 | +-> nodes[2] /dev/dri/renderD128 +-> bustype 0002 | +-> platform | +-> fullname /axi/v3d@2000000 +-> deviceinfo +-> platform +-> compatible brcm,2712-v3d --- Opening device node /dev/dri/renderD128 --- --- Retrieving device info, for node /dev/dri/renderD128 --- device[1] +-> available_nodes 0x05 +-> nodes | +-> nodes[0] /dev/dri/card0 | +-> nodes[2] /dev/dri/renderD128 +-> bustype 0002 | +-> platform | +-> fullname /axi/v3d@2000000 +-> deviceinfo +-> platform +-> compatible brcm,2712-v3d device[2] +-> available_nodes 0x01 +-> nodes | +-> nodes[0] /dev/dri/card1 +-> bustype 0002 | +-> platform | +-> fullname /axi/gpu +-> deviceinfo +-> platform +-> compatible brcm,bcm2712-vc6 --- Opening device node /dev/dri/card1 --- --- Retrieving device info, for node /dev/dri/card1 --- device[2] +-> available_nodes 0x01 +-> nodes | +-> nodes[0] /dev/dri/card1 +-> bustype 0002 | +-> platform | +-> fullname /axi/gpu +-> deviceinfo +-> platform +-> compatible brcm,bcm2712-vc6
If it helps, this is also working

Code: Select all

/usr/bin/kmscube -D /dev/dri/card2
and 'kmsprint' shows

Code: Select all

root@rpi5:/opt/videos# kmsprint Connector 0 (32) HDMI-A-1 (connected) Encoder 0 (31) TMDS Crtc 2 (88) 1920x1080@120.00 297.000 1920/88/44/148/+ 1080/4/5/36/+ 120 (120.00) D 16:9 Plane 2 (78) fb-id: 301 (crtcs: 2) 0,0 1920x1080 -> 0,0 1920x1080 (XR24 AR24 AB24 XB24 RG16 BG16 AR15 XR15 RG24 BG24 YU16 YV16 YU24 YV24 YU12 YV12 NV12 NV21 NV16 NV61 P030 XR30 AR30 AB30 XB30 RGB8 BGR8 XR12 AR12 XB12 AB12 BX12 BA12 RX12 RA12) FB 301 1920x1080 RG16 Connector 1 (42) HDMI-A-2 (disconnected) Encoder 1 (41) TMDS
So, how can I show a video on SPI-1 without desktop (wayland) on rpi5?

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Rpi5 and waveshare display

Postby Rémi Denis-Courmont » 04 Jan 2024 17:26

You need version 4.0 for DRM support. It should work automatically if there are no display servers, but you can also force it with

Code: Select all

vlc -Vdrm
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mcpat
New Cone
New Cone
Posts: 7
Joined: 03 Jan 2024 12:35

Re: Rpi5 and waveshare display

Postby mcpat » 07 Jan 2024 14:14

You need version 4.0 for DRM support. It should work automatically if there are no display servers, but you can also force it with

Code: Select all

vlc -Vdrm
I compiled vlc 4.0 but with same result. I am running Raspian in cli not with desktop.
'config.txt'

Code: Select all

# waveshare 1.3in - 240x240pixel - SKU19650 dtoverlay=mipi-dbi-spi,speed=32000000 dtparam=compatible=wavesku19650\0panel-mipi-dbi-spi dtparam=write-only,cpha,cpol dtparam=width=240,height=240,width-mm=23,height-mm=23 dtparam=reset-gpio=27,dc-gpio=25,backlight-gpio=18 #dtparam=reset-gpio=23,dc-gpio=25,backlight-gpio=24 # Enable DRM VC4 V3D driver dtoverlay=vc4-kms-v3d,nohdmi max_framebuffers=2
Additional infos:

Code: Select all

root@rpi5:/opt# drmdevice --- Checking the number of DRM device available --- --- Devices reported 3 --- --- Retrieving devices information (PCI device revision is ignored) --- device[0] +-> available_nodes 0x01 +-> nodes | +-> nodes[0] /dev/dri/card2 +-> bustype 0002 | +-> platform | +-> fullname /axi/pcie@120000/rp1/spi@50000/panel@0 +-> deviceinfo +-> platform +-> compatible wavesku19650 panel-mipi-dbi-spi --- Opening device node /dev/dri/card2 --- --- Retrieving device info, for node /dev/dri/card2 --- device[0] +-> available_nodes 0x01 +-> nodes | +-> nodes[0] /dev/dri/card2 +-> bustype 0002 | +-> platform | +-> fullname /axi/pcie@120000/rp1/spi@50000/panel@0 +-> deviceinfo +-> platform +-> compatible wavesku19650 panel-mipi-dbi-spi device[1] +-> available_nodes 0x01 +-> nodes | +-> nodes[0] /dev/dri/card1 +-> bustype 0002 | +-> platform | +-> fullname /axi/gpu +-> deviceinfo +-> platform +-> compatible brcm,bcm2712-vc6 --- Opening device node /dev/dri/card1 --- --- Retrieving device info, for node /dev/dri/card1 --- device[1] +-> available_nodes 0x01 +-> nodes | +-> nodes[0] /dev/dri/card1 +-> bustype 0002 | +-> platform | +-> fullname /axi/gpu +-> deviceinfo +-> platform +-> compatible brcm,bcm2712-vc6 device[2] +-> available_nodes 0x05 +-> nodes | +-> nodes[0] /dev/dri/card0 | +-> nodes[2] /dev/dri/renderD128 +-> bustype 0002 | +-> platform | +-> fullname /axi/v3d@2000000 +-> deviceinfo +-> platform +-> compatible brcm,2712-v3d --- Opening device node /dev/dri/card0 --- --- Retrieving device info, for node /dev/dri/card0 --- device[2] +-> available_nodes 0x05 +-> nodes | +-> nodes[0] /dev/dri/card0 | +-> nodes[2] /dev/dri/renderD128 +-> bustype 0002 | +-> platform | +-> fullname /axi/v3d@2000000 +-> deviceinfo +-> platform +-> compatible brcm,2712-v3d --- Opening device node /dev/dri/renderD128 --- --- Retrieving device info, for node /dev/dri/renderD128 --- device[2] +-> available_nodes 0x05 +-> nodes | +-> nodes[0] /dev/dri/card0 | +-> nodes[2] /dev/dri/renderD128 +-> bustype 0002 | +-> platform | +-> fullname /axi/v3d@2000000 +-> deviceinfo +-> platform +-> compatible brcm,2712-v3d
And with working mpv:

Code: Select all

root@rpi5:/opt/videos# mpv --drm-connector=help Available connectors for card 0 (/dev/dri/card2): SPI-1 (connected) Available connectors for card 1 (/dev/dri/card1): Available connectors for card 2 (/dev/dri/card0): Cannot retrieve DRM resources: Operation not supported

Code: Select all

root@rpi5:/opt/videos# mpv --no-audio simpsons.mp4 (+) Video --vid=1 (*) (h264 640x480 25.000fps) Audio --aid=1 --alang=deu (*) (aac 1ch 48000Hz) [vo/gpu] VT_GETMODE failed: Inappropriate ioctl for device [vo/gpu/opengl] Failed to set up VT switcher. Terminal switching will be unavailable. VO: [gpu] 640x480 yuv420p V: 00:05:28 / 00:22:15 (25%)
And VLC

Code: Select all

root@rpi5:/opt/videos# cvlc --no-audio simpsons.mp4 VLC media player 4.0.0-dev Otto Chriek (revision 4.0.0-dev-27260-g3b8438caad) [000055560159fec0] vlcpulse audio output error: PulseAudio server connection failure: Connection refused [00005556015cf7f0] main interface error: no suitable interface module [00005556015e5f10] dummy interface: using the dummy interface module... [00007fff5809a6f0] kms window error: Didn't get DRM resources [00007fff810e53b8] xcb generic error: window not available [00007fff810e5368] xcb generic error: window not available
RetroPie is also working on the display. So the main problem is VLC.

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Rpi5 and waveshare display

Postby Rémi Denis-Courmont » 08 Jan 2024 10:33

Worked for me last time I tried (on different hardware) though.

If you are sure that this is a VLC problem, patches are welcome.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mcpat
New Cone
New Cone
Posts: 7
Joined: 03 Jan 2024 12:35

Re: Rpi5 and waveshare display

Postby mcpat » 08 Jan 2024 11:42

Worked for me last time I tried (on others hardware) though.

If you are sure that this is a VLC problem, patches are welcome.
With the overlay "mipi-dbi-spi"? On Rpi's < 5 I used framebuffer copy and this was working on all displays. But with Rpi5 there are no legacy drivers anymore and fbcp also not possible anymore. With "mipi-dbi-spi" vlc is not running on display. If you can give me a hint were to search I can try to patch vlc and supply the patch too...

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Rpi5 and waveshare display

Postby Rémi Denis-Courmont » 08 Jan 2024 16:37

The specific error normally means that the DRM driver does not support universal planes (the error comes from libdrm, not VLC). If so, then it's no wonder that KMS won't work. This is a driver issue from my standpoint.

Or what you need is a hardware-specific stuff, not the normal KMS/DRM support that VLC provides.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mcpat
New Cone
New Cone
Posts: 7
Joined: 03 Jan 2024 12:35

Re: Rpi5 and waveshare display

Postby mcpat » 08 Jan 2024 17:27

I just tried with the original vlc delivered by apt-get

Code: Select all

Croot@rpi5:/opt/build/docs/drm-howto# cvlc --no-audio /opt/videos/simpsons.mp4 VLC media player 3.0.20 Vetinari (revision 3.0.20-0-g6f0d0ab126b) [000055558aa17580] vlcpulse audio output error: PulseAudio server connection failure: Connection refused [000055558acb1030] main interface error: no suitable interface module [000055558a9ad560] main libvlc error: interface "globalhotkeys,none" initialization failed [000055558acb1030] dummy interface: using the dummy interface module... [h264_v4l2m2m @ 0x7ffed8c18f90] Could not find a valid device [h264_v4l2m2m @ 0x7ffed8c18f90] can't configure decoder [00007ffed8c03c50] avcodec decoder error: cannot start codec (h264_v4l2m2m) [00007ffed4001b50] gles2 generic error: parent window not available [00007ffed4001b50] xcb generic error: window not available [00007ffed40013f0] mmal_xsplitter vout display: Try drm [00007ffed4001b50] drm_vout generic: <<< OpenDrmVout: Fmt=I420 [00007ffed4001b50] drm_vout generic error: Failed to get xlease [00007ffed4001b50] drm_vout generic error: Failed to find output <auto>: No such file or directory [00007ffed40013f0] mmal_xsplitter vout display: Drm no go [00007ffed40013f0] gles2 vout display error: parent window not available [00007ffed40013f0] gl vout display error: parent window not available [00007ffed40013f0] xcb vout display error: window not available [00007ffed40013f0] xcb vout display error: window not available [00007ffed40013f0] fb vout display error: cannot get terminal mode (Inappropriate ioctl for device) [00007ffed40013f0] drm_vout vout display: <<< OpenDrmVout: Fmt=I420 [00007ffed40013f0] drm_vout vout display error: Failed to get xlease [00007ffed40013f0] drm_vout vout display error: Failed to find output <auto>: No such file or directory
How to tell vlc to use /dev/dri/card2 (it's "SPI-1")?

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Rpi5 and waveshare display

Postby Rémi Denis-Courmont » 08 Jan 2024 18:10

Eh, what's wrong with the command line help?

Code: Select all

vlc --kms-device=/dev/dri/card2
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mcpat
New Cone
New Cone
Posts: 7
Joined: 03 Jan 2024 12:35

Re: Rpi5 and waveshare display

Postby mcpat » 09 Jan 2024 10:53

Eh, what's wrong with the command line help?

Code: Select all

vlc --kms-device=/dev/dri/card2
Thank you for the hint, I was mainly testing with v3.0.20 (installed with apt-get), now with compiled 4.0.0 I get this output

Code: Select all

root@rpi5:/opt/videos# cvlc --kms-device=/dev/dri/card2 --no-audio simpsons.mp4 VLC media player 4.0.0-dev Otto Chriek (revision 4.0.0-dev-27260-g3b8438caad) [00005555f987dc60] vlcpulse audio output error: PulseAudio server connection failure: Connection refused [00005555f98aff20] main interface error: no suitable interface module [00005555f98acf70] dummy interface: using the dummy interface module... [00007ffec8099c10] kms window: Updating list of connectors: [00007ffec8099c10] kms window: Looping over 1 resources [00007ffec8099c10] kms window: connector 0: SPI-1 [00007ffef0ed53b8] xcb generic error: window not available [00007ffef0ed5368] xcb generic error: window not available [00007ffec80f0f60] drm_display vout display error: DRM plane format error: Operation not supported [00007ffec8046580] main video output error: video output display creation failed [h264 @ 0x7ffedc218910] get_buffer() failed [h264 @ 0x7ffedc218910] thread_get_buffer() failed [h264 @ 0x7ffedc218910] decode_slice_header error [h264 @ 0x7ffedc218910] no frame! [00007ffec8099c10] kms window: Looping over 1 resources [00007ffec8099c10] kms window: connector 0: SPI-1 [00007ffed60953b8] xcb generic error: window not available [00007ffed6095368] xcb generic error: window not available [00007ffec4048950] drm_display vout display error: DRM plane format error: Operation not supported [00007ffec8046580] main video output error: video output display creation failed [h264 @ 0x7ffedc3115e0] get_buffer() failed [h264 @ 0x7ffedc3115e0] thread_get_buffer() failed [h264 @ 0x7ffedc3115e0] decode_slice_header error [h264 @ 0x7ffedc3115e0] no frame!

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Rpi5 and waveshare display

Postby Rémi Denis-Courmont » 09 Jan 2024 14:39

That looks like a driver bug.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mcpat
New Cone
New Cone
Posts: 7
Joined: 03 Jan 2024 12:35

Re: Rpi5 and waveshare display

Postby mcpat » 09 Jan 2024 16:33

sure? because "mpv" is working?!?! Even hw accelerated. Only with vlc I have this problems. Can you tell me where you expect the bug. Is it the "mipi-dbi-spi" with overlay? Or somewhere else?

Rémi Denis-Courmont
Developer
Developer
Posts: 15263
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Rpi5 and waveshare display

Postby Rémi Denis-Courmont » 09 Jan 2024 19:56

Maybe mpv has rPI-specific stuff. What do I know.

Point is that it does not look like your DRM driver is usable as a generic DRM output that full screen software could use in absence of X11 or Wayland
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

mcpat
New Cone
New Cone
Posts: 7
Joined: 03 Jan 2024 12:35

Re: Rpi5 and waveshare display

Postby mcpat » 10 Jan 2024 21:14

"Fun" fact. Everything above is when I try in a ssh session, I attached a keyboard and started clvc and the video is shown on the display:
Image
I used all for me known parameters, but cvlc doesn't respect the aspect ratio..

When I start mpv without any paramter with the attached keyboard, the aspect ratio is ok (mpv also works via ssh session!):
Image


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 11 guests