The configuration file is only for Ubuntu system with Linux 4.9 and 5.15 kernel.
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.
This configuration is suitable for only the 4.9 kernel.
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:
# HDMI resolution auto detection # yes - auto detection # no - set HDMI resolution via 'hdmi' node hdmi_autodetect=yes
Disable auto detect:
hdmi_autodetect=no
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 |
---|---|
480×272 Progressive 60Hz | hdmi=480x272p60hz |
480×320 Progressive 60Hz | hdmi=480x320p60hz |
720×480 Progressive 60Hz | hdmi=480p60hz |
720×576 Progressive 50Hz | hdmi=576p50hz |
1280×720 Progressive 60Hz | hdmi=720p60hz |
1280×720 Progressive 50Hz | hdmi=720p50hz |
1920×1080 Progressive 60Hz | hdmi=1080p60hz |
1920×1080 Progressive 50Hz | hdmi=1080p50hz |
1920×1080 Progressive 30Hz | hdmi=1080p30hz |
1920×1080 Progressive 24Hz | hdmi=1080p24hz |
1920×1080 Interlaced 60Hz | hdmi=1080i60hz |
1920×1080 Interlaced 50Hz | hdmi=1080i50hz |
3840×2160 Progressive 60Hz | hdmi=2160p60hz |
3840×2160 Progressive 50Hz | hdmi=2160p50hz |
3840×2160 Progressive 30Hz | hdmi=2160p30hz |
3840×2160 Progressive 25Hz | hdmi=2160p25hz |
3840×2160 Progressive 24Hz | hdmi=2160p24hz |
3840×2160 Progressive 24Hz SMPTE | hdmi=smpte24hz |
3840×2160 Progressive 60Hz YCbCr 4:2:0 | hdmi=2160p60hz420 |
3840×2160 Progressive 50Hz YCbCr 4:2:0 | hdmi=2160p50hz420 |
640×480 Progressive 60Hz | hdmi=640x480p60hz |
800×480 Progressive 60Hz | hdmi=800x480p60hz |
800×600 Progressive 60Hz | hdmi=800x600p60hz |
1024×600 Progressive 60Hz | hdmi=1024x600p60hz |
1024×768 Progressive 60Hz | hdmi=1024x768p60hz |
1280×800 Progressive 60Hz | hdmi=1280x800p60hz |
1280×1024 Progressive 60Hz | hdmi=1280x1024p60hz |
1360×768 Progressive 60Hz | hdmi=1360x768p60hz |
1440×900 Progressive 60Hz | hdmi=1440x900p60hz |
1600×900 Progressive 60Hz | hdmi=1600x900p60hz |
1600×1200 Progressive 60Hz | hdmi=1600x1200p60hz |
1680×1050 Progressive 60Hz | hdmi=1680x1050p60hz |
1920×1200 Progressive 60Hz | hdmi=1920x1200p60hz |
2560×1080 Progressive 60Hz | hdmi=2560x1080p60hz |
2560×1440 Progressive 60Hz | hdmi=2560x1440p60hz |
2560×1600 Progressive 60Hz | hdmi=2560x1600p60hz |
3440×1440 Progressive 60Hz | hdmi=3440x1440p60hz |
Set to 1080p
:
hdmi=1080p60hz
Save the file and reboot to take effect.
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.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.
This configuration is suitable for only the 4.9 kernel.
khadas@Khadas:~$ cat /boot/env.txt | grep "fb_rotate"
fb_rotate=0
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.
This configuration is suitable for only the 5.15 kernel.
$ cat /proc/cmdline
You can edit file /boot/uEnv.txt
to add the user bootargs.
The default file contents are similar as below:
$ 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=
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:
boot_user_args=cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory systemd.unified_cgroup_hierarchy=0
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:
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.
After edit the file, you need to save the file and reboot the board.
khadas@Khadas:~$ sync khadas@Khadas:~$ sudo reboot