Rock/display
Contents
The cpu of Radxa Rock - RK3188 has two LCD controllers, LCD0 and LCD1. On RR, LCD1 is connected to HDMI and LCD0 is connect to AV out and the LCD0 signal are also exported on the extension header.
There is some sysfs interface exported to control the display related stuff. The following should work on both Android and Linux.
Set display scale
root@radxa:# export SCALE=/sys/class/graphics/fb0/scale #For the new Ubuntu 14.04 image, the path is changed to /sys/class/display/HDMI/scale, run root@radxa:# export SCALE=/sys/class/display/HDMI/scale root@radxa:# cat $SCALE xscale=95 yscale=95 root@radxa:# echo 100 > $SCALE root@radxa:# cat $SCALE xscale=100 yscale=100
You can also set different scales for X and Y:
root@radxa:# echo xscale=80 > $SCALE root@radxa:# echo yscale=100 > $SCALE root@radxa:# cat $SCALE xscale=80 yscale=100
Set HDMI output mode
you can see supported output modes by the following commands:
root@radxa:# cat /sys/class/display/display0.HDMI/modes #For the new Ubuntu 14.04 image, the path is changed to root@radxa:# cat /sys/class/display/HDMI/modes 1920x1080p-60 1920x1080p-50 1280x720p-60 1280x720p-50 720x576p-50 720x480p-60
check out the current display mode
root@radxa:# cat /sys/class/display/display0.HDMI/mode #For the new Ubuntu 14.04 image, the path is changed to root@radxa:# cat /sys/class/display/HDMI/mode 1280x720p-60
It's 720p@60hz
change the mode to 1080p@60hz
root@radxa:# echo 1920x1080p-60 > /sys/class/display/display0.HDMI/mode #For the new Ubuntu 14.04 image, the path is changed to root@radxa:# echo 1920x1080p-60 > /sys/class/display/HDMI/mode
Set font size of X and console
Change DPI to increase the font size in X
rock@radxa:~$ sudo nano ~/.Xresources
add the following lines:
! Xft settings Xft.dpi: 120 Xft.antialias: true Xft.rgba: rgb Xft.hinting: true Xft.hintstyle: hintslight
Change the console settings:
rock@radxa:~$ sudo dpkg-reconfigure console-setup
Go through the setup: hit enter, hit enter, choose the font and hit enter, hit enter, choose size and hit enter
Switch to console via ctrl+alt+f1 and verify your settings:
root@radxa:~# setupcon
Find the best solution by repeating the console-setup...
Set full color depth
To use full 24/32 bits color depth on the radxa rock linux image:
apt-get install fbset
cat <<eof>> /etc/init/fbset.conf # fbset - run fbset to set truecolor fbmode description "run fbset ASAP" start on startup and started udev or starting lightdm task script echo 0 > /sys/class/display/HDMI/enable [ -x /bin/fbset ] && /bin/fbset -a -nonstd 1 -depth 32 -rgba "8/0,8/8,8/16,8/24" echo 1 > /sys/class/display/HDMI/enable end script eof
cat <<eof>> /etc/X11/xorg.conf Section "Screen" Identifier "Default Screen" DefaultDepth 24 EndSection eof
After rebooting you should not see green/purple screen. If you do, something went wrong. You can then use serial console or SSH from another machine and manually submit these commands:
service lightdm stop fbset -a -nonstd 1 -depth 32 -rgba 8/0,8/8,8/16,8/24 service lightdm start
To make this change permanent, timing is critical during bootup. fbset will need to be called before X / lightdm starts. In Linaro/Ubuntu an upstart script is needed - fbset.conf - see above. The condition "startup and started udev" will try to run fbset as early as possible. On my rk3188 this works reliably, but if you have issues, your best bet is to tinker with these "start on" conditions. Do not use /etc/rc.local for this - this script is run long after lightdm has been started by upstart.
Set framebuffer resolution
Set framebuffer resolution to 720 x 480 pixels
service lightdm stop fbset -a -xres 720 -yres 480 -vxres 720 -vyres 480 service lightdm start
If you get a blank screen, try to reactivate the display
echo 1 > /sys/class/graphics/fb0/enable
A few examples of other framebuffer resolution settings: 720x576, 1024x600, 1280x720, 1920x1080
fbset -a -xres 720 -yres 576 -vxres 720 -vyres 576 fbset -a -xres 1024 -yres 600 -vxres 1024 -vyres 600 fbset -a -xres 1280 -yres 720 -vxres 1280 -vyres 720 fbset -a -xres 1920 -yres 1080 -vxres 1920 -vyres 1080