Now, I am using Ubuntu OS 18.04 after flashing Ubuntu image (VIM3_Ubuntu-xfce-bionic_Linux-4.9_arm64_SD-USB_V20190830.7z) into micro-SDcard on VIM3 Pro development board.
It’s strange. I cannot still get the 800x600 (or 1024x768) resolution when I tried to run the “hdmi-800x600.sh” (simple script) on the terminal. @numbqq , Could you give me a hint to fix this issue? Any comments will be helpful to me.
I also fixed this issue thanks to your comments. The below script is the final version of the resolution conversion script. Now, I successfully get the 800x600 resolution with my 7" monitor.
$ vi hdmi-800x600.sh
#!/usr/bin/env bash
# @titile The resoltuion convertor for lots of monitors
# @brief This file is a simple script to convert the current mode
# to the different resoltuion for various monitors.
# @author Khadas Team <numbqq@khadas.com>
# Geunsik Lim <leemgs@gmail.com>
# @note
# $ sudo systemctl stop lightdm
# $ sudo ./hdmi-800x600.sh
# $ sudo systemctl restart lightdm
#
# ### VESA modes ###
# "640x480p60hz"
# "800x480p60hz"
# "800x600p60hz"
# "1024x600p60hz"
# "1024x768p60hz"
# "1280x800p60hz"
# "1280x1024p60hz"
# "1360x768p60hz"
# "1440x900p60hz"
# "1600x900p60hz"
# "1680x1050p60hz"
# "1600x1200p60hz"
# "1920x1200p60hz"
# "2560x1080p60hz"
# "2560x1440p60hz"
# "2560x1600p60hz"
# "3440x1440p60hz"
# Declare X, Y, and mode
export X=800
export Y=600
export mode="${X}x${Y}p60hz"
#----------------- DO NOT MODIFY FROM THIS LINE ---------------------
# Turn-off display manager
sudo systemctl stop lightdm
# Define a HDMI bpp and a resolution mode
bpp=32
_mode=${mode:-720p60hz}
echo -e "The _mode will be set with '$_mode'."
hpd_state=`cat /sys/class/amhdmitx/amhdmitx0/hpd_state`
if [ $hpd_state -eq 0 ]; then
# Exit if HDMI cable is not connected
echo -e "Oooops. HDMI cable is not connected."
exit 0
fi
# Set-up a frame-buffer with sysfs to change a display mode
M="0 0 $(($X - 1)) $(($Y - 1))"
Y_VIRT=$(($Y * 2))
fbset -fb /dev/fb0 -g $X $Y $X $Y_VIRT $bpp
echo null > /sys/class/display/mode
echo $_mode > /sys/class/display/mode
echo $M > /sys/class/graphics/fb0/free_scale_axis
echo $M > /sys/class/graphics/fb0/window_axis
echo 0 > /sys/class/graphics/fb0/free_scale
echo 1 > /sys/class/graphics/fb0/freescale_mode
# Enable framebuffer device
echo 0 > /sys/class/graphics/fb0/blank
# Blank fb1 to prevent static noise
echo 1 > /sys/class/graphics/fb1/blank
echo 1 > /sys/devices/virtual/graphics/fbcon/cursor_blink
# Turn-on display manager
sudo systemctl restart lightdm
echo -e "Done."
After reboot the preffered screen resolution is lost and returning to the old
At Settings “Display” the is only one resolution to choose 1920x1080.
How to save the resolution ,(ex at 1024x768? )