Script to install Odroid LCD 3.5 Touchscreen Shield

Moderators: mdrjr, odroid

Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby Fourdee » Mon Oct 24, 2016 3:27 am

This script will:

Requires:
  • Debian Jessie or higher
  • Ubuntu 16.xx
  • Any Debian based OS with SystemD

See the scripts sourcecode: http://dietpi.com/downloads/misc/community/install_odroid_LCD35.sh

Download script:
Code: Select all
wget http://dietpi.com/downloads/misc/community/install_odroid_LCD35.sh -O install_odroid_LCD35.sh
chmod +x install_odroid_LCD35.sh


How to install for XU4:
Code: Select all
./install_odroid_LCD35.sh 0


How to install for C1+/C2
Code: Select all
./install_odroid_LCD35.sh 1


How do I disable the display?:
Code: Select all
systemctl disable odroid-lcd35
rm /etc/X11/xorg.conf.d/99-odroid-lcd35.conf

#+XU4
mv /etc/X11/exynos.conf /etc/X11/xorg.conf.d/exynos.conf


How do I calibrate the screen & inputs?:
Code: Select all
DISPLAY=:0 xinput_calibrator


Notes:
  • Many thanks to mad_ady for fix to power off screen during shutdown.
Last edited by Fourdee on Wed Dec 07, 2016 9:18 pm, edited 1 time in total.
http://DietPi.com - Lightweight justice for your Odroid.
DietPi web hosting is powered by http://MyVirtualServer.com
User avatar
Fourdee
 
Posts: 296
Joined: Fri Apr 03, 2015 5:01 am
languages_spoken: english
ODROIDs: C1 / C2 / XU4 + Cloudshell.

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby gkkpch » Mon Oct 24, 2016 4:01 am

Thanks for sharing this, I will likely use parts of it for the C1/C2 Volumio images

-Gé-
User avatar
gkkpch
 
Posts: 241
Joined: Mon Feb 25, 2013 11:47 pm
Location: Switzerland
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby mad_ady » Wed Oct 26, 2016 1:49 am

@odroid please move this in the accessories subforum to be easier to find
User avatar
mad_ady
 
Posts: 2746
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby odroid » Wed Oct 26, 2016 4:23 am

Has been moved. :)
User avatar
odroid
Site Admin
 
Posts: 24994
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby phaseshifter » Sun Oct 30, 2016 1:49 am

systemctl disable odroid-lcd35
rm /etc/X11/xorg.conf.d/99-odroid-lcd35.conf

to confirm running this code will give back the hdmi output..?? on my c1

ok i ran this code and now i got no display on the hdmi or lcd for that matter..
4.9.xx.xx odroids
phaseshifter
 
Posts: 2483
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby Fourdee » Sun Oct 30, 2016 2:47 am

phaseshifter wrote:ok i ran this code and now i got no display on the hdmi or lcd for that matter..

Bizzare, do you have an existing xorg.conf? Please paste contents.
Code: Select all
cat /etc/X11/xorg.conf
http://DietPi.com - Lightweight justice for your Odroid.
DietPi web hosting is powered by http://MyVirtualServer.com
User avatar
Fourdee
 
Posts: 296
Joined: Fri Apr 03, 2015 5:01 am
languages_spoken: english
ODROIDs: C1 / C2 / XU4 + Cloudshell.

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby phaseshifter » Sun Oct 30, 2016 2:52 am

um sox i just reflashed my emmc i wil try give you the deatails of that cat..dont forget i am using a c1+ an 16.04..
4.9.xx.xx odroids
phaseshifter
 
Posts: 2483
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby phaseshifter » Sun Oct 30, 2016 3:05 am

i will fire up my c1+ 4 you but give me 20 mins to bring it up to speed your code for install works fine ..the problem lies within getting bach to "normal " mode hdmi out.
4.9.xx.xx odroids
phaseshifter
 
Posts: 2483
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby Fourdee » Sun Oct 30, 2016 3:13 am

phaseshifter wrote:i will fire up my c1+ 4 you but give me 20 mins to bring it up to speed your code for install works fine ..the problem lies within getting bach to "normal " mode hdmi out.

No rush, thanks.

Also, if you could paste the contents of all files in /etc/modprobe.d/ aswell, would be great, eg:
Code: Select all
ls -lha /etc/modprobe.d/
cat /etc/modprobe.d/*
http://DietPi.com - Lightweight justice for your Odroid.
DietPi web hosting is powered by http://MyVirtualServer.com
User avatar
Fourdee
 
Posts: 296
Joined: Fri Apr 03, 2015 5:01 am
languages_spoken: english
ODROIDs: C1 / C2 / XU4 + Cloudshell.

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby phaseshifter » Sun Oct 30, 2016 3:53 am

these are after i loaded your code but not before i reboot for your setup code to un...

Code: Select all
Section "Device"
        Identifier      "Mali-Fbdev"
        Driver          "mali"
        Option          "fbdev"         "/dev/fb0"
        Option          "DRI2"            "true"
        Option          "DRI2_PAGE_FLIP"  "false"
        Option          "DRI2_WAIT_VSYNC" "false"
        Option          "UMP_CACHED"      "true"
        Option          "UMP_LOCK"        "false"
        Option          "SWCursor"        "true"
        Option          "HWCursor"        "false"

EndSection

Section "ServerFlags"
        Option          "NoTrapSignals" "true"
        Option          "DontZap"       "false"
        Option          "BlankTime"     "0"
        Option          "StandbyTime"   "0"
        Option          "SuspendTime"   "0"
        Option          "OffTime"       "0"
EndSection

Section "DRI"
        Mode            0666
EndSection


Code: Select all
root@odroid:/home/odroid# ls -lha /etc/modprobe.d/
total 68K
drwxr-xr-x   2 root root 4.0K Oct 29 18:47 .
drwxr-xr-x 143 root root  12K Oct 29 18:39 ..
-rw-r--r--   1 root root 2.5K Jul 31  2015 alsa-base.conf
-rw-r--r--   1 root root  325 Mar 13  2016 blacklist-ath_pci.conf
-rw-r--r--   1 root root 1.6K Mar 13  2016 blacklist.conf
-rw-r--r--   1 root root  210 Mar 13  2016 blacklist-firewire.conf
-rw-r--r--   1 root root  697 Mar 13  2016 blacklist-framebuffer.conf
-rw-r--r--   1 root root  156 Jul 31  2015 blacklist-modem.conf
-rw-r--r--   1 root root   85 Jul 28 00:28 blacklist-odroid.conf
lrwxrwxrwx   1 root root   41 Jul 14 01:28 blacklist-oss.conf -> /lib/linux-sound-base/noOSS.modprobe.conf
-rw-r--r--   1 root root  583 Mar 13  2016 blacklist-rare-network.conf
-rw-r--r--   1 root root 1.1K Mar 13  2016 blacklist-watchdog.conf
-rw-r--r--   1 root root  390 May 12 08:39 fbdev-blacklist.conf
-rw-r--r--   1 root root  347 Mar 13  2016 iwlwifi.conf
-rw-r--r--   1 root root  104 Mar 13  2016 mlx4.conf
-rw-r--r--   1 root root   72 Oct 29 18:47 odroid-lcd35.conf


Code: Select all
root@odroid:/home/odroid# cat /etc/modprobe.d/*
# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7

# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
#
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
#
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
# Cause optional modules to be loaded above sound card driver modules
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }

# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
# For some Atheros 5K RF MACs, the madwifi driver loads buts fails to
# correctly initialize the hardware, leaving it in a state from
# which ath5k cannot recover. To prevent this condition, stop
# madwifi from loading by default. Use Jockey to select one driver
# or the other. (Ubuntu: #315056, #323830)
blacklist ath_pci

# This file lists those modules which we don't want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.

# evbug is a debug tool that should be loaded explicitly
blacklist evbug

# these drivers are very simple, the HID drivers are usually preferred
blacklist usbmouse
blacklist usbkbd

# replaced by e100
blacklist eepro100

# replaced by tulip
blacklist de4x5

# causes no end of confusion by creating unexpected network interfaces
blacklist eth1394

# snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much
# hardware on its own (Ubuntu bug #2011, #6810)
blacklist snd_intel8x0m

# Conflicts with dvb driver (which is better for handling this device)
blacklist snd_aw2

# causes failure to suspend on HP compaq nc6000 (Ubuntu: #10306)
blacklist i2c_i801

# replaced by p54pci
blacklist prism54

# replaced by b43 and ssb.
blacklist bcm43xx

# most apps now use garmin usb driver directly (Ubuntu: #114565)
blacklist garmin_gps

# replaced by asus-laptop (Ubuntu: #184721)
blacklist asus_acpi

# low-quality, just noise when being used for sound playback, causes
# hangs at desktop session start (Ubuntu: #246969)
blacklist snd_pcsp

# ugly and loud noise, getting on everyone's nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr

# EDAC driver for amd76x clashes with the agp driver preventing the aperture
# from being initialised (Ubuntu: #297750). Blacklist so that the driver
# continues to build and is installable for the few cases where its
# really needed.
blacklist amd76x_edac
# Select the legacy firewire stack over the new CONFIG_FIREWIRE one.

blacklist ohci1394
blacklist sbp2
blacklist dv1394
blacklist raw1394
blacklist video1394

#blacklist firewire-ohci
#blacklist firewire-sbp2
# Framebuffer drivers are generally buggy and poorly-supported, and cause
# suspend failures, kernel panics and general mayhem.  For this reason we
# never load them automatically.
blacklist aty128fb
blacklist atyfb
blacklist bochs-drm
blacklist radeonfb
blacklist cirrusfb
blacklist cyber2000fb
blacklist cyblafb
blacklist gx1fb
blacklist hgafb
blacklist i810fb
blacklist intelfb
blacklist kyrofb
blacklist lxfb
blacklist matroxfb_base
blacklist neofb
blacklist nvidiafb
blacklist pm2fb
blacklist rivafb
blacklist s1d13xxxfb
blacklist savagefb
blacklist sisfb
blacklist sstfb
blacklist tdfxfb
blacklist tridentfb
#blacklist vesafb
blacklist vfb
blacklist viafb
blacklist vt8623fb
blacklist udlfb
# Uncomment these entries in order to blacklist unwanted modem drivers
# blacklist snd-atiixp-modem
# blacklist snd-intel8x0m
# blacklist snd-via82xx-modem
# Comment only what you need

# 1 Wire GPIO Support
blacklist w1_gpio
blacklist wire
blacklist ac97
blacklist ac97_codec
blacklist ac97_plugin_ad1980
blacklist ad1848
blacklist ad1889
blacklist adlib_card
blacklist aedsp16
blacklist ali5455
blacklist btaudio
blacklist cmpci
blacklist cs4232
blacklist cs4281
blacklist cs461x
blacklist cs46xx
blacklist emu10k1
blacklist es1370
blacklist es1371
blacklist esssolo1
blacklist forte
blacklist gus
blacklist i810_audio
blacklist kahlua
blacklist mad16
blacklist maestro
blacklist maestro3
blacklist maui
blacklist mpu401
blacklist nm256_audio
blacklist opl3
blacklist opl3sa
blacklist opl3sa2
blacklist pas2
blacklist pss
blacklist rme96xx
blacklist sb
blacklist sb_lib
blacklist sgalaxy
blacklist sonicvibes
blacklist sound
blacklist sscape
blacklist trident
blacklist trix
blacklist uart401
blacklist uart6850
blacklist via82cxxx_audio
blacklist v_midi
blacklist wavefront
blacklist ymfpci
blacklist ac97_plugin_wm97xx
blacklist ad1816
blacklist audio
blacklist awe_wave
blacklist dmasound_core
blacklist dmasound_pmac
blacklist harmony
blacklist sequencer
blacklist soundcard
blacklist usb-midi
# Many less commonly used network protocols have recently had various
# security flaws discovered. In an effort to reduce the scope of future
# vulnerability exploitations, they are being blacklisted here so that
# unprivileged users cannot use them by default. System owners can still
# either modify this file, or specifically modprobe any needed protocols.

# ax25
alias net-pf-3 off
# netrom
alias net-pf-6 off
# x25
alias net-pf-9 off
# rose
alias net-pf-11 off
# decnet
alias net-pf-12 off
# econet
alias net-pf-19 off
# rds
alias net-pf-21 off
# af_802154
alias net-pf-36 off
# Watchdog drivers should not be loaded automatically, but only if a
# watchdog daemon is installed.
blacklist acquirewdt
blacklist advantechwdt
blacklist alim1535_wdt
blacklist alim7101_wdt
blacklist booke_wdt
blacklist cpu5wdt
blacklist eurotechwdt
blacklist i6300esb
blacklist i8xx_tco
blacklist ib700wdt
blacklist ibmasr
blacklist indydog
blacklist iTCO_wdt
blacklist it8712f_wdt
blacklist it87_wdt
blacklist ixp2000_wdt
blacklist ixp4xx_wdt
blacklist machzwd
blacklist mixcomwd
blacklist mpc8xx_wdt
blacklist mpcore_wdt
blacklist mv64x60_wdt
blacklist pc87413_wdt
blacklist pcwd
blacklist pcwd_pci
blacklist pcwd_usb
blacklist s3c2410_wdt
blacklist sa1100_wdt
blacklist sbc60xxwdt
blacklist sbc7240_wdt
blacklist sb8360
blacklist sc1200wdt
blacklist sc520_wdt
blacklist sch311_wdt
blacklist scx200_wdt
blacklist shwdt
blacklist smsc37b787_wdt
blacklist softdog
blacklist twl4030_wdt
blacklist w83627hf_wdt
blacklist w83697hf_wdt
blacklist w83697ug_wdt
blacklist w83877f_wdt
blacklist w83977f_wdt
blacklist wafer5823wdt
blacklist wdt
blacklist wdt_pci
blacklist wm8350_wdt
# This file blacklists most old-style PCI framebuffer drivers.

blacklist arkfb
blacklist aty128fb
blacklist atyfb
blacklist radeonfb
blacklist cirrusfb
blacklist cyber2000fb
blacklist kyrofb
blacklist matroxfb_base
blacklist mb862xxfb
blacklist neofb
blacklist pm2fb
blacklist pm3fb
blacklist s3fb
blacklist savagefb
blacklist sisfb
blacklist tdfxfb
blacklist tridentfb
blacklist vt8623fb
# /etc/modprobe.d/iwlwifi.conf
# iwlwifi will dyamically load either iwldvm or iwlmvm depending on the
# microcode file installed on the system.  When removing iwlwifi, first
# remove the iwl?vm module and then iwlwifi.
remove iwlwifi \
(/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) \
&& /sbin/modprobe -r mac80211
# mlx4_core gets automatically loaded, load mlx4_en also (LP: #1115710)
softdep mlx4_core post: mlx4_en
options fbtft_device name=flexpfb rotate=90
options flexfb chip=ili9488
root@odroid:/home/odroid#


in order of what you asked
4.9.xx.xx odroids
phaseshifter
 
Posts: 2483
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby phaseshifter » Sun Oct 30, 2016 4:03 am

the bring back to hdmi code works..do you want any further results..um my c1+ is not exactly the best.
.i just put silly putty on top of the hdmi socket..
i need to get a new c1 and my c-2 i cannot use cuse it`s a sample one i got from odroid and it has different gpio`s
4.9.xx.xx odroids
phaseshifter
 
Posts: 2483
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby Fourdee » Sun Oct 30, 2016 4:47 am

Thanks for the results, looks fine.

the bring back to hdmi code works..

So just to confirm, you used the script in 1st post to install the LCD screen, then to return back to HDMI, you ran the code below and HDMI is working ok after a reboot?
Code: Select all
systemctl disable odroid-lcd35
rm /etc/X11/xorg.conf.d/99-odroid-lcd35.conf

#+XU4
mv /etc/X11/exynos.conf /etc/X11/xorg.conf.d/exynos.conf


um my c1+ is not exactly the best.

Don't tell my C1 that, hes the original (not a plus), gets a little edgy and doesn't take kindly to microUSB power lol ;)
http://DietPi.com - Lightweight justice for your Odroid.
DietPi web hosting is powered by http://MyVirtualServer.com
User avatar
Fourdee
 
Posts: 296
Joined: Fri Apr 03, 2015 5:01 am
languages_spoken: english
ODROIDs: C1 / C2 / XU4 + Cloudshell.

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby phaseshifter » Sun Oct 30, 2016 5:55 am

Code: Select all
systemctl disable odroid-lcd35

Code: Select all
rm /etc/X11/xorg.conf.d/99-odroid-lcd35.conf

the above code i used
ok how do i restart the l.c.d now
after a reboot yes..
Last edited by phaseshifter on Sun Oct 30, 2016 6:05 am, edited 1 time in total.
4.9.xx.xx odroids
phaseshifter
 
Posts: 2483
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby phaseshifter » Sun Oct 30, 2016 5:57 am

is this it

Code: Select all
systemctl enable odroid-lcd35
4.9.xx.xx odroids
phaseshifter
 
Posts: 2483
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby Fourdee » Sun Oct 30, 2016 8:19 pm

phaseshifter wrote:is this it

Code: Select all
systemctl enable odroid-lcd35


Yes, but you'll also need the xorg conf (/etc/X11/xorg.conf.d/99-odroid-lcd35.conf) thats installed with the script. So the easiest method would be to simply run the install script again, then reboot.
http://DietPi.com - Lightweight justice for your Odroid.
DietPi web hosting is powered by http://MyVirtualServer.com
User avatar
Fourdee
 
Posts: 296
Joined: Fri Apr 03, 2015 5:01 am
languages_spoken: english
ODROIDs: C1 / C2 / XU4 + Cloudshell.

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby phaseshifter » Mon Oct 31, 2016 9:01 am

so to get the l.c.d up and running again run
for which ever board you are running

i.e the c-series installer or the xu series installer

How to install for XU4:
Code: Select all
 ./install_odroid_LCD35.sh 0


How to install for C1+/C2
Code: Select all
 ./install_odroid_LCD35.sh 1


and reboot
4.9.xx.xx odroids
phaseshifter
 
Posts: 2483
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby phaseshifter » Thu Nov 10, 2016 10:17 pm

just got my new rev C-2 ran "fourdee`s" script on it seems to work fine but not all of the menus are showing in the gui mode

not shure if that is to do with the screen calibrator

my suggestion in gui mode go to the clock settings
remove the weather and date this will help give more room up the top of the screen length wise
4.9.xx.xx odroids
phaseshifter
 
Posts: 2483
Joined: Fri May 08, 2015 9:12 am
languages_spoken: english
ODROIDs: opp sys.. ubuntu .kernel 4.9.xx.xx.c1+ ..c-2..xu3 lite,xu4...vu7,vu8,c-shell -II..c-shel-II,uart,hi-fi ,,hi-fi2,,show,w-board,6x16GB emmc`s 3.5 inch touch...other odroid acc`s as well

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby mad_ady » Wed Dec 07, 2016 8:25 pm

@Fourdee: I've used your script to activate my 3.5" LCD. Thanks for the quick setup procedure :)

However, I noticed a bug/feature. If you shutdown Ubuntu (e.g. from its menu) the odroid will power off, but the screen will keep displaying the last image (which in my case is gedit). This might be helpful for some, but I think you can turn off the LCD (echo 0 > /sys/devices/platform/pwm-ctrl/duty0) as part of odroid-lcd35.service as ExecStop.
User avatar
mad_ady
 
Posts: 2746
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby Fourdee » Wed Dec 07, 2016 9:15 pm

mad_ady wrote:@Fourdee: I've used your script to activate my 3.5" LCD. Thanks for the quick setup procedure :)

However, I noticed a bug/feature. If you shutdown Ubuntu (e.g. from its menu) the odroid will power off, but the screen will keep displaying the last image (which in my case is gedit). This might be helpful for some, but I think you can turn off the LCD (echo 0 > /sys/devices/platform/pwm-ctrl/duty0) as part of odroid-lcd35.service as ExecStop.

Nice one, thanks. I've updated the script with your changes :)
http://DietPi.com - Lightweight justice for your Odroid.
DietPi web hosting is powered by http://MyVirtualServer.com
User avatar
Fourdee
 
Posts: 296
Joined: Fri Apr 03, 2015 5:01 am
languages_spoken: english
ODROIDs: C1 / C2 / XU4 + Cloudshell.

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby mad_ady » Fri Jan 27, 2017 9:34 pm

@Fourdee: I was trying to use the LCD shield as a second monitor inside the same X server. Can you take a look at this thread and see if you can spot my mistake? viewtopic.php?f=145&t=25667 :)
User avatar
mad_ady
 
Posts: 2746
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby mad_ady » Mon Apr 10, 2017 9:12 pm

@FourDee: I've written a small script that sets the backlight on/off/to a specific percentage (useful to be run in cron jobs - e.g. at night turn off the LCD, or to map to a button to control brightness). It also remembers the previous value when you turn it off (so on restores that value).
Please include it in your installer script (as /usr/local/bin/lcd-backlight): https://pastebin.com/vwVTz99w
-- only for C series

Code: Select all
#!/bin/bash
 
LASTPWM=/dev/shm/lcd35
PWMFILE=/sys/devices/platform/pwm-ctrl/duty0
 
if [ -z "$1" ]; then
        echo "Usage $0 on|off|<0-100>"
        echo "Set the backlight of the LCD on/off or to a percent illumination"
        exit;
fi
 
if [ "$1" = "off" ]; then
        #save the current value
        cat $PWMFILE > $LASTPWM
        echo 0 > $PWMFILE
        echo "Turned off 3.5in LCD"
        exit;
fi
 
if [ "$1" = "on" ]; then
        #see if the old PWM value has been saved
        if [ -f "$LASTPWM" ]; then
                cat "$LASTPWM" > $PWMFILE
        else
                #no previous value, turn on full brightness
                echo 1023 > $PWMFILE
        fi
        echo "Turned on 3.5in LCD"
        exit;
fi
 
if [ "$1" -ge 0 -a "$1" -le 100 ]; then
        #set a percent of brightness
        value=$[1023*$1/100]
        echo $value > $PWMFILE
        echo "Set backlight to $1% ($value)"
fi
User avatar
mad_ady
 
Posts: 2746
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby ColonelPanic » Fri Apr 21, 2017 5:54 am

This script blacks out both inputs (HDMI and 3.5 LCD). When attempting to restart lightdm (service lightdm restart) from a different tty (CTRL+ALT+F2), it displays badly-formatted info about starting lightdm, but it never successfully displays the GUI correctly. Getting the following errors at boot time, regarding pwm:

Code: Select all
Feb 11 11:28:18 odroid64 kernel: [   15.082931] meson_pwm pwm: register pwm device.. meson_pwm_probe
Feb 11 11:28:18 odroid64 kernel: [   15.090203] pwm-ctrl pwm-ctrl: cannot export to PWM-1 : modprobe pwm-meson npwm=2
Feb 11 11:28:05 odroid64 kernel: [   31.512060] meson_pwm pwm: register pwm device.. meson_pwm_probe
Feb 11 11:28:05 odroid64 kernel: [   31.523281] pwm-ctrl pwm-ctrl: cannot export to PWM-1 : modprobe pwm-meson npwm=2
ColonelPanic
 
Posts: 17
Joined: Sun Apr 03, 2016 9:19 pm
languages_spoken: english
ODROIDs: Odroid C2

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby mad_ady » Wed May 03, 2017 4:25 pm

Can you post a picture of the output/distortion?

It is normal for the output of HDMI to disappear and you get no signal and console shifts to the LCD shield.

The PWM messages are normal. I get them as well:

Code: Select all
[   18.525270] meson_pwm pwm: register pwm device.. meson_pwm_probe
[   18.526720] pwm-ctrl pwm-ctrl: cannot export to PWM-1 : modprobe pwm-meson npwm=2


You could try uninstalling the scripts and reinstalling them...
Can you also show us /var/log/Xorg.0.log?
User avatar
mad_ady
 
Posts: 2746
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby Rushlight » Tue Jul 11, 2017 9:57 am

I just ran this install script to use the display on my C0.
I do have a few problems though:
-the touch function is completely unresponsive.
-im seeing lines, tears, and colour artifacts indicative of GPU issues. It's impairing my use of the display.
:3
Rushlight
 
Posts: 53
Joined: Mon Jun 06, 2016 3:15 pm
languages_spoken: English
ODROIDs: C-0(1)
C-0(2)
16GB-EMMC

RPI3B

Re: Script to install Odroid LCD 3.5 Touchscreen Shield

Unread postby mad_ady » Tue Jul 11, 2017 2:56 pm

Can you post a picture? The thing is - this display doesn't use GPU at all - it just uses GPIO pins and CPU. Maybe there's something wrong with the hardware. Can you test on a different device (C0/C1/C2)?
User avatar
mad_ady
 
Posts: 2746
Joined: Wed Jul 15, 2015 5:00 pm
Location: Bucharest, Romania
languages_spoken: english
ODROIDs: XU4, C1+, C2


Return to 3.5inch LCD Shield

Who is online

Users browsing this forum: No registered users and 1 guest