PiTFT installation problem

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/
Locked
User avatar
stysis
 
Posts: 9
Joined: Fri Jun 20, 2014 5:54 am

PiTFT installation problem

Post by stysis »

I have the PiTFT 2.8" installed and working but am having what I expect is a simple problem with one part of the installation.

The last item on the Software Installation page says to add "export FRAMEBUFFER=/dev/fb1" to the sudo nano ~/.profile file so that after rebooting you only need to type "startx" to get the desktop on the PiTFT.

This hasn't worked for me.
When I reboot and type "startx" it will run but no desktop on the PiTFT.
Ctrl-C to exit X, then "FRAMEBUFFER=/dev/fb1 startx" gets the desktop showing fine.

I've checked that the added command is still in the .profile file but other than that I'm too much of a noob on the Pi to know what to do next.

Any ideas would be greatly appreciated.

OldManIvan
 
Posts: 5
Joined: Fri Jun 20, 2014 9:45 am

Re: PiTFT installation problem

Post by OldManIvan »

Feels similar to the problem I'm having. I followed Adafruits guide to the letter and it worked fine up until the autoloading modules part. After I've added export FRAMEBUFFER=/dev/fb1 to the profile, startx turns the HDMI-Screen black with an unblinking cursor, however the PiTFT remains black too. Oddly enough, the values from dmesg match the ones posted in the guide.
My solution so far was removing all the autoloading stuff from /etc/modules and /etc/modprobe.d/adafruit.conf, and putting the following lines in ~/.profile:
sudo modprobe spi-bcm2708
sudo modprobe fbtft_device name=adafruitts rotate=90
export FRAMEBUFFER=/dev/fb1

After that, reboot und startx should display x on the PiTFT. This works fine for me, but it leaves me wondering where I went wrong with the guide.

User avatar
stysis
 
Posts: 9
Joined: Fri Jun 20, 2014 5:54 am

Re: PiTFT installation problem

Post by stysis »

Hi OldManIvan. Thanks for your reply.

I have tried what you suggested - commented out the 2 added lines in /etc/modules and the single line of /etc/modprobe.d/adafruit.conf then edited ~/.profile as per your post. Sadly no success there.

Your comment about your HDMI screen turning black got me wondering if my SSH setup might be the problem. So I borrowed and HDMI cable from my TV and tried again. That didn't help either.

After the changes FRAMEBUFFER=/dev/fb1 startx also did nothing which got me thinking about whether the ~/.profile file is the problem.
At the terminal command line I entered sudo modprobe spi-bcm2708 then sudo modprobe fbtft_device name=adafruitts rotate=90 then FRAMEBUFFER=/dev/fb1 startx and the desktop came up on the PiTFT.

All this points to my ~/.profile file being overlooked for some reason.
I'm looking for a reason why this might be happening and a possible fix which I'll post if I find one.

User avatar
stysis
 
Posts: 9
Joined: Fri Jun 20, 2014 5:54 am

Re: PiTFT installation problem

Post by stysis »

Here's the fix I have put in place.

A similar problem is described here http://www.raspberrypi.org/forums/viewt ... 28&t=37575. I don't pretend to have understood all there but there is discussion of a file /etc/X11/Xsession.d/75source-profile, a recent addition as "a workaround for this issue" which should have contents:

Code: Select all

[ -f /etc/profile ] && . /etc/profile
[ -f "$HOME/.profile" ] && . "$HOME/.profile"
My distro of Raspbian has this file but the contents were:

Code: Select all

[ -f /etc/profile ] && . /etc/profile
[ -f "/home/root/.profile" ] && . "/home/root/.profile"
But there is no /home/root directory so that file was never going to be read!
So I edited /etc/X11/Xsession.d/75source-profile to point to the /home/pi directory and all is good.

Thanks again to OldManIvan for prompting me to look in the right place.

OldManIvan
 
Posts: 5
Joined: Fri Jun 20, 2014 9:45 am

Re: PiTFT installation problem

Post by OldManIvan »

Glad I could help. ;-)

Locked
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/

Return to “Adafruit Raspberry Pi® accessories”