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

Raspberry Pi 5 w/ Official 7" Touchscreen Support #560

Open
Cbeck527 opened this issue Jul 28, 2024 · 5 comments
Open

Raspberry Pi 5 w/ Official 7" Touchscreen Support #560

Cbeck527 opened this issue Jul 28, 2024 · 5 comments
Labels

Comments

@Cbeck527
Copy link

Describe the bug
There are display issues using the following hardware:

  • Raspberry Pi 5
  • Official 7" Touchscreen Support

First, the display does not function until overlay is added. Then, the now playing display appears to be "zoomed in" too much, as if it does not fit the screen.

HiFiBerryOS version
64alpha8
https://github.com/hifiberry/hifiberry-os/releases/tag/64alpha8
hifiberryos-20240523-pi4.img

HiFiBerry sound card
DAC+ Pro

To Reproduce
Steps to reproduce the behavior:

  1. Install HifiBerry on Raspberry Pi 5 with official 7" touchscreen
  2. Display does not function
  3. Add

Expected behavior

  • Functioning display
  • Web browser fitting content appropriately.

FIX
I was able to fix both issues with the following steps:

  1. Remount filesystem as read/write:
mount -o remount,rw /boot
  1. Add line under to [pi5] section
[pi5]
dtoverlay=vc4-kms-v3d-pi5,noaudio
# CUSTOM DISPLAY SETTINGS
dtoverlay=vc4-kms-dsi-7inch,dsi0,sizex=800,sizey=480
# END CUSTOM DISPLAY SETTINGS
  1. Create system unit override to set cog environment variable for wayland (note: I had to use nano as the editor... there seems to be an issue with the built-in vim)
EDITOR=nano systemctl edit cog
  1. Add the following to the unit override
[Service]
Environment=COG_PLATFORM_WL_VIEW_FULLSCREEN=1
  1. Run systemctl restart cog or reboot
@hifiberry
Copy link
Owner

Thank you for the contribution. We'll see how we can integrate this into the next release

@hifiberry hifiberry added the bug label Jul 29, 2024
@Hans-Haefner
Copy link

System unit override to set cog environment variable for wayland also works for my Luckfox 7" HDMI LCD Display (1024x600)

@user10072023github
Copy link

user10072023github commented Sep 12, 2024

@Hans-Haefner @Cbeck527 @hifiberry Can someone walk me through how to do this when putting the SD card with HiFiBerryOS installed on it, into my Ubuntu box? Using sudo nautilus to avoid permissions issues but can't find these files to edit...

Using this display: https://www.waveshare.com/wiki/13.3inch_HDMI_LCD_(H) on an RPi4. Dug around and found a single overlay file with waveshare in the name so I edited config.txt pointing to that dt_overlay file...my install isn't too happy at the moment...

@Profoktor
Copy link

Profoktor commented Dec 19, 2024

tldr; for Pi3, use the dtoverlay=vc4-fkms-v3d,audio=off overlay ("fake kms") to get the official 7"-display working


I'm having the same issue with a RPi 3B+. I tried the steps as described here (adjusting the config.txt to load the overlay for any pi).

[pi3]
dtoverlay=vc4-kms-v3d,noaudio
# CUSTOM DISPLAY SETTINGS
dtoverlay=vc4-kms-dsi-7inch,sizex=800,sizey=480

(also tried display_auto_detect=1 instead, same result)

This results in the display being recognized (i.e., splash screen), but I only get a login terminal, and when restarting the cog-service I get an error that a required service failed:

journalctl -xe
Dec 19 12:53:57 musicstation systemd[1]: Starting Weston, a Wayland compositor, as a system service...
Dec 19 12:53:57 musicstation seatd[270]: 00:08:10.957 [INFO] [seatd/server.c:145] New client connected (pid: 2338, uid: 0, gid: 0)
Dec 19 12:53:57 musicstation seatd[270]: 00:08:10.957 [INFO] [seatd/seat.c:170] Added client 1 to seat0
Dec 19 12:53:57 musicstation seatd[270]: 00:08:10.957 [INFO] [seatd/seat.c:480] Opened client 1 on seat0
Dec 19 12:53:57 musicstation seatd[270]: 00:08:10.959 [INFO] [seatd/seat.c:418] No clients on seat0 to activate
Dec 19 12:53:57 musicstation seatd[270]: 00:08:10.963 [INFO] [seatd/seat.c:524] Closed client 1 on seat0
Dec 19 12:53:57 musicstation seatd[270]: 00:08:10.963 [INFO] [seatd/seat.c:192] Removed client 1 from seat0
Dec 19 12:53:57 musicstation seatd[270]: 00:08:10.963 [INFO] [seatd/client.c:471] Client disconnected
Dec 19 12:53:57 musicstation systemd[1]: weston.service: Main process exited, code=exited, status=1/FAILURE
Dec 19 12:53:57 musicstation systemd[1]: weston.service: Failed with result 'exit-code'.
Dec 19 12:53:57 musicstation systemd[1]: Failed to start Weston, a Wayland compositor, as a system service.
Dec 19 12:53:57 musicstation systemd[1]: Dependency failed for Local web brower to display web interface.
Dec 19 12:53:57 musicstation systemd[1]: cog.service: Job cog.service/start failed with result 'dependency'.q

edit .. checked for other issues - it is not the same as in #367 (cmd-line argument is already added to the service)

Running weston directly yields

# export XDG_RUNTIME_DIR=/var/run/weston
# export XDG_CONFIG_HOME=/etc/xdg/weston
# export WAYLAND_DISPLAY=wayland-1
# /usr/bin/weston --continue-without-input --backend=drm-backend.so --modules=systemd-notify.so
Date: 2024-12-19 UTC
[13:50:46.679] weston 12.0.1
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: 12.0.1
[13:50:46.679] Command line: /usr/bin/weston --continue-without-input --backend=drm-backend.so --modules=systemd-notify.so
[13:50:46.679] OS: Linux, 6.6.31-v8, #1 SMP PREEMPT Thu May 23 07:43:46 UTC 2024, aarch64
[13:50:46.679] Flight recorder: enabled
[13:50:46.679] warning: XDG_RUNTIME_DIR "/var/run/weston" is not configured
correctly.  Unix access mode must be 0700 (current mode is 0755),
and must be owned by the user UID 0 (current owner is UID 0).
Refer to your distribution on how to get it, or
http://www.freedesktop.org/wiki/Specifications/basedir-spec
on how to implement it.
[13:50:46.680] Using config file '/etc/xdg/weston/weston.ini'
[13:50:46.680] Output repaint window is 7 ms maximum.
[13:50:46.680] Loading module '/usr/lib/libweston-12/drm-backend.so'
[13:50:46.684] initializing drm backend
[13:50:46.684] Trying libseat launcher...
[13:50:46.685] [libseat/libseat.c:73] Seat opened with backend 'seatd'
[13:50:46.685] [libseat/backend/seatd.c:212] Enabling seat
[13:50:46.685] libseat: session control granted
[13:50:46.686] no drm device found
[13:50:46.690] fatal: failed to create compositor backend
Internal warning: debug scope 'drm-backend' has not been destroyed.

edit - the folder /sys/class/drm is empty, so the device is actually not recognized properly (in contrast to the old 32-bit hifiberry OS)

edit experimented with the overlays. Switching back to dtoverlay=vc4-fkms-v3d,audio=off did the trick for me. However, no idea whether this has some other side-effects

@Profoktor
Copy link

@Cbeck527 - did you notice if the screensaver is working in your setup?

It's not working for me, but after changing the overlay it might also be related to this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants