Leserartikel [How-To] Arch Linux installieren (verschlüsselt, gehärtet, spieletauglich, modular)

Im Intro hast du stehen: "This guide should be very helpful especially – but not only – for Arch beginners."
:)
 
Arch Linux [Update]
  • Update: mkinitcpio for v35
    • Update: .preset file
    • TODO: Add post-generation hook for signing the UKIs
  • Remove: libavif & libjxl since they are now installed as a dependency
  • Update: Downgrading packages
    • Also for AUR packages

mpv [Future Update]
Bash:
## JPEG XL ##
screenshot-format=jxl
screenshot-jxl-distance=0.1    # 0.1 = visually lossless | 0 = lossless
screenshot-jxl-effort=7    # {1 < ##3 < 9}
# If lossy: higher => better visual quality at a given filesize & better encoder consistency
# If lossless: higher => probably smaller filesize
Siehe: https://github.com/libjxl/libjxl/blob/main/doc/encode_effort.md

Warum ich mich für diese Werte entschieden habe (ausgehend von einem Test-Bild):
  • Dateiformat: Die Dateigröße mit PNG (lossless) ist ~50% größer als mit JXL (d0).
  • Distance: Die Dateigröße mit d0 im Gegensatz zu d0.1 ist viel größer.
  • Effort: e8 benötigt relativ viel Zeit im Gegensatz zu e7.

Extra – my Spectacle settings (screenshot tool):
  • Filename: %Y-%M-%D_ [JXL]
    -> 2023-03-30_<Text>.jxl
  • Compression Quality: 99%
 
Zuletzt bearbeitet:
In cjxl steht schon für d1 visually lossless, oder irre ich mich gerade völlig.
 
--screenshot-jxl-distance=<0-15>
Set the JPEG XL Butteraugli distance. Lower means better quality. Lossless is 0.0, and 1.0 is approximately equivalent to JPEG quality 90 for photographic content. Use 0.1 for "visually lossless" screenshots. The default is 1.0.
Quelle: https://mpv.io/manual/master/
Bei cjxl steht allerdings d1 schon für "visually lossless".

Von manchen im Internet gab es aber auch Empfehlungen, die distance auf 0.5 (statt 0.1) zu setzen, wenn das Original-Bild nicht so detailreich sein sollte.
Ich werde später mehrere Einstellungen testen und evtl. die Werte dementsprechend anpassen.

Was mir gerade auch aufgefallen ist, dass der Default-Effort bei mpv "4" ist – bei cjxl "7".
Da gibt es wohl ein paar Meinungsunterschiede :)
 
Zuletzt bearbeitet:
Ich habe mich schon selber a bisserl mit den jxl Einstellungen herumgespielt. -d1 ist meistens völlig ausreichend. Die Aussage "visually lossless" ist nicht falsch, kann aber bei gewissen Bildern nicht gut genug sein. Ich habe zufällig diese Grafik als Herausforderung für Encoder entdeckt. Das Hintergrundmuster ist an manchen Stellen (besonders über dem Schriftzug "Eternal Edition") selbst mit -d1 nicht visually lossless.
Die Vergleiche sind beeindruckend genug.

png (6,4 MiB) jxl-d0 (2,9 MiB) jxl-d0.5 (890,3 KiB) jxl-d1 (588,9 KiB)
Funfact: ect (efficient compression tool) schafft es nach 100 s die png Datei auf 4,4 MiB zu verkleinern. cjxl braucht nur mehr als einen Wimpernschlag.

Hinsichtlich -d0.5 habe ich einen Vergleich mit einem Haufen von SNES Spielgrafik (mit kleinem Coverbild Anteil) und alpha transparency Bildern gemacht.
-d0.1 und -d0.5 sind in diesem Beispiel überhaupt nicht empfehlenswert.
 

Anhänge

  • test_data.png
    test_data.png
    30,1 KB · Aufrufe: 102
  • Gefällt mir
Reaktionen: agon
Du schreibst unter 14.2.6.1 "Increase compression level (=/>4)". Ist das Standardlevel von zstd = 3?
 
Beelzebot schrieb:
Ist das Standardlevel von zstd = 3?
Ja. Siehe: https://btrfs.readthedocs.io/en/latest/Compression.html
Das kannst du auch nachprüfen mit 'mount | grep zstd'
> …compress=zstd:3
Steht ja auch in fstab nicht anders da.

Bei einer HDD bzw. SATA-Disk macht es viel eher Sinn, das Kompr.level zu erhöhen, da die viel langsamer sind als eine NVMe-SSD. (Die Option im Guide ist aber optional.)

Der Zstd-Benchmark ist übrigens als Richtwert zu verstehen, da bspw. Btrfs nicht immer komprimiert. Man sollte also mehr Leistung bekommen, als der Benchmark glauben lässt.

Evtl. gibt es auch Vorteile, alle Platten mit zstd:3 zu betreiben – für ein effizienteres Kopieren zwischen den Disks.
 
  • Gefällt mir
Reaktionen: Beelzebot
# Workaround: Mausbeschleunigung deaktivieren, wegen xf86-input-libinput 1.3
EDIT: Fixed in 5.27.5 (2023-05-09).

Hintergrund: Man kann gerade nicht in KDE (X11) in der Systemsteuerung die Mausbeschleunigung deaktivieren. Aktivierung von "flat" hat keine Wirkung.

Um die Mausbeschleunigung zu deaktivieren
Bash:
doas vim /etc/X11/xorg.conf.d/50-mouse-acceleration.conf
>
Section "InputClass"
    Identifier "My Mouse"
    Driver "libinput"
    MatchIsPointer "yes"
    Option "AccelProfile" "flat"
    Option "AccelSpeed" "0"
EndSection
Siehe: https://wiki.archlinux.org/title/Mouse_acceleration#with_libinput


# Verifikation
Bash:
xinput list-props {1..50} 2>/dev/null | grep -F 'libinput Accel Profile Enabled ('
> libinput Accel Profile Enabled (307): 0, 1, 0
Sollte passen.
 
Zuletzt bearbeitet:
Arch Linux [Update]
  • New: Signing the UKIs (using mkinitcpio post hook)
    … instead of the pacman hook

# To adopt this update
  • doas rm /etc/pacman.d/hooks/99-secureboot.hook
  • doas vim /etc/initcpio/post/uki-sbsign
    > See: Guide
  • doas chmod +x /etc/initcpio/post/uki-sbsign
  • doas mkinitcpio -P (instead of doas pacman -S linux-zen)

Ich weise darauf hin, dass linux-zen hier der Standard-Kernel ist.
D.h. Optimierungen wie "Disable workqueue for increased solid state drive (SSD) performance" werden nicht behandelt.
 
Zuletzt bearbeitet:
Arch Linux [Security Update]
  • New: "Kernel lockdown (also for Secure Boot)"
  • Update: "Security – Hardening Arch Linux"
  • Harden ESP mount with umask=0077,noexec,nosuid,nodev
    > /etc/fstab: rw,nosuid,nodev,noexec,relatime,fmask=0077,dmask=0077,...
  • Remove: deprecated asp pkg (opt. dep. of paru)
  • Change: vm.max_map_count = 1048576
  • Change: Use "GPT partition automounting": Kernel parameter rootflags=subvol=@ is sufficient
  • Update: fwupd
  • TODO: Harden other mount points (Suggestions are welcome)

fwupd: Firmware security / HSI level
In KDE: Nach "Firmware Security" suchen, oder:
Code:
$ fwupdmgr security --force
> AMD Ryzen 7 3700X:
Host Security ID: HSI:INVALID:missing-data

HSI-1
✔ TPM empty PCRs:                Valid
✔ TPM v2.0:                      Found
✔ UEFI platform key:             Valid
✔ UEFI secure boot:              Enabled
✘ Supported CPU:                 Failed

HSI-2
✔ IOMMU:                         Enabled
✔ TPM PCR0 reconstruction:       Valid

HSI-3
✘ Pre-boot DMA protection:       Disabled
✘ Suspend-to-idle:               Disabled
✘ Suspend-to-ram:                Enabled

HSI-4
✘ Encrypted RAM:                 Not supported

Runtime Suffix -!
✔ Linux kernel:                  Untainted
✔ Linux kernel lockdown:         Enabled
✔ fwupd plugins:                 Untainted
✘ Linux swap:                    Invalid

This system has a low HSI security level.
> Low Security Level
> "Supported CPU" ist valid, wenn der Mainboard-Hersteller die Bereitstellung dieser Information auch ermöglicht. Man müsste ihn also kontaktieren.
> "Pre-boot DMA protection" (bei AMD: ACPI IVRS) lässt sich nicht im UEFI finden
> "Suspend-to-idle" funktioniert nicht, da amdgpu nicht mitmacht
> "Linux swap": fwupd kann anscheinend die btrfs swap file nicht erkennen
 
Zuletzt bearbeitet:

yt-dlp config for archiving YouTube videos​

I don't like it when videos or channels get deleted.

Bash:
####################################
# yt-dlp config for YouTube videos #
####################################
# v2023-07, by agon
# REQ: yt-dlp aria2 python-mutagen


## OUTPUT TEMPLATES
#-> https://github.com/yt-dlp/yt-dlp#output-template

### For Channels & Playlists
#- Config location (example): /mnt/Data/VID/yt-dlp/0_script/yt-dlp.conf
#- START with: $ yt-dlp --config-location yt-dlp.conf
-o "/mnt/Data/VID/yt-dlp/YouTube/%(playlist_uploader)s/%(playlist_title)s/%(upload_date)s - %(title)s.%(ext)s"
--batch-file 2_download_video.txt        # <- Insert URLs of channels & playlists
--download-archive archive_video.log    # Download videos once


### For Single videos
#- Config location: ~/.config/yt-dlp/config
#- START with: $ yt-dlp "<url>"
#-o "/mnt/Data/VID/yt-dlp/1_single/%(uploader)s/%(upload_date)s - %(title)s.%(ext)s"
#--download-archive ~/.config/yt-dlp/archive_video-single.log    # Download videos once


## Video Selection
#-> https://github.com/yt-dlp/yt-dlp#video-selection
# Do not download: live streams, (shorts)
--match-filter "!is_live & !was_live"    # & original_url!*=/shorts/ & url!*=/shorts/"


## Downloader
#-> https://github.com/yt-dlp/yt-dlp#download-options
# REQ: aria2
--downloader aria2c
--downloader-args aria2c:'-c -j 3 -x 3 -s 3 -k 1M'


## A/V Formats
#-> https://github.com/yt-dlp/yt-dlp#video-format-options
#- Prioritize AV1 over VP9 when available (lower bitrate, but better quality than VP9)
#- Prioritize YT Premium (1080p, <50fps, VP9) over AV1 -> -f 616
--format "(bestvideo[vcodec^=av01][height>1080]/616/bestvideo[vcodec^=av01]/bestvideo)+(bestaudio)/best"

--prefer-free-formats
--merge-output-format mkv


## Subtitles
#-> https://github.com/yt-dlp/yt-dlp#subtitle-options
--sub-langs de,en-GB,en,ja    # ALT: all
--embed-subs # for mkv
--sub-format ass/srt/best


## Post-processing
#-> https://github.com/yt-dlp/yt-dlp#post-processing-options
--embed-metadata
--embed-thumbnail # REQ: "python-mutagen" in certain formats


## Misc
#--verbose

Bemerkungen
  • %(playlist_uploader)s gilt auch für Channels.
    %(uploader)s oder %(channel)s würde zu einem unerwünschten Ergebnis führen. (Wenn ein Video einer Playlist von einem anderen stammt, dann wäre es in anderer_channel/playlist_name/video.mkv)
  • %(playlist_uploader)s/%(playlist_title)s ist ungeeignet für einzelne Videos -> NA/NA/video.mkv
    Deswegen %(uploader)s.
  • %(upload_date)s in YYYYMMDD, zwecks Sortierung der Videos nach Namen.
  • Es sind somit zwei Konfigurationen:
    • For Channels & Playlists
      • Config location (example): /mnt/Data/VID/yt-dlp/0_script/yt-dlp.conf
      • START with: $ yt-dlp --config-location yt-dlp.conf
    • For Single videos
      • Config location: ~/.config/yt-dlp/config
      • START with: $ yt-dlp "<url>"
 
Zuletzt bearbeitet:
  • Gefällt mir
Reaktionen: Diff-fusion
Arch Linux [Update]
  • Update: Steam
    • Also install lib32-libnm as a dep. for steam to avoid future errors after a system upgrade
  • New: "mpv (media player)"
    • Note: Also install libplacebo-git as dep. for mpv-git
    • Note: dither=ordered is efficient with vo=gpu-next. dither=error-diffusion is now available, but is too compute-intensive.
  • Update: "Kernel command line (for mkinitcpio)"
    • Use the drop-in config directory (new in v36)
      > /etc/cmdline.d/{root,performance,security,virtualization}.conf instead of /etc/kernel/cmdline
 
Zuletzt bearbeitet: (Kernel command line (for mkinitcpio))
Arch Linux [Update]
  • New: "Easy Effects (for EQ & more)"
    • Optimizations for cheap mics (for male voices)
    • OPT: ParametricEQ for headphones

War bei meinem Billig-Mikrofon echt erstaunt. Klingt auch besser als mit den "Optimierungen" in Teamspeak 3.

Bei den Kopfhörern sieht das anders aus. Denn eigentlich höre ich sie mir gerne an. Habe dennoch die Harman-Presets von AutoEq getestet und war nicht begeistert. Anscheinend gibt es größere Abweichungen bei meinem Modell, sodass die "measurements" in diesem Fall einfach ungeeignet für die "results" sind.

EDIT: Ich habe mir mal die "Raw Frequency Response" von meinen vorigen (DT 880) mit meinen aktuellen Kopfhörer verglichen, und stellte lustigerweise fest, dass sie ziemlich ähnlich sind. Sie ähneln eher dem "Diffuse field target" als dem "Harman target".
Ich habe auch die DT880 simuliert, hörte sich aber so schlechter an. Harman ging aber gar nicht klar & für Counter Strike auch eher ungeeignet (bspw. zu viel Bass).

Mit gutem Audio-Equipment bräuchte man Easy Effects wahrscheinlich nicht. ParametricEQ ist übrigens nur auf eine Abtastfrequenz optimiert.
--fs FS Sampling frequency in Hertz for impulse response and parametric eq filters. […] When multiple values are given only the first one will be used for parametric eq. Defaults to 44100.
 
Zuletzt bearbeitet:
  • Gefällt mir
Reaktionen: Deinorius
Arch Linux [Update]
  • Installation w/ Secure Boot was successfully tested in a VM (using OVMF_CODE_4M.secboot.fd)
  • Added more Gstreamer Plugins
  • Setting the Xorg keymap layout is now possible before "Install Backend & DE"
  • Small update of the "PipeWire optimizations"
  • Minor fixes
 
  • Gefällt mir
Reaktionen: Deinorius
Config [Update]
  • zsh
    • Beautified the config
    • Faster loading times
    • New: "Directories first" when using command completion
  • Firefox
    • New: Locale (esp. for offline translations (new in v117))
  • mpv
    • New: Picture-in-picture (PiP) mode
      Currently no easy input switch between "PiP" & "Fullscreen" profile
    • New: mpv-mpris to control mpv using standard media keys or via KDE Connect.
    • New: Use JPEG XL for screenshots
    • Update: "WEB STREAMING", "DISPLAY", dither=ordered
    • New: [Bad-ass]. If the soft sub style of certain groups is bad, auto overwrite some styles with the "default style". Positions of subs are unchanged.
    • Removed: Windows support, otherwise the config would be even more complex.
  • Firejail
    • General update
    • E.g. add controller support (for e.g. the DualSense controller) in Steam.
  • Package lists
    • ... which are "Software specific". Some packages from the guide can also be found there.
    • Some packages like android-tools & android-udev are necessary/useful for Android ADB & Fastboot to e.g. flash CustomROMs.
    • Note: jdk21-openjdk (LTS) will be included when the next openjdk (22) is released.
 
Zuletzt bearbeitet:
  • Gefällt mir
Reaktionen: Deinorius
Zurück
Oben