GrzegorzKozub / arch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Arch

Automated Arch Linux installation

Prerequisites

  • Windows, along with the EFI partition are already installed. EFI partition size is increased to 512 MB
  • There's at least 80 GB unassigned space on the disk for Arch
  • In Windows, real time is set to UTC following this guide

Archiso

  1. Create a DOS partition table on the pendrive
  2. Add a FAT32 partition with the boot flag
  3. Label the partition with sudo mlabel -i /dev/sda1 ::archiso
  4. Build with ~/code/arch/archiso.zsh
  5. Copy with
rm -rf /run/media/$USER/ARCHISO/(arch|boot|EFI|loader|shellx64.efi)
cp -r ~/code/arch/archiso/usb/* /run/media/$USER/ARCHISO

Installation

  1. Boot from archiso
  2. Run source ~/arch/player.zsh, source ~/arch/drifter.zsh or source ~/arch/worker.zsh
  3. Once per machine, run ~/arch/disk.sh, otherwise run ~/arch/unlock.zsh
  4. Run ~/arch/system.zsh
  5. Once per machine, run ~/arch/boot.zsh
  6. Reboot to Arch and login as normal user
  7. Run ~/code/arch/services.zsh
  8. Reboot to GNOME, login as normal user and connect to internet
  9. Run ~/code/arch/apps.zsh
  10. Reboot

Manual config

  1. Brave
  • Setup your profiles
  • Sign in to your sites
  • Set as default browser
  • Hide bookmarks
  • Hide side panel button
  • Hide bookmarks button
  • Hide Brave News button in address bar
  • Only allow suggestions from top sites, history and bookmarks (not Leo)
  • Hide Brave Rewards button
  • Hide VPN button
  • Hide tab search button
  • Cycle through the most recently used tabs with Ctrl-Tab
  • Disable everything except background images on the dashboard
  • Disable Brave News on the dashboard
  • Enable search and URL autocompletion
  • Disable EasyList Cookie content filter
  • Don't show the number of blocked items on the Shields icon
  • Disable product analytics, daily usage ping and diagnostic reports
  • Enable Safe Browsing
  • Don't allow sites to send notifications
  • Allow camera and microphone access to Teams
  • Join the Sync Chain and sync everything
  • Install your extensions
  • Disable wallets and hide the button
  • Don't offer to save passwords and don't sign in automatically
  • Add Polish and enable spell check for it
  • Don't offer to translate pages
  • Don't ask where to save downloaded files
  • Don't show Wayback Machine prompts on 404 pages
  • Don't continue running background apps
  • Disable Brave VPN
  • Enable Memory Saver
  1. KeePassXC
  • Open your databases
  • Only show attachment, title and username columns
  • Fit columns to window
  1. Change font to Cascadia Code, font size to 16 and tab size to 2 in Postman
  2. Hide recommended extensions and disable tweet feedback icon in Visual Studio Code
  3. GNOME
  • Set display refresh rate on player to 144 Hz
  • Set display scale to 200% on drifter
  • Enable Night Light on worker
  • Select the sound device and set volume to 50%
  1. Run clean.zsh
  2. Prepare $XDG_CONFIG_HOME/zsh/.env file with GitHub & NPM tokens
  3. Fix window sizes and positions

Wayland

Enabled on drifter and worker. Foot and Kitty run on native Wayland. Code, Brave, KeePassXC and Postman run on XWayland.

Problems

  • GNOME text scaling factor not supported by the apps in native Wayland
  • Brave, Steam & games flickering on XWayland with NVIDIA with VRR when above 60 Hz
  • KeePassXC auto-type not supported on native Wayland
  • Blurry XWayland apps with fractional scaling
  • Flameshot issue when using fractional scaling with two monitors
  • dispwin not compatible and colormgr most likely doesn't work on NVIDIA
  • redshift not compatible with Wayland and gammastep doesn't work in GNOME on NVIDIA
  • nvidia-settings not compatible (coolbits, undervolting and overclocking) but maybe tuxclocker can be used
  • PowerMizer doesn't work as soon as nvidia_drm.modeset=1 is enabled

Enabling on NVIDIA

  • Add nvidia_drm.modeset=1 kernel module setting
  • Run ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
  • Make sure there's no WaylandEnable=false in /etc/gdm/custom.conf
  • Fix GNOME Shell suspend

Forcing native Wayland

Force native Wayland for QT apps with QT_QPA_PLATFORM=wayland

XDG Desktop Portal

XDP implementations conflict each other so only one should be installed at the same time:

  • GNOME - xdg-desktop-portal-gnome and xdg-desktop-portal-gtk
  • KDE - xdg-desktop-portal-kde
  • Hyprland - xdg-desktop-portal-hyprland
  • Sway - xdg-desktop-portal-wlr

Fonts

Comfortable settings for display scale & font scaling factor given the screen size and resolution:

  • drifter - 200% & 1.25
  • player & worker - 100% & 1.75

The aim is to use the font size of 1em or 12pt or 16px (converter) and have font scaling factor make it comfortable. Apps running on X11 or XWayland respect font scaling factor. For native Wayland apps font size is adjusted to simulate font scaling factor:

  • Alacritty, Foot & Kitty
    • drifter (Wayland) - 15pt (or 1.25em or 20px)
    • player (X11) - 12pt (or 1em or 16px)
    • worker (Wayland) - 21pt (or 1.75em or 28px)
  • Brave, Code & Postman (XWayland) - 16px (or 1em or 12pt)

GNOME Shell extensions

To test on Wayland run dbus-run-session -- env MUTTER_DEBUG_DUMMY_MODE_SPECS=2560x1440 gnome-shell --nested --wayland.

References

Windows VM

During the installation, put Windows and virtio-win iso in $DIR. Install disk, graphics card and network card drivers from virtio-win. Disable fast startup. Map \\10.0.2.4\qemu as network drive on guest.

For Secure Boot with TPM 2.0 install swtpm and edk2-ovmf on host.

For clipboard sharing using spice install virt-viewer on host and guest tools on guest.

For folder sharing using spice install virt-viewer on host and webdav daemon on guest. Run c:\Program Files (x86)\SPICE webdavd\map-drive.bat on guest.

To install Windows 11 without Internet connection and with local account, when asked to connect to Internet, press Shift+F10 to bring up the command prompt and type OOBE\BYPASSNRO.

To reduce the image size after freeing up space on guest, first defragment the drives and run sdelete -z on guest, then run qemu-img convert -O qcow2 from.cow to.cow.

Gaming

  1. Run ~/code/arch/games.zsh
  2. Reboot
  3. Start Steam
  4. Once per machine, configure Steam, and specifically
  • Don't sign in to friends when Steam starts
  • Disable non-critical notifications and hide non-critical notifications while in game
  • Set start up location to Library
  • Disable community content and hide game icons in Library
  • Enable shader pre-caching and allow background processing of Vulkan shaders
  • Disable Steam overlay and remove screenshot shortcut
  • Enable Steam Play for supported and all other titles
  • Disable Remote Play
  • For each game, set game compatibility to Proton-GE
  1. Once per machine, move Steam to games disk with
mv $XDG_DATA_HOME/Steam /run/media/$USER/games/
ln -s /run/media/$USER/games/Steam $XDG_DATA_HOME/Steam

Launch options

  • Cemu, VULKAN

LD_PRELOAD="$LD_PRELOAD:/usr/lib/libgamemode.so.0" PROTON_ENABLE_NGX_UPDATER=1 PROTON_ENABLE_NVAPI=1 python3 ./save_sync mangohud gamemoderun %command% -f -g "<game file>"

  • Elden Ring, VKD3D

./er-patcher --rate 144 -vcas -- env LD_PRELOAD="$LD_PRELOAD:/usr/lib/libgamemode.so.0" PROTON_ENABLE_NGX_UPDATER=1 PROTON_ENABLE_NVAPI=1 VKD3D_CONFIG=dxr11,dxr WINE_FULLSCREEN_FSR=1 WINE_FULLSCREEN_FSR_MODE=ultra WINE_FULLSCREEN_FSR_STRENGTH=2 mangohud gamemoderun %command%

References

Bugs

Affects all machines. Worked around in the windows GNOME Shell extension. Disabled the workaround on Jan 20th 2024.

Affects all machines. Check the linked thread from time to time.

Worked around with rm -rf ~/.cache/nvidia/GLCache

Worked around by installing lib32-libnm. Disabled the workaround on Jan 20th 2024.

Ideas

  • When NVIDIA driver 555 comes out, switch to Wayland and revisit gaming
  • Explore CachyOS GitHub and maybe use/install something

About


Languages

Language:Shell 88.5%Language:JavaScript 10.8%Language:Python 0.7%