Skip to content

Adding Waveshare35c LCD support in dietpi-config and dietpi-set_hardware #7508

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

kitt-schlatter
Copy link

@kitt-schlatter kitt-schlatter commented Apr 27, 2025

The current code for the Waveshare32 was duplicated and modified to support the very similar Waveshare35c model. I only have the hardware to test on a RPi, and so I was unable to test these changes on any other hardware configurations.

I also needed to modify the framebuffer identifier in dietpi-set_hardware to be /dev/fb0 instead of the /dev/fb1 that's set in the same Waveshare32 code. I have no idea why there was this discrepancy, and I did not make a similar change to the equivalent odroids code, because I could not test to see if that was required - so, this might be an area for improvement and for someone with more knowledge than I to scrutinize.

@MichaIng
Copy link
Owner

Many thanks.

Three thinks:

  1. Does this work with KMS/DRM enabled? /boot/dietpi/func/dietpi-set_hardware rpi-opengl vc4-kms-v3d
  2. Is the X11 config to use fbdev really required? rm /etc/X11/xorg.conf.d/99-waveshare35c_xorg.conf. Especially I am not sure whether the framebuffer device is always the same, /dev/fb0 vs /dev/fb1, or whether it depends on other attached displays. More importantly on RPi 4 and 5 there can be two HDMI framebuffers, which would make the DSI display /dev/fb2. X11 might fall back automatically to fbdev if KMS does not work.
  3. In how far does it work if you do not setup the display at all but only add display_auto_detect=1 to /boot/config.txt? There are some generic DSI display overlays, auto-selected by the bootloader in this case, compatible with KMS/DRM driver. So probably this can make vast parts of the individual setup obsolete.

Waveshare themselves use /dev/fb1 as well btw, but this could have changed as their configs are all very outdated and created for ancient kernel versions (same as ours): https://github.com/waveshareteam/LCD-show/blob/master/usr/share/X11/xorg.conf.d/99-fbturbo.conf
It however seems to contradict the cmdline entry fbcon=map:10, also matching the one used by Waveshare 🤔: https://github.com/waveshareteam/LCD-show/blob/master/cmdline.txt

So in any case well worth it to test everything with modern kernel, drivers and settings, and reduce things to a minimum.

@MichaIng MichaIng linked an issue Apr 27, 2025 that may be closed by this pull request
@MichaIng MichaIng modified the milestones: v9.13, v9.14 May 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DietPi-Set_Hardware | Waveshare 3.5" support
2 participants