{{indexmenu_n>10}}
====== VIM3/3L User Config ======
The configuration file is only for Ubuntu system with Linux 4.9 and 5.15 kernel.
===== Introduction =====
This documentation will introduce how to use the configuration file of the Ubuntu system.
With kernel **4.9**, ''env.txt'' is located in the ''/boot'' directory and is an environment configuration file used to configure the functions of the Ubuntu system.
The system will read this file when it starts to set HDMI, fan, CPU frequency, etc.
With kernel **5.15**, ''uEnv.txt'' is located in the ''/boot'' directory and is an environment configuration file used to configure the user bootargs.
If not mentioned, the configuration applies for both **4.9** and **5.15** Kernel.
===== HDMI Setting =====
This configuration is suitable for only the 4.9 kernel.
==== Auto Detect ====
The default setting is ''yes'', it will automatically detect HDMI and set the best resolution, if it is set to ''no'', you can set it manually:
```shell
# HDMI resolution auto detection
# yes - auto detection
# no - set HDMI resolution via 'hdmi' node
hdmi_autodetect=yes
```
Disable auto detect:
```shell
hdmi_autodetect=no
```
==== HDMI Resolution Setting ====
In some situations HDMI resolution auto detect will not work, and you can try to setup the HDMI resolution manually.
Only when ''hdmi_autodetect=no'', the changed configuration will take effect, the default is ''720p''.
^ Resolution ^ Configuration ^
| 480x272 Progressive 60Hz | ''hdmi=480x272p60hz'' |
| 480x320 Progressive 60Hz | ''hdmi=480x320p60hz'' |
| 720x480 Progressive 60Hz | ''hdmi=480p60hz'' |
| 720x576 Progressive 50Hz | ''hdmi=576p50hz'' |
| 1280x720 Progressive 60Hz | ''hdmi=720p60hz'' |
| 1280x720 Progressive 50Hz | ''hdmi=720p50hz'' |
| 1920x1080 Progressive 60Hz | ''hdmi=1080p60hz'' |
| 1920x1080 Progressive 50Hz | ''hdmi=1080p50hz'' |
| 1920x1080 Progressive 30Hz | ''hdmi=1080p30hz'' |
| 1920x1080 Progressive 24Hz | ''hdmi=1080p24hz'' |
| 1920x1080 Interlaced 60Hz | ''hdmi=1080i60hz'' |
| 1920x1080 Interlaced 50Hz | ''hdmi=1080i50hz'' |
| 3840x2160 Progressive 60Hz | ''hdmi=2160p60hz'' |
| 3840x2160 Progressive 50Hz | ''hdmi=2160p50hz'' |
| 3840x2160 Progressive 30Hz | ''hdmi=2160p30hz'' |
| 3840x2160 Progressive 25Hz | ''hdmi=2160p25hz'' |
| 3840x2160 Progressive 24Hz | ''hdmi=2160p24hz'' |
| 3840x2160 Progressive 24Hz SMPTE | ''hdmi=smpte24hz'' |
| 3840x2160 Progressive 60Hz YCbCr 4:2:0 | ''hdmi=2160p60hz420'' |
| 3840x2160 Progressive 50Hz YCbCr 4:2:0 | ''hdmi=2160p50hz420'' |
| 640x480 Progressive 60Hz | ''hdmi=640x480p60hz'' |
| 800x480 Progressive 60Hz | ''hdmi=800x480p60hz'' |
| 800x600 Progressive 60Hz | ''hdmi=800x600p60hz'' |
| 1024x600 Progressive 60Hz | ''hdmi=1024x600p60hz'' |
| 1024x768 Progressive 60Hz | ''hdmi=1024x768p60hz'' |
| 1280x800 Progressive 60Hz | ''hdmi=1280x800p60hz'' |
| 1280x1024 Progressive 60Hz | ''hdmi=1280x1024p60hz'' |
| 1360x768 Progressive 60Hz | ''hdmi=1360x768p60hz'' |
| 1440x900 Progressive 60Hz | ''hdmi=1440x900p60hz'' |
| 1600x900 Progressive 60Hz | ''hdmi=1600x900p60hz'' |
| 1600x1200 Progressive 60Hz | ''hdmi=1600x1200p60hz'' |
| 1680x1050 Progressive 60Hz | ''hdmi=1680x1050p60hz'' |
| 1920x1200 Progressive 60Hz | ''hdmi=1920x1200p60hz'' |
| 2560x1080 Progressive 60Hz | ''hdmi=2560x1080p60hz'' |
| 2560x1440 Progressive 60Hz | ''hdmi=2560x1440p60hz'' |
| 2560x1600 Progressive 60Hz | ''hdmi=2560x1600p60hz'' |
| 3440x1440 Progressive 60Hz | ''hdmi=3440x1440p60hz'' |
Set to ''1080p'':
```shell
hdmi=1080p60hz
```
Save the file and reboot to take effect.
===== Fan Setting =====
==== Fan Level ====
* ''off'' : Cooling fan is disabled.
* ''low'' : Cooling fan is working at low speed mode.
* ''mid'' : Cooling fan is working at middle speed mode.
* ''high'' : Cooling fan is working at high speed mode.
* ''auto'' : Cooling fan is working at auto speed mode. By default, the fan speed is determined by CPU temperature.
==== Change Fan Level ====
^ Fan level ^ Configuration ^
| off | ''fan_mode=off'' |
| low | ''fan_mode=low'' |
| mid | ''fan_mode=mid'' |
| high | ''fan_mode=high'' |
| auto | ''fan_mode=auto'' |
Set fan level to ''high'':
```
fan_mode=high
```
Save the file and reboot to take effect.
===== Framebuffer Rotate Setting =====
This configuration is suitable for only the 4.9 kernel.
==== Check Framebuffer orientation ====
```shell
khadas@Khadas:~$ cat /boot/env.txt | grep "fb_rotate"
fb_rotate=0
```
==== Change Setting ====
^ Rotation Degrees ^ Configuration ^
| 0 | ''fb_rotate=0'' |
| 90 | ''fb_rotate=1'' |
| 180 | ''fb_rotate=2'' |
| 270 | ''fb_rotate=3'' |
Rotate 90 degrees:
```
fb_rotate=1
```
Save the file and reboot to take effect.
===== Linux Kernel bootargs Setting =====
This configuration is suitable for only the 5.15 kernel.
==== Check Linux Kernel Bootargs ====
```shell
$ cat /proc/cmdline
```
==== Change Linux Kernel Bootargs ====
You can edit file ''/boot/uEnv.txt'' to add the user bootargs.
The default file contents are similar as below:
```shell
$ cat /boot/uEnv.txt
#############################DO NOT TOUCH THIS OPTION#############################
rootdev=root=UUID=a92f7f2f-0d4a-4607-a45a-4549cfe71036
partitiontype=partition_type=generic
#############################DO NOT TOUCH THIS OPTION#############################
## Setup console
consoles=console=ttyS0,115200 console=tty0
## Setup FAN mode
fan_mode=auto
## Add user args here, spilt with space.
## e.g. Add bootargs 'test1=111 test2=222'
## boot_user_args=test1=111 test2=222
boot_user_args=
```
=== Normal Bootargs ===
You can append your bootargs to the configuration ''boot_user_args=''.
e.g. Add bootargs ''cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory systemd.unified_cgroup_hierarchy=0'', the variable ''boot_user_args='' should be as below:
```shell
boot_user_args=cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory systemd.unified_cgroup_hierarchy=0
```
=== Console Bootargs ===
You can change the linux UART pins for normal usage by modifying the configuration ''console=''
^ UART mode ^ Configuration ^
| Configure the UART for linux debug | ''consoles=console=ttyS0,115200 console=tty0'' |
| Configure the UART for general usage | ''consoles=console=tty0'' |
eg. Enable linux UART console should be as below:
```shell
consoles=console=ttyS0,115200 console=tty0
```
Please make sure the bootargs are split with space and don't add quotation marks.
Save the file and reboot to take effect.
===== Saving the configurations =====
After edit the file, you need to save the file and reboot the board.
```shell
khadas@Khadas:~$ sync
khadas@Khadas:~$ sudo reboot
```