EvDev with cheap touch screens


I have a cheap display with touch screen:

(was less than half (£32.49) of the current price (£73.79))

However ever day or so it seems to lose evtdev input. Restarting my LVGL service re-establishes the touch but I was wondering if there is a better way?

This one works great on the same software/Pi:

When bought it was £39.99, I wish I had got another of these but they were over £50 when i last saw them available…

What MCU/Processor/Board and compiler are you using?

Raspberry pi zero w

What LVGL version are you using?


What do you want to achieve?

Re initialize touch functions once a day just in case the display has been weird

What have you tried so far?

Nothing yet

Code to reproduce

Do you reboot the entire system or just restart the application running in userspace?

It would also be interesting to see what evtest /dev/input/<touchscreen> reports after the touch stops working. If evtest still works, but LVGL doesn’t, there might be an issue in LVGL.

I usually issue a systemctl restart on the service.

The Pi itself doesnt need rebooting.

I am not sure if it’s s LVGL issue as it only seems to happen (so far) on that screen/touch interface…

Odd. There is nothing special the evdev initialization routine does besides opening the device file. I wonder why closing and reopening it fixes the problem.

I’m not closing or re-opening anything manually.

A literal restart of the service (app) seems to solve the problem.

That’s why I was wondering if I could do something other than re-start the app (to keep state/page etc) would be something I could do.

I just thought it was that cheap display causing me issues…

If you have any suggestions on how to debug I’m all ears!


On a side note, have you seen the price of screens lately?!?

Yes; I find them quite overpriced as well.

Unfortunately there is no way to reinitialize an input device in LVGL without reinitializing the entire library, meaning that you would lose state.

Something you could try is adding printf statements in evdev_read to see whether an error is being returned from the read call or whether the touchscreen just stops providing events.