[SOLVED] Sarpi / Raspberry (RPi 3) - touchscreen input not working since kernel 5.4.x
Slackware - ARMThis forum is for the discussion of Slackware ARM.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sarpi / Raspberry (RPi 3) - touchscreen input not working since kernel 5.4.x
The touchscreen (official RPi 7") no longer registers touch input after moving from Sarpi kernel 4.19.x to 5.4.x. Screen display works fine, backlight works fine, keyboard & mouse works fine.
TIL after some hours of digging -
In 4.19 the config option was CONFIG_TOUCHSCREEN_RPI_FT5406=m, which generates the module kernel/drivers/input/touchscreen/rpi-ft5406.ko.
Since 4.20 or 4.21, a driver was mainstreamed and the option is now CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m, which generates the module kernel/drivers/input/touchscreen/raspberrypi-ts.ko
Things I tried with no luck on the 5.4.16 kernel:
* modprobe raspberrypi-ts: nothing shows up in dmesg
* Added /sbin/modprobe raspberrypi-ts to /etc/rc.d/rc.modules.local and reboot
* Modified /boot/config.txt to add dtoverlay=rpi-ft5406 (but I never needed to do this before)
* Searched online for a while with no luck
Next I would probably need to install Raspbian on a new drive and see if the touchscreen works there, and try to get hints as to what they may be doing right.
The touchscreen (official RPi 7") no longer registers touch input after moving from Sarpi kernel 4.19.x to 5.4.x. Screen display works fine, backlight works fine, keyboard & mouse works fine.
TIL after some hours of digging -
In 4.19 the config option was CONFIG_TOUCHSCREEN_RPI_FT5406=m, which generates the module kernel/drivers/input/touchscreen/rpi-ft5406.ko.
Since 4.20 or 4.21, a driver was mainstreamed and the option is now CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m, which generates the module kernel/drivers/input/touchscreen/raspberrypi-ts.ko
Things I tried with no luck on the 5.4.16 kernel:
* modprobe raspberrypi-ts: nothing shows up in dmesg
* Added /sbin/modprobe raspberrypi-ts to /etc/rc.d/rc.modules.local and reboot
* Modified /boot/config.txt to add dtoverlay=rpi-ft5406 (but I never needed to do this before)
* Searched online for a while with no luck
Next I would probably need to install Raspbian on a new drive and see if the touchscreen works there, and try to get hints as to what they may be doing right.
I'm guessing it has something to do with missing modules. It would be prudent to do a 'lsmod' while running kernel 4.19.x and then compare with the same from kernel 5.4.x and see what the differences are. Testing with Raspbian would only be eventful if they are running kernel 5.4.x because last time I checked they were still on the 4.19.97 release. You can always 'upgradepkg' using the older kernel 4.19.x SARPi packages and revert to your previous settings/setup.
[EDIT] I just checked the SARPi4 (Raspberry Pi 4) kernel 5.4.16 .config and it tells me:
I believe that's correct, that the relevant change causing the issue is the change from:
4.19: CONFIG_TOUCHSCREEN_RPI_FT5406=m
to
4.20/1 and later: CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
Raspbian is still on 4.19 so nothing I can currently learn from there. I'll wait for Raspbian to rev to a newer kernel and see what I can learn once they do that.
I believe that's correct, that the relevant change causing the issue is the change from:
4.19: CONFIG_TOUCHSCREEN_RPI_FT5406=m
to
4.20/1 and later: CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m
Raspbian is still on 4.19 so nothing I can currently learn from there. I'll wait for Raspbian to rev to a newer kernel and see what I can learn once they do that.
OF COURSE! It's very much in my interest to ensure any software released by the SARPi Project is working as expected so I need to look into problems such as yours.
Also thanks for letting me know about this problem because it does highlight an issue which I would never have found - as I don't use touchscreen. I have done some research online about the official 7" touchscreen on the RPis and it seems that it can be a troublesome affair on most Linux distros - including Raspbian! I'm not surprised you found it difficult to locate information to help in problem-solving because I found the same thing, unless you are using Raspbian! haha!
Waiting for the RPi guys to decide which kernel version they will ship next after 4.19 is one option available to you. Troubleshooting and testing yourself is another (I read that users have been successful on Ubuntu and Gentoo with this touchscreen). Installing a previous 4.19 kernel and modules will undoubtabley solve your issue until a later date. I know that's only a stop-gap but your Raspberry Pi 3 won't be any worse off for it.
I'll look into Gentoo/Ubuntu and see what I can learn.
Thanks again.
It might be possible to 'borrow' from other distributions; whatever firmware/modules are needed to make the hardware work. Any OS would probably have to be running the same kernel major version but you'd surely find out through 'trial and error' testing to see what worked, or not as the case may be. Given that this can be simple, or a complete PITA, it's up to you to decide if it's worth it while there are alternatives.
FWIW: If I were in your shoes I'd revert to kernel 4.19.x release and wait a while, if touchscreen was that crucial to the setup. You might find that after spending considerable time (days/weeks/months) solving this problem - with or without success - that something somewhere else gets fixed upstream and your efforts have been somewhat squandered. It's happened to me a few times in my experience, and it's so damned annoying!
Turns out the issue was fixed by an updated rpi-ft5406.dtbo overlay.
I confirmed by copying rpi-ft5406.dtbo from the contents of the package sarpi3-boot-firmware-armv7-1_slackcurrent_08Feb20_sp1 to my system running 5.4.16 and sarpi3-boot-firmware-armv7-1_slackcurrent_31Jan20_sp1 and this made the touchscreen work under 5.4.16 after rebooting.
Turns out the issue was fixed by an updated rpi-ft5406.dtbo overlay.
The Raspberry Pi device tree blobs are supported from userspace by means of 'overlays' but they're actually built off the back of the kernel [a.k.a. 'make dtbs'] just like the modules - i.e. from the same source code as the kernel, etc. This page gives you some idea of the order of things: https://www.raspberrypi.org/document...el/building.md
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.