初心者
Boot Failed: Failed to start Remount Root and Kernel File Systems
# ls all drivers info$ blkid
# check `fstab` file, find a wrong value$ cat /etc/fstab
# I don't know how to copy and paste in terminal...# So, edit driver's id to `/dev/sda1`$ vi /etc/fstab
# reboot machine# edit `/etc/fstab` <file system> value to UUID of each driverref:
Boot Failed: Failed to start Remount Root and Kernel File Systems
Set custom resolution
System Setting ->> Hardware Configuraion ->> Display controller ->> video-modesetting & video-vesa
After these 2 driver installed, my monitor display in a wrong resolution or just go black after reboot
# list ports of your video card$ xrandr --props
# generate a "modeline" with cvt# eg. 4k monitor in 60FPS$ cvt 3840 2160 60# 3840x2160 59.98 Hz (CVT 8.29M9) hsync: 134.18 kHz; pclk: 712.75 MHzModeline "3840x2160_60.00" 712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync
# edit Xsetup file$ sudo vim /usr/share/sddm/scripts/Xsetup
# add followingxrandr --newmode "3840x2160_60.00" 712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsyncxrandr --addmode DisplayPort-1 3840x2160_60xrandr --output DisplayPort-1 --mode 3840x2160_60ref:
Vega 64 installation problems
amdgpu displayport
xrandr - How to set a custom resolution?
Restart X-windows service
Ctrl Alt Backspace
But usually doesn’t work
Ctrl Alt F6
Switch to tty6(any other tty is ok), login and systemctl restart display-manager
ref:
How to restart X Window Server from command line?
Set Wacom tablet, scrolling pages with middle mouse button
# list devices$ xsetwacom --list devicesWacom Intuos BT M Pen stylus id: 10 type: STYLUSWacom Intuos BT M Pad pad id: 11 type: PADWacom Intuos BT M Pen eraser id: 13 type: ERASERWacom Intuos BT M Pen cursor id: 14 type: CURSOR
# change feature of button 2 to pan$ xsetwacom --set "Wacom Intuos BT M Pen stylus" Button 2 "pan"
# increase the sensitivity of panning action$ xsetwacom --set "Wacom Intuos BT M Pen stylus" "PanScrollThreshold" 40But I need to set these parameters every login, therefore add following lines to .bashrc
# Wacom tablet, pan with middle mouse buttonxsetwacom --set "Wacom Intuos BT M Pen stylus" Button 2 "pan"xsetwacom --set "Wacom Intuos BT M Pen stylus" "PanScrollThreshold" 40ref:
Wacom tablet middle mouse button scrolling
man xsetwacom in terminal
2020/07/28 update
# Wcaom tablet, press&click to workxsetwacom --set "Wacom Intuos BT M Pen stylus" TabletPCButton "on"Access to SMB share folder
eg. input smb://win/e to address bar of folder manager
win/eis the share link of SMB folder
cd to custom directory
ref:
Use CDPATH to define the base directory for cd command
2020/07/05 update
Chris Titus Tech provide a solution that set alias for custom directory in his video 16 Linux Tips in 10 Minutes
eg. alias ctt=‘cd /media/backups/SynologyDrive/ctt’
Work on VPS.
But on my desktop, it’ll always crash bash shell (misleading me for a long time…)
Network problem
System Setting ->> Hardware Configuraion ->> Network controller
this driver doesn’t work well on my computer
No connetion with the wired cable, connection only succeed after reboot.
cat /etc/resolv.conf no nameserver
ip route output nothing
ip addr output a lot, but I can’t find bugs
uninstall this driver will solve the problem
(maybe it’s not the correct driver
Return to last edit position in Vim
Solution from /usr/share/vim/vim82/defaults.vim
" When editing a file, always jump to the last known cursor position." Don't do it when the position is invalid, when inside an event handler" (happens when dropping a file on gvim) and for a commit message (it's" likely a different one than last time).autocmd BufReadPost * \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' \ | exe "normal! g`\"" \ | endifUbuntu Boot Partition Full
# 1. check drive useage$ df -h
# 2. check current kernel version$ uname -r
# 3. list all the installed kernel packages$ dpkg -l | grep linux-image
# 4. remove useless kernel packages$ apt remove --purge linux-image-*.**.*-**-generic
# 5. clean up the dependencies of removed kernel packages$ apt autoremove --purgeRef: Ubuntu Boot Partition Full
2020/11/28 update
Telegram Desktop can’t input Chinese characters
- Solution [Note] Linux下無法在telegram輸入中文(解法)
addenv QT_IM_MODULE=***totelegramdesktop.desktopfile
***is the input method
I use ibus, so addenv QT_IM_MODULE=ibusafterExex= - edited .desktop file
[Desktop Entry]Version=1.0Name=Telegram DesktopComment=Official desktop version of Telegram messaging appTryExec=telegram-desktopExec=env QT_IM_MODULE=ibus telegram-desktop -- %uIcon=telegramTerminal=falseStartupWMClass=TelegramDesktopType=ApplicationCategories=Chat;Network;InstantMessaging;Qt;MimeType=x-scheme-handler/tg;Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;X-GNOME-UsesNotifications=true(only QT_IM_MODULE=ibus is also ok)
- but other applications can’t input Chinese too
在 Linux 上用 Telegram Desktop 打不到中文?
思前想後,決定去報告問題。然後在 ilya-fedin 大大的協助下,發現較新版本的 iBus 會參考 $WAYLAND_DISPLAY 參數決定 socket 的名稱,而 Qt 暫時還未適應這個轉變,而引用了錯誤的 iBus socket,導致無法收到任何 iBus 的輸入,而只能顯示英文字母。
同樣的問題應該適用於 .deb / .rpm / tarball 安裝的任何 Qt 軟件。
Soution from above article:
mkdir -p $HOME/.config/environment.decho "IBUS_USE_PORTAL=1" > $HOME/.config/environment.d/99-ibus-use-portal.confand reboot
But above solution don’t work on my manjaro kde 20.1.2
- Finally
echo "IBUS_USE_PORTAL=1" > $HOME/.pam_environmentand log out, log in again, work on every application (except telegram…
Ref: Telegram Desktop does not recognize IBus switch between Japanese and English input
Firefox hardware acceleration
ArchWiki - Firefox
ArchWiki - Hardware video acceleration
mpv.io - options hwdec
mozilla wiki - Blocklisting/Blocked Graphics Drivers
input about:support at address bar of firefox to check info
input about:config at address bar of firefox to edit advance options
AMD gpu fan control
pacman -S fancontrol-gui
Pacman Mirrors
ArchWiki - Mirrors
ArchWiki - Mirrors Status
ArchWiki - Pacman Mirrorlist Generator
After creating/editing /etc/pacman.d/mirrorlist, issue the following command:
pacman -Syyu
2020/12/16 update
Search function
The search function of Dlophin which is the default file manager in Manjaro KDE is tooooooooooo weak to use.
FSearch and ANGRYsearch are good search tools with GUI, fzf is a choice in command line.
Ref: Linux下快速搜索文件(类似Everything)
2021/02/24 update
Reinstall system aaaaaagain
Breaking my Linux system one/two/three/…etc time(s)
:(
# 1. :([FAILED] Failed to start Load Kernel Modules.[FAILED] Failed to mount /boot/efi.[DEPEND] Dependency failed for Local File Systems.
# 2. "journalctl -xb"mount: /boot/efi: unknown filesystem type 'vfat'.boot-efi.mount: Mount process exited, code=exited, status=32/n/aboot-efi.mount: Fialed with result 'exit-code'.Failed to mount /boot/efi.Dependency failed for Local File Systems.
Failed to look up module alias 'crypto_user': Function not implementedFailed to look up module alias 'sg': Function not implementedFailed to look up module alias 'msr': Function not implementedFailed to look up module alias 'vboxdrv': Function not implementedFailed to look up module alias 'vboxnetadp': Function not implementedFailed to look up module alias 'vboxnetflt': Function not implementedFailed to look up module alias 'uinput': Function not implementedFailed to look up module alias 'vboxguest': Function not implementedFailed to look up module alias 'vboxsf': Function not implementedFailed to look up module alias 'vboxvideo': Function not implemented
systemcd-modules-load.service: Failed with result 'exit-code'.Failed to start Load Kernel Modules.try to fix, but failed :(
A similar post: Error = ‘FAILED. Failed to start Load Kernel Modules’
2021/03/06 update
Enable BBR in Ubuntu
- check if BBR in use
# output nothing shows that BBR is offlsmod | grep bbror
# By default, Linux uses the Reno and CUBIC congestion control algorithm. To check available congestion control algorithms, run the following command:sysctl net.ipv4.tcp_available_congestion_control
# Output:net.ipv4.tcp_available_congestion_control = cubic reno
# To check the current congestion control algorithm in use, run:sysctl net.ipv4.tcp_congestion_control
# Output:net.ipv4.tcp_congestion_control = cubic- enable BBR
vim /etc/sysctl.d/local-bbr.conf
# add following two linesnet.core.default_qdisc=fqnet.ipv4.tcp_congestion_control=bbr
# apply change bydeb-systemd-invoke restart procps.serviceRef:
- Easily Boost Ubuntu Network Performance by Enabling TCP BBR
- sysctl mannual:
/etc/sysctl.d/README.sysctl
2021/03/14 update
Install nvidia driver
# install packagessudo pacman -S nvidia-utils lib32-nvidia-utils linux59-nvidia
# block nouveauvim /etc/modprobe.d/blacklist-nvidia-nouveau.conf# add following linesblacklist nouveauoptions nouveau modeset=0
# rebootRef:
NVIDIA - ArchWiki
Nouveau - ArchWiki
How to disable/blacklist Nouveau nvidia driver on Ubuntu 20.04 Focal Fossa Linux
2021/03/14 update
Downgrade a package
-
Search the old package in “Arch Linux Historical Archive” on archive.org
-
For example, install qbittorrent-4.1.9
sudo pacman -U https://archive.org/download/archlinux_pkg_qbittorrent/qbittorrent-4.1.9-1-x86_64.pkg.tar.xz -
install telegram-desktop
sudo pacman -U https://archive.org/download/archlinux_pkg_telegram-desktop/telegram-desktop-2.7.4-2-x86_64.pkg.tar.zst
Ref: ArchWiki - Arch Linux Archive: How to downgrade one package
2021/03/22 update
Creat Disk Partition with parted
# 1. creat partitionparted /dev/sdb(parted) mklabel gpt
(parted) mkpartFile system type? ext4Start? 1End? 5000# the Unit of End is "MB"
# 2. build filesystemmkfs.ext4 /dev/sdb1
# 3. mount itRef:
How to Create Disk Partitions with Parted Command in Linux
How to properly automount a drive in Ubuntu Linux
2021/04/09 update
Update Pacman Mirrorlist
pacman-mirrors -idAfter creating/editing /etc/pacman.d/mirrorlist, issue the following command:
pacman -Syyu
2021/05/01 update
Automated Backup
ArchWiki - Rsync: Automated backup
2021/05/05 update
[In-prograss] Automated Empty Clipboard Content
Use ‘KDE klipper actions’ with ‘qdbus org.kde.klipper /klipper clearClipboardContents’ command.
But not perfect, need another method.
klipper has these commands:
org.kde.klipper.klipper.clearClipboardContentsorg.kde.klipper.klipper.clearClipboardHistoryorg.kde.klipper.klipper.getClipboardContentsorg.kde.klipper.klipper.getClipboardHistoryItemorg.kde.klipper.klipper.getClipboardHistoryMenuorg.kde.klipper.klipper.saveClipboardHistoryorg.kde.klipper.klipper.setClipboardContentsorg.kde.klipper.klipper.showKlipperManuallyInvokeActionMenuorg.kde.klipper.klipper.showKlipperPopupMenuclearClipboardContents sometimes don’t work, ‘clearClipboardHistory’ work normally
Ref:
KDE UserBase Wiki - Klipper
Command line access to Plasma clipboard
Clear clipboard in Konsole
2021/08/18 update
Firefox smoothScroll (maybe useful?)
input about:config in address bar, edit general.smoothScroll.mouseWheel.migrationPercent to 0
Ref: I can’t remember…
2021/10/01 update
Do Not Disturb a server which running normally(
Update and reboot 2 servers, then can’t SSH to them, 100 percentage lost…
Server 1
VNC to it, a mounted driver bugged.
ls get ls: reading directory XXX Input/output error
dmesg get Buffer I/O error on dev sda1, logical block 0, lost sync page write
Reboot the server, mount get mount: XXX : can't read superblock on /dev/sda.
First comment this bugged driver in /etc/fstab, I just want to boot and SSH normally.
Open a support ticket, get a reply power/off and power on (not a reboot) your server and try again
It working, fine ~
Server 2
VNC to it, found server’s network is down.
- When boot, it said
Failed to start Raise network interfaces journalctl -u networkingget/etc/network/if-pre-up.d/iptables: line 2: /sbin/iptables-restore: No such file or directory
touch /sbin/iptables-restore && chmod 744 /sbin/iptables-restore
systemctl start networking
Ref: Iptables if-pre-up blocking my network interfaces - Debian
Network interfaces is up, but IP changed…
Open a support ticket, want to change the IP back.
In one word, Do Not Disturb a server which running normally(
2022/03/01 update
Batch rename
Ref: The 7 Best Ways to Batch Rename Files in Linux
# replace "file" with "photo"rename file photo *.png
# rename multi files within Vimqmv -e vim2022/08/10 update
“Failed to mount /boot/efi” after update
Ref:
HowTo - Restore an unbootable system after an interrupted kernel update
Mkinitcpio tries to work on uninstalled kernels
# chrootmanjaro-chroot -a
# The first updates the system.# Second command rebuilds initramfs for all installed kernels.# Third command updates grub, so that entries for all the kernels are up to date.pacman -Syumkinitcpio -Pupdate-grub
# remove a not valid kernel module# Check what you got under /use/lib/modules. If no linux57-58 folders there, then you can remove related files in /boot and /etc/mkinitcpio.d manually. Otherwise, you need to uninstall linux57-58 with pacman.2022/09/18 update
Wired Connetion Disconnects, journalctl display “carrier-changed”
Ref:
Network Manager Stops Working Every 30 Minutes or So
Ethernet connection randomly disconnects, “reason: ‘carrier-changed”
journalctl -b --no-hostname --no-pager -u NetworkManager
# Check journalctl# NetworkManager: <info> device (enp): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
# As this post "Ethernet connection randomly disconnects, “reason: ‘carrier-changed”"# The reaseon is my wired cable...# And that's right, really a hardware problem...# Try another port on switch, restart NetworkManager, and everything OK...
systemctl restart NetworkManager.service2023/08/26 update
gpg: [don’t know]: invalid packet (ctb=00)
Keyring Errors
# First, remove local cached keyring filessudo rm -r /etc/pacman.d/gnupg
# Then initialize the pacman keyringsudo pacman-key --init
# Populate the keyrings (not sure whether necessary)sudo pacman-key --populate manjaro archlinuxRef:
Manjaro Wiki - Errors_about_Keys
2024/01/13 update
Hangs after login
/usr/lib/Xorg -nolisten tcp -background none -seat seat0 vt* -auth /run/sddm/xauth_ADBaYx -noreset -displayfd ** 100% CPU useage
Arch Wiki - SDDM: Hangs after login
Try removing ~/.Xauthority and logging in again without rebooting. Rebooting without logging in creates the file again and the problem will persist.
Maybe VS Code resulte a memory leak(1000 GB+ virtual memory useage)…
KDE Applications Launcher not work
After updated to KDE 6, Applications Launcher doesn’t show any installed packages.(Open from command line is working.)
Maybe ~/.local/share/applications folder disappearring is the reason.
update-desktop-database ~/.local/share/applications -vsudo update-desktop-database /usr/share/applications -v(note: the second command will likely return a number of KDE apps lacking MimeType, which is fine)
Ref:
Manjaro Forum - KDE Launcher no longer displays hardly any installed apps