HDMI Overscan

  • Operation confirmed on the following models.
    • Odroid-N2
    • Odroid-C4
  • Make sure you use our Ubuntu Mate image. We cannot sure it can be applied on the other desktop environment.

By editing the configuration file

You can set the overscan rate by editing /media/boot/config.ini file.

Open the config.ini file and you can see this part.

; Overscan percentage
; This value scales down the actual screen size by the percentage below
; valid range is 80 to 100

Edit the value and reboot to take effect.

By editing the framebuffer settings

Create a script file

If the editing configuration file doesn't work in your environment, you can try editing the framebuffer settings by yourself.

Thanks to our forum user @RolandE, we can reduce several jobs to one script file.

Create a shell script file that has the following contents.

vi ~/hdmi_overscan.sh
M="0 0 $(($X - 1)) $(($Y - 1))"
Y_VIRT=$(($Y * 2))
fbset -fb /dev/fb0 -g $X $Y $X $Y_VIRT $BPP
echo $mode > /sys/class/display/mode
echo 0 > /sys/class/graphics/fb0/free_scale
echo 1 > /sys/class/graphics/fb0/freescale_mode
echo $M > /sys/class/graphics/fb0/free_scale_axis
# change for override with a frame of 50 pixel
# echo $M > /sys/class/graphics/fb0/window_axis
echo 0 > /sys/class/graphics/fb1/free_scale
echo 1 > /sys/class/graphics/fb1/freescale_mode
echo $NEW_M > /sys/class/graphics/fb0/window_axis
echo 0x10001 > /sys/class/graphics/fb0/free_scale

This file has four constant values, X, Y, BPP, and FRAME_SIZE.

  • X: Width resolution
  • Y: Height resolution
  • BPP: Color depth
  • FRAME_SIZE: Values that how much the letterbox increased

Set the values for your environment.

Grant permission to execute the script file.

chmod +x ~/hdmi_overscan.sh

Execute the script file then you can see the screen size reduced with the letterbox on the four edges of the screen.

. ~/hdmi_overscan.sh

If the screen size still doesn't fit into the actual screen, find your best position by editing FRAME_SIZE value.

Run automatically at boot time

To apply the script to every boot time, edit /etc/rc.local to run the script file.

sudo vi /etc/rc.local

Put a command that runs the script file into the right before exit command. Then it will look like this.

Assume that the script file located in the root's home directory.

. /root/hdmi_overscan.sh
exit 0
2021/06/10 12:01 · joshua