System: Host: obi-notebook Kernel: 5.13.19-200.fc34.x86_64 x86_64 bits: 64 Desktop: GNOME 40.4
Distro: Fedora release 34 (Thirty Four)
Machine: Type: Laptop System: LENOVO product: 21A00004GE v: ThinkPad P14s Gen 2a
Mobo: LENOVO model: 21A00004GE UEFI: LENOVO v: R1MET39W (1.09 ) date: 06/21/2021
Battery: ID-1: BAT0 charge: 42.6 Wh (79.5%) condition: 53.6/50.5 Wh (106.3%)
Memory: RAM: total: 27.23 GiB used: 2.61 GiB (9.6%)
Array-1: capacity: 64 GiB slots: 2 EC: None
Device-1: DIMM 0 size: 16 GiB speed: 3200 MT/s
Device-2: DIMM 0 size: 16 GiB speed: 3200 MT/s
CPU: Info: 8-Core AMD Ryzen 7 PRO 5850U with Radeon Graphics [MT MCP] speed: 1334 MHz min/max: 1600/1900 MHz
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Cezanne driver: amdgpu v: kernel
Device-2: IMC Networks Integrated Camera type: USB driver: uvcvideo
Display: server: X.Org 1.21.1.2 driver: loaded: amdgpu note: n/a (using device driver)
resolution: 3840x2160~60Hz
OpenGL: renderer: AMD RENOIR (DRM 3.41.0 5.13.19-200.fc34.x86_64 LLVM 12.0.1) v: 4.6 Mesa 21.1.8
Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169
Device-2: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz driver: iwlwifi *
Device-3: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169
Bluetooth: Device-1: Intel AX210 Bluetooth type: USB driver: btusb *
Drives: Local Storage: total: 953.87 GiB used: 39.84 GiB (4.2%)
ID-1: /dev/nvme0n1 vendor: SK Hynix model: HFS001TDE9X081N size: 953.87 GiB
Info: Processes: 420 Uptime: 24m Memory: 27.23 GiB used: 2.56 GiB (9.4%) Shell: Zsh inxi: 3.3.06
* originally Realtek 8852AE (see WIFI)
The installed M.2 Realtek WIFI chip 8852AE sucks. It's slow and driver support is not in mainline kernel yet. Get a better Intel AX200 or AX210 WIFI chip for 10-15€. However, the kernel still needs to be updated for Intel AX210 to work out-of-the-box. For more details see: https://gist.github.com/linderd/71ec30048e78813115ba3f634e1b0817#wlanwifi
For Linux suspend to work, set the following in UEFI:
Config -> Energy-Optimization -> select Linux
instead of Windows 10
Display backlight control did not work with stock Fedora 34 kernel. After a kernel upgrade everything worked as expected.
Enable encryption on both Windows and Linux using BitLocker and LUKS. Furthermore, mount the encrypted NTFS partition in Linux automatically. Windows will soon be able to mount the LUKS encrypted Linux partitions via WSL2, too.
- Enable Windows BitLocker
- Save BitLocker recovery key:
Control Panel -> System Security -> BitLocker Drive Encryption -> Backup your recovery key -> Save to a file
- Shrink
C:\
partition using Windows Disk Management - Install Fedora via USB flash drive
- Choose empty space for installation
- Enable LUKS encryption
- Default settings work just fine
- Read your BitLocker recovery key file and copy&paste the recovery key to unlock the Windows partition via Linux file explorer
- Configure NTFS usermapping
- Unmount Windows file system
sudo ntfsusermap /dev/mapper/bitlk-<id>
(just map your Windows user)- Mount Windows file system
- Copy created config to file system:
sudo mkdir /windows/.NTFS-3G && sudo mv UserMapping /windows/.NTFS-3G
- Enable Windows partition unlock on startup using systemd-cryptsetup
- Copy BitLocker recovery key to a plain text file with
600
permissions. For instance:/etc/cryptsetup/bitlocker
- Add the following line to your
/etc/crypttab
file (get PARTUUID withsudo blkid
command):bitlk-<id> PARTUUID="<PARTUUID>" /etc/cryptsetup/windows_bitlocker.key bitlk,discard
- Copy BitLocker recovery key to a plain text file with
- Mount Windows file system on startup using Gnome Disks
- Edit mount options
- Uncheck
Use Session Defaults
- Set the following mount options:
nosuid,nodev,nofail,x-gvfs-show,windows_names,big_writes
TODO coming soon: https://docs.microsoft.com/en-us/windows/wsl/wsl2-mount-disk
- Install WSL2
- Mount LUKS encryted partition via WSL2...
- https://wiki.archlinux.org/title/NTFS-3G
- https://wiki.ubuntuusers.de/Windows-Partitionen_einbinden/NTFS-3G/
Grub2 and console font on the 4K screen is way too small and unreadable. Fix as shown below.
Create font for grub.
sudo grub2-mkfont --output=/boot/efi/EFI/fedora/fonts/DejaVuSansMono32.pf2 --size=32 /usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono.ttf
Set new custom font in /etc/default/grub
.
# CUSTOM FONT
GRUB_TERMINAL_OUTPUT="gfxterm"
GRUB_FONT="/boot/efi/EFI/fedora/fonts/DejaVuSansMono32.pf2"
Update grub config.
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg # for UEFI boot
sudo grub2-mkconfig -o /boot/grub2/grub.cfg # for BIOS boot
Available fonts can be found in /usr/lib/kbd/consolefonts/
.
Edit /etc/vconsole.conf
and set:
FONT="latarcyrheb-sun32"
Append vconsole.font=latarcyrheb-sun32
to GRUB_CMDLINE_LINUX
in /etc/default/grub
.
GRUB_CMDLINE_LINUX="[...] rhgb quiet vconsole.font=latarcyrheb-sun32"
Update grub config.
sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg # for UEFI boot
sudo grub2-mkconfig -o /boot/grub2/grub.cfg # for BIOS boot
- https://ask.fedoraproject.org/t/hwo-to-increase-the-size-of-tty-font/2604/2
- https://forums.fedoraforum.org/showthread.php?321014-Increase-Boot-Menu-Font-Size&p=1838816#post1838816
https://github.com/Obihoernchen/shell-config
- https://gitlab.com/Remmina/Remmina/-/issues/1778#note_161949289
- https://gitlab.com/Remmina/Remmina/-/wikis/Problems-and-tweaks/Remmina-RDP-and-HiDPI-scaling
Non native Wayland applications do not scale properly if there are multiple displays with different scaling.
- Set vscode setting:
"window.titleBarStyle": "custom"
- Create script to start chrome and vscode with native wayland support and use it for every system update
#!/bin/bash
sudo dnf update --refresh
# Native Wayland support
#files=(/usr/share/applications/code.desktop /usr/share/applications/code-url-handler.desktop /usr/share/applications/google-chrome.desktop)
# Chrome now via chrome://flags/#ozone-platform-hint Auto
files=(/usr/share/applications/code.desktop /usr/share/applications/code-url-handler.desktop)
for i in ${files[@]}; do
if ! grep -q '\-\-enable-features=UseOzonePlatform \-\-ozone-platform=wayland' "$i"; then
echo "Patching wayland support: $i"
sudo sed -i -E 's/^Exec=\S+/& --enable-features=UseOzonePlatform --ozone-platform=wayland/' "$i"
fi
done
Disable the new chrome feature WaylandFractionalScaleV1
if ! grep -q '\-\-disable-features=WaylandFractionalScaleV1' "/usr/share/applications/google-chrome.desktop"; then
sudo sed -i -E 's/^Exec=\S+/& --disable-features=WaylandFractionalScaleV1/' "/usr/share/applications/google-chrome.desktop"
fi
Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=1356014
Create file /etc/udev/rules.d/71-mousespeed.rules
and replace <YOUR_USER>
with your username.
# Change sensitivity for USB mouse
# Ignore touchpad and trackpoint
SUBSYSTEMS=="serio", GOTO="mousespeed_end"
# USB mouse speed
ACTION=="add", KERNEL=="mouse[0-9]*", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", RUN+="/usr/sbin/runuser -l <YOUR_USER> -c '/usr/bin/gsettings set org.gnome.desktop.peripherals.mouse speed 0.0'"
# Touchpad/Trackpoint speed
ACTION=="remove", KERNEL=="mouse[0-9]*", SUBSYSTEM=="input", ENV{ID_INPUT_MOUSE}=="1", RUN+="/usr/sbin/runuser -l <YOUR_USER> -c '/usr/bin/gsettings set org.gnome.desktop.peripherals.mouse speed -0.4'"
LABEL="mousespeed_end"
- RPM Fusion repositories 1, RPM Fusion repositories 2
- Multimedia codecs
- Fedora 37 misses some codecs:
sudo dnf install gstreamer1-plugins-bad-freeworld mesa-va-drivers-freeworld mesa-vdpau-drivers-freeworld --allowerasing
- See: rpmfusion-infra/fedy#110 (comment)
- OpenH264
- Software -> Software Repositories -> Third Party Repositories -> Enable All
sudo dnf install gnome-tweak-tool
- Set mouse acceleration to flat
- Enable tap to click
- Gnome Extensions:
- https://extensions.gnome.org/extension/690/easyscreencast/
- https://extensions.gnome.org/extension/4839/clipboard-history/
- https://extensions.gnome.org/extension/1386/notification-counter/
- https://extensions.gnome.org/extension/19/user-themes/
- https://extensions.gnome.org/extension/1460/vitals/
- https://extensions.gnome.org/extension/3193/blur-my-shell/
- https://extensions.gnome.org/extension/1160/dash-to-panel/
- Install arc theme
- Install Fedy
- Install MS fonts
- Install vscode
- Archive tools
- Disable bluetooth autostart in
/etc/bluetooth/main.conf
. SetAutoEnable
tofalse
. - IPSec
sudo dnf install strongswan NetworkManager-strongswan NetworkManager-strongswan-gnome strongswan-libipsec strongswan-charon-nm
- vim default
sudo dnf install vim-default-editor.noarch --allowerasing
- Enable chrome screen sharing: chrome://flags/#enable-webrtc-pipewire-capturer
- Allow insecure private SSL certs: chrome://flags/#allow-insecure-localhost
gsettings set org.gnome.mutter center-new-windows true
gsettings set org.gnome.shell.app-switcher current-workspace-only true
git config --global user.name "<Name>"
git config --global user.email "<Mail>"
git config --global pull.rebase true
In /etc/fstab
# Home NAS
//192.168.0.1/NAS/SSD /mnt/Home/NAS/SSD smb3 credentials=/etc/mount_home.cred,uid=1000,gid=1000,noserverino,file_mode=0644,dir_mode=0755,nofail,noauto,_netdev,x-systemd.automount,x-systemd.mount-timeout=10s,x-systemd.idle-timeout=600s 0 0
# Company
//192.168.X.Y/vertrieb /mnt/Company/X/Y smb3 credentials=/etc/mount_company.cred,uid=1000,gid=1000,file_mode=0644,dir_mode=0755,nostrictsync,actimeo=10,cache=loose,nofail,noauto,_netdev,x-systemd.automount,x-systemd.mount-timeout=10s,x-systemd.idle-timeout=600s 0 0
Module needs to be signed for secure boot. Follow steps from /usr/share/doc/akmods/README.secureboot
.
Note: A real shutdown (boot cycle) was necessary. A reboot was not enough
- https://gist.github.com/timlinux/dfcc773be7db435a8a79b8253de69b1b
- https://gist.github.com/linderd/71ec30048e78813115ba3f634e1b0817
- https://wiki.archlinux.org/title/Lenovo_ThinkPad_T14_(AMD)_Gen_2
- https://mutschler.eu/linux/install-guides/fedora-post-install/
- https://austingwalters.com/increasing-battery-life-on-an-arch-linux-laptop-thinkpad-t14s/