📬❄️📦Adafruit Holiday Shipping Deadlines 2019: Please place all UPS 3 Day orders by 11am ET Friday December 13 📬❄️📦
0

List all of the places needed to change for PiTFT vs. HDMI
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

List all of the places needed to change for PiTFT vs. HDMI

by michaelmeissner on Fri Dec 19, 2014 2:16 pm

I've been using the 2.8" PiTFT display with resistive touch for awhile, and I just got a 5" HDMI display with touch. Is there a comprehensive list of all of the places that need to be changed to switch between the displays (/etc/modules, /etc/rc.local, /boot/config.txt, etc.). Ideally, I would like to make a shell script that can change all of the files so I can easily switch displays.

michaelmeissner
 
Posts: 1399
Joined: Wed Aug 29, 2012 12:40 am

Re: List all of the places needed to change for PiTFT vs. HD

by michaelmeissner on Fri Dec 19, 2014 2:23 pm

And even better if I could determine via shell/perl scripts at boot time which display I'm using and automatically switch. I suspect that may be problematical, but it would be nice.

I've done that in the past, when I would move a laptop from my work docking station to my home docking station to no docking station, changing the various defaults based on the system.

michaelmeissner
 
Posts: 1399
Joined: Wed Aug 29, 2012 12:40 am

Re: List all of the places needed to change for PiTFT vs. HD

by adafruit_support_mike on Tue Dec 23, 2014 2:34 am

I don't know of any way to do hardware detection of the PiTFT or a HDMI display at a point in the boot process early enough to make a difference.

It would probably be easier to try and run both at the same time, and let whatever one doesn't have the hardware support fail.

adafruit_support_mike
 
Posts: 59692
Joined: Thu Feb 11, 2010 2:51 pm

Re: List all of the places needed to change for PiTFT vs. HD

by michaelmeissner on Tue Dec 23, 2014 1:05 pm

Well you don't have to make the choice that early. It isn't until /etc/rc.local runs that I would need to know. It comes up on the HDMI display and it isn't until the PiTFT is configured that it switches displays. I don't need a general solution (i.e. recognize any HDMI video display and auto configure for it), I just need to dig in and see if the PiTFT display is mounted, and assume if it isn't that I'm using the 5" HDMI display. But getting back to my question, assuming I'm in /etc/rc.local, and I want to switch between the displays, is there a list of all of the files that need to be changed, modules loaded/unloaded, etc. to switch displays?

I'm using https://github.com/adafruit/adafruit-pi-cam/archive/master.zip, which in turn use python-pip.

michaelmeissner
 
Posts: 1399
Joined: Wed Aug 29, 2012 12:40 am

Re: List all of the places needed to change for PiTFT vs. HD

by adafruit_support_mike on Thu Dec 25, 2014 5:10 am

Not really.. you just call `startx` with FRAMEBUFFER=/dev/fv0 or /dev/fb1.

Something to check: does your RasPi create /dev/fb1 if the TFT isn't connected?

adafruit_support_mike
 
Posts: 59692
Joined: Thu Feb 11, 2010 2:51 pm

Re: List all of the places needed to change for PiTFT vs. HD

by michaelmeissner on Sat Dec 27, 2014 4:46 pm

So far my list includes the following go from PiTFT to HDMI. Maybe it is helpful to somebody else:
  • Remove spi-bcm2708 and fbtft_device from /etc/modules
  • Remove /etc/modprobe.d/adafruit.conf if you never want to go back to PiTFT
  • Remove /etc/X11/xorg.conf.d/99-calibration.conf
  • Remove /etc/udev/rules.d/95-stmpe.rules
  • Remove fbcon=map:10 fbcon=font:VGA8x8 from /boot/cmdline.txt
  • Possibly re-do [b]dpkg-reconfigure console-setup to change the console font
  • Possibly changing BLANK_TIME=0 to BLANK_TIME=30 in /etc/kbd/config
  • Edit /boot/config.txt to add the HDMI specific configurations mentioned in https://learn.adafruit.com/hdmi-uberguide/2109-5-display-touch-mini-driver-800x480
  • Delete /usr/share/X11/xorg.conf.d/99-pitft.conf, replacing it with a file that targets /dev/fb0 instead of /dev/fb1
  • Hook up a mini-USB cable between the touchscreen interface and the pi.

michaelmeissner
 
Posts: 1399
Joined: Wed Aug 29, 2012 12:40 am

Please be positive and constructive with your questions and comments.