2

I'm running a Raspberry Pi 3 with a Pi TFT+ 3.5" display. -- I figured this is more of a Linux Question than anything else though.

It works fine when I use the suggested image for the device -- it works.

My issue is,the first time I boot up the device, the screen works but not the touch portion. If I hard reboot it, the second boot works, always. And if I want to reboot again, I have to do it twice again.

It seems like it has something to do with the files (or links?) in the /dev/input directory.

On the working system, when I run ls on /dev/input I get the following attached picture as output.
http://imgur.com/a/r3Rk2

However, when the system is not working, and I've run that command, the only thing that shows up under /dev/input is mouse0, so obviously those links and files are getting deleted? I'm not sure.

Do you have any ideas what is happening in that directory? I am not making any changes at all that would force a config change.

EDIT: here is the dmesg output.

Not working: http://pastebin.com/BMCcaZh6

Working: http://pastebin.com/ZqNAczXZ

4
  • Have a look at dmesg output and/or syslog, and compare the working one with the one when it doesn't work. Very likely you'll see error messages that give a clue about what happened. "Missing" entries in /dev/input after boot point to drivers not loading properly, for whatever reason. All files in /dev/input are created when the driver loads (via udev), on boot or later, nobody maliciously deletes them. :-)
    – dirkt
    Mar 15, 2017 at 8:12
  • @dirkt, this is my output that I get when running dmesg. imgur.com/tmTfnzE Mar 15, 2017 at 15:09
  • A screenshot of the end of a single output with all the interesting parts missing doesn't really help ... As I said, compare the output of the working one with the bad one. That manes two outputs, obviously. You can use dmesg > some_file to save the output as text, cut to remove the time stamps, and diff to look for differences (man cut, man diff for details). Even better, read through the output and look for the part that deals with the touchscreen in both. And use a pastebin instead of imgur :-) One can't work with images of text.
    – dirkt
    Mar 15, 2017 at 15:58
  • @dirkt I added the outputs in the main question. :) Mar 18, 2017 at 17:48

1 Answer 1

1

Partial answer:

If you compare them, you'll see that in the "working" variant,

[    4.478652] stmpe-spi spi0.1: stmpe610 detected, chip id: 0x811
[    4.496482] input: stmpe-ts as /devices/platform/soc/3f204000.spi/spi_master/spi0/spi0.1/stmpe-ts/input/input0

while in the "not working" variant,

[    5.560311] stmpe-spi spi0.1: unknown chip id: 0x0
[    5.560351] stmpe-spi: probe of spi0.1 failed with error -22

Googling for "stmpe610" shows that this is indeed a resistive touch screen controller chip. So this chip sits on an SPI bus, and is for some reason not detected on first boot.

Could be a timing issue, could be a missing initialization that happens later for some reason, could be something else.

I assume you do have a module called stmpe-spi or similar (check in /lib/modules). In the "not working" state, can you modprobe stmpe-spi after it finished booting, and does it recognize the chip then (check dmesg)?

6
  • when I run modprobe, I get modprobe: FATAL: Module stmpe-spi not found. In the non-working version, I cannot seem to find the stmpe-spi module either. Mar 18, 2017 at 18:39
  • 1
    Going by the source, it definitely can be compiled as module. I don't have a RaspPi, so I don't know what the exact kernel config option is, or what the exact name of the compiled module is. Did you look in /lib/modules for a similar name as I wrote? If there's none there, can you compile your own RaspPi kernel, and configure it as module? It would make debugging easier.
    – dirkt
    Mar 18, 2017 at 19:15
  • pastebin.com/6sAV2E82 this is the output I get when searching for files containing smtpe @dirkt Mar 18, 2017 at 21:05
  • So, did you try to modprobe smtpe-ts? (Do I really have to prompt you for every single step? Come on, do a bit of thinking on your own.)
    – dirkt
    Mar 18, 2017 at 22:15
  • sorry, didn't know asking for help on a help website was a problem. Im not a Linux expert. Mar 18, 2017 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.