forked from mcuadros/OctoPrint-TFT
-
Notifications
You must be signed in to change notification settings - Fork 1
TFT Installation Tips
CJeffyB edited this page Mar 26, 2018
·
3 revisions
From a base installation of OctoPi, various TFTs may have problems displaying the interface. (This may be due, in part, to the base OctoPi install having no X components at all.)
The steps I followed to get the Adafruit PiTFT Plus working were:
- Install the TFT with Adafruit's script:
> cd ~
> wget https://raw.githubusercontent.com/adafruit/Adafruit-PiTFT-Helper/master/adafruit-pitft-helper2.sh
> chmod +x adafruit-pitft-helper2.sh
> sudo ./adafruit-pitft-helper2.sh
* When asked if you want the console to appear on the PiTFT display, answer "yes".
- Install the prerequisites for OctoPrint-TFT:
> sudo apt install xserver-xorg
> sudo apt install xinit
> sudo apt install libgtk-3-0
> sudo apt install xserver-xorg-video-fbdev
* (These commands can be entered individually, or as a single `apt install`.)
* (The last item, `xserver-xorg-video-fbdev` was needed because OctoPrint does not include the required display driver.)
- Install OctoPrint-TFT:
> wget https://github.com/mcuadros/OctoPrint-TFT/releases/download/v0.1.2/octoprint-tft_0.1.2-1.jessie_armhf.deb
> sudo dpkg -i octoprint-tft_0.1.2-1.jessie_armhf.deb
- Create the X config file for the TFT:
> sudo nano /usr/share/X11/xorg.conf.d/99-pitft.conf
* Paste the following contents:
Section "Device"
Identifier "PiTFT"
Driver "fbdev"
Option "fbdev" "/dev/fb1"
EndSection
- Remove an old / incorrect config file:
> sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
- Change the OctoPrint-TFT service to output to framebuffer 1, rather than 0:
> sudo nano /lib/systemd/system/octoprint-tft.service
and edit the command line from:
ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :0 -nolisten tcp -nocursor
to
ExecStart=/usr/bin/xinit /usr/bin/OctoPrint-TFT -- :1 -nolisten tcp -nocursor
- Make sure things are linked properly:
> sudo ln -sf /lib/systemd/system/octoprint-tft.service /etc/systemd/system/display-manager.service
> systemctl set-default graphical.target
- Reboot and everything should work!
The above steps should also work for the Waveshare 3.5inch RPi LCD (A) 320×480 display, just be sure to replace the Adafruit install script in the first step with the driver from the Waveshare site.