2016-07-02 14:20:49 -04:00
# How to customize keyboard, time zone?
2020-11-18 15:41:52 -05:00
- **Attention: The preferred method to change most of this stuff is by using the interactive _ armbian-config _ tool which is shipped with all Armbian images.**
2020-03-13 05:58:39 +01:00
2022-01-04 20:11:52 -03:00
## Keyboard:
2016-07-02 14:20:49 -04:00
dpkg-reconfigure keyboard-configuration
2022-01-04 20:11:52 -03:00
In some cases, e.g. when your keyboard standard is not available in previous command, you may also need to set your keymap config:
# Check your actual keymap config
localectl status | grep -i keymap
# Set the desired keymap config. Example below to 'br-abnt2'
localectl set-keymap br-abnt2
2020-11-18 15:41:52 -05:00
## System language:
2016-07-02 14:20:49 -04:00
# Debian --> https://wiki.debian.org/ChangeLanguage
dpkg-reconfigure locales
# Ubuntu --> https://help.ubuntu.com/community/Locale
update-locale LANG=[options] && dpkg-reconfigure locales
2020-11-18 15:41:52 -05:00
## Console font, codepage:
2016-07-02 14:20:49 -04:00
dpkg-reconfigure console-setup
2022-01-04 20:11:52 -03:00
## Time zone:
2016-07-02 14:20:49 -04:00
dpkg-reconfigure tzdata
2022-01-04 20:11:52 -03:00
## Sound output:
2016-07-02 14:20:49 -04:00
2022-01-04 20:11:52 -03:00
# Check the available sound output options:
pacmd list-sinks | less
# The default will be marked with "*"
# Press "q" to close
# Define the new default sound output
pacmd set-default-sink <NAME-OF-DESIRED-OPTION>
The name of HDMI sound output may change accordingly to the device. If you don't wanna deal with different names you can:
pacmd set-default-sink $(pactl list short sinks | grep -i 'hdmi' | awk '{print $2}')
The command to define the default sound output is not persistent, to make it persistent add it to the file `~/.bashrc`
## Screen resolution on other boards:
nano /boot/boot.cmd
2016-07-02 14:20:49 -04:00
# example:
2022-01-04 20:11:52 -03:00
# change example from
# disp.screen0_output_mode=1920x1080p60
# to
2016-07-02 14:20:49 -04:00
# disp.screen0_output_mode=1280x720p60
2017-04-01 17:20:34 +03:00
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
2022-01-04 20:11:52 -03:00
2020-11-18 15:41:52 -05:00
## Screen resolution within Xorg
2016-07-02 14:20:49 -04:00
2020-11-18 15:41:52 -05:00
- Thanks to user @maxlinux2000 in [this ](https://forum.armbian.com/topic/10403-add-undetected-hdmi-resolution-to-x11xorg/ ) forum post.
2016-07-02 14:20:49 -04:00
2020-11-18 15:41:52 -05:00
Find matching HDMI output:
2022-01-04 20:11:52 -03:00
xrandr --listmonitors
2020-11-18 15:41:52 -05:00
Calculate VESA CVT mode lines (example for 1440x900)
cvt 1440 900
2022-01-04 20:11:52 -03:00
Sample output:
2020-11-18 15:41:52 -05:00
1440x900 59.89 Hz (CVT 1.30MA) hsync: 55.93 kHz; pclk: 106.50 MHz
2022-01-04 20:11:52 -03:00
Modeline "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync )
2020-11-18 15:41:52 -05:00
Create new mode (example):
2022-01-04 20:11:52 -03:00
xrandr --newmode "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
2020-11-18 15:41:52 -05:00
Add resolution (example):
2022-01-04 20:11:52 -03:00
xrandr --addmode HDMI-1 1440x900_60.00
2020-11-18 15:41:52 -05:00
Set current resolution (example):
xrandr --output HDMI-1 --mode 1440x900_60.00
If it works as expected add it to Xorg by editing `/etc/X11/xorg.conf.d/40-monitor.conf` and add (example):
Section "Monitor"
Identifier "HDMI-1"
Modeline "1440x900_60.00" 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync
Option "PreferredMode" "1440x900"
EndSection
2022-01-04 20:11:52 -03:00
Restart Xorg or reboot
2020-11-18 15:41:52 -05:00
## How to alter CPU frequency?
2016-07-02 14:20:49 -04:00
2020-03-12 10:56:28 +01:00
Some boards allow to adjust CPU speed
2016-07-02 14:20:49 -04:00
nano /etc/default/cpufrequtils
Alter **min_speed ** or **max_speed ** variable.
2020-12-29 18:13:49 +01:00
systemctl restart cpufrequtils
## Swap for experts
2022-01-04 20:11:52 -03:00
By default Armbian implements ZRAM (writing nothing to 'disk' but compressing memory pages in RAM) but in case you often run into out of memory errors and your device has some capable storage (e.g. a securely attached NVMe or SATA SSD) you might want to use ZSWAP instead.
2020-12-29 18:13:49 +01:00
Check whether your kernel has zswap enabled (`dmesg | grep zswap` should output something) and if so create a swapfile or swap partition the traditional way, edit/uncomment `/etc/default/armbian-zram-config` so that it reads `SWAP=false` , reboot and you're done.
Zswap performs a lot better than the combination of ZRAM and 'swap on disk' in parallel.
2016-07-02 14:20:49 -04:00
2020-11-18 15:41:52 -05:00
## How to downgrade a package via apt?
2016-07-07 07:36:17 +02:00
2022-01-04 20:11:52 -03:00
This is useful when you need to fall back to previous kernel version.
2016-07-07 07:36:17 +02:00
2020-03-12 10:56:28 +01:00
apt install linux-image-sun8i=5.13
2016-07-07 07:36:17 +02:00
2020-11-25 12:05:16 -05:00
This example is for H3 legacy kernel. Check [this page ](https://www.armbian.com/kernel/ ) for others.
2016-07-07 07:36:17 +02:00
2020-11-18 15:41:52 -05:00
## How to toggle boot output?
2016-07-02 14:20:49 -04:00
2020-11-27 16:46:23 -05:00
Edit and change [boot parameters ](http://redsymbol.net/linux-kernel-boot-parameters/ ) in `/boot/boot.cmd` (not recommended) or variables in `/boot/armbianEnv.txt` :
2016-07-02 14:20:49 -04:00
2017-04-01 17:20:34 +03:00
- console=both
+ console=serial
2016-07-02 14:20:49 -04:00
2021-07-09 05:57:51 +02:00
To disable console entirely (not recommended) set console to `none` .
2017-04-01 17:20:34 +03:00
Recompile boot.cmd to boot.scr if it was changed:
2016-07-02 14:20:49 -04:00
mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
Reboot.
Serial console on imx6 boards are ttymxc0 (Hummingboard, Cubox-i) or ttymxc1 (Udoo).
2020-11-18 15:41:52 -05:00
## How to toggle verbose boot?
2016-07-02 14:20:49 -04:00
2017-02-24 15:33:08 +01:00
Using Armbian 5.05 to 5.20 you would need to touch/rm `/boot/.force-verbose` to increase boot verbosity. With more recent Armbian builds you would have to alter the `verbosity=` line in `/boot/armbianEnv.txt` (defaults to 1 which means less verbose, maximum value is 7).
2016-07-02 14:20:49 -04:00
2020-11-18 15:41:52 -05:00
## How to provide boot logs for inspection?
2016-07-02 14:20:49 -04:00
2020-03-12 10:56:28 +01:00
When your SBC behaves strange first step is to check power supply and integrity of boot media (`armbianmonitor -c "$HOME"` ). Then look into your kernel logs. We made a tool that grabs info and pastes it to an online pasteboard service. Please increase boot verbosity as shown above (`verbosity=7` ), reboot and then run
2016-07-02 14:20:49 -04:00
2017-02-24 15:33:08 +01:00
sudo armbianmonitor -u
2022-01-04 20:11:52 -03:00
2016-07-02 14:20:49 -04:00
Copy and past URL of your log to the forum, mail, ...
2020-11-18 15:41:52 -05:00
## How to change network configuration?
2016-07-02 14:20:49 -04:00
2020-11-25 12:05:16 -05:00
To get Wi-Fi working simply use `nmtui` , a simple console based UI for network-manager (an example how to set up an AP with network-manager can be found [here ](https://forum.odroid.com/viewtopic.php?f=52&t=25472& )). To deal with different Ethernet/Wi-Fi combinations there are six predefined configurations available, you can find them in those files:
2016-07-02 14:20:49 -04:00
2017-02-24 15:33:08 +01:00
/etc/network/interfaces.bonding
2016-07-02 14:20:49 -04:00
/etc/network/interfaces.default
2016-08-09 20:18:19 +03:00
/etc/network/interfaces.hostapd
2017-02-24 15:33:08 +01:00
/etc/network/interfaces.network-manager
2016-07-02 14:20:49 -04:00
/etc/network/interfaces.r1
/etc/network/interfaces.r1switch
2016-08-09 20:18:19 +03:00
By default * * /etc/network/interfaces** is a copy of * * /etc/network/interfaces.default**
2016-07-02 14:20:49 -04:00
2017-02-24 15:33:08 +01:00
1. BONDING: your network adapters are bonded in fail safe / "notebook" way.
2022-01-04 20:11:52 -03:00
2. DEFAULT: your network adapters are connected classical way.
2017-02-24 15:33:08 +01:00
3. HOSTAPD: your network adapters are bridged together and bridge is connected to the network. This allows you to have your AP connected directly to your router.
2022-01-04 20:11:52 -03:00
4. All interfaces are handled by network-manager (`nmtui` /`nmcli` or using the GUI)
2016-07-02 14:20:49 -04:00
4. Router configuration for Lamobo R1 / Banana R1.
5. Switch configuration for Lamobo R1 / Banana R1.
2016-08-09 20:18:19 +03:00
You can switch configuration with copying.
2016-07-02 14:20:49 -04:00
cd /etc/network
2016-08-09 20:18:19 +03:00
cp interfaces.x interfaces
2022-01-04 20:11:52 -03:00
2016-07-02 14:20:49 -04:00
(x = default,hostapd,bonding,r1)
2017-02-24 15:33:08 +01:00
Then check / alter your interfaces:
2016-07-02 14:20:49 -04:00
nano /etc/network/interfaces
2020-12-17 22:24:10 -05:00
## Choosing an apt mirror
Armbian has its own apt repository and mirrors for armbian-specific packages. The default of `http://apt.armbian.com` is a round-robin to all mirrors. If you are having trouble updating or slow speeds you may want to choose a specific mirror.
Do the following:
Assure `jq` is installed
2021-01-05 08:50:28 -05:00
2020-12-17 22:24:10 -05:00
`apt install -y jq`
Get a list of available mirrors from our `https://apt.armbian.com/mirrors` endpoint.
2021-01-05 08:50:28 -05:00
```bash
curl -s http://apt.armbian.com/mirrors|jq
2021-01-05 09:04:53 -05:00
```
2020-12-17 22:24:10 -05:00
You will see a result set similar to this, listing mirrors by region:
```json
{
"AS": [
"https://mirrors.tuna.tsinghua.edu.cn/armbian/",
"https://minio.k-space.ee/armbian/apt/"
],
"NA": [
"https://armbian.tnahosting.net/apt/",
"https://us.mirrors.fossho.st/armbian/apt/"
],
"EU": [
"https://minio.k-space.ee/armbian/apt/",
"https://armbian.systemonachip.net/apt/",
"https://mirrors.netix.net/armbian/apt/",
"https://mirrors.dotsrc.org/armbian-apt/",
"https://armbian.hosthatch.com/apt/"
],
"default": [
"https://armbian.tnahosting.net/apt/",
"https://us.mirrors.fossho.st/armbian/apt/",
"https://minio.k-space.ee/armbian/apt/",
"https://armbian.systemonachip.net/apt/",
"https://mirrors.netix.net/armbian/apt/",
"https://mirrors.dotsrc.org/armbian-apt/",
"https://armbian.hosthatch.com/apt/"
]
}
```
Edit `/etc/apt/sources.list.d/armbian.list` and replace the url `http://apt.armbian.com` with your preferred mirror.