0

I am using the 7" touchscreen display and added the display_config=1 to /boot/config.

It is set to boot to GUI which works fine and the UI itself is displayed correctly.

Unfortunately the touch driver does not seem to follow the changed display orientation.

How can I make the touch driver to use the changed display orientation?

3
  • 1
    If this is the same screen mentioned here: raspberrypi.org/blog/the-eagerly-awaited-raspberry-pi-display. I see no mention of an accelerometer, so there's literally no sensor that would read orientation on it. Unless I'm missing something (possible).
    – BJ Black
    Commented Oct 3, 2016 at 13:18
  • That is because orientation isn't really a factor as a click in the bottom left is still the bottom left no matter the orientation Commented Oct 3, 2016 at 14:03
  • I expected that the touchscreen driver in the "out of the box" distro to take care of it, since LDXE/Pixel already uses that setting to change the screen orientation. Of course there is no accelerometer, but the screen is fixed vertically, but touch input is not correct.
    – Zuppa
    Commented Oct 3, 2016 at 18:53

1 Answer 1

1

The touch driver/x configuration needs to be configured in the x startup script. I found this to be working:

Install xinput:

sudo apt-get install xinput

then add a script call into the last line of ~/.config/lxsession/LXDE-pi/autostart

@/usr/local/bin/swapaxes.sh

The script in /usr/local/bin looks like this:

xinput set-prop 'FT5406 memory based driver' 'Evdev Axes Swap' 1
xinput set-prop 'FT5406 memory based driver' 'Evdev Axis Inversion' 0 1

This is the setting for 90° rotation. For 270° use this:

xinput set-prop 'FT5406 memory based driver' 'Evdev Axes Swap' 1
xinput set-prop 'FT5406 memory based driver' 'Evdev Axis Inversion' 1 0

The Raspberry Pi now boots into the GUI with vertical layout and working touchscreen.

1
  • If those properties are stable across reboots, one should really put them in xorg.conf instead of running a script at every boot. Commented Mar 16, 2017 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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