geerlingguy / pi-camera

A Raspberry Pi Camera
MIT License
107 stars 10 forks source link

Better screen drivers? Waveshare 3.5" ili9486 TFT is choppy #4

Open geerlingguy opened 1 year ago

geerlingguy commented 1 year ago

In general, the driver Waveshare recommends for their TFT '(A)' model display is wonky.

Their install script overwrites config.txt, and the driver isn't a DRM driver, so the screen seems to refresh very slowly, like 5 fps. And the SPI driver also seems to eat up CPU cycles, which is annoying.

And because it's not DRM, you have to use --qt-preview or use the QT software renderer to get camera output to screen. So that's really choppy too, and also induces more CPU load!

There's a waveshare,rpi-lcd-35 driver in https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/gpu/drm/tiny/ili9486.c, but there's no overlay available for it... would be nice to have a high-refresh touchscreen instead of the laggy one here...

jwillikers commented 1 year ago

@geerlingguy Yeah, that sucks. I don't think you're going to be able to get much out of it using Qt's CPU rendering. I've found Pimoroni to do a pretty good job at upstreaming things. Have you considered something like the HyperPixel 4.0 - Hi-Res Display for Raspberry Pi. Looks pretty good with the caveat it uses all the GPIO. It provides an I2C interface though, so it would still be possible to set up inputs that way. According to their website, it should just work on Raspberry Pi OS:

Raspberry Pi OS Bullseye includes major changes to how DPI display drivers work. If you're using an image dated 04/04/2022 or later, it will come with Hyperpixel drivers baked in and you don't need to run the installer. You can set up display and touch by adding a few lines to your boot/config.txt:
[PSA: HyperPixel 4 (Square & Rectangular) on Raspberry Pi OS 2022-04-04](https://github.com/pimoroni/hyperpixel4/issues/177)

Of course, they are unfortunately out of stock right now. Oh wait, Digikey has some here.

alekthegenius commented 1 year ago

As @jwillikers said, another option If you wanted to completely do away with the Waveshare display is Hyperpixel. I have been using Pimoroni's HyperPixel 2.1 Round in my little Raspberry Pi camera project and have been quite happy with the resolution and refresh rate, with no driver problems. There is also an extra I2C interface that has been used to attach shutter buttons, such as in this project: 1979 Merlin Pi High Quality Camera The Hyperpixel displays also mount directly onto the Raspberry Pi board with standoffs.

jwillikers commented 1 year ago

As @jwillikers said, another option If you wanted to completely do away with the Waveshare display is Hyperpixel. I have been using Pimoroni's HyperPixel 2.1 Round in my little Raspberry Pi camera project and have been quite happy with the resolution and refresh rate, with no driver problems. There is also an extra I2C interface that has been used to attach shutter buttons, such as in this project: 1979 Merlin Pi High Quality Camera The Hyperpixel displays also mount directly onto the Raspberry Pi board with standoffs.

Yeah, I was able to attach a push button over I2C to the Hyperpixel and get it working. It doesn't work under Wayland, fyi.