Comments (29)
How to modify the display orientation
- GPIO interface type LCD rotating display method:
Suitable for GPIO interface type LCD (2.4” 2.8”3.2” 3.5”).
Run command at Terminal:
sudonano /boot/config.txt
if you are using 2.4”, 2.8”or 3.2”, then find line “dtoverlay=tft9341”and add rotate parameter value as format following:
dtoverlay=tft9341:rotate=value
if it is LCD 3.5”, then find line “dtoverlay=tft35a” and add rotate parameter value as format following:
dtoverlay=tft35a:rotate=value
Take LCD 3.5”as example:
To rotate 0 degrees (vertical screen display), the corresponding parameter value:
dtoverlay=tft35a:rotate=0
To rotate 90degrees (horizontal screen display), the corresponding parameter value:
dtoverlay=tft35a:rotate=90
To rotate 180degrees (vertical screen display), the corresponding parameter value:
dtoverlay=tft35a:rotate=180
To rotate 270degrees (horizontal screen display), the corresponding parameter value:
dtoverlay=tft35a:rotate=270
Press Ctrl + X, choose Y, save and exit; and re-start to achieve..
from lcd-show.
Adding this:
Option "InvertY" "true"
Option "InvertX" "true"
To /etc/X11/xorg.conf.d/99-calibration.conf
Just before EndSection
I tried it with mine (Kuman 3.5") and it worked :D
from lcd-show.
this saved my sanity... both fixes worked...
This setting in /boot/config.txt
dtoverlay=tft35a:rotate=270
and
/etc/X11/xorg.conf.d/99-calibration.conf
Option "InvertY" "true"
Option "InvertX" "true"
PERFECT! Thanks!
from lcd-show.
Not intuitive at all. The documentation is pathetic. Sorry, goodtft, but it is true.
I started with a fresh raspbian install and LCD-show from github. I stood the display up such that the power chord and HDMI adapter are pointing up (the way I want it when I deploy it). This setting in /boot/config.txt worked for me:
dtoverlay=tft35a:rotate=270
I observed:
rotate=0 top of screen is at physical left
rotate=90 top of screen is at physical bottom (up-side down)
rotate=180 top of screen is at physical right
rotate=270 top of screen is at physical top (right-side up)
It matters not what the contents of /etc/X11/xorg.conf.d/99-calibration.conf are. I left the file as it was installed except following the touch-screen calibration instructions.
from lcd-show.
My entire Raspberry Pi 2 /boot/config.txt after filtering out all of the comment lines:
dtparam=i2c_arm=on
dtparam=spi=on
enable_uart=1
dtparam=audio=on
dtoverlay=tft35a:rotate=270
Before on settling on rotate=270, I experimented with rotate values and observed the following:
rotate=0 start of display area is at physical left
rotate=90 start of display area is at physical bottom (up-side down)
rotate=180 start of display area is at physical right
rotate=270 start of display area is at physical top (right-side up)
I used the supplied goodtft program for calibration. I did not hand-edit any calibration parameters in /etc/X11/xorg.conf.d/99-calibration.conf. Here is the final file for me:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "3936 227 268 3880"
Option "SwapAxes" "1"
Option "InvertY" "true"
Option "InvertX" "true"
EndSection
Then, sudo reboot.
Good luck.
from lcd-show.
@VivienGiraud and @texadactyl This helped me out a lot! Thank you for documenting your solutions!
from lcd-show.
Does this also rotate the touchscreen as currently, I'm using:
dtoverlay=piscreen,speed=16000000,rotate=270
which rotates the display but not the touchscreen
from lcd-show.
@deanfantastic It won't works as it's not the same SPI interface, if I found a solution I will post it here :)
from lcd-show.
Thank you.
from lcd-show.
These links might help you:
https://www.raspberrypi.org/forums/viewtopic.php?t=143581
https://ubuntuforums.org/archive/index.php/t-1493407.html
Please keep us in touch if it works, I don't have a piScreen so I can't test.
from lcd-show.
Oh I'm not using a PiScreen, some kind of knock-off.
Tried all the above with SwapAxes and SwapXY but neither were effective.
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "MinX" "3652"
Option "MaxX" "62360"
Option "MinY" "61728"
Option "MaxY" "5342"
Option "SwapXY" "1"
EndSection
and
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "MinX" "3652"
Option "MaxX" "62360"
Option "MinY" "61728"
Option "MaxY" "5342"
Option "SwapAxes" "1"
EndSection
from lcd-show.
Yeah it didn't works, you should try my solution.
Adding this:
Option "InvertY" "true"
Option "InvertX" "true"
from lcd-show.
On my side it works flawlessly !
from lcd-show.
Viv, please publish your config.txt setting for dtoverlay=tft35a parameter and the entire /etc/X11/xorg.conf.d/99-calibration.conf contents.
Thanks.
from lcd-show.
My screen display orientation was solved. But, my touchpad was inverted when I used one of my Tk applications and the desktop in general. Viv's solution worked for me.
goodtft, your documentation sorely needs a refresh.
from lcd-show.
@texadactyl Sorry for being late, really happy if my solution worked for you! You can close this one, and if you think documentation needs a refresh please open a new one with info related to.
Anyway I'm happy it works for you now, I'm really having funny with so, yeah! have fun with it too!
from lcd-show.
deanfantastic was the originator and, therefore, should close it. I don't know if this person has resolved their issues.
from lcd-show.
Okay, I suspect that deanfantastic lost interest in the thread he started. I tried to close this issue but I am not permitted to.
from lcd-show.
There is no way to invert the x and y for the framebuffer?
I really don't want to use xorg, just with ie. pygame on a framebuffer.
plox
from lcd-show.
Is it possible to reopen this issue?
I'm trying to rotate touchscreen of tft35a using an eglfs application but didn't work. Even using EVDEV or TSLIB params.
from lcd-show.
@carpajr If you want assistance, you have to provide more details than "didn't work". WHAT is going wrong? Rotated screen? Unexpectedly zoomed in or out? What specific remedies have you tried?
By the way, this vendor will provide no solution for you. It's up to you to figure it out like everyone else in this stream of messages. My messages describe what I did to make it work on an RPi. My project for RPi and this TFT is here, for whatever it is worth: https://github.com/texadactyl/rpi_clock
Also see @dbvandy commented on Jan 29, 2018 who seems to have done the same thing as me.
Trial and error! (=:
from lcd-show.
@texadactyl, sorry. I've started to write and forgot to explain what happens.
I tried several ways to touchscreen work and these boot/config.txt lines were effective:
dtoverlay=tft35a:rotate=270
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=1,pmax=255,xohms=60,xmin=200,xmax=3900,ymin=200,ymax=3900
dtoverlay=w1-gpio-pullup,gpiopin=4,extpullup=1
However, set up the screen rotation became a real challenge for eglfs applications. I tried several modifications in dtoverlay and decided to use ts_calibration, but also didn't work.
QT_QPA_FB_TSLIB=1
TSLIB_FBDEVICE=/dev/fb0
TSLIB_TSDEVICE=/dev/input/event0
TSLIB_CALIBFILE =/etc/pointercal
So, I tried to use ev_dev with some parameters, but once again, didn't work. The rotation configuration doesn't work.
QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event0:rotate=270 or 90
from lcd-show.
I have no file called "/etc/pointercal" on my RPi. I am using Raspbian. What are you using?
uname -a:
Linux rpiclock 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
My app is not based on QT. Instead, I am using Tk/tkinter to access the TFT.
from lcd-show.
@texadactyl,
I'm using Raspbian, but not using X11 or any windows system. The application that I'm developing runs over EGLFS (OpenGL) and that is why it is harder to do the touchscreen rotation. I didn't find any tip for fix this.
I have not any problem using two other displays (7" resistive and 10" capacitive), but the tft35a seems a lost cause. :(
from lcd-show.
You will have a challenge to train EGL and OpenGL in using goodtft hardware. This TFT vendor supports only Xorg in combination with their custom Xorg code.
You probably have seen this: https://doc.qt.io/qt-5/embedded-linux.html
from lcd-show.
I didn't know about the limitation when I bought the display, but life is short to complain about that. :)
Yes, I saw the docs. There are some tricks to set up a touch, but none of them worked with tft35a.
from lcd-show.
Not intuitive at all. The documentation is pathetic. Sorry, goodtft, but it is true.
I started with a fresh raspbian install and LCD-show from github. I stood the display up such that the power chord and HDMI adapter are pointing up (the way I want it when I deploy it). This setting in /boot/config.txt worked for me:
dtoverlay=tft35a:rotate=270
I observed:
rotate=0 top of screen is at physical left
rotate=90 top of screen is at physical bottom (up-side down)
rotate=180 top of screen is at physical right
rotate=270 top of screen is at physical top (right-side up)It matters not what the contents of /etc/X11/xorg.conf.d/99-calibration.conf are. I left the file as it was installed except following the touch-screen calibration instructions.
It's working thank you 😃👍
from lcd-show.
Option "InvertY" "true"
Option "InvertX" "true"
It's working fine. thx
from lcd-show.
Option "InvertY" "true" Option "InvertX" "true"
Thanks You Work Find.
Option "SwapAxes" "1" or "0"
this option for just accepted of invert orientation?????
from lcd-show.
Related Issues (20)
- [Solved] Raspberry Pi 5 - Display Resolution and Orientation stuck
- After installing drivers Screen White , But Touch working, Display on Hdmi HOT 4
- Question for terminal
- Two touch screens
- Scrolling is not detected on ADS7846 display
- Display stays white while bootup, how to show splash image or video instead?
- Force 4" MPI4008 to 720x1280 definition
- After this install i can not connect via vnc HOT 6
- Require TFT 3.5 display configuration for Raspberry Pi Bookworm release HOT 58
- raspi 4b LCD7C Ubuntu2404 can't work HOT 4
- MPI3508 安装脚本在 RPi 3B+ 的 Bookworm 系统下安装失败
- Low refresh rate on MHS-3.5” RPi Display HOT 4
- sudo rm -rf LCD-show git clone https://github.com/goodtft/LCD-show.git chmod -R 755 LCD-show cd LCD-show/
- sudo ./MPI3508-show
- Does the lcd screen cod work for raspberry pi 400?
- Does it support GC9106
- MPI5001 and RPi Zero 2 W and MoOde Audio
- Breaks USB serial Connection
- Conflicts With Picamera2
- Pi 4 Model B 1GB 3.5” RPi Display doesn't start GUI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lcd-show.