LCD Support on Linux
#1
Information 
This thread/post is intended to pull together scattered discussions from the forum on LCD Support on Linux, and put the current information of the state of affairs of LCD support on the pine64 with regards to the Linux operating systems in one place. It is a living post, so may be subject to change by myself or other moderators as needed to correct any inaccuracies over time. Any support requests will be moved to a different thread as that is NOT the focus of this thread. If you have any suggestions as to more information or related forum threads, please leave a reply!

Out of the box, the pine64 has always supported both the HDMI and LCD outputs via the Android images - but not at the same time. More recently in that area, the need for two different images has been removed, and a simply change to the uEnv.txt file was needed.

This was not the case with linux... until recently, there was no LCD support at all. It was certainly possible, as it had been done before with other boards using the Allwinner Display Engine, but was not enabled on the pine64 until recently. There are currently no "official" images that support the LCD and/or touchscreen out of the box. However, it was pointed out in Nov 2016 that support was present in the official Armbian repo, so there is in fact a ready to use image that is available for download or for you to build yourself. Check out the latest Armbian Beta image (I won't direct link as it is rebuilt daily, but you want the Pine64_Ubuntu_xenial build), and also look at the pine64 specific documentation on their site in order to try it out for yourself! 

To enable the LCD panel under Armbian navigate to /boot, open the armbianEnv.txt file with a text editor and  
change the pine64_lcd=off value to on. You will also need to add gt9xxf_ts to /ect/modules if you wish to enable the touch screen support. 
For more information please see (the last three points of) the pine64 specific Armbian documentation

[Image: FUx71W7.jpg]


Instructions for installing the touch screen driver in Debian (and possibly other images) 

Other threads/subforums:
Notes:
  • Posts talking about adding LCD support to linux images (made a list - will create redirects once this thread is open ~ Luke)
  • An OpenSuse LCD image is now available (just video/ no touch)

One way to increase/decrease brightness using GPIO:

Code:
echo 362 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio362/direction

while true; do
case "`xscreensaver-command -time | egrep -o ' blanked|non-blanked|locked'`" in
  " blanked")     echo 1 > /sys/class/gpio/gpio362/value ;;
  "non-blanked")  echo 0 > /sys/class/gpio/gpio362/value ;;
esac
sleep 5
done



Changelog:
  •  2017-03-19 - Added link to "[EXPERIMENTAL] Linux on the LCD screen" thread
  Reply
#2
Hi pfeerick

I'm going to try Linux on my Pine64 with LCD+Touch, but I found out that " Armbian Beta image " link from your post isn't working anymore.
Could you please orient me where can I obtain the right image for my experiments?

Regards!
d;-)
  Reply
#3
(10-09-2017, 10:45 AM)Workaholic Wrote: Hi pfeerick

I'm going to try Linux on my Pine64 with LCD+Touch, but I found out that " Armbian Beta image " link from your post isn't working anymore.
Could you please orient me where can I obtain the right image for my experiments?

Regards!

Hey, this is an old post and ought to be updated. If I am not mistaken LCD should work with ayufans images as well as armbian pretty much out-of-the-box. In ayufan's images you need to set the following value in uEnv.txt: 
Code:
disp_screen0=lcd
Edit: not 100% this makes TP work out of the box ...

Edit 2: regarding armbian (from their docs): 

Quote: LCD with touchscreen support can simply be activated in  /boot/armbianEnv.txt by setting pine64_lcd=on and adding gt9xxf_ts to /etc/modules followed by a reboot. 
You can find me on IRC, Discord and Twitter


  Reply
#4
(10-09-2017, 12:24 PM)Luke Wrote:
(10-09-2017, 10:45 AM)Workaholic Wrote: Hi pfeerick

I'm going to try Linux on my Pine64 with LCD+Touch, but I found out that " Armbian Beta image " link from your post isn't working anymore.
Could you please orient me where can I obtain the right image for my experiments?

Regards!

Hey, this is an old post and ought to be updated. If I am not mistaken LCD should work with ayufans images as well as armbian pretty much out-of-the-box. In ayufan's images you need to set the following value in uEnv.txt: 
Code:
disp_screen0=lcd
Edit: not 100% this makes TP work out of the box ...

Edit 2: regarding armbian (from their docs): 

Quote: LCD with touchscreen support can simply be activated in  /boot/armbianEnv.txt by setting pine64_lcd=on and adding gt9xxf_ts to /etc/modules followed by a reboot. 

What about for the Pine64-LTS? It is a different build than the Pine64 and does not seem to work with LCD after adding those two lines as specified.
  Reply
#5
Can anyone describe how to get the LCD working with mainline 5.6.x kernel? Still struggling here to get mipi-dsi dt (overlays or blob) configured and applied.
  Reply
#6
(02-18-2020, 11:50 AM)chilicon Wrote:
(10-09-2017, 12:24 PM)Luke Wrote: Hey, this is an old post and ought to be updated. If I am not mistaken LCD should work with ayufans images as well as armbian pretty much out-of-the-box. In ayufan's images you need to set the following value in uEnv.txt: 
Code:
disp_screen0=lcd
Edit: not 100% this makes TP work out of the box ...

Edit 2: regarding armbian (from their docs): 

Quote: LCD with touchscreen support can simply be activated in  /boot/armbianEnv.txt by setting pine64_lcd=on and adding gt9xxf_ts to /etc/modules followed by a reboot. 

What about for the Pine64-LTS? It is a different build than the Pine64 and does not seem to work with LCD after adding those two lines as specified.


I believe the docs from Armbian website are just out of date because I have not been able to make it work with a Pine A64+ 2GB following those instructions. And from what I've read in their forums it only ever worked on the old 3.10 kernel based on longsleep's work. Here're what I've tested to work so far apart from openSUSE:




Pine A64+ LCD


Debian / Ubuntu: ayufan's pine64 images by following the changes described in his /boot/uEnv.txt



Code:
disp_screen0=lcd
disp_mode=screen0



Armbian: The latest Armbian version that I found which works out of the box is from modsbyus (thanks to NexusDude's post). This image is Ubuntu Xenial on KDE however I was able to upgrade it all the way to Focal with the following steps:

  • Resize the root partition
Code:
fdisk /dev/mmcblk0
p #print the partition table and take note of the starting sector. For this image it's 4096
d #to delete the partition
n #create a new partition
p #partition type primary
1 #partition number
4096 #first sector, this should be the starting sector which you noted down above when you listed the partition table. Just press enter for the last sector
w #save the changes and exit from fdisk

partx -u /dev/mmcblk0
resize2fs /dev/mmcblk0p1
reboot

  • There are 2 display managers installed (lightdm and nodm) but nodm is the one used. Get rid of lightdm with apt-get purge lightdm
  • Open /etc/apt/sources.list.d/armbian.list and change utils to xenial-utils
  • apt-get update && apt-get upgrade. You can reboot here however it's not necessary
  • Open /etc/apt/sources.list /etc/apt/sources.list.d/armbian.list and replace all instances of xenial with bionic
  • apt-get update && apt-get dist-upgrade && apt-get autoremove. The generated Image-3.10.107-pine64 and uInitrd-3.10.107-pine64 will still work so go ahead and reboot
  • Open /etc/apt/sources.list /etc/apt/sources.list.d/armbian.list and replace all instances of bionic with eoan
  • Backup the contents of /boot somewhere else (i.e. /home/momonga/boot)
  • apt-get update && apt-get dist-upgrade && apt-get autoremove. Now at this point the generated Image-3.10.107-pine64 and uInitrd-3.10.107-pine64 will no longer work and your Pine A64+ will refuse to boot up so copy back the ones we backed up earlier
Code:
cp /home/momonga/boot/Image-3.10.107-pine64 /boot
cp /home/momonga/boot/uInitrd-3.10.107-pine64 /boot

  • Reboot and repeat the same steps for eoan->focal upgrade and copy back the Image-3.10.107-pine64 and uInitrd-3.10.107-pine64 before rebooting
  • Congratulations you should now have Armbian Focal running with the Pine A64+ LCD which boots directly into KDE


Pine A64-LTS LCD


Debian: ayufan's sopine images by following the changes described in his /boot/uEnv.txt




Code:
disp_screen0=lcd
disp_mode=screen0
  Reply
#7
I use the steps of LrdShaper to update the armbian to the focal, I will leave the link in case anyone wants to avoid the pain of updating 10 million packages.

Donwload
  Reply
#8
(08-24-2020, 12:55 AM)HBeserra Wrote: I use the steps of LrdShaper to update the armbian to the focal, I will leave the link in case anyone wants to avoid the pain of updating 10 million packages.

Donwload
I'm new to my pine a64 could you explain how to use this image? I tried flashing it directly to an sd card but nothing came up. Thanks!
  Reply
#9
(12-28-2020, 05:18 AM)JAYJAYN Wrote:
(08-24-2020, 12:55 AM)HBeserra Wrote: I use the steps of LrdShaper to update the armbian to the focal, I will leave the link in case anyone wants to avoid the pain of updating 10 million packages.

Donwload
I'm new to my pine a64 could you explain how to use this image? I tried flashing it directly to an sd card but nothing came up. Thanks!

Hi Jayjayn, you can use the process described in the noobs page, I use the Linux dd command, but today the Armbian is a more viable solution for use 7" display with the new driver and a new version of the kernel with security paths 

Armbian display configuration process
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [EXPERIMENTAL] Linux on the LCD screen Terra854 24 39,406 07-21-2017, 07:41 AM
Last Post: apple4ever
  Linux Support UnixOutlaw 69 102,483 03-18-2017, 07:25 PM
Last Post: apple4ever
  Touch screen support shariq_2001 14 22,324 12-07-2016, 07:47 AM
Last Post: Luke
Photo Playbox LCD on Linux MackPI 10 17,566 10-19-2016, 07:49 AM
Last Post: Zoidiano0
  Received a bad LCD, can't get support. bryanlyon 3 5,558 09-27-2016, 03:55 AM
Last Post: Luke
  Touchscreen support? NoahJ 12 17,592 07-09-2016, 12:01 PM
Last Post: yodermk
  LVDS support Flood_of_SYNs 2 7,153 12-22-2015, 05:08 PM
Last Post: balornt

Forum Jump:


Users browsing this thread: 2 Guest(s)