There are plenty of help-pages, so this md-page just collects some useful snippets or links, but IS NOT A COMPLETE GUIDE.
Good pages to start
- Arch installation guide
- as orientation (but don't install everything from there!): Arch - steps after installation
- Package-group overview
- Notes when installing Arch
- Notes when setting up Arch
- General snippets and interesting stuff
- vpn with openconnect
- Monitoring system-resources with htop
- Printing system-info
- Check colors in terminal
- Activate colors for pacman (and yay)
- Event-Listening with evtest
- LaTeX or TeX Live
- Mouse-polling-rate
- Python
- Random-number-generator
- Check kernel-default-settings
- Check existing groups
- Linux Container with lxc/lxd
- Cool themes and icons
- Fonts
- Troubleshooting
- Booting into black screen with blinking cursor
- Login doesn't work after updating pam
- System-maintenance and logging
- Could not find tools on server when updating/installing tools
- Unrecognized tools or external HDD or whatever
- Screen flicker after resume from suspend (Radeon GPU)
- CPU random generator seems to be failing (0xffffffff)
- vscode's cmd 'Open Containing Folder' opens vscode instead of Files
- Can't read from NTFS-format (windows-partition)
- Unrecognized mount option windows_names
- sp5100-tco: Watchdog hardware is disabled
In addition to the installation-guide on archwiki, the following notes could be helpful and save google-time. :)
Use fdisk -l
to find the respective partition- and disk-names.
Note, that the Device
-names for Disks, like /dev/sdb
or /dev/sda
, can change between reboots.
Hence don't use these names without lookup via fdisk -l
.
Then, partition the disk-name (not a partition-name) via fdisk
, e.g. fdisk /dev/sdb
.
Made changes in the resulting mode will change the actual disk-partitions only if you save them.
So don't hesitate in executing the fdisk
-command.
You will need following types, which can be added inside the fdisk
-mode:
EFI System
Linux filesystem
Linux swap
The swap-partition can have a size of ~4 GB
.
With hibernation (meaning saving RAM to HDD when turning off to restore RAM after reboot), you should take the whole RAM-size plus some extra space, but I don't use hibernation.
useradd -m -G wheel -s /usr/bin/zsh USERNAME
passwd USERNAME
visudo # for wheel-user-group
Basic systemctl-stuff can be found here
Note that enable
means the service to start automatically on reboot, while start
means starting it right now for once.
Install networkmanager
(including nmcli
) for wifi and enable it on reboot via systemctl enable NetworkManager.service
(should be explained in the Archwiki).
Helpful commands:
# Show little overview
nmcli
# Show network-devices (e.g. wifi-sticks)
ip link # or
nmcli device show
# List nearby wifi networks
nmcli device wifi list
# connect to a wifi network with password being asked interactively
nmcli --ask device wifi connect "${ssid}"
# OR
# connect to a wifi network without password being stored in history
vim tmp_pw.txt
ssid='my-wlan'
nmcli device wifi connect "${ssid}" password "$(cat tmp_pw.txt)"
rm tmp_pw.txt
- rEFInd installation guide for Arch
- theme: rEFInd-minimal
- configs inclusive rEFInd-minimal
- Labeling the filesystem with Gnome's
disk
-utility is needed forrEFInd
s entryvolume
in amenuentry
. You can check existing labels viall /dev/disk/by-label
(andfdisk -l
for respective mount-names). - Manual
stanzas
(menuentry
s) and their options forrefind.conf
can be found here. /efi/EFI/refind/refind.conf
vs/boot/refind_linux.conf
: Former is the manually written config while latter is taken for automatically detected kernels. Generate arefind_conf.linux
viamkrlconf
. Take a look at the archwiki for more info.
Take a look at this super link for documentation of the options. Note that you could have another version as used in the URL.
To check your kernel-version, execute uname -r
.
Just install as mentioned in the Archwiki.
When logging in, the default is wayland, but currently (end 2019), wayland doesn't support app-switching, e.g. when Enpass
wants to authenticate via browser
, going back to the app afterwards.
sudo pacman -S xorg-server xorg-xinit
sudo pacman -S xf86-video-amdgpu
deprecated
Repeadingly removes my home-directory when trying to uninstall a color-theme. Hence goodbye KDE-Plasma, hello GNOME.
sudo pacman -S plasma-meta
sudo pacman -S kdebase-meta
sudo pacman -S kdegraphics-meta
sudo pacman -S kdeutils-meta
sudo pacman -S kdeadmin-meta
sudo pacman -S kdegames-meta
sudo pacman -S kde-gtk-config
KDE uses sddm (sudo pacman -S sddm sddm-kcm
according to ).
Based on Google Images, the theme breeze
is the same as Manjaro
is using.
Changing keyboard-layout for login with SDDM
(a display-manager for KDE
) can be done in the file /usr/share/sddm/scripts/Xsetup
.
Add the line
setxkbmap de,us
to enable a selection. More information from askubuntu - Wrong language displayed by SDDM on login Kubuntu 18.04 or US keyboard layout always used or ArchLinux Forum SDDM Keyboard Selection.
sudo pacman -S plasma-wayland-session
- crashes with
RX 5700 XT
If discover shows No application back-ends found, please report to your distribution.
, then install package-qt5
according to this doc.
yay -S cups cups-pdf
yay -S hplip
sudo systemctl start cups
# for automatically starting after reboot
sudo systemctl enable cups
Then enter http://localhost:631/admin
and add a new printer.
In my case, the printer is HP_Color_LaserJet_MFP_M277dw
, so I have added the respective PDD-file from hplib
at /usr/share/ppd/HP/hp-color_laserjet_pro_mfp_m277-ps.ppd.gz
Whether your printer needs a plugin, you will find at hp.
Executing hp-plugin --interactive
after installing hplip
should install the plugin.
HOWEVER, on my machine at 6th October 2020
, this doesn't work.
The error-message is something related to the checksum, but in fact, no file is downloaded at all.
Here is a workaround:
TLDR
- When executing
hp-plugin --help
, your version is printed. In my case, it is3.20.6
. - Download the
hplip-VERSION-plugin.run
andhplip-VERSION-plugin.run.asc
of your version (hp-plugin --help
) from here. - Execute
hp-plugin --interactive
and use the relative path to the directory, where you've just downloaded your plugin-files to.
# get version
hp-plugin --help
# Download key
curl 'https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-VERSION-plugin.run.asc' -o "${HOME}/Downloads/hplip-VERSION-plugin.run.asc"
# Download plugin-files
curl 'https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-VERSION-plugin.run' -o "${HOME}/Downloads/hplip-VERSION-plugin.run"
# Install and use relative path to download-directory
hp-plugin --interactive --path="${HOME}/Downloads"
# Cleanup
rm "${HOME}/Downloads/hplip-VERSION-plugin.run"
rm "${HOME}/Downloads/hplip-VERSION-plugin.run.asc"
More details about finding the right files/urls
- Execute
which hp-plugin
to find the executable, which is a symlink. - Follow the symlink to find the underlying
py
-script. - When digging through this
py
-script (and imported modules in neighbouringpy
-scripts), you may find the download-url. In my case, the download-function is in/usr/share/hplip/installer/pluginhandler.py
. - In case the plugin-path (pointing to a local file) is empty, the download-function gathers info from this config.
- Search for your version in the config-file and find the url to the respective file
plugin.run
. The key-fileplugin.run.asc
is needed as well. Probably add.asc
to the url, or simply remove the url's suffix to find all relevant files listed. In the list, look for your version (in my case,hplip-3.20.6-plugin.run
andhplip-3.20.6-plugin.run.asc
).
I'm using the Open-Source-Build of vscode
, installed via yay -S code
, and it runs very nice.
Note that the vscode-home-directory
changes.
For more information, see the archwiki.
See archwiki about OpenConnect.
Don't forget the integration-section ;)
This blog explains some basics, for example the colors of the bars, which are:
For CPU-usage
- Blue: Low priority processes (nice > 0)
- Green: Normal (user-) processes
- Red: Kernel processes
- Yellow: IRQ time
- Magenta: Soft IRQ time
- Grey: IO wait-time
For memory-usage
- Green: Used memory-pages
- Blue: Buffer-pages
- Yellow: Cache-pages
You can use uname -a
for quick-info.
For a more fancy output, do yay -S archey4
followed by archey
printing something like
[dominic:~]$ archey
+ User: dominic
# Hostname: aqua
### Model: motherboard
##### Distro: Arch Linux [x86_64]
###### Kernel: 5.4.11-arch1-1
; #####; Uptime: 26 minutes
+##.##### WindowManager: Not detected
+########## DesktopEnvironment: GNOME
#############; Shell: /usr/bin/zsh
###############+ Terminal: xterm-256color ## ## ## ## ## ## ##
####### ####### Packages: 1147
.######; ;###;`". Temperature: 16.8 C (Max. 16.8 C)
.#######; ;#####. CPU: ...
#########. .########` GPU: ...
######' '###### RAM: 1934 MB / 16024 MB
;#### ####; Disk: 167 GB / 522 GB
##' '## LAN_IP: ...
#' `# WAN_IP: ...
From stackoverflow
msgcat --color=test
Uncomment #Color
in /etc/pacman.conf
.
Execute sudo evtest
and follow instructions.
Install the packages mentioned in the ArchWiki-page.
Check with sudo evhz
Just install python and pip-modules with your package-manager (e.g. yay
).
No need to use pip
(yesss).
yay -S haveged
Snippet: zcat /proc/config.gz | grep CONFIG_RANDOM_TRUST_CPU
getent group
cat /etc/group
# Syntax
man group
Info can be found here.
While lxc
stands for client
, the lxd
represents the daemon
.
The daemon provides a socket and has root-rights.
The client can send commands to this socket, e.g. to create containers.
Installing lxc
and lxd
:
yay -S lxc lxd
You can launch privileged and unprivileged containers.
The former maps the container-root to the host-root, whereas the latter maps the container-root to some nobody-user.
For unprivileged containers, create a uid
- and gid
-mapping by creating /etc/subuid
and /etc/subgid
:
root:100000:65536
Look at this super youtube-tutorial as soon as lxc/lxd
are running.
The man in the video uses lxc
without sudo
.
ATTENTION: You can do this by adding your user to the lxd
-group via usermod -a -G lxd <user>
.
This makes privilege escalation possible, basically meaning that this added user is able to create privileged containers, which can mount the host-system in and change everything with host-root-rights.
By the way, same holds for docker
.
Install them using yay
, like yay nordic-theme-git
.
-
aur/nordic-theme-git
(dark version) -
aur/nordic-polar-theme-git
(light version) -
ant-dracula-gtk-theme
-
community/materia-gtk-theme
-
community/arc-gtk-theme
-
community/arc-icon-theme
-
community/papirus-icon-theme
-
aur/zafiro-icon-theme
Some cool monospace-fonts
More useful fonts/fonts-pkgs can be found in the Archwiki, e.g.
ttf-liberation
, which is used inlibreoffice
-templatesttf-ms-win10
, which is a wrapper for local ms-fonts. Microsoft-Fonts can be added from an Windows-ISO as described in the Archwiki.
CTRL
, ALT
and e.g. F2
selects another tty
.
This can be used to check logs or access the system if something is not running accordingly.
Solution: Switch TTY
with ALT
, F2
and back with ALT
, F1
.
Once, after updating the system, login didn't work.
Reason for this was an update in a config of the login-service pam
.
When pacman
updated pam
, the config /etc/pam.d/system-login
had merge-conflicts with the new version.
To keep both versions, pacman
adds the new version as /etc/pam.d/system-login.pacnew
.
Problem has been, that the updated pam
needs the new config to work, hence crashed (or something) and login didn't work (even for root).
To solve this: boot from an Bootalbe USB-stick, chroot
into the system (see installation-guide on archwiki) and resolve the merge-conflict.
In general, to find pacnew
-files, you might play around with
sudo find . -type f -exec grep -i "pacnew" --color=auto {} +
for finding .pacnew
-files.
Via journalctl
and systemctl
, e.g.
systemctl --failed
journalctl -p 3 -xb
journalctl --unit=sddm.service
See the archwiki for very detailed info about system-maintenance.
Arch is strict in versioning, meaning if your system is too old (could mean days), you won't find tools in the mirror-servers.
Just update the system (e.g. via yay
) and reboot.
If you have updated your system, e.g. via yay
, do a restart.
Kernel-updates lead to missing support.
In my case the external HDD hasn't been detected anymore (exFAT
).
I imagine, that old versions should be loaded that are already removed due to the system-update.
A restart fixed my problem with the unrecognized external HDD.
TLDR Solution is updating BIOS (source: Manjaro-Forum).
If you have a mainboard from msi
, check this 3-min-video.
For the x570 Aorus Elite
, check this video.
My AMD-CPU seems to have a bug or something, throwing the message
WARNING: CPU random generator seem to be failing, disable hardware random number generation
WARNING: RDRND generated: 0xffffffff 0xffffffff 0xffffffff 0xffffffff
resulting in bad random numbers (only fff...ff
) when using QT
(e.g. in matplotlib
).
You can check the random-number-generator of your cpu via the following c-script, using an inline-assembler-snippet to access the hardware-random-generator directly, not through your OS
.
If the code is saved as script named rdrand-test.c
, just execute gcc rdrand-test.c && ./a.out
to print the random number.
/*
The code has been derived from systemd:
https://github.com/systemd/systemd/blob/master/src/basic/random-util.c
SPDX-License-Identifier: LGPL-2.1+
*/
#include <stdio.h>
int main() {
unsigned char success;
unsigned long v;
asm volatile("rdrand %0;"
"setc %1"
: "=r"(v), "=qm"(success));
printf("success: %i value: %lx\n", success, v);
}
Though, you can check the output of head -c 8 /dev/urandom | xxd
.
If it is random stuff, your OS
probably has detected the issue by its own.
Source: archlinux-forum
The default-application for opening folders has changed somehow, but your gnome-settings doesn't show it in its section Default Applications
.
To solve this,
- open
Files
, - right-click on a folder,
- select
Open With Other Application
(or similar) - and select
Files
since this is probably your preferred application to open folders. - Maybe (cannot tell since I just have done it): Restart all open
vscode
-windows.
Now, vscode
should open containing folders in Files
again.
See see troubleshooting for unrecognized mount option windows_names
Install ntfs-3g
.
Source: the ubuntu-forum
Add blacklist sp5100_tco
to /etc/modprobe.d/sp5100_tco.conf
.
Source: archlinux-forum See also: archlinux-wiki for blacklisting kernel-modules