Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:vim3:configurations:user-config

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
products:sbc:vim3:configurations:user-config [2022/09/28 08:46]
nick
products:sbc:vim3:configurations:user-config [2023/11/07 05:53] (current)
sravan
Line 1: Line 1:
 {{indexmenu_n>10}} {{indexmenu_n>10}}
- 
  
 ====== VIM3/3L User Config ====== ====== VIM3/3L User Config ======
  
 <WRAP important > <WRAP important >
-The config file is only for Ubuntu system with Linux 4.9 kernel.+The configuration file is only for Ubuntu system with Linux 4.9 and 5.15 kernel.
 </WRAP> </WRAP>
  
Line 12: Line 11:
 This documentation will introduce how to use the configuration file of the Ubuntu system. This documentation will introduce how to use the configuration file of the Ubuntu system.
  
-''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 **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 ===== ===== HDMI Setting =====
  
 <WRAP important > <WRAP important >
-Only applicable to the firmware of the 4.9 kernel, a more general method can be used for the firmware of the mainline kernel!+This configuration is suitable for only the 4.9 kernel.
 </WRAP> </WRAP>
- 
  
 ==== Auto Detect ==== ==== 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:
-The default setting is ''yes'', it will automatically detect HDMI and set the best resolution, if it is closedit will be set manually:+
  
 ```shell ```shell
Line 47: Line 47:
 Only when ''hdmi_autodetect=no'', the changed configuration will take effect, the default is ''720p''. Only when ''hdmi_autodetect=no'', the changed configuration will take effect, the default is ''720p''.
  
-```shell +Resolution Configuration ^ 
-# HDMI mode +| 480x272 Progressive 60Hz | ''hdmi=480x272p60hz'' | 
-Resolution Configuration +| 480x320 Progressive 60Hz | ''hdmi=480x320p60hz'' | 
-#    Symbol             | Resolution +| 720x480 Progressive 60Hz | ''hdmi=480p60hz'' | 
-# ----------------------+------------- +| 720x576 Progressive 50Hz | ''hdmi=576p50hz'' | 
-#    "480x272p60hz"     | 480x272 Progressive 60Hz +| 1280x720 Progressive 60Hz | ''hdmi=720p60hz'' | 
-#    "480x320p60hz"     | 480x320 Progressive 60Hz +| 1280x720 Progressive 50Hz | ''hdmi=720p50hz'' | 
-#    "480p60hz"         | 720x480 Progressive 60Hz +| 1920x1080 Progressive 60Hz | ''hdmi=1080p60hz'' | 
-#    "576p50hz"         | 720x576 Progressive 50Hz +| 1920x1080 Progressive 50Hz | ''hdmi=1080p50hz'' | 
-#    "720p60hz"         | 1280x720 Progressive 60Hz +| 1920x1080 Progressive 30Hz | ''hdmi=1080p30hz'' | 
-#    "720p50hz"         | 1280x720 Progressive 50Hz +| 1920x1080 Progressive 24Hz | ''hdmi=1080p24hz'' | 
-#    "1080p60hz"        | 1920x1080 Progressive 60Hz +| 1920x1080 Interlaced 60Hz | ''hdmi=1080i60hz'' | 
-#    "1080p50hz"        | 1920x1080 Progressive 50Hz +| 1920x1080 Interlaced 50Hz | ''hdmi=1080i50hz'' | 
-#    "1080p30hz"        | 1920x1080 Progressive 30Hz +| 3840x2160 Progressive 60Hz | ''hdmi=2160p60hz'' | 
-#    "1080p24hz"        | 1920x1080 Progressive 24Hz +| 3840x2160 Progressive 50Hz | ''hdmi=2160p50hz'' | 
-#    "1080i60hz"        | 1920x1080 Interlaced 60Hz +| 3840x2160 Progressive 30Hz | ''hdmi=2160p30hz'' | 
-#    "1080i50hz"        | 1920x1080 Interlaced 50Hz +| 3840x2160 Progressive 25Hz | ''hdmi=2160p25hz'' | 
-#    "2160p60hz"        | 3840x2160 Progressive 60Hz +| 3840x2160 Progressive 24Hz | ''hdmi=2160p24hz'' | 
-#    "2160p50hz"        | 3840x2160 Progressive 50Hz +| 3840x2160 Progressive 24Hz SMPTE | ''hdmi=smpte24hz'' | 
-#    "2160p30hz"        | 3840x2160 Progressive 30Hz +| 3840x2160 Progressive 60Hz YCbCr 4:2:0 | ''hdmi=2160p60hz420'' | 
-#    "2160p25hz"        | 3840x2160 Progressive 25Hz +| 3840x2160 Progressive 50Hz YCbCr 4:2:0 | ''hdmi=2160p50hz420'' | 
-#    "2160p24hz"        | 3840x2160 Progressive 24Hz +| 640x480 Progressive 60Hz | ''hdmi=640x480p60hz'' | 
-#    "smpte24hz"        | 3840x2160 Progressive 24Hz SMPTE +| 800x480 Progressive 60Hz | ''hdmi=800x480p60hz'' | 
-#    "2160p60hz420"     | 3840x2160 Progressive 60Hz YCbCr 4:2:0 +| 800x600 Progressive 60Hz | ''hdmi=800x600p60hz'' | 
-#    "2160p50hz420"     | 3840x2160 Progressive 50Hz YCbCr 4:2:0 +| 1024x600 Progressive 60Hz | ''hdmi=1024x600p60hz'' | 
-#    "640x480p60hz"     | 640x480 Progressive 60Hz +| 1024x768 Progressive 60Hz | ''hdmi=1024x768p60hz'' | 
-#    "800x480p60hz"     | 800x480 Progressive 60Hz +| 1280x800 Progressive 60Hz | ''hdmi=1280x800p60hz'' | 
-#    "800x600p60hz"     | 800x600 Progressive 60Hz +| 1280x1024 Progressive 60Hz | ''hdmi=1280x1024p60hz'' | 
-#    "1024x600p60hz"    | 1024x600 Progressive 60Hz +| 1360x768 Progressive 60Hz | ''hdmi=1360x768p60hz'' | 
-#    "1024x768p60hz"    | 1024x768 Progressive 60Hz +| 1440x900 Progressive 60Hz | ''hdmi=1440x900p60hz'' | 
-#    "1280x800p60hz"    | 1280x800 Progressive 60Hz +| 1600x900 Progressive 60Hz | ''hdmi=1600x900p60hz'' | 
-#    "1280x1024p60hz"   | 1280x1024 Progressive 60Hz +| 1600x1200 Progressive 60Hz | ''hdmi=1600x1200p60hz'' | 
-#    "1360x768p60hz"    | 1360x768 Progressive 60Hz +| 1680x1050 Progressive 60Hz | ''hdmi=1680x1050p60hz'' | 
-#    "1440x900p60hz"    | 1440x900 Progressive 60Hz +| 1920x1200 Progressive 60Hz | ''hdmi=1920x1200p60hz'' | 
-#    "1600x900p60hz"    | 1600x900 Progressive 60Hz +| 2560x1080 Progressive 60Hz | ''hdmi=2560x1080p60hz'' | 
-#    "1600x1200p60hz"   | 1600x1200 Progressive 60Hz +| 2560x1440 Progressive 60Hz | ''hdmi=2560x1440p60hz'' | 
-#    "1680x1050p60hz"   | 1680x1050 Progressive 60Hz +| 2560x1600 Progressive 60Hz | ''hdmi=2560x1600p60hz'' | 
-#    "1920x1200p60hz"   | 1920x1200 Progressive 60Hz +| 3440x1440 Progressive 60Hz | ''hdmi=3440x1440p60hz'' | 
-#    "2560x1080p60hz"   | 2560x1080 Progressive 60Hz +
-#    "2560x1440p60hz"   | 2560x1440 Progressive 60Hz +
-#    "2560x1600p60hz"   | 2560x1600 Progressive 60Hz +
-#    "3440x1440p60hz"   | 3440x1440 Progressive 60Hz +
-hdmi=720p60hz +
-```+
  
 Set to ''1080p'': Set to ''1080p'':
Line 98: Line 93:
 ``` ```
  
-Restart the system to take effect.+Save the file and reboot to take effect.
  
 ===== Fan Setting ===== ===== Fan Setting =====
- 
-<WRAP important > 
-Only applicable to the firmware of the 4.9 kerne 
-</WRAP> 
  
 ==== Fan Level ==== ==== Fan Level ====
- 
  
   * ''off''  : Cooling fan is disabled.   * ''off''  : Cooling fan is disabled.
   * ''low''  : Cooling fan is working at low speed mode.   * ''low''  : Cooling fan is working at low speed mode.
-  * ''mid'' Coolinn fan is working at middle speed mode.+  * ''mid'' Cooling fan is working at middle speed mode.
   * ''high'' : Cooling fan is working at high 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.   * ''auto'' : Cooling fan is working at auto speed mode. By default, the fan speed is determined by CPU temperature.
Line 117: Line 107:
 ==== Change Fan Level ==== ==== 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 cooling fan to ''low'' speed mode: +Set fan level to ''high'':
-    * Edit file ''/boot/env.txt'' and set ''fan_mode=low''.+
  
-  * Set cooling fan to ''mid'' speed mode: +``` 
-    * Edit file ''/boot/env.txt'' and set ''fan_mode=mid''.+fan_mode=high 
 +```
  
-  * Set cooling fan to ''high'' speed mode: +Save the file and reboot to take effect.
-    * Edit file ''/boot/env.txt'' and set ''fan_mode=high''.+
  
-  * Set cooling fan to ''auto'' speed mode: +===== Framebuffer Rotate Setting =====
-    * Edit file ''/boot/env.txt'' and set ''fan_mode=auto''.+
  
-  * Disable cooling fan: +<WRAP important > 
-    * Edit file ''/boot/env.txt'' and set ''fan_mode=off''.+This configuration is suitable for only the 4.9 kernel. 
 +</WRAP>
  
-After edit the file, you need to save the file and reboot the board.+==== Check Framebuffer orientation ====
  
 ```shell ```shell
-khadas@Khadas:~$ sync +khadas@Khadas:~$ cat /boot/env.txt | grep "fb_rotate" 
-khadas@Khadas:~$ sudo reboot+fb_rotate=0
 ``` ```
  
-===== Framebuffer Rotate =====+==== Change Setting ====
  
-==== Check related configuration ====+^ 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 =====
 +
 +<WRAP important >
 +This configuration is suitable for only the 5.15 kernel.
 +</WRAP>
 +
 +==== Check Linux Kernel Bootargs ====
  
 ```shell ```shell
-khadas@Khadas:~$ cat /boot/env.txt | grep "fb_rotate" +$ cat /proc/cmdline
-fb_rotate=0+
 ``` ```
  
-==== Change Setting ====+==== Change Linux Kernel Bootargs ====
  
 +You can edit file ''/boot/uEnv.txt'' to add the user bootargs.
  
-Rotate 90 degrees:+The default file contents are similar as below:
  
 ```shell ```shell
-khadas@Khadas:~sudo vim /boot/env.txt +cat /boot/uEnv.txt  
-[sudo] password for khadas:+#############################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=''.
  
-''fb_rotate=0'' change to ''fb_rotate=1''.+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''
 + 
 +egEnable linux UART console should be as below: 
 + 
 +```shell 
 +consoles=console=ttyS0,115200 console=tty0 
 +``` 
 + 
 +<WRAP important > 
 +Please make sure the bootargs are split with space and don't add quotation marks. 
 +</WRAP> 
 + 
 +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. After edit the file, you need to save the file and reboot the board.
Line 168: Line 221:
 khadas@Khadas:~$ sudo reboot khadas@Khadas:~$ sudo reboot
 ``` ```
- 
-After restarting, you will see the framebuffer console rotated 90 degrees. 
  
Last modified: 2022/09/28 08:46 by nick