This documentation will introduce how to use the configuration file of the Ubuntu system.
The config file is only for Ubuntu system with Linux 4.9 kernel.
Introduction
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.
HDMI Setting
Only applicable to the firmware of the 4.9 kernel, a more general method can be used for the firmware of the mainline kernel!
Auto Detect
The default setting is yes
, it will automatically detect HDMI and set the best resolution, if it is closed, it will be set manually:
1 | # HDMI resolution auto detection |
Disable auto detect:
1 | 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
.
1 | # HDMI mode |
Set to 1080p
:
1 | hdmi=1080p60hz |
Restart the system to take effect.
Fan Setting
Only applicable to the firmware of the 4.9 kernel
Fan level
off
: Cooling fan is disabled.low
: Cooling fan is working at low speed mode.mid
: Coolinn 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
Set cooling fan to
low
speed mode:- Edit file
/boot/env.txt
and setfan_mode=low
.
- Edit file
Set cooling fan to
mid
speed mode:- Edit file
/boot/env.txt
and setfan_mode=mid
.
- Edit file
Set cooling fan to
high
speed mode:- Edit file
/boot/env.txt
and setfan_mode=high
.
- Edit file
Set cooling fan to
auto
speed mode:- Edit file
/boot/env.txt
and setfan_mode=auto
.
- Edit file
Disable cooling fan:
- Edit file
/boot/env.txt
and setfan_mode=off
.
- Edit file
After edit the file, you need to save the file and reboot the board.
1 | khadas@Khadas:~$ sync |
Framebuffer Rotate
Check related configuration
1 | khadas@Khadas:~$ cat /boot/env.txt | grep "fb_rotate" |
Change Setting
Rotate 90 degrees:
1 | khadas@Khadas:~$ sudo vim /boot/env.txt |
fb_rotate=0
change to fb_rotate=1
.
After edit the file, you need to save the file and reboot the board.
1 | khadas@Khadas:~$ sync |
After restarting, you will see the framebuffer console rotated 90 degrees.