Know-How
Completed
Digital input not reading: NPN or PNP, step by step
248 Views •4-20 mA input reading wrong: check it step by step
238 Views •RS-485: how to check a bus step by step
234 Views •Scaling a 4-20 mA signal in the PLC: formula, constants and code
229 Views •Relay or transistor output: which one and how to check it
189 Views •Modbus RTU timeout: 6 checks before blaming the wiring
142 Views •Upload fails: 6 checks before blaming the code
138 Views •4G PLC not connecting: 6 checks before blaming the code
105 Views •LoRa works on the desk, fails in the field: 6 checks before you install
94 Views •Choosing a PLC 1: count the I/O and leave spare
32 Views •Choosing a PLC 2: which communications do you really need
31 Views •LoRaWAN node won't join: 6 checks, in order
30 Views •Touch panel: screen turned, touch didn't. 6 checks
29 Views •SD card corrupted? 6 habits for Linux in the field
30 Views •Arduino IDE compile error: 6 checks before the code
29 Views •Touch panel: screen turned, touch didn't. 6 checks
Short answer: when a panel PC turns the image but not the touch, check the power supply, the OS version and graphics session, the rotation of display and touch, the calibration matrix, the drivers and, if the screen stays black, the system over SSH, in this order.
Download the checklist (PDF, 2 pages)
Descarga la lista de comprobación (PDF, 2 páginas)
These checks apply to panel PCs based on Raspberry Pi running Raspberry Pi OS. Display and touch are two separate settings: the Raspberry Pi documentation states that rotation of touch input is independent of the orientation of the display. If you use an Industrial Shields TouchBerry Pi, read the datasheet and the documentation of your unit (links below) before you change the configuration.
Six checks, in this order
| Check | What to do | Good result |
|---|---|---|
| 1. Power | Use the power supply recommended for your board and a good cable. Raspberry Pi boards from the B+ on (except the Zero range) detect low voltage and write a warning in the kernel log. Check it with vcgencmd get_throttled (bit 0: undervoltage now, bit 16: undervoltage since boot) and dmesg. | No undervoltage warnings in the log and both bits clear. |
| 2. Image | Note the OS version (Bookworm or Trixie) and the graphics session. Since the October 2024 release, Raspberry Pi OS Bookworm uses Wayland with labwc by default on all models; on Bookworm, raspi-config can switch back to X11. Display and touch are set in different places in each case. | You know which version and session run on the panel, and which settings apply. |
| 3. Rotation | Rotate the display first: Screen Configuration (Bookworm) or Control Centre (Trixie), wlr-randr on the Wayland command line, xrandr in X11. Then map the touch to that output (mapToOutput in the labwc rc.xml) or rotate it with a calibration matrix. | A touch in each corner lands in that same corner. |
| 4. Calibration | If touches land off target, set the calibration matrix. libinput takes 6 values, the first two rows of the 3x3 matrix (default "1 0 0 0 1 0", 90 degrees clockwise "0 -1 1 1 0 0"); labwc reads them in rc.xml and X11 takes the full matrix with xinput. Names like left or right change between sources: test, do not trust the name. | The four corners and the centre land on target. |
| 5. Drivers | Run libinput list-devices and look for the touch. Raspberry Pi OS loads overlays for recognised DSI displays automatically (display_auto_detect); a third-party DSI or SPI display usually needs the overlay of its maker in config.txt (/boot/firmware/). A USB touch depends on the cable and the USB link. | The touch is listed and libinput debug-events shows events when you touch the screen. |
| 6. Black screen | Try SSH. If it answers, the system is running: read journalctl -b, check the video output and any video= option in cmdline.txt. Some displays take time to show an image (the Touch Display 2 documentation mentions up to one minute). Start your app with the desktop session, for example in ~/.config/labwc/autostart, not before it. | Image on screen, and the app appears after the desktop. |
From symptom to check
- Reboots or hangs at boot, lightning icon: power supply or cable (check 1).
- Image rotated, touch not: the touch is not mapped or rotated to the output (check 3).
- Touch rotated but off target: wrong or missing calibration matrix (check 4).
- Touch dead: not listed by libinput; overlay, cable or USB (check 5).
- Black screen with SSH alive, or app missing after boot: video output, video= in cmdline.txt or an app started outside the desktop session (check 6).
Where you set it, by version
Bookworm with X11: xrandr for the display and xinput for the touch. Bookworm with labwc: Screen Configuration for the display, rc.xml for the touch and ~/.config/labwc/autostart for your apps. Trixie: Control Centre replaces Screen Configuration; touch in rc.xml and apps in the labwc autostart. Raspberry Pi does not recommend or support upgrading a running Bookworm image to Trixie. With labwc, the on-screen keyboard appears in text fields and can be turned on or off in Raspberry Pi Configuration, Display tab.
Next steps
- SD card corrupted? 6 habits for Linux in the field
- TouchBerry Pi Panel PC family datasheet
- How to recalibrate your Raspberry Pi touchscreen (TouchBerry Pi 10.1")
- How to power supply the TouchBerry Pi
- Video: software to program an industrial panel PC
Sources
Raspberry Pi documentation: Touch Display, Touch Display 2, Power supply, config.txt, Configuration and the kiosk mode tutorial. Raspberry Pi News: A new release of Raspberry Pi OS (October 2024) and Trixie, the new version of Raspberry Pi OS. libinput documentation: static device configuration via udev and libinput(1). Manual pages labwc-config(5) and wlr-randr(1). Ubuntu Wiki: X Input Coordinate Transformation.
Commenting is not enabled on this course.