ArmbianHowTo2

Changing display output

With current kernel version (4.13) changing display output must be done by recompiling u-boot. This is necessary because kernel supports only SimpleFB. This will change in the future.

LCD

Enable touchscreen

Create blacklist file:

# echo "blacklist sun4i_gpadc_iio" > /etc/modprobe.d/blacklist-touchscreen.conf
# echo "blacklist sun4i_gpadc" >> /etc/modprobe.d/blacklist-touchscreen.conf

Calibrate touchscreen

Install calibration package:

# apt-get install xinput-calibrator

After completion start the program inside the X.

Applications
  -> System
    -> Calibrate Touchscreen

You will see blank screen. Touch the display at the marks. Then store the calibration values. Create new file 99-calibration.conf

# cat > /etc/X11/xorg.conf.d/99-calibration.conf << __EOF__
Section "InputClass"
	Identifier	"calibration"
	MatchProduct	"1c25000.rtp"
	Option	"Calibration"	"3930 108 348 3948"
	Option	"SwapAxes"	"0"
EndSection
__EOF__

Put the values from the calibrator program.

VGA

Changing resolution

The default resolution in 1024x768. You can list all resolutions with:

# xrandr

The output should be something like this:

Screen 0: minimum 320 x 200, current 1280 x 1024, maximum 8192 x 8192
VGA-1 unknown connection 1280x1024+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
  1024x768      60.00 +
  1920x1200     59.88    59.95  
  1920x1080     60.00  
  1600x1200     60.00  
  1680x1050     59.95    59.88  
  1400x1050     59.98    59.95  
  1600x900      60.00  
  1280x1024     60.02* 
  1440x900      59.89    59.90  
  1280x960      60.00  
  1366x768      59.79    60.00  
  1360x768      60.02  
  1280x800      59.81    59.91  
  1280x768      59.87    59.99  
  1280x720      60.00  
  800x600       60.32    56.25  
  848x480       60.00  
  640x480       59.94  

To change resolution from the command line, do the following:

# export DISPLAY=:0
# xrandr -s <resolution>

HDMI

Set custom resolution

To use lower resolution than 1920x1080 append /boot/armbianEnv.txt with:

extraargs=video=HDMI-A-1:1280x1080

This will set monitor with 1280x1080 resolution. Getting supported modes is done with:

# cat /sys/class/drm/card0-HDMI-A-1/modes 
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1920x1080
1280x1024
1280x960
1152x864
1280x720
1280x720
1280x720
1024x768
1024x768
1024x768
832x624
800x600
800x600
800x600
800x600
720x576
720x480
720x480
640x480
640x480
640x480
640x480
720x400

Disabling HDMI output

To disable video output on the HDMI monitor add folloing in /boot/armbianEnv.txt:

extraargs=video=HDMI-A-1:d

Save the file and reboot the board.

Debugging

Enabling DRM debug output

The DRM driver supports multiple debugging levels.

Add the following in /boot/armbianEnv.txt:

extraargs=drm.debug=0xf