Start the system as X-Window on the LCD automatically after booting.

Add following lines in "/etc/modprobe.d/lcd35.conf" file.

options fbtft_device name=flexpfb rotate=270
options flexfb chip=ili9488

Add following lines in "/etc/modules" file.

ODROID-C1/C2

aml_i2c
pwm-meson
pwm-ctrl
fbtft_device
flexfb
sx865x

ODROID-XU4

fbtft_device
flexfb
sx865x

To enable sx865x touch driver on ODROID-XU4, you need to fix a dtb as following commands.

$ sudo apt-get install device-tree-compiler
$ sudo cp /media/boot/exynos5422-odroidxu3.dtb /media/boot/exynos5422-odroidxu3.dtb.old
$ sudo fdtput -t s /media/boot/exynos5422-odroidxu3.dtb /hsi2c@12CB0000/sx865x@49 status "okay"

Create a new config file

$ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old
$ sudo rm -fr /etc/X11/xorg.conf.d/exynos.conf

Add following lines in "xorg.conf" file.

Open /etc/X11/xorg.conf file.

Section "Device"
    Identifier    "C fbdev"
    Driver        "fbdev"
    Option        "fbdev" "/dev/fb2"
EndSection

If you're using Ubuntu 18.04 on C2, edit /usr/share/X11/xorg.conf.d/99-odroidc2.conf file instead.

Check lightdm service

  sudo systemctl list-unit-files | grep lightdm

If the lightdm service is static, run following command.

  sudo dpkg-reconfigure lightdm

Automatically enable the Backlight

The PWM0 of ODROID-C2/C1 is pull-down as default, so you have to add following line in “/etc/rc.local” file.

echo 1 > /sys/devices/platform/pwm-ctrl/enable0
echo 500000 > /sys/devices/platform/pwm-ctrl/freq0
echo 1023 > /sys/devices/platform/pwm-ctrl/duty0
chvt 1

If you're using Ubuntu 18.04 on C2, add the following lines instead.

echo 1 > /sys/devices/pwm-ctrl/enable0
echo 500000 > /sys/devices/pwm-ctrl/freq0
echo 1023 > /sys/devices/pwm-ctrl/duty0
chvt 1

* You have to place those lines before “exit 0” command.

Reboot

$ sudo reboot