diff --git a/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250126-010242-DTCR23K.md b/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250126-010242-DTCR23K.md new file mode 100644 index 0000000..3b18b10 --- /dev/null +++ b/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250126-010242-DTCR23K.md @@ -0,0 +1,234 @@ +- This guide is based on this [lemmy.ml post](https://lemmy.ml/post/61254) which is also heavily based on this [blog post.](https://nerdstuff.org/posts/2020/2020-004_arch_linux_luks_btrfs_systemd-boot/) I have outlined here my steps in reinstalling my arch linux system after it had a hiccup which is time consuming to recover from and decided to nuke my system and reinstall it anew and might as well try to use BTRFS and TPM2.0 unlocking for my encrypted volumes. +- There are some problems I've encountered which deviate the steps a little from the previously said guides which maybe due to my setup. +- I've used the latest Arch Linux iso as of the writing of this guide [[Sep 22nd, 2024]] (2024.09.01 Release). I've also used Ventoy to load the iso from a usb. It has a little bit of quirk that the live environment wont boot if using normal mode and would instead need to be booted in grub2 mode. This maybe due to a bug in Ventoy. + - I was planning to migrate from ventoy sometime in the future since it's been giving me problems in booting to live environments lately and specially with the [issue](https://lemmy.ml/post/20404494) the other day. + - Considering to use a fork or `glim` +- # Base Install +- An internet connection is needed for the whole process. I used an Ethernet cable but a WiFi connection can also be used but it needs to be configured first as outlined in the [Arch Wiki.](https://wiki.archlinux.org/title/Iwd#iwctl) For other connection types, refer to the [Arch Wiki Installation page.](https://wiki.archlinux.org/title/Installation_guide#Connect_to_the_internet) +- The system clock is to be synced first + - ``` + # timedatectl set-ntp true + ``` + - My first problem occurred here. Maybe due to the ISP servers or some unknown reason, my system clock can't sync. + - Due to the clock not synced up with the servers, the installation environment can't automatically run some commands in order to sync up with their servers. This would cause some problems in the installation of packages. To resolve, the following should be run + - ``` + # pacman-key --init + # pacman-key --populate archlinux + # pacman -Sy archlinux-keyring + ``` + - The system installed after would also need its time to be synced up. I followed up the steps from the top comment of [this post.](https://www.reddit.com/r/archlinux/comments/15zgd4y/time_sync_wont_sync_help/) + - Relevant Links + - https://bbs.archlinux.org/viewtopic.php?id=292688 +- Partitioning the Disks + - For my setup I'm installing Arch on `/dev/nvme0`. + - To partition the disk, we need to work on it using `gdisk` or `fdisk`. + - ``` + # gdisk /dev/nvme0 + ``` + - Create a new partition table by selecting `o` + - ``` + Command (? for help): o + ``` + - Create an EFI partition (I chose a size of 1G to fit more kernels sometime in the future. The hex code is `EF00` for the boot partition): + - ``` + Command (? for help): n + ``` + - Create a root partition by adopting the default values. + - ``` + Command (? for help): n + ``` + - Now write the new partitions to the disk. + - ``` + Command (? for help): w + ``` + - I've also created a swap partition right before the root partition. From the guides, they're using a swap file inside the encrypted partition. I may use that in the future and will be editing this guide. As for the hex code for the swap partition, it is `8200`. +- Encrypting the Disks + - First is to create an encrypted container for the root file system. A passphrase is needed to be defined. + - ``` + # cryptsetup luksFormat /dev/sda2 + ``` + - The encrypted container is needed to be unlocked for it to be used. Same with the guides, I used `luks` as the placeholder here. + - ``` + # cryptsetup open /dev/sda2 luks + ``` +- File System Creation + - Format the EFI partition with FAT32 and give it the label `EFI` - you can choose any other label name: + collapsed:: true + - ``` + # mkfs.vfat -F32 -n EFI /dev/sda1 + ``` + - Format the root partition with Btrfs and give it the label `ROOT` - you can choose any other label name. If you didn’t open the LUKS container under the name “`luks`” you must adjust the command accordingly: + collapsed:: true + - ``` + # mkfs.btrfs -L ROOT /dev/mapper/luks + ``` + - Create and Mount Sub Volumes + collapsed:: true + - Create [sub volumes](https://wiki.archlinux.org/index.php/Btrfs#Subvolumes) for root, home, the package cache, and the entire Btrfs file system: + - ``` + # mount /dev/mapper/luks /mnt + # btrfs sub create /mnt/@ + # btrfs sub create /mnt/@home + # umount /mnt + ``` + - The guide also made a sub volume for the snapshots. I will be using `timeshift` to create snapshots so it was not needed. Maybe in the future I will use it and configure my system accordingly. + - Mount the sub volumes: + - ``` + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@ /dev/mapper/luks /mnt + # mkdir -p /mnt/{boot,home} + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@home /dev/mapper/luks /mnt/home + ``` + - Mount the EFI partition + - ``` + # mount /dev/nvme0n1p1 /mnt/boot + ``` + - Install Arch Linux (adjust this list to your needs): + - collapsed:: true + ``` + # pacstrap /mnt linux-zen linux-firmware base btrfs-progs intel-ucode vim + ``` + - I used `linux-zen` and `vim` here. The kernel lets me use `waydroid` without any new kernel modules but I must use the `dkms` version of nvidia drivers for the dgpu to work. + - Generate `/etc/fstab`: + - ``` + # genfstab -U /mnt >> /mnt/etc/fstab + ``` + - System Configuration + - `chroot` into the new system: + - ``` + # arch-chroot /mnt/ + ``` + - Set host name: + - ``` + # echo > /etc/hostname + ``` + - create a user and a password, first the root password: + - ``` + # passwd + ``` + - Create a user + - ``` + # useradd -mG wheel + ``` + - Now edit the sudoers file to give your user sudo permissions. I used `vim` as my text editor: + - ``` + # EDITOR=vim visudo + ``` + - Uncomment the following + - ``` + %wheel ALL=(ALL) ALL + ``` + - Add a password for the user + - ``` + passwd + ``` + - Set locale: + collapsed:: true + - ``` + # echo LANG=en_US.UTF-8 > /etc/locale.conf + ``` + - Uncomment the following rows of `/etc/locale.gen`: + - ``` + #en_US.UTF-8 UTF-8 + ``` + - I've uncommented out more lines so that I can use some more language and locales. + - Generate locale: + - ``` + # locale-gen + ``` + - Set time zone: + - ``` + # ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime + ``` + - Define hosts in `/etc/hosts`: + - ``` + # + 127.0.0.1 .localdomain + ::1 localhost.localdomain localhost + ``` + - Configuring the initramfs + - Configure the creation of [initramfs](https://wiki.archlinux.org/index.php/Arch_boot_process#initramfs) by editing `/etc/mkinitcpio.conf`. Change the line `HOOKS=...` to: + - ``` + HOOKS=(base udev systemd autodetect keyboard modconf block sd-encrypt filesystems resume) + ``` + - Recreate initramfs: + - ``` + # mkinitcpio -P + ``` + - Install some more useful packages. (Apparmor and Refind package included here) + - ``` + pacman -S linux-zen-headers networkmanager dialog wpa_supplicant mtools dosfstools git xdg-utils xdg-user-dirs alsa-utils pipewire pipewire-alsa pipewire-pulse apparmor refind + ``` + - Install `REFind` as the boot loader + - ``` + # refind-install + ``` + - Edit `/boot/EFI/refind/refind.conf` and add the following entry at the bottom. More info on configuring the `REFind` bootloader on [[Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas]] Necessary parts here are the `rd.luks` and `root` parameters for the encrypted drives. + - ``` + menuentry "Arch Linux" { + icon /EFI/refind/themes/darkmini/icons/os_arch.png + volume "Arch Linux" + loader /vmlinuz-linux + initrd /initramfs-linux.img + options " rd.luks.name==luks root=/dev/mapper/luks rootflags=subvol=@ rd.luks.options==discard rw quiet lsm=lockdown,yama,apparmor,bpf quiet splash loglevel=3 systemd.show_status=auto rd.udev.log_level=3 nvidia_drm.modeset=1 amd_pstate=active acpi_enforce_resources=lax iommu=soft amd_iommu=fullflush" + } + } + ``` + - Exit the `chroot` and reboot the system. +- # Installing KDE,Yay, Timeshift and the Nvidia Drivers. +- After logging on the system, A desktop environment can then be installed along with the other drivers such as the Nvidia GPU drivers. + - For my system I installed the KDE Plasma DE + - ``` + $ sudo pacman -Syu plasma-meta + ``` + - More info on the [Arch wiki.](https://wiki.archlinux.org/title/KDE) + - Needs to install more applications such as `dolphin` for file manager + - Enable the Display Manager and Network Manager services. + - ``` + systemctl enable sddm.service + systemctl enable NetworkManager.service + ``` + - Nvidia Drivers + - Since I'm using the `linux-zen` kernel and want to use the beta drivers I first need to install `yay`, an AUR helper. + - ``` + $ sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si + ``` + - Then install the Nvidia drivers + - ``` + $ yay -S nvidia-open-beta-dkms nvidia-utils-beta + ``` + - Install `timeshift` + - ``` + $ sudo pacman -Syu timeshift + ``` +- # Enabling Secure Boot and TPM 2.0 + - Enabling Secure Boot in `rEFind` using Pre Signed Bootloader. + - Install `preloader-signed` from the `AUR` + - ``` + $ yay -Syu preloader-signed + ``` + - Run `refind-install` with some options + - ``` + # refind-install --preloader /usr/share/preloader-signed/PreLoader.efi + ``` + - After a reboot with Secure Boot enabled from the `UEFI` firmware menu, HashTool will launch and it is needed to enroll the hash of rEFInd `loader.efi` and the kernel `vmlinuz-linux-zen` + - TPM 2.0 + - Check if the system supports TPM 2.0 + - ``` + cat /sys/class/tpm/tpm0/device/description + ``` + - ``` + /sys/class/tpm/tpm0/tpm_version_major + ``` + - If the system supports it, run the following command to check if the system is configured properly (from the initramfs hooks earlier) + - ``` + systemd-cryptenroll --tpm2-device=list + ``` + - Run the following to enroll the TPM 2.0 key to our encrypted drive `/dev/nvme0n1p3` + - ``` + $ sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0,7 /dev/nvme0n1p3 + ``` + - Add the following to the bootloader entry + - ``` + rd.luks.options=tpm2-device=auto + ``` + - \ No newline at end of file diff --git a/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250202-172352-BE4T4MK.md b/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250202-172352-BE4T4MK.md new file mode 100644 index 0000000..2478133 --- /dev/null +++ b/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250202-172352-BE4T4MK.md @@ -0,0 +1,236 @@ +- This guide is based on this [lemmy.ml post](https://lemmy.ml/post/61254) which is also heavily based on this [blog post.](https://nerdstuff.org/posts/2020/2020-004_arch_linux_luks_btrfs_systemd-boot/) I have outlined here my steps in reinstalling my arch linux system after it had a hiccup which is time consuming to recover from and decided to nuke my system and reinstall it anew and might as well try to use BTRFS and TPM2.0 unlocking for my encrypted volumes. +- There are some problems I've encountered which deviate the steps a little from the previously said guides which maybe due to my setup. +- I've used the latest Arch Linux iso as of the writing of this guide [[Sep 22nd, 2024]] (2024.09.01 Release). I've also used Ventoy to load the iso from a usb. It has a little bit of quirk that the live environment wont boot if using normal mode and would instead need to be booted in grub2 mode. This maybe due to a bug in Ventoy. + - I was planning to migrate from ventoy sometime in the future since it's been giving me problems in booting to live environments lately and specially with the [issue](https://lemmy.ml/post/20404494) the other day. + - Considering to use a fork or `glim` +- # Base Install +- An internet connection is needed for the whole process. I used an Ethernet cable but a WiFi connection can also be used but it needs to be configured first as outlined in the [Arch Wiki.](https://wiki.archlinux.org/title/Iwd#iwctl) For other connection types, refer to the [Arch Wiki Installation page.](https://wiki.archlinux.org/title/Installation_guide#Connect_to_the_internet) +- The system clock is to be synced first + - ``` + # timedatectl set-ntp true + ``` + - My first problem occurred here. Maybe due to the ISP servers or some unknown reason, my system clock can't sync. + - Due to the clock not synced up with the servers, the installation environment can't automatically run some commands in order to sync up with their servers. This would cause some problems in the installation of packages. To resolve, the following should be run + - ``` + # pacman-key --init + # pacman-key --populate archlinux + # pacman -Sy archlinux-keyring + ``` + - The system installed after would also need its time to be synced up. I followed up the steps from the top comment of [this post.](https://www.reddit.com/r/archlinux/comments/15zgd4y/time_sync_wont_sync_help/) + - Relevant Links + - https://bbs.archlinux.org/viewtopic.php?id=292688 +- Partitioning the Disks + - For my setup I'm installing Arch on `/dev/nvme0`. + - To partition the disk, we need to work on it using `gdisk` or `fdisk`. + - ``` + # gdisk /dev/nvme0 + ``` + - Create a new partition table by selecting `o` + - ``` + Command (? for help): o + ``` + - Create an EFI partition (I chose a size of 1G to fit more kernels sometime in the future. The hex code is `EF00` for the boot partition): + - ``` + Command (? for help): n + ``` + - Create a root partition by adopting the default values. + - ``` + Command (? for help): n + ``` + - Now write the new partitions to the disk. + - ``` + Command (? for help): w + ``` + - I've also created a swap partition right before the root partition. From the guides, they're using a swap file inside the encrypted partition. I may use that in the future and will be editing this guide. As for the hex code for the swap partition, it is `8200`. +- Encrypting the Disks + - First is to create an encrypted container for the root file system. A passphrase is needed to be defined. + - ``` + # cryptsetup luksFormat /dev/sda2 + ``` + - The encrypted container is needed to be unlocked for it to be used. Same with the guides, I used `luks` as the placeholder here. + - ``` + # cryptsetup open /dev/sda2 luks + ``` +- File System Creation + - Format the EFI partition with FAT32 and give it the label `EFI` - you can choose any other label name: + collapsed:: true + - ``` + # mkfs.vfat -F32 -n EFI /dev/sda1 + ``` + - Format the root partition with Btrfs and give it the label `ROOT` - you can choose any other label name. If you didn’t open the LUKS container under the name “`luks`” you must adjust the command accordingly: + collapsed:: true + - ``` + # mkfs.btrfs -L ROOT /dev/mapper/luks + ``` + - Create and Mount Sub Volumes + collapsed:: true + - Create [sub volumes](https://wiki.archlinux.org/index.php/Btrfs#Subvolumes) for root, home, the package cache, and the entire Btrfs file system: + - ``` + # mount /dev/mapper/luks /mnt + # btrfs sub create /mnt/@ + # btrfs sub create /mnt/@home + # umount /mnt + ``` + - The guide also made a sub volume for the snapshots. I will be using `timeshift` to create snapshots so it was not needed. Maybe in the future I will use it and configure my system accordingly. + - Mount the sub volumes: + - ``` + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@ /dev/mapper/luks /mnt + # mkdir -p /mnt/{boot,home} + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@home /dev/mapper/luks /mnt/home + ``` + - Mount the EFI partition + - ``` + # mount /dev/nvme0n1p1 /mnt/boot + ``` + - Install Arch Linux (adjust this list to your needs): + - collapsed:: true + ``` + # pacstrap /mnt linux-zen linux-firmware base btrfs-progs intel-ucode vim + ``` + - I used `linux-zen` and `vim` here. The kernel lets me use `waydroid` without any new kernel modules but I must use the `dkms` version of nvidia drivers for the dgpu to work. + - Generate `/etc/fstab`: + - ``` + # genfstab -U /mnt >> /mnt/etc/fstab + ``` + - System Configuration + - `chroot` into the new system: + - ``` + # arch-chroot /mnt/ + ``` + - Set host name: + - ``` + # echo > /etc/hostname + ``` + - create a user and a password, first the root password: + - ``` + # passwd + ``` + - Create a user + - ``` + # useradd -mG wheel + ``` + - Now edit the sudoers file to give your user sudo permissions. I used `vim` as my text editor: + - ``` + # EDITOR=vim visudo + ``` + - Uncomment the following + - ``` + %wheel ALL=(ALL) ALL + ``` + - Add a password for the user + - ``` + passwd + ``` + - Set locale: + collapsed:: true + - ``` + # echo LANG=en_US.UTF-8 > /etc/locale.conf + ``` + - Uncomment the following rows of `/etc/locale.gen`: + - ``` + #en_US.UTF-8 UTF-8 + ``` + - I've uncommented out more lines so that I can use some more language and locales. + - Generate locale: + - ``` + # locale-gen + ``` + - Set time zone: + - ``` + # ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime + ``` + - Define hosts in `/etc/hosts`: + - ``` + # + 127.0.0.1 .localdomain + ::1 localhost.localdomain localhost + ``` + - Configuring the initramfs + - Configure the creation of [initramfs](https://wiki.archlinux.org/index.php/Arch_boot_process#initramfs) by editing `/etc/mkinitcpio.conf`. Change the line `HOOKS=...` to: + - ``` + HOOKS=(base udev systemd autodetect keyboard modconf block sd-encrypt filesystems resume) + ``` + - Recreate initramfs: + - ``` + # mkinitcpio -P + ``` + - Install some more useful packages. (Apparmor and Refind package included here) + - ``` + pacman -S linux-zen-headers networkmanager dialog wpa_supplicant mtools dosfstools git xdg-utils xdg-user-dirs alsa-utils pipewire pipewire-alsa pipewire-pulse apparmor refind + ``` + - Install `REFind` as the boot loader + - ``` + # refind-install + ``` + - Edit `/boot/EFI/refind/refind.conf` and add the following entry at the bottom. More info on configuring the `REFind` bootloader on [[Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas]] Necessary parts here are the `rd.luks` and `root` parameters for the encrypted drives. + - ``` + menuentry "Arch Linux" { + icon /EFI/refind/themes/darkmini/icons/os_arch.png + volume "Arch Linux" + loader /vmlinuz-linux + initrd /initramfs-linux.img + options " rd.luks.name==luks root=/dev/mapper/luks rootflags=subvol=@ rd.luks.options==discard rw quiet lsm=lockdown,yama,apparmor,bpf quiet splash loglevel=3 systemd.show_status=auto rd.udev.log_level=3 nvidia_drm.modeset=1 amd_pstate=active acpi_enforce_resources=lax iommu=soft amd_iommu=fullflush" + } + } + ``` + - Exit the `chroot` and reboot the system. +- # Installing KDE,Yay, Timeshift and the Nvidia Drivers. +- After logging on the system, A desktop environment can then be installed along with the other drivers such as the Nvidia GPU drivers. + - For my system I installed the KDE Plasma DE + - ``` + $ sudo pacman -Syu plasma-meta + ``` + - More info on the [Arch wiki.](https://wiki.archlinux.org/title/KDE) + - Needs to install more applications such as `dolphin` for file manager + - Enable the Display Manager and Network Manager services. + - ``` + systemctl enable sddm.service + systemctl enable NetworkManager.service + ``` + - Nvidia Drivers + - Since I'm using the `linux-zen` kernel and want to use the beta drivers I first need to install `yay`, an AUR helper. + - ``` + $ sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si + ``` + - Then install the Nvidia drivers + - ``` + $ yay -S nvidia-open-beta-dkms nvidia-utils-beta + ``` + - Install `timeshift` + - ``` + $ sudo pacman -Syu timeshift + ``` +- # Enabling Secure Boot and TPM 2.0 + - Enabling Secure Boot in `rEFind` using Pre Signed Bootloader. + - Install `preloader-signed` from the `AUR` + - ``` + $ yay -Syu preloader-signed + ``` + - Run `refind-install` with some options + - ``` + # refind-install --preloader /usr/share/preloader-signed/PreLoader.efi + ``` + - After a reboot with Secure Boot enabled from the `UEFI` firmware menu, HashTool will launch and it is needed to enroll the hash of rEFInd `loader.efi` and the kernel `vmlinuz-linux-zen` + - TPM 2.0 + - Check if the system supports TPM 2.0 + - ``` + cat /sys/class/tpm/tpm0/device/description + ``` + - ``` + /sys/class/tpm/tpm0/tpm_version_major + ``` + - If the system supports it, run the following command to check if the system is configured properly (from the initramfs hooks earlier) + - ``` + systemd-cryptenroll --tpm2-device=list + ``` + - Run the following to enroll the TPM 2.0 key to our encrypted drive `/dev/nvme0n1p3` + - ``` + $ sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0,7 /dev/nvme0n1p3 + ``` + - Add the following to the bootloader entry + - ``` + rd.luks.options=tpm2-device=auto + ``` + - For more information on LUKS encryption (Adding FIDO 2 Devices as unlock key, etc) Refer to [[Enabling Yubikey Security Key unlock for LUKS Encrypted Root Partition]] + - Note for TPM 2.0 Key: If dual booting with Windows and/or messing with TPM 2.0 keys on the BIOS/UEFI, the keys can be reset/modified. This will result into the TPM 2.0 unlock key not be able to be used and during boot will be asked for the LUKS encryption passkey (VERY IMPORTANT TO SET A PASSKEY AS OUTLINED EARLIER IN THIS GUIDE and to remember this passkey, this will serve as backup). To re-enable TPM 2.0 unlock, just re-enroll the TPM 2.0 key. + - Updated on January 23, 2025 for the TPM 2.0 Note. The Dual-boot windows partition had an update and may have messed with the TPM 2.0 keys. \ No newline at end of file diff --git a/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250203-103509-BE4T4MK.md b/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250203-103509-BE4T4MK.md new file mode 100644 index 0000000..2478133 --- /dev/null +++ b/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250203-103509-BE4T4MK.md @@ -0,0 +1,236 @@ +- This guide is based on this [lemmy.ml post](https://lemmy.ml/post/61254) which is also heavily based on this [blog post.](https://nerdstuff.org/posts/2020/2020-004_arch_linux_luks_btrfs_systemd-boot/) I have outlined here my steps in reinstalling my arch linux system after it had a hiccup which is time consuming to recover from and decided to nuke my system and reinstall it anew and might as well try to use BTRFS and TPM2.0 unlocking for my encrypted volumes. +- There are some problems I've encountered which deviate the steps a little from the previously said guides which maybe due to my setup. +- I've used the latest Arch Linux iso as of the writing of this guide [[Sep 22nd, 2024]] (2024.09.01 Release). I've also used Ventoy to load the iso from a usb. It has a little bit of quirk that the live environment wont boot if using normal mode and would instead need to be booted in grub2 mode. This maybe due to a bug in Ventoy. + - I was planning to migrate from ventoy sometime in the future since it's been giving me problems in booting to live environments lately and specially with the [issue](https://lemmy.ml/post/20404494) the other day. + - Considering to use a fork or `glim` +- # Base Install +- An internet connection is needed for the whole process. I used an Ethernet cable but a WiFi connection can also be used but it needs to be configured first as outlined in the [Arch Wiki.](https://wiki.archlinux.org/title/Iwd#iwctl) For other connection types, refer to the [Arch Wiki Installation page.](https://wiki.archlinux.org/title/Installation_guide#Connect_to_the_internet) +- The system clock is to be synced first + - ``` + # timedatectl set-ntp true + ``` + - My first problem occurred here. Maybe due to the ISP servers or some unknown reason, my system clock can't sync. + - Due to the clock not synced up with the servers, the installation environment can't automatically run some commands in order to sync up with their servers. This would cause some problems in the installation of packages. To resolve, the following should be run + - ``` + # pacman-key --init + # pacman-key --populate archlinux + # pacman -Sy archlinux-keyring + ``` + - The system installed after would also need its time to be synced up. I followed up the steps from the top comment of [this post.](https://www.reddit.com/r/archlinux/comments/15zgd4y/time_sync_wont_sync_help/) + - Relevant Links + - https://bbs.archlinux.org/viewtopic.php?id=292688 +- Partitioning the Disks + - For my setup I'm installing Arch on `/dev/nvme0`. + - To partition the disk, we need to work on it using `gdisk` or `fdisk`. + - ``` + # gdisk /dev/nvme0 + ``` + - Create a new partition table by selecting `o` + - ``` + Command (? for help): o + ``` + - Create an EFI partition (I chose a size of 1G to fit more kernels sometime in the future. The hex code is `EF00` for the boot partition): + - ``` + Command (? for help): n + ``` + - Create a root partition by adopting the default values. + - ``` + Command (? for help): n + ``` + - Now write the new partitions to the disk. + - ``` + Command (? for help): w + ``` + - I've also created a swap partition right before the root partition. From the guides, they're using a swap file inside the encrypted partition. I may use that in the future and will be editing this guide. As for the hex code for the swap partition, it is `8200`. +- Encrypting the Disks + - First is to create an encrypted container for the root file system. A passphrase is needed to be defined. + - ``` + # cryptsetup luksFormat /dev/sda2 + ``` + - The encrypted container is needed to be unlocked for it to be used. Same with the guides, I used `luks` as the placeholder here. + - ``` + # cryptsetup open /dev/sda2 luks + ``` +- File System Creation + - Format the EFI partition with FAT32 and give it the label `EFI` - you can choose any other label name: + collapsed:: true + - ``` + # mkfs.vfat -F32 -n EFI /dev/sda1 + ``` + - Format the root partition with Btrfs and give it the label `ROOT` - you can choose any other label name. If you didn’t open the LUKS container under the name “`luks`” you must adjust the command accordingly: + collapsed:: true + - ``` + # mkfs.btrfs -L ROOT /dev/mapper/luks + ``` + - Create and Mount Sub Volumes + collapsed:: true + - Create [sub volumes](https://wiki.archlinux.org/index.php/Btrfs#Subvolumes) for root, home, the package cache, and the entire Btrfs file system: + - ``` + # mount /dev/mapper/luks /mnt + # btrfs sub create /mnt/@ + # btrfs sub create /mnt/@home + # umount /mnt + ``` + - The guide also made a sub volume for the snapshots. I will be using `timeshift` to create snapshots so it was not needed. Maybe in the future I will use it and configure my system accordingly. + - Mount the sub volumes: + - ``` + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@ /dev/mapper/luks /mnt + # mkdir -p /mnt/{boot,home} + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@home /dev/mapper/luks /mnt/home + ``` + - Mount the EFI partition + - ``` + # mount /dev/nvme0n1p1 /mnt/boot + ``` + - Install Arch Linux (adjust this list to your needs): + - collapsed:: true + ``` + # pacstrap /mnt linux-zen linux-firmware base btrfs-progs intel-ucode vim + ``` + - I used `linux-zen` and `vim` here. The kernel lets me use `waydroid` without any new kernel modules but I must use the `dkms` version of nvidia drivers for the dgpu to work. + - Generate `/etc/fstab`: + - ``` + # genfstab -U /mnt >> /mnt/etc/fstab + ``` + - System Configuration + - `chroot` into the new system: + - ``` + # arch-chroot /mnt/ + ``` + - Set host name: + - ``` + # echo > /etc/hostname + ``` + - create a user and a password, first the root password: + - ``` + # passwd + ``` + - Create a user + - ``` + # useradd -mG wheel + ``` + - Now edit the sudoers file to give your user sudo permissions. I used `vim` as my text editor: + - ``` + # EDITOR=vim visudo + ``` + - Uncomment the following + - ``` + %wheel ALL=(ALL) ALL + ``` + - Add a password for the user + - ``` + passwd + ``` + - Set locale: + collapsed:: true + - ``` + # echo LANG=en_US.UTF-8 > /etc/locale.conf + ``` + - Uncomment the following rows of `/etc/locale.gen`: + - ``` + #en_US.UTF-8 UTF-8 + ``` + - I've uncommented out more lines so that I can use some more language and locales. + - Generate locale: + - ``` + # locale-gen + ``` + - Set time zone: + - ``` + # ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime + ``` + - Define hosts in `/etc/hosts`: + - ``` + # + 127.0.0.1 .localdomain + ::1 localhost.localdomain localhost + ``` + - Configuring the initramfs + - Configure the creation of [initramfs](https://wiki.archlinux.org/index.php/Arch_boot_process#initramfs) by editing `/etc/mkinitcpio.conf`. Change the line `HOOKS=...` to: + - ``` + HOOKS=(base udev systemd autodetect keyboard modconf block sd-encrypt filesystems resume) + ``` + - Recreate initramfs: + - ``` + # mkinitcpio -P + ``` + - Install some more useful packages. (Apparmor and Refind package included here) + - ``` + pacman -S linux-zen-headers networkmanager dialog wpa_supplicant mtools dosfstools git xdg-utils xdg-user-dirs alsa-utils pipewire pipewire-alsa pipewire-pulse apparmor refind + ``` + - Install `REFind` as the boot loader + - ``` + # refind-install + ``` + - Edit `/boot/EFI/refind/refind.conf` and add the following entry at the bottom. More info on configuring the `REFind` bootloader on [[Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas]] Necessary parts here are the `rd.luks` and `root` parameters for the encrypted drives. + - ``` + menuentry "Arch Linux" { + icon /EFI/refind/themes/darkmini/icons/os_arch.png + volume "Arch Linux" + loader /vmlinuz-linux + initrd /initramfs-linux.img + options " rd.luks.name==luks root=/dev/mapper/luks rootflags=subvol=@ rd.luks.options==discard rw quiet lsm=lockdown,yama,apparmor,bpf quiet splash loglevel=3 systemd.show_status=auto rd.udev.log_level=3 nvidia_drm.modeset=1 amd_pstate=active acpi_enforce_resources=lax iommu=soft amd_iommu=fullflush" + } + } + ``` + - Exit the `chroot` and reboot the system. +- # Installing KDE,Yay, Timeshift and the Nvidia Drivers. +- After logging on the system, A desktop environment can then be installed along with the other drivers such as the Nvidia GPU drivers. + - For my system I installed the KDE Plasma DE + - ``` + $ sudo pacman -Syu plasma-meta + ``` + - More info on the [Arch wiki.](https://wiki.archlinux.org/title/KDE) + - Needs to install more applications such as `dolphin` for file manager + - Enable the Display Manager and Network Manager services. + - ``` + systemctl enable sddm.service + systemctl enable NetworkManager.service + ``` + - Nvidia Drivers + - Since I'm using the `linux-zen` kernel and want to use the beta drivers I first need to install `yay`, an AUR helper. + - ``` + $ sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si + ``` + - Then install the Nvidia drivers + - ``` + $ yay -S nvidia-open-beta-dkms nvidia-utils-beta + ``` + - Install `timeshift` + - ``` + $ sudo pacman -Syu timeshift + ``` +- # Enabling Secure Boot and TPM 2.0 + - Enabling Secure Boot in `rEFind` using Pre Signed Bootloader. + - Install `preloader-signed` from the `AUR` + - ``` + $ yay -Syu preloader-signed + ``` + - Run `refind-install` with some options + - ``` + # refind-install --preloader /usr/share/preloader-signed/PreLoader.efi + ``` + - After a reboot with Secure Boot enabled from the `UEFI` firmware menu, HashTool will launch and it is needed to enroll the hash of rEFInd `loader.efi` and the kernel `vmlinuz-linux-zen` + - TPM 2.0 + - Check if the system supports TPM 2.0 + - ``` + cat /sys/class/tpm/tpm0/device/description + ``` + - ``` + /sys/class/tpm/tpm0/tpm_version_major + ``` + - If the system supports it, run the following command to check if the system is configured properly (from the initramfs hooks earlier) + - ``` + systemd-cryptenroll --tpm2-device=list + ``` + - Run the following to enroll the TPM 2.0 key to our encrypted drive `/dev/nvme0n1p3` + - ``` + $ sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0,7 /dev/nvme0n1p3 + ``` + - Add the following to the bootloader entry + - ``` + rd.luks.options=tpm2-device=auto + ``` + - For more information on LUKS encryption (Adding FIDO 2 Devices as unlock key, etc) Refer to [[Enabling Yubikey Security Key unlock for LUKS Encrypted Root Partition]] + - Note for TPM 2.0 Key: If dual booting with Windows and/or messing with TPM 2.0 keys on the BIOS/UEFI, the keys can be reset/modified. This will result into the TPM 2.0 unlock key not be able to be used and during boot will be asked for the LUKS encryption passkey (VERY IMPORTANT TO SET A PASSKEY AS OUTLINED EARLIER IN THIS GUIDE and to remember this passkey, this will serve as backup). To re-enable TPM 2.0 unlock, just re-enroll the TPM 2.0 key. + - Updated on January 23, 2025 for the TPM 2.0 Note. The Dual-boot windows partition had an update and may have messed with the TPM 2.0 keys. \ No newline at end of file diff --git a/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250203-110011-BE4T4MK.md b/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250203-110011-BE4T4MK.md new file mode 100644 index 0000000..c8512dc --- /dev/null +++ b/logseq/.recycle/pages_Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.sync-conflict-20250203-110011-BE4T4MK.md @@ -0,0 +1,240 @@ +- This guide is based on this [lemmy.ml post](https://lemmy.ml/post/61254) which is also heavily based on this [blog post.](https://nerdstuff.org/posts/2020/2020-004_arch_linux_luks_btrfs_systemd-boot/) I have outlined here my steps in reinstalling my arch linux system after it had a hiccup which is time consuming to recover from and decided to nuke my system and reinstall it anew and might as well try to use BTRFS and TPM2.0 unlocking for my encrypted volumes. +- There are some problems I've encountered which deviate the steps a little from the previously said guides which maybe due to my setup. +- I've used the latest Arch Linux iso as of the writing of this guide [[Sep 22nd, 2024]] (2024.09.01 Release). I've also used Ventoy to load the iso from a usb. It has a little bit of quirk that the live environment wont boot if using normal mode and would instead need to be booted in grub2 mode. This maybe due to a bug in Ventoy. + - I was planning to migrate from ventoy sometime in the future since it's been giving me problems in booting to live environments lately and specially with the [issue](https://lemmy.ml/post/20404494) the other day. + - Considering to use a fork or `glim` +- # Base Install +- An internet connection is needed for the whole process. I used an Ethernet cable but a WiFi connection can also be used but it needs to be configured first as outlined in the [Arch Wiki.](https://wiki.archlinux.org/title/Iwd#iwctl) For other connection types, refer to the [Arch Wiki Installation page.](https://wiki.archlinux.org/title/Installation_guide#Connect_to_the_internet) +- The system clock is to be synced first + - ``` + # timedatectl set-ntp true + ``` + - My first problem occurred here. Maybe due to the ISP servers or some unknown reason, my system clock can't sync. + - Due to the clock not synced up with the servers, the installation environment can't automatically run some commands in order to sync up with their servers. This would cause some problems in the installation of packages. To resolve, the following should be run + - ``` + # pacman-key --init + # pacman-key --populate archlinux + # pacman -Sy archlinux-keyring + ``` + - The system installed after would also need its time to be synced up. I followed up the steps from the top comment of [this post.](https://www.reddit.com/r/archlinux/comments/15zgd4y/time_sync_wont_sync_help/) + - Relevant Links + - https://bbs.archlinux.org/viewtopic.php?id=292688 +- Partitioning the Disks + - For my setup I'm installing Arch on `/dev/nvme0`. + - To partition the disk, we need to work on it using `gdisk` or `fdisk`. + - ``` + # gdisk /dev/nvme0 + ``` + - Create a new partition table by selecting `o` + - ``` + Command (? for help): o + ``` + - Create an EFI partition (I chose a size of 1G to fit more kernels sometime in the future. The hex code is `EF00` for the boot partition): + - ``` + Command (? for help): n + ``` + - Create a root partition by adopting the default values. + - ``` + Command (? for help): n + ``` + - Now write the new partitions to the disk. + - ``` + Command (? for help): w + ``` + - I've also created a swap partition right before the root partition. From the guides, they're using a swap file inside the encrypted partition. I may use that in the future and will be editing this guide. As for the hex code for the swap partition, it is `8200`. +- Encrypting the Disks + - First is to create an encrypted container for the root file system. A passphrase is needed to be defined. + - ``` + # cryptsetup luksFormat /dev/sda2 + ``` + - The encrypted container is needed to be unlocked for it to be used. Same with the guides, I used `luks` as the placeholder here. + - ``` + # cryptsetup open /dev/sda2 luks + ``` +- File System Creation + - Format the EFI partition with FAT32 and give it the label `EFI` - you can choose any other label name: + collapsed:: true + - ``` + # mkfs.vfat -F32 -n EFI /dev/sda1 + ``` + - Format the root partition with Btrfs and give it the label `ROOT` - you can choose any other label name. If you didn’t open the LUKS container under the name “`luks`” you must adjust the command accordingly: + collapsed:: true + - ``` + # mkfs.btrfs -L ROOT /dev/mapper/luks + ``` + - Create and Mount Sub Volumes + collapsed:: true + - Create [sub volumes](https://wiki.archlinux.org/index.php/Btrfs#Subvolumes) for root, home, the package cache, and the entire Btrfs file system: + - ``` + # mount /dev/mapper/luks /mnt + # btrfs sub create /mnt/@ + # btrfs sub create /mnt/@home + # umount /mnt + ``` + - The guide also made a sub volume for the snapshots. I will be using `timeshift` to create snapshots so it was not needed. Maybe in the future I will use it and configure my system accordingly. + - Mount the sub volumes: + - ``` + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@ /dev/mapper/luks /mnt + # mkdir -p /mnt/{boot,home} + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@home /dev/mapper/luks /mnt/home + ``` + - Mount the EFI partition + - ``` + # mount /dev/nvme0n1p1 /mnt/boot + ``` + - Install Arch Linux (adjust this list to your needs): + - collapsed:: true + ``` + # pacstrap /mnt linux-zen linux-firmware base btrfs-progs intel-ucode vim + ``` + - I used `linux-zen` and `vim` here. The kernel lets me use `waydroid` without any new kernel modules but I must use the `dkms` version of nvidia drivers for the dgpu to work. + - Generate `/etc/fstab`: + - ``` + # genfstab -U /mnt >> /mnt/etc/fstab + ``` + - System Configuration + - `chroot` into the new system: + - ``` + # arch-chroot /mnt/ + ``` + - Set host name: + - ``` + # echo > /etc/hostname + ``` + - create a user and a password, first the root password: + - ``` + # passwd + ``` + - Create a user + - ``` + # useradd -mG wheel + ``` + - Now edit the sudoers file to give your user sudo permissions. I used `vim` as my text editor: + - ``` + # EDITOR=vim visudo + ``` + - Uncomment the following + - ``` + %wheel ALL=(ALL) ALL + ``` + - Add a password for the user + - ``` + passwd + ``` + - Set locale: + collapsed:: true + - ``` + # echo LANG=en_US.UTF-8 > /etc/locale.conf + ``` + - Uncomment the following rows of `/etc/locale.gen`: + - ``` + #en_US.UTF-8 UTF-8 + ``` + - I've uncommented out more lines so that I can use some more language and locales. + - Generate locale: + - ``` + # locale-gen + ``` + - Set time zone: + - ``` + # ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime + ``` + - Define hosts in `/etc/hosts`: + - ``` + # + 127.0.0.1 .localdomain + ::1 localhost.localdomain localhost + ``` + - Configuring the initramfs + - Configure the creation of [initramfs](https://wiki.archlinux.org/index.php/Arch_boot_process#initramfs) by editing `/etc/mkinitcpio.conf`. Change the line `HOOKS=...` to: + - ``` + HOOKS=(base udev systemd autodetect keyboard modconf block sd-encrypt filesystems resume) + ``` + - Recreate initramfs: + - ``` + # mkinitcpio -P + ``` + - Install some more useful packages. (Apparmor and Refind package included here) + - ``` + pacman -S linux-zen-headers networkmanager dialog wpa_supplicant mtools dosfstools git xdg-utils xdg-user-dirs alsa-utils pipewire pipewire-alsa pipewire-pulse apparmor refind + ``` + - Install `REFind` as the boot loader + - ``` + # refind-install + ``` + - Edit `/boot/EFI/refind/refind.conf` and add the following entry at the bottom. More info on configuring the `REFind` bootloader on [[Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas]] Necessary parts here are the `rd.luks` and `root` parameters for the encrypted drives. + - ``` + menuentry "Arch Linux" { + icon /EFI/refind/themes/darkmini/icons/os_arch.png + volume "Arch Linux" + loader /vmlinuz-linux + initrd /initramfs-linux.img + options " rd.luks.name==luks root=/dev/mapper/luks rootflags=subvol=@ rd.luks.options==discard rw quiet lsm=lockdown,yama,apparmor,bpf quiet splash loglevel=3 systemd.show_status=auto rd.udev.log_level=3 nvidia_drm.modeset=1 amd_pstate=active acpi_enforce_resources=lax iommu=soft amd_iommu=fullflush" + } + } + ``` + - Exit the `chroot` and reboot the system. +- # Installing KDE,Yay, Timeshift and the Nvidia Drivers. +- After logging on the system, A desktop environment can then be installed along with the other drivers such as the Nvidia GPU drivers. + - For my system I installed the KDE Plasma DE + - ``` + $ sudo pacman -Syu plasma-meta + ``` + - More info on the [Arch wiki.](https://wiki.archlinux.org/title/KDE) + - Needs to install more applications such as `dolphin` for file manager + - Enable the Display Manager and Network Manager services. + - ``` + systemctl enable sddm.service + systemctl enable NetworkManager.service + ``` + - Nvidia Drivers + - Since I'm using the `linux-zen` kernel and want to use the beta drivers I first need to install `yay`, an AUR helper. + - ``` + $ sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si + ``` + - Then install the Nvidia drivers + - ``` + $ yay -S nvidia-open-beta-dkms nvidia-utils-beta + ``` + - Install `timeshift` + - ``` + $ sudo pacman -Syu timeshift + ``` +- # Enabling Secure Boot and TPM 2.0 + - Enabling Secure Boot in `rEFind` using Pre Signed Bootloader. + collapsed:: true + - Install `preloader-signed` from the `AUR` + - ``` + $ yay -Syu preloader-signed + ``` + - Run `refind-install` with some options + - ``` + # refind-install --preloader /usr/share/preloader-signed/PreLoader.efi + ``` + - After a reboot with Secure Boot enabled from the `UEFI` firmware menu, HashTool will launch and it is needed to enroll the hash of rEFInd `loader.efi` and the kernel `vmlinuz-linux-zen` + - TPM 2.0 + collapsed:: true + - Check if the system supports TPM 2.0 + - ``` + cat /sys/class/tpm/tpm0/device/description + ``` + - ``` + /sys/class/tpm/tpm0/tpm_version_major + ``` + - If the system supports it, run the following command to check if the system is configured properly (from the initramfs hooks earlier) + - ``` + systemd-cryptenroll --tpm2-device=list + ``` + - Run the following to enroll the TPM 2.0 key to our encrypted drive `/dev/nvme0n1p3` + - ``` + $ sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0,7 /dev/nvme0n1p3 + ``` + - Add the following to the bootloader entry + - ``` + rd.luks.options=tpm2-device=auto + ``` + - For more information on LUKS encryption (Adding FIDO 2 Devices as unlock key, etc) Refer to [[Enabling Yubikey Security Key unlock for LUKS Encrypted Root Partition]] + - Note for TPM 2.0 Key: If dual booting with Windows and/or messing with TPM 2.0 keys on the BIOS/UEFI, the keys can be reset/modified. This will result into the TPM 2.0 unlock key not be able to be used and during boot will be asked for the LUKS encryption passkey (VERY IMPORTANT TO SET A PASSKEY AS OUTLINED EARLIER IN THIS GUIDE and to remember this passkey, this will serve as backup). To re-enable TPM 2.0 unlock, just re-enroll the TPM 2.0 key. + collapsed:: true + - Updated on January 23, 2025 for the TPM 2.0 Note. The Dual-boot windows partition had an update and may have messed with the TPM 2.0 keys. +- \ No newline at end of file diff --git a/logseq/bak/logseq/config/2024-04-15T05_03_51.682Z.Desktop.edn b/logseq/bak/logseq/config/2025-07-25T07_26_03.383Z.Desktop.edn old mode 100755 new mode 100644 similarity index 98% rename from logseq/bak/logseq/config/2024-04-15T05_03_51.682Z.Desktop.edn rename to logseq/bak/logseq/config/2025-07-25T07_26_03.383Z.Desktop.edn index 30e14a4..e0ccbaa --- a/logseq/bak/logseq/config/2024-04-15T05_03_51.682Z.Desktop.edn +++ b/logseq/bak/logseq/config/2025-07-25T07_26_03.383Z.Desktop.edn @@ -128,7 +128,8 @@ ;; If `:sidebar` remains unset, the right sidebar will stay hidden. ;; Examples: ;; 1. Set "Changelog" as the home page and display "Contents" in the right sidebar: - :default-home {:page "Changelog", :sidebar "Contents"} + :default-home {:page "Contents" + :sidebar "Contents"} ;; 2. Set "Jun 3rd, 2021" as the home page without the right sidebar: ;; :default-home {:page "Jun 3rd, 2021"} ;; 3. Set "home" as the home page and display multiple pages in the right sidebar: @@ -418,4 +419,7 @@ ;; - :triple-lowbar (default) ;; ;use triple underscore `___` for slash `/` in page title ;; ;use Percent-encoding for other invalid characters - :file/name-format :triple-lowbar} + :file/name-format :triple-lowbar + :graph/settings {:builtin-pages? true + :journal? true} + :publishing/all-pages-public? true} diff --git a/logseq/bak/logseq/config/2025-07-25T07_26_25.538Z.Desktop.edn b/logseq/bak/logseq/config/2025-07-25T07_26_25.538Z.Desktop.edn new file mode 100644 index 0000000..e0ccbaa --- /dev/null +++ b/logseq/bak/logseq/config/2025-07-25T07_26_25.538Z.Desktop.edn @@ -0,0 +1,425 @@ +{:meta/version 1 + + ;; Set the preferred format. + ;; Available options: + ;; - Markdown (default) + ;; - Org + ;; :preferred-format "Markdown" + + ;; Set the preferred workflow style. + ;; Available options: + ;; - :now for NOW/LATER style (default) + ;; - :todo for TODO/DOING style + :preferred-workflow :now + + ;; Exclude directories/files. + ;; Example usage: + ;; :hidden ["/archived" "/test.md" "../assets/archived"] + :hidden [] + + ;; Define the default journal page template. + ;; Enter the template name between the quotes. + :default-templates + {:journals ""} + + ;; Set a custom date format for the journal page title. + ;; Default value: "MMM do, yyyy" + ;; e.g., "Jan 19th, 2038" + ;; Example usage e.g., "Tue 19th, Jan 2038" + ;; :journal/page-title-format "EEE do, MMM yyyy" + + ;; Specify the journal filename format using a valid date format string. + ;; !Warning: + ;; This configuration is not retroactive and affects only new journals. + ;; To show old journal files in the app, manually rename the files in the + ;; journal directory to match the new format. + ;; Default value: "yyyy_MM_dd" + ;; :journal/file-name-format "yyyy_MM_dd" + + ;; Enable tooltip preview on hover. + ;; Default value: true + :ui/enable-tooltip? true + + ;; Display brackets [[]] around page references. + ;; Default value: true + ;; :ui/show-brackets? true + + ;; Display all lines of a block when referencing ((block)). + ;; Default value: false + :ui/show-full-blocks? false + + ;; Automatically expand block references when zooming in. + ;; Default value: true + :ui/auto-expand-block-refs? true + + ;; Enable Block timestamps. + ;; Default value: false + :feature/enable-block-timestamps? false + + ;; Disable accent marks when searching. + ;; After changing this setting, rebuild the search index by pressing (^C ^S). + ;; Default value: true + :feature/enable-search-remove-accents? true + + ;; Enable journals. + ;; Default value: true +:feature/enable-journals? false + + ;; Enable flashcards. + ;; Default value: true + ;; :feature/enable-flashcards? true + + ;; Enable whiteboards. + ;; Default value: true + ;; :feature/enable-whiteboards? true + + ;; Disable the journal's built-in 'Scheduled tasks and deadlines' query. + ;; Default value: false + ;; :feature/disable-scheduled-and-deadline-query? false + + ;; Specify the number of days displayed in the future for + ;; the 'scheduled tasks and deadlines' query. + ;; Example usage: + ;; Display all scheduled and deadline blocks for the next 14 days: + ;; :scheduled/future-days 14 + ;; Default value: 7 + ;; :scheduled/future-days 7 + + ;; Specify the first day of the week. + ;; Available options: + ;; - integer from 0 to 6 (Monday to Sunday) + ;; Default value: 6 (Sunday) + :start-of-week 6 + + ;; Specify a custom CSS import. + ;; This option takes precedence over the local `logseq/custom.css` file. + ;; Example usage: + ;; :custom-css-url "@import url('https://cdn.jsdelivr.net/gh/dracula/logseq@master/custom.css');" + + ;; Specify a custom JS import. + ;; This option takes precedence over the local `logseq/custom.js` file. + ;; Example usage: + ;; :custom-js-url "https://cdn.logseq.com/custom.js" + + ;; Set a custom Arweave gateway + ;; Default gateway: https://arweave.net + ;; :arweave/gateway "https://arweave.net" + + ;; Set bullet indentation when exporting + ;; Available options: + ;; - `:eight-spaces` as eight spaces + ;; - `:four-spaces` as four spaces + ;; - `:two-spaces` as two spaces + ;; - `:tab` as a tab character (default) + ;; :export/bullet-indentation :tab + + ;; Publish all pages within the Graph + ;; Regardless of whether individual pages have been marked as public. + ;; Default value: false + ;; :publishing/all-pages-public? false + + ;; Define the default home page and sidebar status. + ;; If unspecified, the journal page will be loaded on startup and the right sidebar will stay hidden. + ;; The `:page` value represents the name of the page displayed at startup. + ;; Available options for `:sidebar` are: + ;; - "Contents" to display the Contents page in the right sidebar. + ;; - A specific page name to display in the right sidebar. + ;; - An array of multiple pages, e.g., ["Contents" "Page A" "Page B"]. + ;; If `:sidebar` remains unset, the right sidebar will stay hidden. + ;; Examples: + ;; 1. Set "Changelog" as the home page and display "Contents" in the right sidebar: + :default-home {:page "Contents" + :sidebar "Contents"} + ;; 2. Set "Jun 3rd, 2021" as the home page without the right sidebar: + ;; :default-home {:page "Jun 3rd, 2021"} + ;; 3. Set "home" as the home page and display multiple pages in the right sidebar: + ;; :default-home {:page "home", :sidebar ["Page A" "Page B"]} + + ;; Set the default location for storing notes. + ;; Default value: "pages" + ;; :pages-directory "pages" + + ;; Set the default location for storing journals. + ;; Default value: "journals" + ;; :journals-directory "journals" + + ;; Set the default location for storing whiteboards. + ;; Default value: "whiteboards" + ;; :whiteboards-directory "whiteboards" + + ;; Enabling this option converts + ;; [[Grant Ideas]] to [[file:./grant_ideas.org][Grant Ideas]] for org-mode. + ;; For more information, visit https://github.com/logseq/logseq/issues/672 + ;; :org-mode/insert-file-link? false + + ;; Configure custom shortcuts. + ;; Syntax: + ;; 1. + indicates simultaneous key presses, e.g., `Ctrl+Shift+a`. + ;; 2. A space between keys represents key chords, e.g., `t s` means + ;; pressing `t` followed by `s`. + ;; 3. mod refers to `Ctrl` for Windows/Linux and `Command` for Mac. + ;; 4. Use false to disable a specific shortcut. + ;; 5. You can define multiple bindings for a single action, e.g., ["ctrl+j" "down"]. + ;; The full list of configurable shortcuts is available at: + ;; https://github.com/logseq/logseq/blob/master/src/main/frontend/modules/shortcut/config.cljs + ;; Example: + ;; :shortcuts + ;; {:editor/new-block "enter" + ;; :editor/new-line "shift+enter" + ;; :editor/insert-link "mod+shift+k" + ;; :editor/highlight false + ;; :ui/toggle-settings "t s" + ;; :editor/up ["ctrl+k" "up"] + ;; :editor/down ["ctrl+j" "down"] + ;; :editor/left ["ctrl+h" "left"] + ;; :editor/right ["ctrl+l" "right"]} + :shortcuts {} + + ;; Configure the behavior of pressing Enter in document mode. + ;; if set to true, pressing Enter will create a new block. + ;; Default value: false + :shortcut/doc-mode-enter-for-new-block? false + + ;; Block content larger than `block/content-max-length` will not be searchable + ;; or editable for performance. + ;; Default value: 10000 + :block/content-max-length 10000 + + ;; Display command documentation on hover. + ;; Default value: true + :ui/show-command-doc? true + + ;; Display empty bullet points. + ;; Default value: false + :ui/show-empty-bullets? false + + ;; Pre-defined :view function to use with advanced queries. + :query/views + {:pprint + (fn [r] [:pre.code (pprint r)])} + + ;; Advanced queries `:result-transform` function. + ;; Transform the query result before displaying it. + :query/result-transforms + {:sort-by-priority + (fn [result] (sort-by (fn [h] (get h :block/priority "Z")) result))} + + ;; The following queries will be displayed at the bottom of today's journal page. + ;; The "NOW" query returns tasks with "NOW" or "DOING" status. + ;; The "NEXT" query returns tasks with "NOW", "LATER", or "TODO" status. + :default-queries + {:journals + [{:title "🔨 NOW" + :query [:find (pull ?h [*]) + :in $ ?start ?today + :where + [?h :block/marker ?marker] + [(contains? #{"NOW" "DOING"} ?marker)] + [?h :block/page ?p] + [?p :block/journal? true] + [?p :block/journal-day ?d] + [(>= ?d ?start)] + [(<= ?d ?today)]] + :inputs [:14d :today] + :result-transform (fn [result] + (sort-by (fn [h] + (get h :block/priority "Z")) result)) + :group-by-page? false + :collapsed? false} + {:title "📅 NEXT" + :query [:find (pull ?h [*]) + :in $ ?start ?next + :where + [?h :block/marker ?marker] + [(contains? #{"NOW" "LATER" "TODO"} ?marker)] + [?h :block/page ?p] + [?p :block/journal? true] + [?p :block/journal-day ?d] + [(> ?d ?start)] + [(< ?d ?next)]] + :inputs [:today :7d-after] + :group-by-page? false + :collapsed? false}]} + + ;; Add custom commands to the command palette + ;; Example usage: + ;; :commands + ;; [ + ;; ["js" "Javascript"] + ;; ["md" "Markdown"] + ;; ] + :commands [] + + ;; Enable collapsing blocks with titles but no children. + ;; By default, only blocks with children can be collapsed. + ;; Setting `:outliner/block-title-collapse-enabled?` to true allows collapsing + ;; blocks with titles (multiple lines) and content. For example: + ;; - block title + ;; block content + ;; Default value: false + :outliner/block-title-collapse-enabled? false + + ;; Macros replace texts and will make you more productive. + ;; Example usage: + ;; Change the :macros value below to: + ;; {"poem" "Rose is $1, violet's $2. Life's ordered: Org assists you."} + ;; input "{{poem red,blue}}" + ;; becomes + ;; Rose is red, violet's blue. Life's ordered: Org assists you. + :macros {} + + ;; Configure the default expansion level for linked references. + ;; For example, consider the following block hierarchy: + ;; - a [[page]] (level 1) + ;; - b (level 2) + ;; - c (level 3) + ;; - d (level 4) + ;; + ;; With the default value of level 2, block b will be collapsed. + ;; If the level's value is set to 3, block c will be collapsed. + ;; Default value: 2 + :ref/default-open-blocks-level 2 + + ;; Configure the threshold for linked references before collapsing. + ;; Default value: 100 + :ref/linked-references-collapsed-threshold 50 + + ;; Graph view configuration. + ;; Example usage: + ;; :graph/settings + ;; {:orphan-pages? true ; Default value: true + ;; :builtin-pages? false ; Default value: false + ;; :excluded-pages? false ; Default value: false + ;; :journal? false} ; Default value: false + + ;; Graph view configuration. + ;; Example usage: + ;; :graph/forcesettings + ;; {:link-dist 180 ; Default value: 180 + ;; :charge-strength -600 ; Default value: -600 + ;; :charge-range 600} ; Default value: 600 + + ;; Favorites to list on the left sidebar + :favorites [] + + ;; Set flashcards interval. + ;; Expected value: + ;; - Float between 0 and 1 + ;; higher values result in faster changes to the next review interval. + ;; Default value: 0.5 + ;; :srs/learning-fraction 0.5 + + ;; Set the initial interval after the first successful review of a card. + ;; Default value: 4 + ;; :srs/initial-interval 4 + + ;; Hide specific block properties. + ;; Example usage: + ;; :block-hidden-properties #{:public :icon} + + ;; Create a page for all properties. + ;; Default value: true + :property-pages/enabled? true + + ;; Properties to exclude from having property pages + ;; Example usage: + ;; :property-pages/excludelist #{:duration :author} + + ;; By default, property value separated by commas will not be treated as + ;; page references. You can add properties to enable it. + ;; Example usage: + ;; :property/separated-by-commas #{:alias :tags} + + ;; Properties that are ignored when parsing property values for references + ;; Example usage: + ;; :ignored-page-references-keywords #{:author :website} + + ;; logbook configuration. + ;; :logbook/settings + ;; {:with-second-support? false ;limit logbook to minutes, seconds will be eliminated + ;; :enabled-in-all-blocks true ;display logbook in all blocks after timetracking + ;; :enabled-in-timestamped-blocks false ;don't display logbook at all + ;; } + + ;; Mobile photo upload configuration. + ;; :mobile/photo + ;; {:allow-editing? true + ;; :quality 80} + + ;; Mobile features options + ;; Gestures + ;; Example usage: + ;; :mobile + ;; {:gestures/disabled-in-block-with-tags ["kanban"]} + + ;; Extra CodeMirror options + ;; See https://codemirror.net/5/doc/manual.html#config for possible options + ;; Example usage: + ;; :editor/extra-codemirror-options + ;; {:lineWrapping false ; Default value: false + ;; :lineNumbers true ; Default value: true + ;; :readOnly false} ; Default value: false + + ;; Enable logical outdenting + ;; Default value: false + ;; :editor/logical-outdenting? false + + ;; Prefer pasting the file when text and a file are in the clipboard. + ;; Default value: false + ;; :editor/preferred-pasting-file? false + + ;; Quick capture templates for receiving content from other apps. + ;; Each template contains three elements {time}, {text} and {url}, which can be auto-expanded + ;; by receiving content from other apps. Note: the {} cannot be omitted. + ;; - {time}: capture time + ;; - {date}: capture date using current date format, use `[[{date}]]` to get a page reference + ;; - {text}: text that users selected before sharing. + ;; - {url}: URL or assets path for media files stored in Logseq. + ;; You can also reorder them or use only one or two of them in the template. + ;; You can also insert or format any text in the template, as shown in the following examples. + ;; :quick-capture-templates + ;; {:text "[[quick capture]] **{time}**: {text} from {url}" + ;; :media "[[quick capture]] **{time}**: {url}"} + + ;; Quick capture options. + ;; - insert-today? Insert the capture at the end of today's journal page (boolean). + ;; - redirect-page? Redirect to the quick capture page after capturing (boolean). + ;; - default-page The default page to capture to if insert-today? is false (string). + ;; :quick-capture-options + ;; {:insert-today? false ;; Default value: true + ;; :redirect-page? false ;; Default value: false + ;; :default-page "quick capture"} ;; Default page: "quick capture" + + ;; File sync options + ;; Ignore these files when syncing, regexp is supported. + ;; :file-sync/ignore-files [] + + ;; Configure the Enter key behavior for + ;; context-aware editing with DWIM (Do What I Mean). + ;; context-aware Enter key behavior implies that pressing Enter will + ;; have different outcomes based on the context. + ;; For instance, pressing Enter within a list generates a new list item, + ;; whereas pressing Enter in a block reference opens the referenced block. + ;; :dwim/settings + ;; {:admonition&src? true ;; Default value: true + ;; :markup? false ;; Default value: false + ;; :block-ref? true ;; Default value: true + ;; :page-ref? true ;; Default value: true + ;; :properties? true ;; Default value: true + ;; :list? false} ;; Default value: false + + ;; Configure the escaping method for special characters in page titles. + ;; Warning: + ;; This is a dangerous operation. To modify the setting, + ;; access the 'Filename format' setting and follow the instructions. + ;; Otherwise, You may need to manually rename all affected files and + ;; re-index them on all clients after synchronization. + ;; Incorrect handling may result in messy page titles. + ;; Available options: + ;; - :triple-lowbar (default) + ;; ;use triple underscore `___` for slash `/` in page title + ;; ;use Percent-encoding for other invalid characters + :file/name-format :triple-lowbar + :graph/settings {:builtin-pages? true + :journal? true} + :publishing/all-pages-public? true} diff --git a/logseq/bak/pages/AMD P-State EPP Scaling Driver Configuration For Ryzen Laptops/2024-07-07T12_46_27.015Z.Desktop.md b/logseq/bak/pages/AMD P-State EPP Scaling Driver Configuration For Ryzen Laptops/2024-07-07T12_46_27.015Z.Desktop.md new file mode 100644 index 0000000..fa4d836 --- /dev/null +++ b/logseq/bak/pages/AMD P-State EPP Scaling Driver Configuration For Ryzen Laptops/2024-07-07T12_46_27.015Z.Desktop.md @@ -0,0 +1,58 @@ +## Prerequisites + - Almost everything in this page may come pre-configured on newer laptops (and maybe even desktop CPUs) after installation of Arch Linux (No Sources). If not and/or you just want to manually configure the options, this page may come in handy. + Linux uses `acpi-cpufreq` or `amd-pstate` as the default scaling drivers for the CPU. As of the writing of this guide, `amd-pstate` is widely used by different distros for AMD processors. Configuring the scaling driver to use different drivers for different power states can improve power and performance efficiency as well as manage temperatures. + - [`amd_pstate` has three operation modes](https://wiki.archlinux.org/title/CPU_frequency_scaling#amd_pstate):`active`,`passive` and `guided` . From a [phoronix article testing the amd_pstate 'passive' and 'active' mode along with `acpi-freq` performance](https://www.phoronix.com/review/amd-pstate-epp-ryzen-mobile), it is evident that `active` mode implemented by `amd_pstate_epp` driver performs the best considering power consumption, cpu temperature and computing performance. ~~So far I haven't found any testing that includes the `guided` mode, as such this guide only considers the `active` mode only.~~ There are discussions on the [Phoronix forums](https://www.phoronix.com/forums/forum/hardware/processors-memory/1394900-linux-6-5-now-defaults-to-amd-p-state-active-epp-for-modern-ryzen-systems/page2) regarding the `guided` mode but there is still no definitive testing regarding its performance. + - The AMD P-state `active` mode is the default now for Ryzen Linux Systems as of [Linux 6.5](https://www.phoronix.com/news/Linux-6.5-Power-Management). + - To enable ``amd_pstate_epp`` (AMD P-state `active` mode) scaling driver for AMD Ryzen Processors, the processor needs to be from `zen 2` and newer generations. + - To check if your device is able to use the scaling driver, `cpcc` support must be checked first using `lscpu | grep cppc`. The output must show `cpcc`. If it didn't, there may be a BIOS/UEFI setting needed to be changed first. + - For more info about `amd-pstate` and `cpcc`, consult the [kernel documentation.](https://docs.kernel.org/admin-guide/pm/amd-pstate.html) + - This guide discusses how to enable `amd_pstate_epp` driver or the AMD P-state `active` mode and configure the governor and EPP hints using `auto-cpufreq` under the Arch Linux distro depending on what power source is being used. This is applicable for mobile Ryzen systems (Laptops, etc) in order to manage battery life and device temperatures. +- ## Enabling the P-State EPP Scaling Driver + - To enable the `amd_pstate_epp` driver, the kernel module parameter `amd_pstate=active` must first be added. This may be unnecessary for newer Linux kernels. + - For Arch Linux systems using the `refind` boot manager, the kernel parameter can be added on `/boot/refind_linux.conf` or `/boot/EFI/refind/refind.conf` depending on how the boot manager was [configured.](https://wiki.archlinux.org/title/REFInd#Configuration) . + - For other distros and/or boot managers, refer to their respective guides on how to change kernel parameters. + - The ``active`` mode is only available for kernel versions 6.3 and higher. + - If `guided` or `passive` is the preferred mode, just change the kernel parameter to be added into `amd_pstate=guided` or `amd_pstate=passive` respectively. + - The ``guided`` mode is only available for kernel versions 6.4 and higher. + - To verify if the `amd_pstate_epp` driver is being used, run the following command: + - ```` + cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver + ``` +- # (Currently not Used) Configuring Auto-Cpufreq to adjusts CPU governor and EPP hints automatically + - Currently using the `power-profiles-daemon` and KDE Plasma Power Profiles to automatically control the CPU power profiles. It basically works the same way but is integrated to the KDE Plasma Desktop Environment. + - ~~The [`amd_pstate_epp` scaling driver offers only two pseudo-governors](https://wiki.archlinux.org/title/CPU_frequency_scaling#Autonomous_frequency_scaling), `powersave` and `performance`. They're similar with other scaling driver governors but work differently in that these governors need EPP hint to be passed unto the CPU internal governor.~~ + - ~~To check the current scaling driver governor, the following command can be used:~~ + - ``` + cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ``` + - ~~The available EPP hints for the governors can be checked using:~~ + - ``` + cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences + ``` + - ~~Mixing and matching the governors and EPP hints can yield different results (refer to the aforementioned [Phoronix article](https://www.phoronix.com/review/amd-pstate-epp-ryzen-mobile) for benchmarks.) in performance.~~ + - ~~The program `auto-cpufreq` automatically adjusts CPU governors and frequencies and supports adjusting the EPP hints for `amd_pstate_epp` scaling driver depending on the power source. It is useful for managing and improving battery life of laptops.~~ + - ~~It can also be configured to use preferred CPU governors by making a config file `/etc/auto-cpufreq.conf`. An example and instructions on how to configure the config file is in the program's [github repo.](https://github.com/AdnanHodzic/auto-cpufreq)~~ + - ~~We only need to adjust the CPU governor and EPP hint for battery and AC power source. From the aforementioned Phoronix tests, `powersave balanced_power` and `powersave power` governor and EPP hint pairs are best suited for power consumption and cpu temperature with little impact on the computer's performance when using AC power and Battery power respectively.~~ + - ~~The following lines on the `/etc/auto-cpufreq.conf` should be changed in order to set the previous governor and EPP pairing:~~ + - ~~under the `[charger]` block the lines `governor = powersave` and `energy_performance_preference = balanced_performance` should be inserted/changed from default.~~ + - ~~under the `[battery]` block the lines `governor = powersave` and `energy_performance_preference = power` should be inserted/changed from default.~~ + - ~~To apply changes, the ``systemd`` service for `auto-cpufreq` can be restarted using:~~ + - ``` + sudo systemctl restart auto-cpufreq.service + ``` +- # Notes: + - This guide is heavily inspired by a [Lemmy.world post](https://lemmy.world/post/3081149)that discusses on how to configure the AMD P-States EPP driver. This guide though tries to organize the information from the post regarding some terms and configurations with more sources and is focused on automatically adjusting the CPU governors and the EPP hints on Ryzen Laptops. This guide is also targeted for Arch Linux Systems since I'm using one. + - Some forum discussions and guides were also consulted in creating this guide. + - https://forum.endeavouros.com/t/dont-get-amd-p-state-active/41018 + - https://forum.level1techs.com/t/amd-p-state-driver/197885/89?page=2 + - https://www.reddit.com/r/linux/comments/1aoaps4/amd_pstate_epp_amd_pstate_power_management_energy/ + - https://forum.endeavouros.com/t/how-to-use-amd-p-state-in-linux/25247/425 + - https://bbs.archlinux.org/viewtopic.php?id=292940 + - https://www.reddit.com/r/framework/comments/18b9cp8/does_framework_have_cppc_enabled_for_linux/ + - https://gitlab.com/echoa/amd-pstate-guide + - The following benchmarks deals with AMD P-state and may be useful: + - https://community.frame.work/t/responded-linux-amd-pstate-scaling-driver-benchmarks/45830 + - https://www.phoronix.com/review/amd-pstate-first + - https://www.phoronix.com/news/AMD-P-State-Guided-Auto (Not a benchmark but it talks about a benchmark performed by AMD regarding `guided` mode. + - Instead of `auto-cpufreq`, [`auto-epp`](https://github.com/jothi-prasath/auto-epp) can also be used. [`power-profiles-daemon`](https://gitlab.freedesktop.org/upower/power-profiles-daemon) can also be used for KDE and GNOME desktops. Note that they may conflict with each other and other programs such as `tlp`. For a very minimalist but harder approach, `cron` can also be used. + - `auto-cpufreq` may show the following "Warning: CPU turbo is not available" on its status. An [issue](https://github.com/AdnanHodzic/auto-cpufreq/issues/602) has already been filed in its github repo regarding it. It is a bug since turbo still works; maxing out the CPU will make it reach turbo frequencies. \ No newline at end of file diff --git a/logseq/bak/pages/AMD P-State EPP Scaling Driver Configuration For Ryzen Laptops/2024-07-07T12_47_11.559Z.Desktop.md b/logseq/bak/pages/AMD P-State EPP Scaling Driver Configuration For Ryzen Laptops/2024-07-07T12_47_11.559Z.Desktop.md new file mode 100644 index 0000000..fa4d836 --- /dev/null +++ b/logseq/bak/pages/AMD P-State EPP Scaling Driver Configuration For Ryzen Laptops/2024-07-07T12_47_11.559Z.Desktop.md @@ -0,0 +1,58 @@ +## Prerequisites + - Almost everything in this page may come pre-configured on newer laptops (and maybe even desktop CPUs) after installation of Arch Linux (No Sources). If not and/or you just want to manually configure the options, this page may come in handy. + Linux uses `acpi-cpufreq` or `amd-pstate` as the default scaling drivers for the CPU. As of the writing of this guide, `amd-pstate` is widely used by different distros for AMD processors. Configuring the scaling driver to use different drivers for different power states can improve power and performance efficiency as well as manage temperatures. + - [`amd_pstate` has three operation modes](https://wiki.archlinux.org/title/CPU_frequency_scaling#amd_pstate):`active`,`passive` and `guided` . From a [phoronix article testing the amd_pstate 'passive' and 'active' mode along with `acpi-freq` performance](https://www.phoronix.com/review/amd-pstate-epp-ryzen-mobile), it is evident that `active` mode implemented by `amd_pstate_epp` driver performs the best considering power consumption, cpu temperature and computing performance. ~~So far I haven't found any testing that includes the `guided` mode, as such this guide only considers the `active` mode only.~~ There are discussions on the [Phoronix forums](https://www.phoronix.com/forums/forum/hardware/processors-memory/1394900-linux-6-5-now-defaults-to-amd-p-state-active-epp-for-modern-ryzen-systems/page2) regarding the `guided` mode but there is still no definitive testing regarding its performance. + - The AMD P-state `active` mode is the default now for Ryzen Linux Systems as of [Linux 6.5](https://www.phoronix.com/news/Linux-6.5-Power-Management). + - To enable ``amd_pstate_epp`` (AMD P-state `active` mode) scaling driver for AMD Ryzen Processors, the processor needs to be from `zen 2` and newer generations. + - To check if your device is able to use the scaling driver, `cpcc` support must be checked first using `lscpu | grep cppc`. The output must show `cpcc`. If it didn't, there may be a BIOS/UEFI setting needed to be changed first. + - For more info about `amd-pstate` and `cpcc`, consult the [kernel documentation.](https://docs.kernel.org/admin-guide/pm/amd-pstate.html) + - This guide discusses how to enable `amd_pstate_epp` driver or the AMD P-state `active` mode and configure the governor and EPP hints using `auto-cpufreq` under the Arch Linux distro depending on what power source is being used. This is applicable for mobile Ryzen systems (Laptops, etc) in order to manage battery life and device temperatures. +- ## Enabling the P-State EPP Scaling Driver + - To enable the `amd_pstate_epp` driver, the kernel module parameter `amd_pstate=active` must first be added. This may be unnecessary for newer Linux kernels. + - For Arch Linux systems using the `refind` boot manager, the kernel parameter can be added on `/boot/refind_linux.conf` or `/boot/EFI/refind/refind.conf` depending on how the boot manager was [configured.](https://wiki.archlinux.org/title/REFInd#Configuration) . + - For other distros and/or boot managers, refer to their respective guides on how to change kernel parameters. + - The ``active`` mode is only available for kernel versions 6.3 and higher. + - If `guided` or `passive` is the preferred mode, just change the kernel parameter to be added into `amd_pstate=guided` or `amd_pstate=passive` respectively. + - The ``guided`` mode is only available for kernel versions 6.4 and higher. + - To verify if the `amd_pstate_epp` driver is being used, run the following command: + - ```` + cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver + ``` +- # (Currently not Used) Configuring Auto-Cpufreq to adjusts CPU governor and EPP hints automatically + - Currently using the `power-profiles-daemon` and KDE Plasma Power Profiles to automatically control the CPU power profiles. It basically works the same way but is integrated to the KDE Plasma Desktop Environment. + - ~~The [`amd_pstate_epp` scaling driver offers only two pseudo-governors](https://wiki.archlinux.org/title/CPU_frequency_scaling#Autonomous_frequency_scaling), `powersave` and `performance`. They're similar with other scaling driver governors but work differently in that these governors need EPP hint to be passed unto the CPU internal governor.~~ + - ~~To check the current scaling driver governor, the following command can be used:~~ + - ``` + cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ``` + - ~~The available EPP hints for the governors can be checked using:~~ + - ``` + cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences + ``` + - ~~Mixing and matching the governors and EPP hints can yield different results (refer to the aforementioned [Phoronix article](https://www.phoronix.com/review/amd-pstate-epp-ryzen-mobile) for benchmarks.) in performance.~~ + - ~~The program `auto-cpufreq` automatically adjusts CPU governors and frequencies and supports adjusting the EPP hints for `amd_pstate_epp` scaling driver depending on the power source. It is useful for managing and improving battery life of laptops.~~ + - ~~It can also be configured to use preferred CPU governors by making a config file `/etc/auto-cpufreq.conf`. An example and instructions on how to configure the config file is in the program's [github repo.](https://github.com/AdnanHodzic/auto-cpufreq)~~ + - ~~We only need to adjust the CPU governor and EPP hint for battery and AC power source. From the aforementioned Phoronix tests, `powersave balanced_power` and `powersave power` governor and EPP hint pairs are best suited for power consumption and cpu temperature with little impact on the computer's performance when using AC power and Battery power respectively.~~ + - ~~The following lines on the `/etc/auto-cpufreq.conf` should be changed in order to set the previous governor and EPP pairing:~~ + - ~~under the `[charger]` block the lines `governor = powersave` and `energy_performance_preference = balanced_performance` should be inserted/changed from default.~~ + - ~~under the `[battery]` block the lines `governor = powersave` and `energy_performance_preference = power` should be inserted/changed from default.~~ + - ~~To apply changes, the ``systemd`` service for `auto-cpufreq` can be restarted using:~~ + - ``` + sudo systemctl restart auto-cpufreq.service + ``` +- # Notes: + - This guide is heavily inspired by a [Lemmy.world post](https://lemmy.world/post/3081149)that discusses on how to configure the AMD P-States EPP driver. This guide though tries to organize the information from the post regarding some terms and configurations with more sources and is focused on automatically adjusting the CPU governors and the EPP hints on Ryzen Laptops. This guide is also targeted for Arch Linux Systems since I'm using one. + - Some forum discussions and guides were also consulted in creating this guide. + - https://forum.endeavouros.com/t/dont-get-amd-p-state-active/41018 + - https://forum.level1techs.com/t/amd-p-state-driver/197885/89?page=2 + - https://www.reddit.com/r/linux/comments/1aoaps4/amd_pstate_epp_amd_pstate_power_management_energy/ + - https://forum.endeavouros.com/t/how-to-use-amd-p-state-in-linux/25247/425 + - https://bbs.archlinux.org/viewtopic.php?id=292940 + - https://www.reddit.com/r/framework/comments/18b9cp8/does_framework_have_cppc_enabled_for_linux/ + - https://gitlab.com/echoa/amd-pstate-guide + - The following benchmarks deals with AMD P-state and may be useful: + - https://community.frame.work/t/responded-linux-amd-pstate-scaling-driver-benchmarks/45830 + - https://www.phoronix.com/review/amd-pstate-first + - https://www.phoronix.com/news/AMD-P-State-Guided-Auto (Not a benchmark but it talks about a benchmark performed by AMD regarding `guided` mode. + - Instead of `auto-cpufreq`, [`auto-epp`](https://github.com/jothi-prasath/auto-epp) can also be used. [`power-profiles-daemon`](https://gitlab.freedesktop.org/upower/power-profiles-daemon) can also be used for KDE and GNOME desktops. Note that they may conflict with each other and other programs such as `tlp`. For a very minimalist but harder approach, `cron` can also be used. + - `auto-cpufreq` may show the following "Warning: CPU turbo is not available" on its status. An [issue](https://github.com/AdnanHodzic/auto-cpufreq/issues/602) has already been filed in its github repo regarding it. It is a bug since turbo still works; maxing out the CPU will make it reach turbo frequencies. \ No newline at end of file diff --git a/logseq/bak/pages/AMD P-State EPP Scaling Driver Configuration For Ryzen Laptops/2025-07-25T07_26_30.084Z.Desktop.md b/logseq/bak/pages/AMD P-State EPP Scaling Driver Configuration For Ryzen Laptops/2025-07-25T07_26_30.084Z.Desktop.md new file mode 100644 index 0000000..fa4d836 --- /dev/null +++ b/logseq/bak/pages/AMD P-State EPP Scaling Driver Configuration For Ryzen Laptops/2025-07-25T07_26_30.084Z.Desktop.md @@ -0,0 +1,58 @@ +## Prerequisites + - Almost everything in this page may come pre-configured on newer laptops (and maybe even desktop CPUs) after installation of Arch Linux (No Sources). If not and/or you just want to manually configure the options, this page may come in handy. + Linux uses `acpi-cpufreq` or `amd-pstate` as the default scaling drivers for the CPU. As of the writing of this guide, `amd-pstate` is widely used by different distros for AMD processors. Configuring the scaling driver to use different drivers for different power states can improve power and performance efficiency as well as manage temperatures. + - [`amd_pstate` has three operation modes](https://wiki.archlinux.org/title/CPU_frequency_scaling#amd_pstate):`active`,`passive` and `guided` . From a [phoronix article testing the amd_pstate 'passive' and 'active' mode along with `acpi-freq` performance](https://www.phoronix.com/review/amd-pstate-epp-ryzen-mobile), it is evident that `active` mode implemented by `amd_pstate_epp` driver performs the best considering power consumption, cpu temperature and computing performance. ~~So far I haven't found any testing that includes the `guided` mode, as such this guide only considers the `active` mode only.~~ There are discussions on the [Phoronix forums](https://www.phoronix.com/forums/forum/hardware/processors-memory/1394900-linux-6-5-now-defaults-to-amd-p-state-active-epp-for-modern-ryzen-systems/page2) regarding the `guided` mode but there is still no definitive testing regarding its performance. + - The AMD P-state `active` mode is the default now for Ryzen Linux Systems as of [Linux 6.5](https://www.phoronix.com/news/Linux-6.5-Power-Management). + - To enable ``amd_pstate_epp`` (AMD P-state `active` mode) scaling driver for AMD Ryzen Processors, the processor needs to be from `zen 2` and newer generations. + - To check if your device is able to use the scaling driver, `cpcc` support must be checked first using `lscpu | grep cppc`. The output must show `cpcc`. If it didn't, there may be a BIOS/UEFI setting needed to be changed first. + - For more info about `amd-pstate` and `cpcc`, consult the [kernel documentation.](https://docs.kernel.org/admin-guide/pm/amd-pstate.html) + - This guide discusses how to enable `amd_pstate_epp` driver or the AMD P-state `active` mode and configure the governor and EPP hints using `auto-cpufreq` under the Arch Linux distro depending on what power source is being used. This is applicable for mobile Ryzen systems (Laptops, etc) in order to manage battery life and device temperatures. +- ## Enabling the P-State EPP Scaling Driver + - To enable the `amd_pstate_epp` driver, the kernel module parameter `amd_pstate=active` must first be added. This may be unnecessary for newer Linux kernels. + - For Arch Linux systems using the `refind` boot manager, the kernel parameter can be added on `/boot/refind_linux.conf` or `/boot/EFI/refind/refind.conf` depending on how the boot manager was [configured.](https://wiki.archlinux.org/title/REFInd#Configuration) . + - For other distros and/or boot managers, refer to their respective guides on how to change kernel parameters. + - The ``active`` mode is only available for kernel versions 6.3 and higher. + - If `guided` or `passive` is the preferred mode, just change the kernel parameter to be added into `amd_pstate=guided` or `amd_pstate=passive` respectively. + - The ``guided`` mode is only available for kernel versions 6.4 and higher. + - To verify if the `amd_pstate_epp` driver is being used, run the following command: + - ```` + cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver + ``` +- # (Currently not Used) Configuring Auto-Cpufreq to adjusts CPU governor and EPP hints automatically + - Currently using the `power-profiles-daemon` and KDE Plasma Power Profiles to automatically control the CPU power profiles. It basically works the same way but is integrated to the KDE Plasma Desktop Environment. + - ~~The [`amd_pstate_epp` scaling driver offers only two pseudo-governors](https://wiki.archlinux.org/title/CPU_frequency_scaling#Autonomous_frequency_scaling), `powersave` and `performance`. They're similar with other scaling driver governors but work differently in that these governors need EPP hint to be passed unto the CPU internal governor.~~ + - ~~To check the current scaling driver governor, the following command can be used:~~ + - ``` + cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + ``` + - ~~The available EPP hints for the governors can be checked using:~~ + - ``` + cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences + ``` + - ~~Mixing and matching the governors and EPP hints can yield different results (refer to the aforementioned [Phoronix article](https://www.phoronix.com/review/amd-pstate-epp-ryzen-mobile) for benchmarks.) in performance.~~ + - ~~The program `auto-cpufreq` automatically adjusts CPU governors and frequencies and supports adjusting the EPP hints for `amd_pstate_epp` scaling driver depending on the power source. It is useful for managing and improving battery life of laptops.~~ + - ~~It can also be configured to use preferred CPU governors by making a config file `/etc/auto-cpufreq.conf`. An example and instructions on how to configure the config file is in the program's [github repo.](https://github.com/AdnanHodzic/auto-cpufreq)~~ + - ~~We only need to adjust the CPU governor and EPP hint for battery and AC power source. From the aforementioned Phoronix tests, `powersave balanced_power` and `powersave power` governor and EPP hint pairs are best suited for power consumption and cpu temperature with little impact on the computer's performance when using AC power and Battery power respectively.~~ + - ~~The following lines on the `/etc/auto-cpufreq.conf` should be changed in order to set the previous governor and EPP pairing:~~ + - ~~under the `[charger]` block the lines `governor = powersave` and `energy_performance_preference = balanced_performance` should be inserted/changed from default.~~ + - ~~under the `[battery]` block the lines `governor = powersave` and `energy_performance_preference = power` should be inserted/changed from default.~~ + - ~~To apply changes, the ``systemd`` service for `auto-cpufreq` can be restarted using:~~ + - ``` + sudo systemctl restart auto-cpufreq.service + ``` +- # Notes: + - This guide is heavily inspired by a [Lemmy.world post](https://lemmy.world/post/3081149)that discusses on how to configure the AMD P-States EPP driver. This guide though tries to organize the information from the post regarding some terms and configurations with more sources and is focused on automatically adjusting the CPU governors and the EPP hints on Ryzen Laptops. This guide is also targeted for Arch Linux Systems since I'm using one. + - Some forum discussions and guides were also consulted in creating this guide. + - https://forum.endeavouros.com/t/dont-get-amd-p-state-active/41018 + - https://forum.level1techs.com/t/amd-p-state-driver/197885/89?page=2 + - https://www.reddit.com/r/linux/comments/1aoaps4/amd_pstate_epp_amd_pstate_power_management_energy/ + - https://forum.endeavouros.com/t/how-to-use-amd-p-state-in-linux/25247/425 + - https://bbs.archlinux.org/viewtopic.php?id=292940 + - https://www.reddit.com/r/framework/comments/18b9cp8/does_framework_have_cppc_enabled_for_linux/ + - https://gitlab.com/echoa/amd-pstate-guide + - The following benchmarks deals with AMD P-state and may be useful: + - https://community.frame.work/t/responded-linux-amd-pstate-scaling-driver-benchmarks/45830 + - https://www.phoronix.com/review/amd-pstate-first + - https://www.phoronix.com/news/AMD-P-State-Guided-Auto (Not a benchmark but it talks about a benchmark performed by AMD regarding `guided` mode. + - Instead of `auto-cpufreq`, [`auto-epp`](https://github.com/jothi-prasath/auto-epp) can also be used. [`power-profiles-daemon`](https://gitlab.freedesktop.org/upower/power-profiles-daemon) can also be used for KDE and GNOME desktops. Note that they may conflict with each other and other programs such as `tlp`. For a very minimalist but harder approach, `cron` can also be used. + - `auto-cpufreq` may show the following "Warning: CPU turbo is not available" on its status. An [issue](https://github.com/AdnanHodzic/auto-cpufreq/issues/602) has already been filed in its github repo regarding it. It is a bug since turbo still works; maxing out the CPU will make it reach turbo frequencies. \ No newline at end of file diff --git a/logseq/bak/pages/Automating RyzenAdj Limit on KDE with Password Prompt/2024-07-07T12_46_27.725Z.Desktop.md b/logseq/bak/pages/Automating RyzenAdj Limit on KDE with Password Prompt/2024-07-07T12_46_27.725Z.Desktop.md new file mode 100644 index 0000000..f41d051 --- /dev/null +++ b/logseq/bak/pages/Automating RyzenAdj Limit on KDE with Password Prompt/2024-07-07T12_46_27.725Z.Desktop.md @@ -0,0 +1,21 @@ +## RyzenAdj and Setting Power Limits + - In order to help improve battery life on Linux, `ryzenadj` can be useful to limit the power drawn by the CPU. + - Laptops automatically adjusts settings if it is plugged in or running in battery. As stated on the [RyzenAdj Github Wiki](https://github.com/FlyGoat/RyzenAdj/wiki/Renoir-Tuning-Guide), `power-saving ` or `max-performance` is automatically set depending on the power source and values vary depending on the device. + - Setting much more lower power limits may help on improving the battery life. Thus I want to set the power limit max at 10W. Essentially limiting the CPU performance drastically in exchange for battery life. A [related reddit thread](https://www.reddit.com/r/AMDLaptops/comments/11jjmmc/turned_my_6800h_into_a_6800u_using_ryzenadj/) discusses this comparing it into changing their mobile CPU into its low power equivalent. + - Setting power limits can be done on CLI using: + - `# ryzenadj --stapm-limit=10000 --fast-limit=10000 --slow-limit=10000 ` + - needing `sudo` to run + - ### To_Improve + - Possible references: + - https://www.reddit.com/r/archlinux/comments/pwpk8o/in_my_laptop_linux_has_very_bad_battery_duration/ + - +- ## Automatically setting power limit using RyzenAdj on KDE + - KDE is able to run commands or scripts when changing power profiles on System Settings > Energy Saving. + - Running commands or scripts that require `sudo` using the previous step won't prompt to enter the password. If you have a yubikey set up like from [[YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux]], the Yubikey will light up and you would be able to authenticate for `sudo`. + - In order to prompt for the password, the following bash script was used: + - ``` + #!/bin/bash + echo $(kdialog --password "sudo password required") | sudo ryzenadj --tctl-temp=75 --stapm-limit=10000 --fast-limit=10000 --slow-limit=10000 + ``` + - This [Ask Ubuntu forum post](https://askubuntu.com/questions/1067064/how-do-i-run-a-graphical-sudo-in-bash-on-kubuntu-18-04-now-that-kdesudo-is-gone) discusses how to run Graphical Sudo Prompts in KDE. This is where the bash script part to prompt `sudo` password was referenced. Note this may be outdated and not very secure. +- \ No newline at end of file diff --git a/logseq/bak/pages/Automating RyzenAdj Limit on KDE with Password Prompt/2024-07-07T12_47_12.208Z.Desktop.md b/logseq/bak/pages/Automating RyzenAdj Limit on KDE with Password Prompt/2024-07-07T12_47_12.208Z.Desktop.md new file mode 100644 index 0000000..f41d051 --- /dev/null +++ b/logseq/bak/pages/Automating RyzenAdj Limit on KDE with Password Prompt/2024-07-07T12_47_12.208Z.Desktop.md @@ -0,0 +1,21 @@ +## RyzenAdj and Setting Power Limits + - In order to help improve battery life on Linux, `ryzenadj` can be useful to limit the power drawn by the CPU. + - Laptops automatically adjusts settings if it is plugged in or running in battery. As stated on the [RyzenAdj Github Wiki](https://github.com/FlyGoat/RyzenAdj/wiki/Renoir-Tuning-Guide), `power-saving ` or `max-performance` is automatically set depending on the power source and values vary depending on the device. + - Setting much more lower power limits may help on improving the battery life. Thus I want to set the power limit max at 10W. Essentially limiting the CPU performance drastically in exchange for battery life. A [related reddit thread](https://www.reddit.com/r/AMDLaptops/comments/11jjmmc/turned_my_6800h_into_a_6800u_using_ryzenadj/) discusses this comparing it into changing their mobile CPU into its low power equivalent. + - Setting power limits can be done on CLI using: + - `# ryzenadj --stapm-limit=10000 --fast-limit=10000 --slow-limit=10000 ` + - needing `sudo` to run + - ### To_Improve + - Possible references: + - https://www.reddit.com/r/archlinux/comments/pwpk8o/in_my_laptop_linux_has_very_bad_battery_duration/ + - +- ## Automatically setting power limit using RyzenAdj on KDE + - KDE is able to run commands or scripts when changing power profiles on System Settings > Energy Saving. + - Running commands or scripts that require `sudo` using the previous step won't prompt to enter the password. If you have a yubikey set up like from [[YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux]], the Yubikey will light up and you would be able to authenticate for `sudo`. + - In order to prompt for the password, the following bash script was used: + - ``` + #!/bin/bash + echo $(kdialog --password "sudo password required") | sudo ryzenadj --tctl-temp=75 --stapm-limit=10000 --fast-limit=10000 --slow-limit=10000 + ``` + - This [Ask Ubuntu forum post](https://askubuntu.com/questions/1067064/how-do-i-run-a-graphical-sudo-in-bash-on-kubuntu-18-04-now-that-kdesudo-is-gone) discusses how to run Graphical Sudo Prompts in KDE. This is where the bash script part to prompt `sudo` password was referenced. Note this may be outdated and not very secure. +- \ No newline at end of file diff --git a/logseq/bak/pages/Automating RyzenAdj Limit on KDE with Password Prompt/2025-07-25T07_26_30.085Z.Desktop.md b/logseq/bak/pages/Automating RyzenAdj Limit on KDE with Password Prompt/2025-07-25T07_26_30.085Z.Desktop.md new file mode 100644 index 0000000..f41d051 --- /dev/null +++ b/logseq/bak/pages/Automating RyzenAdj Limit on KDE with Password Prompt/2025-07-25T07_26_30.085Z.Desktop.md @@ -0,0 +1,21 @@ +## RyzenAdj and Setting Power Limits + - In order to help improve battery life on Linux, `ryzenadj` can be useful to limit the power drawn by the CPU. + - Laptops automatically adjusts settings if it is plugged in or running in battery. As stated on the [RyzenAdj Github Wiki](https://github.com/FlyGoat/RyzenAdj/wiki/Renoir-Tuning-Guide), `power-saving ` or `max-performance` is automatically set depending on the power source and values vary depending on the device. + - Setting much more lower power limits may help on improving the battery life. Thus I want to set the power limit max at 10W. Essentially limiting the CPU performance drastically in exchange for battery life. A [related reddit thread](https://www.reddit.com/r/AMDLaptops/comments/11jjmmc/turned_my_6800h_into_a_6800u_using_ryzenadj/) discusses this comparing it into changing their mobile CPU into its low power equivalent. + - Setting power limits can be done on CLI using: + - `# ryzenadj --stapm-limit=10000 --fast-limit=10000 --slow-limit=10000 ` + - needing `sudo` to run + - ### To_Improve + - Possible references: + - https://www.reddit.com/r/archlinux/comments/pwpk8o/in_my_laptop_linux_has_very_bad_battery_duration/ + - +- ## Automatically setting power limit using RyzenAdj on KDE + - KDE is able to run commands or scripts when changing power profiles on System Settings > Energy Saving. + - Running commands or scripts that require `sudo` using the previous step won't prompt to enter the password. If you have a yubikey set up like from [[YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux]], the Yubikey will light up and you would be able to authenticate for `sudo`. + - In order to prompt for the password, the following bash script was used: + - ``` + #!/bin/bash + echo $(kdialog --password "sudo password required") | sudo ryzenadj --tctl-temp=75 --stapm-limit=10000 --fast-limit=10000 --slow-limit=10000 + ``` + - This [Ask Ubuntu forum post](https://askubuntu.com/questions/1067064/how-do-i-run-a-graphical-sudo-in-bash-on-kubuntu-18-04-now-that-kdesudo-is-gone) discusses how to run Graphical Sudo Prompts in KDE. This is where the bash script part to prompt `sudo` password was referenced. Note this may be outdated and not very secure. +- \ No newline at end of file diff --git a/logseq/bak/pages/Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas/2024-07-07T12_46_27.963Z.Desktop.md b/logseq/bak/pages/Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas/2024-07-07T12_46_27.963Z.Desktop.md new file mode 100644 index 0000000..45b50ec --- /dev/null +++ b/logseq/bak/pages/Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas/2024-07-07T12_46_27.963Z.Desktop.md @@ -0,0 +1,64 @@ +## Prerequisites + - The rEFInd Bootloader must be installed. Instructions on how to set it up along with using it with secure boot are found on the [Arch Wiki](https://wiki.archlinux.org/title/REFInd) + - A very comprehensive documentation on how to Configure rEFInd is found [here.](https://www.rodsbooks.com/refind/configfile.html) This page would only discuss on adding Boot menu entries with custom kernel parameters for my Arch Linux System and adding a theme. + - The sample configuration file for rEFInd must first be copied by using + - ``` + # cp /usr/share/refind/refind.conf-sample esp/EFI/refind/refind.conf + ``` +- ## Adding and Applying a theme + - I used the darkmini theme from this [github repo.](https://github.com/LightAir/darkmini) Other themes may be used but their instructions may differ. There are also available themes from the AUR. + - Locate the rEFInd EFI directory. Commonly it is on `/boot/EFI/refind` like in my system. To determine the directory, one may consult the output of + - ``` + mount + ``` + - Create a `themes` folder on the previously mentioned directory + - Clone the theme inside the `themes` folder. This may need `root` privileges + - ``` + git clone https://github.com/LightAir/darkmini.git + ``` + - Add one of the following lines on the rEFInd config file `/boot/EFI/refind/refind.conf` + - ``` + include themes/darkmini/theme-mini.conf + ``` + - ``` + include themes/darkmini/theme.conf + ``` + - The background image can be selected by setting the `banner` option in the theme file (From one of the previous lines). + - ``` + banner themes/darkmini/bg/ubuntu_style.png + ``` +- # Adding Custom Boot Menu Stanzas + id:: 6633b1dd-15b1-44ec-ace9-41dae827b72e + - By default, rEFInd auto detects installations and automatically add manual boot stanzas for them. For Linux systems, passing kernel options/parameters can be done on `/boot/refind_linux.conf` + - Adding Custom Boot Menu Stanzas is done on `/boot/EFI/refind/refind.conf`. The configuration file is already extensively documented within its own file. + - I use a custom boot menu stanza for my Arch Linux system. I first disabled the automatic scan by rEFInd by removing the `internal` option in the `scanfor` line. Be careful when doing this since if the custom boot menu stanza doesn't work (wrong options in the config file, etc) you wouldn't be able to boot easily into the system in rEFInd. You would need some other way to boot into the system or to edit the `refind.conf` file. + - My current custom boot menu stanza is: + - ``` + menuentry "Arch Linux" { + icon /EFI/refind/themes/darkmini/icons/os_arch.png + volume "Arch Linux" + loader /vmlinuz-linux + initrd /initramfs-linux.img + options "cryptdevice=PARTUUID=367c4973-3dd4-ed4c-ad44-d9990213dfc9:luksdev resume=UUID=da08223c-a742-4a82-9275-f02ec2703bba root=/dev/mapper/luksdev zswap.enabled=0 rw rootfstype=ext4 quiet splash loglevel=3 systemd.show_status=auto rd.udev.log_level=3 nvidia_drm.modeset=1 amd_pstate=active acpi_enforce_resources=lax iommu=soft amd_iommu=fullflush" + submenuentry "Boot to single-user mode" { + options "cryptdevice=PARTUUID=367c4973-3dd4-ed4c-ad44-d9990213dfc9:luksdev root=/dev/mapper/luksdev zswap.enabled=0 rw rootfstype=ext4 single" + } + submenuentry "Boot with minimal options" { + options "ro root=/dev/mapper/luksdev" + } + submenuentry "Integrated GPU mode" { + add_options "supergfxd.mode=Integrated" + } + submenuentry "Hybrid GPU mode" { + add_options "supergfxd.mode=Hybrid" + } + } + ``` + - The two last submenu's are for GPU switching modes by `supergfxcontrol`. Refer to [[Using supergfxcontrol for GPU mode switching at boot]] on how to set up `supergfxcontrol` in KDE Arch Linux. +- # Notes + - Depending on how the bootloader partition/s are in the system, directories for this guide may vary. Refer to the [Arch Wiki](https://wiki.archlinux.org/title/REFInd) for more info +- # Relevant Sites + - https://bbs.archlinux.org/viewtopic.php?id=258468 + - https://github.com/evanpurkhiser/rEFInd-minimal + - + - \ No newline at end of file diff --git a/logseq/bak/pages/Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas/2024-07-07T12_47_12.439Z.Desktop.md b/logseq/bak/pages/Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas/2024-07-07T12_47_12.439Z.Desktop.md new file mode 100644 index 0000000..45b50ec --- /dev/null +++ b/logseq/bak/pages/Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas/2024-07-07T12_47_12.439Z.Desktop.md @@ -0,0 +1,64 @@ +## Prerequisites + - The rEFInd Bootloader must be installed. Instructions on how to set it up along with using it with secure boot are found on the [Arch Wiki](https://wiki.archlinux.org/title/REFInd) + - A very comprehensive documentation on how to Configure rEFInd is found [here.](https://www.rodsbooks.com/refind/configfile.html) This page would only discuss on adding Boot menu entries with custom kernel parameters for my Arch Linux System and adding a theme. + - The sample configuration file for rEFInd must first be copied by using + - ``` + # cp /usr/share/refind/refind.conf-sample esp/EFI/refind/refind.conf + ``` +- ## Adding and Applying a theme + - I used the darkmini theme from this [github repo.](https://github.com/LightAir/darkmini) Other themes may be used but their instructions may differ. There are also available themes from the AUR. + - Locate the rEFInd EFI directory. Commonly it is on `/boot/EFI/refind` like in my system. To determine the directory, one may consult the output of + - ``` + mount + ``` + - Create a `themes` folder on the previously mentioned directory + - Clone the theme inside the `themes` folder. This may need `root` privileges + - ``` + git clone https://github.com/LightAir/darkmini.git + ``` + - Add one of the following lines on the rEFInd config file `/boot/EFI/refind/refind.conf` + - ``` + include themes/darkmini/theme-mini.conf + ``` + - ``` + include themes/darkmini/theme.conf + ``` + - The background image can be selected by setting the `banner` option in the theme file (From one of the previous lines). + - ``` + banner themes/darkmini/bg/ubuntu_style.png + ``` +- # Adding Custom Boot Menu Stanzas + id:: 6633b1dd-15b1-44ec-ace9-41dae827b72e + - By default, rEFInd auto detects installations and automatically add manual boot stanzas for them. For Linux systems, passing kernel options/parameters can be done on `/boot/refind_linux.conf` + - Adding Custom Boot Menu Stanzas is done on `/boot/EFI/refind/refind.conf`. The configuration file is already extensively documented within its own file. + - I use a custom boot menu stanza for my Arch Linux system. I first disabled the automatic scan by rEFInd by removing the `internal` option in the `scanfor` line. Be careful when doing this since if the custom boot menu stanza doesn't work (wrong options in the config file, etc) you wouldn't be able to boot easily into the system in rEFInd. You would need some other way to boot into the system or to edit the `refind.conf` file. + - My current custom boot menu stanza is: + - ``` + menuentry "Arch Linux" { + icon /EFI/refind/themes/darkmini/icons/os_arch.png + volume "Arch Linux" + loader /vmlinuz-linux + initrd /initramfs-linux.img + options "cryptdevice=PARTUUID=367c4973-3dd4-ed4c-ad44-d9990213dfc9:luksdev resume=UUID=da08223c-a742-4a82-9275-f02ec2703bba root=/dev/mapper/luksdev zswap.enabled=0 rw rootfstype=ext4 quiet splash loglevel=3 systemd.show_status=auto rd.udev.log_level=3 nvidia_drm.modeset=1 amd_pstate=active acpi_enforce_resources=lax iommu=soft amd_iommu=fullflush" + submenuentry "Boot to single-user mode" { + options "cryptdevice=PARTUUID=367c4973-3dd4-ed4c-ad44-d9990213dfc9:luksdev root=/dev/mapper/luksdev zswap.enabled=0 rw rootfstype=ext4 single" + } + submenuentry "Boot with minimal options" { + options "ro root=/dev/mapper/luksdev" + } + submenuentry "Integrated GPU mode" { + add_options "supergfxd.mode=Integrated" + } + submenuentry "Hybrid GPU mode" { + add_options "supergfxd.mode=Hybrid" + } + } + ``` + - The two last submenu's are for GPU switching modes by `supergfxcontrol`. Refer to [[Using supergfxcontrol for GPU mode switching at boot]] on how to set up `supergfxcontrol` in KDE Arch Linux. +- # Notes + - Depending on how the bootloader partition/s are in the system, directories for this guide may vary. Refer to the [Arch Wiki](https://wiki.archlinux.org/title/REFInd) for more info +- # Relevant Sites + - https://bbs.archlinux.org/viewtopic.php?id=258468 + - https://github.com/evanpurkhiser/rEFInd-minimal + - + - \ No newline at end of file diff --git a/logseq/bak/pages/Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas/2025-07-25T07_26_30.620Z.Desktop.md b/logseq/bak/pages/Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas/2025-07-25T07_26_30.620Z.Desktop.md new file mode 100644 index 0000000..45b50ec --- /dev/null +++ b/logseq/bak/pages/Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas/2025-07-25T07_26_30.620Z.Desktop.md @@ -0,0 +1,64 @@ +## Prerequisites + - The rEFInd Bootloader must be installed. Instructions on how to set it up along with using it with secure boot are found on the [Arch Wiki](https://wiki.archlinux.org/title/REFInd) + - A very comprehensive documentation on how to Configure rEFInd is found [here.](https://www.rodsbooks.com/refind/configfile.html) This page would only discuss on adding Boot menu entries with custom kernel parameters for my Arch Linux System and adding a theme. + - The sample configuration file for rEFInd must first be copied by using + - ``` + # cp /usr/share/refind/refind.conf-sample esp/EFI/refind/refind.conf + ``` +- ## Adding and Applying a theme + - I used the darkmini theme from this [github repo.](https://github.com/LightAir/darkmini) Other themes may be used but their instructions may differ. There are also available themes from the AUR. + - Locate the rEFInd EFI directory. Commonly it is on `/boot/EFI/refind` like in my system. To determine the directory, one may consult the output of + - ``` + mount + ``` + - Create a `themes` folder on the previously mentioned directory + - Clone the theme inside the `themes` folder. This may need `root` privileges + - ``` + git clone https://github.com/LightAir/darkmini.git + ``` + - Add one of the following lines on the rEFInd config file `/boot/EFI/refind/refind.conf` + - ``` + include themes/darkmini/theme-mini.conf + ``` + - ``` + include themes/darkmini/theme.conf + ``` + - The background image can be selected by setting the `banner` option in the theme file (From one of the previous lines). + - ``` + banner themes/darkmini/bg/ubuntu_style.png + ``` +- # Adding Custom Boot Menu Stanzas + id:: 6633b1dd-15b1-44ec-ace9-41dae827b72e + - By default, rEFInd auto detects installations and automatically add manual boot stanzas for them. For Linux systems, passing kernel options/parameters can be done on `/boot/refind_linux.conf` + - Adding Custom Boot Menu Stanzas is done on `/boot/EFI/refind/refind.conf`. The configuration file is already extensively documented within its own file. + - I use a custom boot menu stanza for my Arch Linux system. I first disabled the automatic scan by rEFInd by removing the `internal` option in the `scanfor` line. Be careful when doing this since if the custom boot menu stanza doesn't work (wrong options in the config file, etc) you wouldn't be able to boot easily into the system in rEFInd. You would need some other way to boot into the system or to edit the `refind.conf` file. + - My current custom boot menu stanza is: + - ``` + menuentry "Arch Linux" { + icon /EFI/refind/themes/darkmini/icons/os_arch.png + volume "Arch Linux" + loader /vmlinuz-linux + initrd /initramfs-linux.img + options "cryptdevice=PARTUUID=367c4973-3dd4-ed4c-ad44-d9990213dfc9:luksdev resume=UUID=da08223c-a742-4a82-9275-f02ec2703bba root=/dev/mapper/luksdev zswap.enabled=0 rw rootfstype=ext4 quiet splash loglevel=3 systemd.show_status=auto rd.udev.log_level=3 nvidia_drm.modeset=1 amd_pstate=active acpi_enforce_resources=lax iommu=soft amd_iommu=fullflush" + submenuentry "Boot to single-user mode" { + options "cryptdevice=PARTUUID=367c4973-3dd4-ed4c-ad44-d9990213dfc9:luksdev root=/dev/mapper/luksdev zswap.enabled=0 rw rootfstype=ext4 single" + } + submenuentry "Boot with minimal options" { + options "ro root=/dev/mapper/luksdev" + } + submenuentry "Integrated GPU mode" { + add_options "supergfxd.mode=Integrated" + } + submenuentry "Hybrid GPU mode" { + add_options "supergfxd.mode=Hybrid" + } + } + ``` + - The two last submenu's are for GPU switching modes by `supergfxcontrol`. Refer to [[Using supergfxcontrol for GPU mode switching at boot]] on how to set up `supergfxcontrol` in KDE Arch Linux. +- # Notes + - Depending on how the bootloader partition/s are in the system, directories for this guide may vary. Refer to the [Arch Wiki](https://wiki.archlinux.org/title/REFInd) for more info +- # Relevant Sites + - https://bbs.archlinux.org/viewtopic.php?id=258468 + - https://github.com/evanpurkhiser/rEFInd-minimal + - + - \ No newline at end of file diff --git a/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-04-16T02_24_31.746Z.android.md b/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-07-07T12_46_28.266Z.Desktop.md old mode 100755 new mode 100644 similarity index 74% rename from logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-04-16T02_24_31.746Z.android.md rename to logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-07-07T12_46_28.266Z.Desktop.md index d35849a..eba2665 --- a/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-04-16T02_24_31.746Z.android.md +++ b/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-07-07T12_46_28.266Z.Desktop.md @@ -1,12 +1,15 @@ -# Prerequisites +## Prerequisites - External Monitor Brightness are not controllable from within the desktop GUI without 3rd-party programs. - Information for controlling the display brightness (and other options) from within Linux is documented by [this article](https://wiki.archlinux.org/title/backlight) from the Archlinux Wiki. - `ddcutil` is a cli program used to query and set those settings. `ddcui` is a graphical user interface for ddcutil and is [available on the AUR.](https://aur.archlinux.org/packages/ddcui) -- # Plasmoid: KDE Plasma Widget for external monitor brightness adjustment +- ## Plasmoid: KDE Plasma Widget for external monitor brightness adjustment - A KDE Plasma widget is available as an interface for `ddcutil`. It can be found on this [repo.](https://github.com/davidhi7/ddcci-plasmoid) A detailed instruction is found from within the README of the repo. This page will discuss only the specific steps performed for my specific machine. - - `ddcutil` is a required dependency for this widget to run. + - `ddcutil` is a required dependency for this widget to run. Other dependencies are found on the repo. `ddcui` is an optional program to be able to control more settings for the external monitors using a gui as this widget only controls the brightness. - As of [[Apr 16th, 2024]], my system is running KDE Plasma 6 under Arch Linux. The widget is already updated to be compatible for Plasma 6 and thus following the instructions from the repo is a breeze. - Specific steps followed for my own system: - `pip` on Archlinux does not allow global packages installation and thus `pipx` was used. - `$ pipx install ddcci-plasmoid-backend` - - This also necessitates changing the `Backend executable command` option from within the widget setting (after displaying the widget on the KDE desktop) from the default into ``~/.local/bin/ddcci_plasmoid_backend`` \ No newline at end of file + - This also necessitates changing the `Backend executable command` option from within the widget setting (after displaying the widget on the KDE desktop) from the default into ``~/.local/bin/ddcci_plasmoid_backend`` +- ## VDU Control (To be implemented later) + - WIP + - https://github.com/digitaltrails/vdu_controls \ No newline at end of file diff --git a/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-04-16T02_24_13.688Z.android.md b/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-07-07T12_47_12.942Z.Desktop.md old mode 100755 new mode 100644 similarity index 67% rename from logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-04-16T02_24_13.688Z.android.md rename to logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-07-07T12_47_12.942Z.Desktop.md index b766551..eba2665 --- a/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-04-16T02_24_13.688Z.android.md +++ b/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-07-07T12_47_12.942Z.Desktop.md @@ -1,13 +1,15 @@ -- WIP -- https://github.com/davidhi7/ddcci-plasmoid -- # Prerequisites +## Prerequisites - External Monitor Brightness are not controllable from within the desktop GUI without 3rd-party programs. - Information for controlling the display brightness (and other options) from within Linux is documented by [this article](https://wiki.archlinux.org/title/backlight) from the Archlinux Wiki. - `ddcutil` is a cli program used to query and set those settings. `ddcui` is a graphical user interface for ddcutil and is [available on the AUR.](https://aur.archlinux.org/packages/ddcui) -- # Plasmoid: KDE Plasma Widget for external monitor brightness adjustment +- ## Plasmoid: KDE Plasma Widget for external monitor brightness adjustment - A KDE Plasma widget is available as an interface for `ddcutil`. It can be found on this [repo.](https://github.com/davidhi7/ddcci-plasmoid) A detailed instruction is found from within the README of the repo. This page will discuss only the specific steps performed for my specific machine. + - `ddcutil` is a required dependency for this widget to run. Other dependencies are found on the repo. `ddcui` is an optional program to be able to control more settings for the external monitors using a gui as this widget only controls the brightness. - As of [[Apr 16th, 2024]], my system is running KDE Plasma 6 under Arch Linux. The widget is already updated to be compatible for Plasma 6 and thus following the instructions from the repo is a breeze. - Specific steps followed for my own system: - `pip` on Archlinux does not allow global packages installation and thus `pipx` was used. - `$ pipx install ddcci-plasmoid-backend` - - This also necessitates changing the `Backend executable command` option from within the widget setting (after ) \ No newline at end of file + - This also necessitates changing the `Backend executable command` option from within the widget setting (after displaying the widget on the KDE desktop) from the default into ``~/.local/bin/ddcci_plasmoid_backend`` +- ## VDU Control (To be implemented later) + - WIP + - https://github.com/digitaltrails/vdu_controls \ No newline at end of file diff --git a/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-04-16T02_23_03.466Z.android.md b/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2025-07-25T07_26_30.083Z.Desktop.md old mode 100755 new mode 100644 similarity index 63% rename from logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-04-16T02_23_03.466Z.android.md rename to logseq/bak/pages/Controlling external monitor options using DDC in KDE/2025-07-25T07_26_30.083Z.Desktop.md index ea6abbf..eba2665 --- a/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2024-04-16T02_23_03.466Z.android.md +++ b/logseq/bak/pages/Controlling external monitor options using DDC in KDE/2025-07-25T07_26_30.083Z.Desktop.md @@ -1,13 +1,15 @@ -- WIP -- https://github.com/davidhi7/ddcci-plasmoid -- # Prerequisites +## Prerequisites - External Monitor Brightness are not controllable from within the desktop GUI without 3rd-party programs. - Information for controlling the display brightness (and other options) from within Linux is documented by [this article](https://wiki.archlinux.org/title/backlight) from the Archlinux Wiki. - `ddcutil` is a cli program used to query and set those settings. `ddcui` is a graphical user interface for ddcutil and is [available on the AUR.](https://aur.archlinux.org/packages/ddcui) -- # Plasmoid: KDE Plasma Widget for external monitor brightness adjustment +- ## Plasmoid: KDE Plasma Widget for external monitor brightness adjustment - A KDE Plasma widget is available as an interface for `ddcutil`. It can be found on this [repo.](https://github.com/davidhi7/ddcci-plasmoid) A detailed instruction is found from within the README of the repo. This page will discuss only the specific steps performed for my specific machine. + - `ddcutil` is a required dependency for this widget to run. Other dependencies are found on the repo. `ddcui` is an optional program to be able to control more settings for the external monitors using a gui as this widget only controls the brightness. - As of [[Apr 16th, 2024]], my system is running KDE Plasma 6 under Arch Linux. The widget is already updated to be compatible for Plasma 6 and thus following the instructions from the repo is a breeze. - Specific steps followed for my own system: - `pip` on Archlinux does not allow global packages installation and thus `pipx` was used. - `$ pipx install ddcci-plasmoid-backend` - - \ No newline at end of file + - This also necessitates changing the `Backend executable command` option from within the widget setting (after displaying the widget on the KDE desktop) from the default into ``~/.local/bin/ddcci_plasmoid_backend`` +- ## VDU Control (To be implemented later) + - WIP + - https://github.com/digitaltrails/vdu_controls \ No newline at end of file diff --git a/logseq/bak/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key/2024-04-16T06_14_58.469Z.android.md b/logseq/bak/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key/2025-07-25T07_26_03.389Z.Desktop.md old mode 100755 new mode 100644 similarity index 63% rename from logseq/bak/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key/2024-04-16T06_14_58.469Z.android.md rename to logseq/bak/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key/2025-07-25T07_26_03.389Z.Desktop.md index 8569adb..d49f5e3 --- a/logseq/bak/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key/2024-04-16T06_14_58.469Z.android.md +++ b/logseq/bak/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key/2025-07-25T07_26_03.389Z.Desktop.md @@ -1,23 +1,29 @@ - {{renderer :tocgen2}} -- [[#red]]==**Note: Copied From an .md file written on November 8,2023**== +- Note: Copied From an .md file written on November 8,2023 + background-color:: red - Note: The machine that is used here is running archlinux and is using yay as a third party package manager to be able to download AUR packages conviniently. -- $ yay -S libfido2 pam-u2f yubico-authenticator-bin +- ``` + $ yay -S libfido2 pam-u2f yubico-authenticator-bin + ``` - Add the key + id:: 661dd702-b5fa-4e99-8259-534692b87edf ``` - $ mkdir ~/.config/Yubico + $ mkdir ~/.config/Yubico $ pamu2fcfg -o pam://hostname -i pam://hostname > ~/.config/Yubico/u2f_keys ``` `hostname` should be changed. - ## For sudo + id:: 661dd702-e1c2-4803-9b49-7ff141bd8e72 - Add the following line to `/etc/pam.d/sudo` as the first line. + id:: 661dd702-6034-4cc7-bea7-265c1ab9385e ``` auth sufficient pam_u2f.so cue origin=pam://hostname appid=pam://hostname ``` - `hostname`` should be changed. + `hostname` should be changed. Also `sufficient` there indicates that the following authentication is sufficient to be used. If 2FA is desired, where the key and a password is required, changing it to `required` is necessary. This would make the security key as one of the ways to run sudo. There is still the password fallback. To remove the fallback, comment out the following line from the file @@ -39,17 +45,19 @@ `hostname` should be changed accordingly. The cue at the end of the line gives a prompt to touch the device to unlock. - This would still require the password. Changing `required` into `sufficient` from the line and moving it as the first line in the `auth` parts would make the hardware key as sufficient unlocking tool with the password as fallback. The problem with this is that upon loggin in, Gnome Keyring would then ask for the password phrase. To remove it, change the Gnome Keyring password into blank. It can be done using `seahorse` (installable using the package manager). This theoretically makes your password and data less secure. My root and home partitions are encrypted though and for my use case I prefer a little bit of convenience over security. In the future, I will be dabbling in using the key to also unlock Gnome Keyring. + This would still require the password. Changing `required` into `sufficient` from the line and moving it as the first line in the `auth` parts would make the hardware key as sufficient unlocking tool with the password as fallback. The problem with this is that upon loggin in, Gnome Keyring would then ask for the password phrase. To remove it, change the Gnome Keyring password into blank. It can be done using `seahorse` (installable using the package manager). This theoretically makes your password and data less secure. My root and home partitions are encrypted though and for my use case I prefer a little bit of convenience over security. ~~In the future, I will be dabbling in using the key to also unlock Gnome Keyring.~~ This is difficult and there have been discussions to implement this within Gnome Keyring itself. There's also an [old implementation](https://github.com/recolic/gnome-keyring-yubikey-unlock) but has since been abandoned and nonfunctional. I've since then moved to KDE Plasma 6 and steps to implement a Yubikey authentication for it is outlined in [[YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux]]. Relevant Links: https://221b.uk/gnome-login-using-u2f-security-tokens https://askubuntu.com/questions/1167691/passwordless-login-with-yubikey-5-nfc - - https://github.com/recolic/gnome-keyring-yubikey-unlock - ## For Browsers - Open the Yubico Authenticator Program with the key inserted on the device. Add a PIN to be assigned to the key. The key is now usable for websites that supports it. +- # Notes + id:: 661df029-bbd1-4f3e-bf00-005aa8c2dc69 + - `nouserok` flag of `pam_u2f` : Set to enable authentication attempts to succeed even if the user trying to authenticate is not found inside authfile or if authfile is + missing/malformed. From: https://developers.yubico.com/pam-u2f/Manuals/pam_u2f.8.html - ## Relevant Links: https://wiki.archlinux.org/title/Universal_2nd_Factor diff --git a/logseq/bak/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key/2025-07-25T07_26_25.538Z.Desktop.md b/logseq/bak/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key/2025-07-25T07_26_25.538Z.Desktop.md new file mode 100644 index 0000000..d49f5e3 --- /dev/null +++ b/logseq/bak/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key/2025-07-25T07_26_25.538Z.Desktop.md @@ -0,0 +1,65 @@ +- {{renderer :tocgen2}} +- Note: Copied From an .md file written on November 8,2023 + background-color:: red +- Note: The machine that is used here is running archlinux and is using yay as a third party package manager to be able to download AUR packages conviniently. +- ``` + $ yay -S libfido2 pam-u2f yubico-authenticator-bin + ``` +- Add the key + id:: 661dd702-b5fa-4e99-8259-534692b87edf + + ``` + $ mkdir ~/.config/Yubico + $ pamu2fcfg -o pam://hostname -i pam://hostname > ~/.config/Yubico/u2f_keys + ``` + + `hostname` should be changed. +- ## For sudo + id:: 661dd702-e1c2-4803-9b49-7ff141bd8e72 + - Add the following line to `/etc/pam.d/sudo` as the first line. + id:: 661dd702-6034-4cc7-bea7-265c1ab9385e + + ``` + auth sufficient pam_u2f.so cue origin=pam://hostname appid=pam://hostname + ``` + + `hostname` should be changed. Also `sufficient` there indicates that the following authentication is sufficient to be used. If 2FA is desired, where the key and a password is required, changing it to `required` is necessary. + + This would make the security key as one of the ways to run sudo. There is still the password fallback. To remove the fallback, comment out the following line from the file + + ``` + auth include system-auth` + ``` + + into + + ``` + #auth include system-auth + ``` +- ## For GDM + - Add the following line to `/etc/pam.d/gdm-password` after the existing `auth` lines + + ``` + auth required pam_u2f.so nouserok origin=pam://hostname appid=pam://hostname cue + ``` + + `hostname` should be changed accordingly. The cue at the end of the line gives a prompt to touch the device to unlock. + + This would still require the password. Changing `required` into `sufficient` from the line and moving it as the first line in the `auth` parts would make the hardware key as sufficient unlocking tool with the password as fallback. The problem with this is that upon loggin in, Gnome Keyring would then ask for the password phrase. To remove it, change the Gnome Keyring password into blank. It can be done using `seahorse` (installable using the package manager). This theoretically makes your password and data less secure. My root and home partitions are encrypted though and for my use case I prefer a little bit of convenience over security. ~~In the future, I will be dabbling in using the key to also unlock Gnome Keyring.~~ This is difficult and there have been discussions to implement this within Gnome Keyring itself. There's also an [old implementation](https://github.com/recolic/gnome-keyring-yubikey-unlock) but has since been abandoned and nonfunctional. I've since then moved to KDE Plasma 6 and steps to implement a Yubikey authentication for it is outlined in [[YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux]]. + + + + Relevant Links: https://221b.uk/gnome-login-using-u2f-security-tokens + + https://askubuntu.com/questions/1167691/passwordless-login-with-yubikey-5-nfc +- ## For Browsers + - Open the Yubico Authenticator Program with the key inserted on the device. Add a PIN to be assigned to the key. The key is now usable for websites that supports it. +- # Notes + id:: 661df029-bbd1-4f3e-bf00-005aa8c2dc69 + - `nouserok` flag of `pam_u2f` : Set to enable authentication attempts to succeed even if the user trying to authenticate is not found inside authfile or if authfile is + missing/malformed. From: https://developers.yubico.com/pam-u2f/Manuals/pam_u2f.8.html +- ## Relevant Links: + + https://wiki.archlinux.org/title/Universal_2nd_Factor + + https://www.reddit.com/r/Fedora/comments/akck9m/authenticating_with_gdm_and_sudo_with_a_u2f/ \ No newline at end of file diff --git a/logseq/bak/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux/2024-07-07T12_46_28.470Z.Desktop.md b/logseq/bak/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux/2024-07-07T12_46_28.470Z.Desktop.md new file mode 100644 index 0000000..f15742a --- /dev/null +++ b/logseq/bak/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux/2024-07-07T12_46_28.470Z.Desktop.md @@ -0,0 +1,14 @@ +- Checking for Dynamic VRAM and BAR values within linux using + - Following ways + - ``` + lspci -v | grep -i 'memory at' + ``` + - ``` + sudo dmesg | grep BAR + ``` + - and within Ryzen Controller + - yields values that would correspond to the system not having ReBAR or Dynamic RAM. When checking with windows (through ryzen controller) the system uses dynamic vram. + - +- I tried to enable the ReBAR and 4G decoding options from the bios. Since the Advanced Settings are inaccessible from the F.19RevA BIOS version, I used Smokeless_UMAF from [[Advanced BIOS Settings for HP Victus 16]] to access options supposedly only accessed from the advanced settings. +- From a [kolAhilft.de Article](https://kolahilft.de/2023/09/vram-and-memory-for-integrated-graphics-with-linux/) , Linux works in a way (through its drivers) such that it allocates memory to the igpu according to the amount of RAM available. This does not cover the dedicated gpu and I still have no idea if ReBAR is working for the dGPU for the HP Victus 16. +- \ No newline at end of file diff --git a/logseq/bak/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux/2024-07-07T12_47_13.154Z.Desktop.md b/logseq/bak/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux/2024-07-07T12_47_13.154Z.Desktop.md new file mode 100644 index 0000000..f15742a --- /dev/null +++ b/logseq/bak/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux/2024-07-07T12_47_13.154Z.Desktop.md @@ -0,0 +1,14 @@ +- Checking for Dynamic VRAM and BAR values within linux using + - Following ways + - ``` + lspci -v | grep -i 'memory at' + ``` + - ``` + sudo dmesg | grep BAR + ``` + - and within Ryzen Controller + - yields values that would correspond to the system not having ReBAR or Dynamic RAM. When checking with windows (through ryzen controller) the system uses dynamic vram. + - +- I tried to enable the ReBAR and 4G decoding options from the bios. Since the Advanced Settings are inaccessible from the F.19RevA BIOS version, I used Smokeless_UMAF from [[Advanced BIOS Settings for HP Victus 16]] to access options supposedly only accessed from the advanced settings. +- From a [kolAhilft.de Article](https://kolahilft.de/2023/09/vram-and-memory-for-integrated-graphics-with-linux/) , Linux works in a way (through its drivers) such that it allocates memory to the igpu according to the amount of RAM available. This does not cover the dedicated gpu and I still have no idea if ReBAR is working for the dGPU for the HP Victus 16. +- \ No newline at end of file diff --git a/logseq/bak/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux/2025-07-25T07_26_30.085Z.Desktop.md b/logseq/bak/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux/2025-07-25T07_26_30.085Z.Desktop.md new file mode 100644 index 0000000..f15742a --- /dev/null +++ b/logseq/bak/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux/2025-07-25T07_26_30.085Z.Desktop.md @@ -0,0 +1,14 @@ +- Checking for Dynamic VRAM and BAR values within linux using + - Following ways + - ``` + lspci -v | grep -i 'memory at' + ``` + - ``` + sudo dmesg | grep BAR + ``` + - and within Ryzen Controller + - yields values that would correspond to the system not having ReBAR or Dynamic RAM. When checking with windows (through ryzen controller) the system uses dynamic vram. + - +- I tried to enable the ReBAR and 4G decoding options from the bios. Since the Advanced Settings are inaccessible from the F.19RevA BIOS version, I used Smokeless_UMAF from [[Advanced BIOS Settings for HP Victus 16]] to access options supposedly only accessed from the advanced settings. +- From a [kolAhilft.de Article](https://kolahilft.de/2023/09/vram-and-memory-for-integrated-graphics-with-linux/) , Linux works in a way (through its drivers) such that it allocates memory to the igpu according to the amount of RAM available. This does not cover the dedicated gpu and I still have no idea if ReBAR is working for the dGPU for the HP Victus 16. +- \ No newline at end of file diff --git a/logseq/bak/pages/Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd/2025-02-06T05_03_51.697Z.Desktop.md b/logseq/bak/pages/Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd/2025-02-06T05_03_51.697Z.Desktop.md new file mode 100644 index 0000000..2478133 --- /dev/null +++ b/logseq/bak/pages/Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd/2025-02-06T05_03_51.697Z.Desktop.md @@ -0,0 +1,236 @@ +- This guide is based on this [lemmy.ml post](https://lemmy.ml/post/61254) which is also heavily based on this [blog post.](https://nerdstuff.org/posts/2020/2020-004_arch_linux_luks_btrfs_systemd-boot/) I have outlined here my steps in reinstalling my arch linux system after it had a hiccup which is time consuming to recover from and decided to nuke my system and reinstall it anew and might as well try to use BTRFS and TPM2.0 unlocking for my encrypted volumes. +- There are some problems I've encountered which deviate the steps a little from the previously said guides which maybe due to my setup. +- I've used the latest Arch Linux iso as of the writing of this guide [[Sep 22nd, 2024]] (2024.09.01 Release). I've also used Ventoy to load the iso from a usb. It has a little bit of quirk that the live environment wont boot if using normal mode and would instead need to be booted in grub2 mode. This maybe due to a bug in Ventoy. + - I was planning to migrate from ventoy sometime in the future since it's been giving me problems in booting to live environments lately and specially with the [issue](https://lemmy.ml/post/20404494) the other day. + - Considering to use a fork or `glim` +- # Base Install +- An internet connection is needed for the whole process. I used an Ethernet cable but a WiFi connection can also be used but it needs to be configured first as outlined in the [Arch Wiki.](https://wiki.archlinux.org/title/Iwd#iwctl) For other connection types, refer to the [Arch Wiki Installation page.](https://wiki.archlinux.org/title/Installation_guide#Connect_to_the_internet) +- The system clock is to be synced first + - ``` + # timedatectl set-ntp true + ``` + - My first problem occurred here. Maybe due to the ISP servers or some unknown reason, my system clock can't sync. + - Due to the clock not synced up with the servers, the installation environment can't automatically run some commands in order to sync up with their servers. This would cause some problems in the installation of packages. To resolve, the following should be run + - ``` + # pacman-key --init + # pacman-key --populate archlinux + # pacman -Sy archlinux-keyring + ``` + - The system installed after would also need its time to be synced up. I followed up the steps from the top comment of [this post.](https://www.reddit.com/r/archlinux/comments/15zgd4y/time_sync_wont_sync_help/) + - Relevant Links + - https://bbs.archlinux.org/viewtopic.php?id=292688 +- Partitioning the Disks + - For my setup I'm installing Arch on `/dev/nvme0`. + - To partition the disk, we need to work on it using `gdisk` or `fdisk`. + - ``` + # gdisk /dev/nvme0 + ``` + - Create a new partition table by selecting `o` + - ``` + Command (? for help): o + ``` + - Create an EFI partition (I chose a size of 1G to fit more kernels sometime in the future. The hex code is `EF00` for the boot partition): + - ``` + Command (? for help): n + ``` + - Create a root partition by adopting the default values. + - ``` + Command (? for help): n + ``` + - Now write the new partitions to the disk. + - ``` + Command (? for help): w + ``` + - I've also created a swap partition right before the root partition. From the guides, they're using a swap file inside the encrypted partition. I may use that in the future and will be editing this guide. As for the hex code for the swap partition, it is `8200`. +- Encrypting the Disks + - First is to create an encrypted container for the root file system. A passphrase is needed to be defined. + - ``` + # cryptsetup luksFormat /dev/sda2 + ``` + - The encrypted container is needed to be unlocked for it to be used. Same with the guides, I used `luks` as the placeholder here. + - ``` + # cryptsetup open /dev/sda2 luks + ``` +- File System Creation + - Format the EFI partition with FAT32 and give it the label `EFI` - you can choose any other label name: + collapsed:: true + - ``` + # mkfs.vfat -F32 -n EFI /dev/sda1 + ``` + - Format the root partition with Btrfs and give it the label `ROOT` - you can choose any other label name. If you didn’t open the LUKS container under the name “`luks`” you must adjust the command accordingly: + collapsed:: true + - ``` + # mkfs.btrfs -L ROOT /dev/mapper/luks + ``` + - Create and Mount Sub Volumes + collapsed:: true + - Create [sub volumes](https://wiki.archlinux.org/index.php/Btrfs#Subvolumes) for root, home, the package cache, and the entire Btrfs file system: + - ``` + # mount /dev/mapper/luks /mnt + # btrfs sub create /mnt/@ + # btrfs sub create /mnt/@home + # umount /mnt + ``` + - The guide also made a sub volume for the snapshots. I will be using `timeshift` to create snapshots so it was not needed. Maybe in the future I will use it and configure my system accordingly. + - Mount the sub volumes: + - ``` + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@ /dev/mapper/luks /mnt + # mkdir -p /mnt/{boot,home} + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@home /dev/mapper/luks /mnt/home + ``` + - Mount the EFI partition + - ``` + # mount /dev/nvme0n1p1 /mnt/boot + ``` + - Install Arch Linux (adjust this list to your needs): + - collapsed:: true + ``` + # pacstrap /mnt linux-zen linux-firmware base btrfs-progs intel-ucode vim + ``` + - I used `linux-zen` and `vim` here. The kernel lets me use `waydroid` without any new kernel modules but I must use the `dkms` version of nvidia drivers for the dgpu to work. + - Generate `/etc/fstab`: + - ``` + # genfstab -U /mnt >> /mnt/etc/fstab + ``` + - System Configuration + - `chroot` into the new system: + - ``` + # arch-chroot /mnt/ + ``` + - Set host name: + - ``` + # echo > /etc/hostname + ``` + - create a user and a password, first the root password: + - ``` + # passwd + ``` + - Create a user + - ``` + # useradd -mG wheel + ``` + - Now edit the sudoers file to give your user sudo permissions. I used `vim` as my text editor: + - ``` + # EDITOR=vim visudo + ``` + - Uncomment the following + - ``` + %wheel ALL=(ALL) ALL + ``` + - Add a password for the user + - ``` + passwd + ``` + - Set locale: + collapsed:: true + - ``` + # echo LANG=en_US.UTF-8 > /etc/locale.conf + ``` + - Uncomment the following rows of `/etc/locale.gen`: + - ``` + #en_US.UTF-8 UTF-8 + ``` + - I've uncommented out more lines so that I can use some more language and locales. + - Generate locale: + - ``` + # locale-gen + ``` + - Set time zone: + - ``` + # ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime + ``` + - Define hosts in `/etc/hosts`: + - ``` + # + 127.0.0.1 .localdomain + ::1 localhost.localdomain localhost + ``` + - Configuring the initramfs + - Configure the creation of [initramfs](https://wiki.archlinux.org/index.php/Arch_boot_process#initramfs) by editing `/etc/mkinitcpio.conf`. Change the line `HOOKS=...` to: + - ``` + HOOKS=(base udev systemd autodetect keyboard modconf block sd-encrypt filesystems resume) + ``` + - Recreate initramfs: + - ``` + # mkinitcpio -P + ``` + - Install some more useful packages. (Apparmor and Refind package included here) + - ``` + pacman -S linux-zen-headers networkmanager dialog wpa_supplicant mtools dosfstools git xdg-utils xdg-user-dirs alsa-utils pipewire pipewire-alsa pipewire-pulse apparmor refind + ``` + - Install `REFind` as the boot loader + - ``` + # refind-install + ``` + - Edit `/boot/EFI/refind/refind.conf` and add the following entry at the bottom. More info on configuring the `REFind` bootloader on [[Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas]] Necessary parts here are the `rd.luks` and `root` parameters for the encrypted drives. + - ``` + menuentry "Arch Linux" { + icon /EFI/refind/themes/darkmini/icons/os_arch.png + volume "Arch Linux" + loader /vmlinuz-linux + initrd /initramfs-linux.img + options " rd.luks.name==luks root=/dev/mapper/luks rootflags=subvol=@ rd.luks.options==discard rw quiet lsm=lockdown,yama,apparmor,bpf quiet splash loglevel=3 systemd.show_status=auto rd.udev.log_level=3 nvidia_drm.modeset=1 amd_pstate=active acpi_enforce_resources=lax iommu=soft amd_iommu=fullflush" + } + } + ``` + - Exit the `chroot` and reboot the system. +- # Installing KDE,Yay, Timeshift and the Nvidia Drivers. +- After logging on the system, A desktop environment can then be installed along with the other drivers such as the Nvidia GPU drivers. + - For my system I installed the KDE Plasma DE + - ``` + $ sudo pacman -Syu plasma-meta + ``` + - More info on the [Arch wiki.](https://wiki.archlinux.org/title/KDE) + - Needs to install more applications such as `dolphin` for file manager + - Enable the Display Manager and Network Manager services. + - ``` + systemctl enable sddm.service + systemctl enable NetworkManager.service + ``` + - Nvidia Drivers + - Since I'm using the `linux-zen` kernel and want to use the beta drivers I first need to install `yay`, an AUR helper. + - ``` + $ sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si + ``` + - Then install the Nvidia drivers + - ``` + $ yay -S nvidia-open-beta-dkms nvidia-utils-beta + ``` + - Install `timeshift` + - ``` + $ sudo pacman -Syu timeshift + ``` +- # Enabling Secure Boot and TPM 2.0 + - Enabling Secure Boot in `rEFind` using Pre Signed Bootloader. + - Install `preloader-signed` from the `AUR` + - ``` + $ yay -Syu preloader-signed + ``` + - Run `refind-install` with some options + - ``` + # refind-install --preloader /usr/share/preloader-signed/PreLoader.efi + ``` + - After a reboot with Secure Boot enabled from the `UEFI` firmware menu, HashTool will launch and it is needed to enroll the hash of rEFInd `loader.efi` and the kernel `vmlinuz-linux-zen` + - TPM 2.0 + - Check if the system supports TPM 2.0 + - ``` + cat /sys/class/tpm/tpm0/device/description + ``` + - ``` + /sys/class/tpm/tpm0/tpm_version_major + ``` + - If the system supports it, run the following command to check if the system is configured properly (from the initramfs hooks earlier) + - ``` + systemd-cryptenroll --tpm2-device=list + ``` + - Run the following to enroll the TPM 2.0 key to our encrypted drive `/dev/nvme0n1p3` + - ``` + $ sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0,7 /dev/nvme0n1p3 + ``` + - Add the following to the bootloader entry + - ``` + rd.luks.options=tpm2-device=auto + ``` + - For more information on LUKS encryption (Adding FIDO 2 Devices as unlock key, etc) Refer to [[Enabling Yubikey Security Key unlock for LUKS Encrypted Root Partition]] + - Note for TPM 2.0 Key: If dual booting with Windows and/or messing with TPM 2.0 keys on the BIOS/UEFI, the keys can be reset/modified. This will result into the TPM 2.0 unlock key not be able to be used and during boot will be asked for the LUKS encryption passkey (VERY IMPORTANT TO SET A PASSKEY AS OUTLINED EARLIER IN THIS GUIDE and to remember this passkey, this will serve as backup). To re-enable TPM 2.0 unlock, just re-enroll the TPM 2.0 key. + - Updated on January 23, 2025 for the TPM 2.0 Note. The Dual-boot windows partition had an update and may have messed with the TPM 2.0 keys. \ No newline at end of file diff --git a/logseq/bak/pages/Mounting SAMBA shared Folders in Linux/2024-07-07T12_46_28.514Z.Desktop.md b/logseq/bak/pages/Mounting SAMBA shared Folders in Linux/2024-07-07T12_46_28.514Z.Desktop.md new file mode 100644 index 0000000..34d584a --- /dev/null +++ b/logseq/bak/pages/Mounting SAMBA shared Folders in Linux/2024-07-07T12_46_28.514Z.Desktop.md @@ -0,0 +1,25 @@ +## Prerequisites + - A samba server must already be configured and is sharing a drive across the network. + - I already had two drives shared through samba on my Raspberry Pi 4. The configuration was done through CasaOS. To set-up a samba server manually refer to the [Arch wiki.](https://wiki.archlinux.org/title/samba#Server) + - samba must already be configured for client use on the computer. The [Arch wiki](https://wiki.archlinux.org/title/samba#Client) is a good place to refer for this for almost all Linux distros. + - +- # Automount samba drive as mount entry + - Edit the `/etc/fstab` file with the following entry + - ``` + //SERVER/sharename /mnt/mountpoint cifs _netdev,nofail,username=myuser,password=mypass 0 0 + ``` + - From the Arch wiki. For my personal machine I used the following line: + - ``` + //192.168.201.3/NetworkDrive /home/$USER/NetworkDrive cifs _netdev,credentials=<>,noauto,nofail,x-systemd.automount,cache=none,users,x-systemd.device-timeout=10ms 0 0 nodfs + ``` + - My credentials are stored in a file located somewhere in my root directory. + - It has the following format + - ``` + username=value + password=value + ``` + - It is write-protected. I tried to only give my user account the permission to read the file but it breaks the mounting function in KDE Dolphin File Manager. As of now the permissions of the credential file is given by the following: + - ``` + # chmod 744 <> + ``` + - The ``x-systemd`` options are for automounting only when accessed and for giving a time after booting before mounting. \ No newline at end of file diff --git a/logseq/bak/pages/Mounting SAMBA shared Folders in Linux/2024-07-07T12_47_13.240Z.Desktop.md b/logseq/bak/pages/Mounting SAMBA shared Folders in Linux/2024-07-07T12_47_13.240Z.Desktop.md new file mode 100644 index 0000000..34d584a --- /dev/null +++ b/logseq/bak/pages/Mounting SAMBA shared Folders in Linux/2024-07-07T12_47_13.240Z.Desktop.md @@ -0,0 +1,25 @@ +## Prerequisites + - A samba server must already be configured and is sharing a drive across the network. + - I already had two drives shared through samba on my Raspberry Pi 4. The configuration was done through CasaOS. To set-up a samba server manually refer to the [Arch wiki.](https://wiki.archlinux.org/title/samba#Server) + - samba must already be configured for client use on the computer. The [Arch wiki](https://wiki.archlinux.org/title/samba#Client) is a good place to refer for this for almost all Linux distros. + - +- # Automount samba drive as mount entry + - Edit the `/etc/fstab` file with the following entry + - ``` + //SERVER/sharename /mnt/mountpoint cifs _netdev,nofail,username=myuser,password=mypass 0 0 + ``` + - From the Arch wiki. For my personal machine I used the following line: + - ``` + //192.168.201.3/NetworkDrive /home/$USER/NetworkDrive cifs _netdev,credentials=<>,noauto,nofail,x-systemd.automount,cache=none,users,x-systemd.device-timeout=10ms 0 0 nodfs + ``` + - My credentials are stored in a file located somewhere in my root directory. + - It has the following format + - ``` + username=value + password=value + ``` + - It is write-protected. I tried to only give my user account the permission to read the file but it breaks the mounting function in KDE Dolphin File Manager. As of now the permissions of the credential file is given by the following: + - ``` + # chmod 744 <> + ``` + - The ``x-systemd`` options are for automounting only when accessed and for giving a time after booting before mounting. \ No newline at end of file diff --git a/logseq/bak/pages/Mounting SAMBA shared Folders in Linux/2025-07-25T07_26_30.086Z.Desktop.md b/logseq/bak/pages/Mounting SAMBA shared Folders in Linux/2025-07-25T07_26_30.086Z.Desktop.md new file mode 100644 index 0000000..34d584a --- /dev/null +++ b/logseq/bak/pages/Mounting SAMBA shared Folders in Linux/2025-07-25T07_26_30.086Z.Desktop.md @@ -0,0 +1,25 @@ +## Prerequisites + - A samba server must already be configured and is sharing a drive across the network. + - I already had two drives shared through samba on my Raspberry Pi 4. The configuration was done through CasaOS. To set-up a samba server manually refer to the [Arch wiki.](https://wiki.archlinux.org/title/samba#Server) + - samba must already be configured for client use on the computer. The [Arch wiki](https://wiki.archlinux.org/title/samba#Client) is a good place to refer for this for almost all Linux distros. + - +- # Automount samba drive as mount entry + - Edit the `/etc/fstab` file with the following entry + - ``` + //SERVER/sharename /mnt/mountpoint cifs _netdev,nofail,username=myuser,password=mypass 0 0 + ``` + - From the Arch wiki. For my personal machine I used the following line: + - ``` + //192.168.201.3/NetworkDrive /home/$USER/NetworkDrive cifs _netdev,credentials=<>,noauto,nofail,x-systemd.automount,cache=none,users,x-systemd.device-timeout=10ms 0 0 nodfs + ``` + - My credentials are stored in a file located somewhere in my root directory. + - It has the following format + - ``` + username=value + password=value + ``` + - It is write-protected. I tried to only give my user account the permission to read the file but it breaks the mounting function in KDE Dolphin File Manager. As of now the permissions of the credential file is given by the following: + - ``` + # chmod 744 <> + ``` + - The ``x-systemd`` options are for automounting only when accessed and for giving a time after booting before mounting. \ No newline at end of file diff --git a/logseq/bak/pages/Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)/2024-07-07T12_46_28.726Z.Desktop.md b/logseq/bak/pages/Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)/2024-07-07T12_46_28.726Z.Desktop.md new file mode 100644 index 0000000..2929419 Binary files /dev/null and b/logseq/bak/pages/Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)/2024-07-07T12_46_28.726Z.Desktop.md differ diff --git a/logseq/bak/pages/Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)/2024-07-07T12_47_13.456Z.Desktop.md b/logseq/bak/pages/Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)/2024-07-07T12_47_13.456Z.Desktop.md new file mode 100644 index 0000000..2929419 Binary files /dev/null and b/logseq/bak/pages/Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)/2024-07-07T12_47_13.456Z.Desktop.md differ diff --git a/logseq/bak/pages/Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)/2025-07-25T07_26_30.082Z.Desktop.md b/logseq/bak/pages/Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)/2025-07-25T07_26_30.082Z.Desktop.md new file mode 100644 index 0000000..2929419 Binary files /dev/null and b/logseq/bak/pages/Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)/2025-07-25T07_26_30.082Z.Desktop.md differ diff --git a/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-06-22T06_01_07.860Z.Desktop.md b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-06-22T06_01_07.860Z.Desktop.md new file mode 100644 index 0000000..7105ec8 --- /dev/null +++ b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-06-22T06_01_07.860Z.Desktop.md @@ -0,0 +1,14 @@ +# Prerequisites + - Needs a laptop to be Hybrid Laptop; With integrated graphics and a dedicated graphics. + - This controls gpu mode switching, similar to [envycontrol](https://github.com/bayasdev/envycontrol) and [optimus manager.](https://github.com/Askannz/optimus-manager) This can run (and is only supported) on Wayland like envycontrol but gpu mode can be picked on boot using kernel parameters. This also does not need a full reboot when switching modes and may only need a logout at most. + - For Optimus Laptops, the NVIDIA proprietary drivers are needed and no other GPU switcher tool installed. For more info refer to [ for Arch Linux systems](https://wiki.archlinux.org/title/Supergfxctl) or your own distro's documentations. +- # Installation and Setting up on KDE + - Install from the [AUR](https://aur.archlinux.org/packages/supergfxctl/). + - Enable the SystemD service + - ``` + sudo systemctl enable --now supergfxd.service + ``` + - Install the Plasma 6 applet from the [AUR.](https://aur.archlinux.org/packages/plasma6-applets-supergfxctl/) + - Reboot +- # Adding GPU modes selection on Refind Bootloader + - Refer to ((6633b1dd-15b1-44ec-ace9-41dae827b72e)). \ No newline at end of file diff --git a/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-06-22T06_06_51.696Z.Desktop.md b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-06-22T06_06_51.696Z.Desktop.md new file mode 100644 index 0000000..7105ec8 --- /dev/null +++ b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-06-22T06_06_51.696Z.Desktop.md @@ -0,0 +1,14 @@ +# Prerequisites + - Needs a laptop to be Hybrid Laptop; With integrated graphics and a dedicated graphics. + - This controls gpu mode switching, similar to [envycontrol](https://github.com/bayasdev/envycontrol) and [optimus manager.](https://github.com/Askannz/optimus-manager) This can run (and is only supported) on Wayland like envycontrol but gpu mode can be picked on boot using kernel parameters. This also does not need a full reboot when switching modes and may only need a logout at most. + - For Optimus Laptops, the NVIDIA proprietary drivers are needed and no other GPU switcher tool installed. For more info refer to [ for Arch Linux systems](https://wiki.archlinux.org/title/Supergfxctl) or your own distro's documentations. +- # Installation and Setting up on KDE + - Install from the [AUR](https://aur.archlinux.org/packages/supergfxctl/). + - Enable the SystemD service + - ``` + sudo systemctl enable --now supergfxd.service + ``` + - Install the Plasma 6 applet from the [AUR.](https://aur.archlinux.org/packages/plasma6-applets-supergfxctl/) + - Reboot +- # Adding GPU modes selection on Refind Bootloader + - Refer to ((6633b1dd-15b1-44ec-ace9-41dae827b72e)). \ No newline at end of file diff --git a/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-07-07T12_46_28.929Z.Desktop.md b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-07-07T12_46_28.929Z.Desktop.md new file mode 100644 index 0000000..9d1e325 --- /dev/null +++ b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-07-07T12_46_28.929Z.Desktop.md @@ -0,0 +1,14 @@ +## Prerequisites + - Needs a Hybrid Laptop; With integrated graphics and a dedicated graphics. + - This controls gpu mode switching, similar to [envycontrol](https://github.com/bayasdev/envycontrol) and [optimus manager.](https://github.com/Askannz/optimus-manager) This can run (and is only supported) on Wayland like envycontrol but gpu mode can be picked on boot using kernel parameters. This also does not need a full reboot when switching modes and may only need a logout at most. + - For Optimus Laptops, the NVIDIA proprietary drivers are needed and no other GPU switcher tool installed. For more info refer to [ for Arch Linux systems](https://wiki.archlinux.org/title/Supergfxctl) or your own distro's documentations. +- ## Installation and Setting up on KDE + - Install from the [AUR](https://aur.archlinux.org/packages/supergfxctl/). + - Enable the SystemD service + - ``` + sudo systemctl enable --now supergfxd.service + ``` + - Install the Plasma 6 applet from the [AUR.](https://aur.archlinux.org/packages/plasma6-applets-supergfxctl/) + - Reboot +- ## Adding GPU modes selection on Refind Bootloader + - Refer to ((6633b1dd-15b1-44ec-ace9-41dae827b72e)). \ No newline at end of file diff --git a/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-07-07T12_47_13.866Z.Desktop.md b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-07-07T12_47_13.866Z.Desktop.md new file mode 100644 index 0000000..9d1e325 --- /dev/null +++ b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2024-07-07T12_47_13.866Z.Desktop.md @@ -0,0 +1,14 @@ +## Prerequisites + - Needs a Hybrid Laptop; With integrated graphics and a dedicated graphics. + - This controls gpu mode switching, similar to [envycontrol](https://github.com/bayasdev/envycontrol) and [optimus manager.](https://github.com/Askannz/optimus-manager) This can run (and is only supported) on Wayland like envycontrol but gpu mode can be picked on boot using kernel parameters. This also does not need a full reboot when switching modes and may only need a logout at most. + - For Optimus Laptops, the NVIDIA proprietary drivers are needed and no other GPU switcher tool installed. For more info refer to [ for Arch Linux systems](https://wiki.archlinux.org/title/Supergfxctl) or your own distro's documentations. +- ## Installation and Setting up on KDE + - Install from the [AUR](https://aur.archlinux.org/packages/supergfxctl/). + - Enable the SystemD service + - ``` + sudo systemctl enable --now supergfxd.service + ``` + - Install the Plasma 6 applet from the [AUR.](https://aur.archlinux.org/packages/plasma6-applets-supergfxctl/) + - Reboot +- ## Adding GPU modes selection on Refind Bootloader + - Refer to ((6633b1dd-15b1-44ec-ace9-41dae827b72e)). \ No newline at end of file diff --git a/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2025-07-25T07_26_03.456Z.Desktop.md b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2025-07-25T07_26_03.456Z.Desktop.md new file mode 100644 index 0000000..12cfb08 --- /dev/null +++ b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2025-07-25T07_26_03.456Z.Desktop.md @@ -0,0 +1,16 @@ +# Prerequisites + - Needs a laptop to be Hybrid Laptop; With integrated graphics and a dedicated graphics. + - This controls gpu mode switching, similar to [envycontrol](https://github.com/bayasdev/envycontrol) and [optimus manager.](https://github.com/Askannz/optimus-manager) This can run (and is only supported) on Wayland like envycontrol but gpu mode can be picked on boot using kernel parameters. This also does not need a full reboot when switching modes and may only need a logout at most. + - For Optimus Laptops, the NVIDIA proprietary drivers are needed and no other GPU switcher tool installed. For more info refer to [ for Arch Linux systems](https://wiki.archlinux.org/title/Supergfxctl) or your own distro's documentations. +- # Installation and Setting up on KDE + - Install from the [AUR](https://aur.archlinux.org/packages/supergfxctl/). + - Enable the SystemD service + - ``` + sudo systemctl enable --now supergfxd.service + ``` + - Install the Plasma 6 applet from the [AUR.](https://aur.archlinux.org/packages/plasma6-applets-supergfxctl/) + - Reboot +- # Adding GPU modes selection on Refind Bootloader + - Refer to ((6633b1dd-15b1-44ec-ace9-41dae827b72e)). +- +- As of [[Jul 25th, 2025]], switching to integrated mode does not work and the dGPU is still active even after logging out and/or restarting. I opted to remove everything related to `supergfxcontrol` since the power savings are not that significant IMO. I tried this to test if switching modes work along with trying `envycontrol` again in my efforts to fix my problem in [[Lag using HDMI external display on dual GPU Nvidia Laptop (KDE)]]. \ No newline at end of file diff --git a/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2025-07-25T07_26_25.588Z.Desktop.md b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2025-07-25T07_26_25.588Z.Desktop.md new file mode 100644 index 0000000..12cfb08 --- /dev/null +++ b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2025-07-25T07_26_25.588Z.Desktop.md @@ -0,0 +1,16 @@ +# Prerequisites + - Needs a laptop to be Hybrid Laptop; With integrated graphics and a dedicated graphics. + - This controls gpu mode switching, similar to [envycontrol](https://github.com/bayasdev/envycontrol) and [optimus manager.](https://github.com/Askannz/optimus-manager) This can run (and is only supported) on Wayland like envycontrol but gpu mode can be picked on boot using kernel parameters. This also does not need a full reboot when switching modes and may only need a logout at most. + - For Optimus Laptops, the NVIDIA proprietary drivers are needed and no other GPU switcher tool installed. For more info refer to [ for Arch Linux systems](https://wiki.archlinux.org/title/Supergfxctl) or your own distro's documentations. +- # Installation and Setting up on KDE + - Install from the [AUR](https://aur.archlinux.org/packages/supergfxctl/). + - Enable the SystemD service + - ``` + sudo systemctl enable --now supergfxd.service + ``` + - Install the Plasma 6 applet from the [AUR.](https://aur.archlinux.org/packages/plasma6-applets-supergfxctl/) + - Reboot +- # Adding GPU modes selection on Refind Bootloader + - Refer to ((6633b1dd-15b1-44ec-ace9-41dae827b72e)). +- +- As of [[Jul 25th, 2025]], switching to integrated mode does not work and the dGPU is still active even after logging out and/or restarting. I opted to remove everything related to `supergfxcontrol` since the power savings are not that significant IMO. I tried this to test if switching modes work along with trying `envycontrol` again in my efforts to fix my problem in [[Lag using HDMI external display on dual GPU Nvidia Laptop (KDE)]]. \ No newline at end of file diff --git a/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2025-07-25T07_26_30.228Z.Desktop.md b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2025-07-25T07_26_30.228Z.Desktop.md new file mode 100644 index 0000000..9d1e325 --- /dev/null +++ b/logseq/bak/pages/Using supergfxcontrol for GPU mode switching at boot/2025-07-25T07_26_30.228Z.Desktop.md @@ -0,0 +1,14 @@ +## Prerequisites + - Needs a Hybrid Laptop; With integrated graphics and a dedicated graphics. + - This controls gpu mode switching, similar to [envycontrol](https://github.com/bayasdev/envycontrol) and [optimus manager.](https://github.com/Askannz/optimus-manager) This can run (and is only supported) on Wayland like envycontrol but gpu mode can be picked on boot using kernel parameters. This also does not need a full reboot when switching modes and may only need a logout at most. + - For Optimus Laptops, the NVIDIA proprietary drivers are needed and no other GPU switcher tool installed. For more info refer to [ for Arch Linux systems](https://wiki.archlinux.org/title/Supergfxctl) or your own distro's documentations. +- ## Installation and Setting up on KDE + - Install from the [AUR](https://aur.archlinux.org/packages/supergfxctl/). + - Enable the SystemD service + - ``` + sudo systemctl enable --now supergfxd.service + ``` + - Install the Plasma 6 applet from the [AUR.](https://aur.archlinux.org/packages/plasma6-applets-supergfxctl/) + - Reboot +- ## Adding GPU modes selection on Refind Bootloader + - Refer to ((6633b1dd-15b1-44ec-ace9-41dae827b72e)). \ No newline at end of file diff --git a/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-04-16T06_14_58.480Z.android.md b/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-04-16T06_14_58.480Z.android.md deleted file mode 100755 index e69de29..0000000 diff --git a/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-04-16T06_14_58.482Z.android.md b/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-04-16T06_14_58.482Z.android.md deleted file mode 100755 index e69de29..0000000 diff --git a/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-04-16T06_14_58.484Z.android.md b/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-04-16T06_14_58.484Z.android.md deleted file mode 100755 index e69de29..0000000 diff --git a/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-07-07T12_46_29.086Z.Desktop.md b/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-07-07T12_46_29.086Z.Desktop.md new file mode 100644 index 0000000..aeb588b --- /dev/null +++ b/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-07-07T12_46_29.086Z.Desktop.md @@ -0,0 +1,19 @@ +- Yubikey Security Key must first be added as a key for authentication as outline in [Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key](((661dd702-b5fa-4e99-8259-534692b87edf))) . Optionally add it as a key for sudo. This page would outline the steps to be done for using the Yubikey Security Key (Yubikey Security Key C NFC) for SDDM login and lockscreen. +- ## Use as a second factor authentication (2FA) + - A useful [github repo](https://github.com/Zer0CoolX/Fedora-KDE-Yubikey-U2F-2FA-Logins-Guide) outlined the steps for using a Yubikey Security Key as 2FA for Fedora KDE Linux. These steps also works for Arch Linux but replacing some steps for the distro specific programs. + - There are steps for using Yubikey 2FA for `sudo`,`su`,SDDM login screen, KDE Lockscreen and PolicyKit KDE Agent within the repo. + - For `sudo`, the steps are similar from [Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key](((661dd702-e1c2-4803-9b49-7ff141bd8e72))) . Yubikey can also be a sufficient key if `sufficient` parameter is used instead of `required`. + - A line in the repo instructions about changing ``auth include system-auth`` to `auth substack system-auth`. I didn't changed the line and haven't tested what are its effects. I don't know how `substack` or `include` affects the authentication. + collapsed:: true + - The following links may contain the answers and I still yet to read them: + collapsed:: true + - https://utcc.utoronto.ca/~cks/space/blog/linux/PAMStackingAndStopping + - https://www.redhat.com/sysadmin/pam-configuration-file + - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system-level_authentication_guide/pam_configuration_files + - https://www.linux.org/docs/man5/system-auth.html + - I didn't used the instructions from this repo since I want to use the Yubikey as a sufficient key to login for my computer. For `sudo` and changing `required` to `sufficient`, this works adequately but for the SDDM login screen, even after changing to `sufficient`, a password is still required. For the lockscreen, the instructions and changing to `sufficient` is adequate though. +- # +- ## Adding YubiKey as a Global (System Wide) Authentication key + - Adding the line (similar line used from the previous steps) `auth sufficient pam_u2f.so cue origin=pam://hostname appid=pam://hostname` as a first line in ``/etc/pam.d/system-auth`` would make the Yubikey a sufficient key for SDDM login. This would also include the KDE lockscreen, ``sudo``, and KDE PolicyKit Agent popup screens. Not yet tested if this works for `tty` screens. The `nouserok` flag is maybe needed after `cue` (or maybe replace it since `cue` does not do anything during prompts). So far, I did not used and there were no problems as far as I am concerned. Meanwhile information about the flag is on [Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key](((661df029-bbd1-4f3e-bf00-005aa8c2dc69))). + - This [website article](https://lucaweiss.eu/post/2016-07-23-sddm-login-with-yubikey/) is the reference for this step but it uses ``yubico-pam`` instead of ``pam-u2f``. +- \ No newline at end of file diff --git a/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-07-07T12_47_13.941Z.Desktop.md b/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-07-07T12_47_13.941Z.Desktop.md new file mode 100644 index 0000000..aeb588b --- /dev/null +++ b/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2024-07-07T12_47_13.941Z.Desktop.md @@ -0,0 +1,19 @@ +- Yubikey Security Key must first be added as a key for authentication as outline in [Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key](((661dd702-b5fa-4e99-8259-534692b87edf))) . Optionally add it as a key for sudo. This page would outline the steps to be done for using the Yubikey Security Key (Yubikey Security Key C NFC) for SDDM login and lockscreen. +- ## Use as a second factor authentication (2FA) + - A useful [github repo](https://github.com/Zer0CoolX/Fedora-KDE-Yubikey-U2F-2FA-Logins-Guide) outlined the steps for using a Yubikey Security Key as 2FA for Fedora KDE Linux. These steps also works for Arch Linux but replacing some steps for the distro specific programs. + - There are steps for using Yubikey 2FA for `sudo`,`su`,SDDM login screen, KDE Lockscreen and PolicyKit KDE Agent within the repo. + - For `sudo`, the steps are similar from [Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key](((661dd702-e1c2-4803-9b49-7ff141bd8e72))) . Yubikey can also be a sufficient key if `sufficient` parameter is used instead of `required`. + - A line in the repo instructions about changing ``auth include system-auth`` to `auth substack system-auth`. I didn't changed the line and haven't tested what are its effects. I don't know how `substack` or `include` affects the authentication. + collapsed:: true + - The following links may contain the answers and I still yet to read them: + collapsed:: true + - https://utcc.utoronto.ca/~cks/space/blog/linux/PAMStackingAndStopping + - https://www.redhat.com/sysadmin/pam-configuration-file + - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system-level_authentication_guide/pam_configuration_files + - https://www.linux.org/docs/man5/system-auth.html + - I didn't used the instructions from this repo since I want to use the Yubikey as a sufficient key to login for my computer. For `sudo` and changing `required` to `sufficient`, this works adequately but for the SDDM login screen, even after changing to `sufficient`, a password is still required. For the lockscreen, the instructions and changing to `sufficient` is adequate though. +- # +- ## Adding YubiKey as a Global (System Wide) Authentication key + - Adding the line (similar line used from the previous steps) `auth sufficient pam_u2f.so cue origin=pam://hostname appid=pam://hostname` as a first line in ``/etc/pam.d/system-auth`` would make the Yubikey a sufficient key for SDDM login. This would also include the KDE lockscreen, ``sudo``, and KDE PolicyKit Agent popup screens. Not yet tested if this works for `tty` screens. The `nouserok` flag is maybe needed after `cue` (or maybe replace it since `cue` does not do anything during prompts). So far, I did not used and there were no problems as far as I am concerned. Meanwhile information about the flag is on [Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key](((661df029-bbd1-4f3e-bf00-005aa8c2dc69))). + - This [website article](https://lucaweiss.eu/post/2016-07-23-sddm-login-with-yubikey/) is the reference for this step but it uses ``yubico-pam`` instead of ``pam-u2f``. +- \ No newline at end of file diff --git a/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2025-07-25T07_26_30.082Z.Desktop.md b/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2025-07-25T07_26_30.082Z.Desktop.md new file mode 100644 index 0000000..aeb588b --- /dev/null +++ b/logseq/bak/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux/2025-07-25T07_26_30.082Z.Desktop.md @@ -0,0 +1,19 @@ +- Yubikey Security Key must first be added as a key for authentication as outline in [Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key](((661dd702-b5fa-4e99-8259-534692b87edf))) . Optionally add it as a key for sudo. This page would outline the steps to be done for using the Yubikey Security Key (Yubikey Security Key C NFC) for SDDM login and lockscreen. +- ## Use as a second factor authentication (2FA) + - A useful [github repo](https://github.com/Zer0CoolX/Fedora-KDE-Yubikey-U2F-2FA-Logins-Guide) outlined the steps for using a Yubikey Security Key as 2FA for Fedora KDE Linux. These steps also works for Arch Linux but replacing some steps for the distro specific programs. + - There are steps for using Yubikey 2FA for `sudo`,`su`,SDDM login screen, KDE Lockscreen and PolicyKit KDE Agent within the repo. + - For `sudo`, the steps are similar from [Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key](((661dd702-e1c2-4803-9b49-7ff141bd8e72))) . Yubikey can also be a sufficient key if `sufficient` parameter is used instead of `required`. + - A line in the repo instructions about changing ``auth include system-auth`` to `auth substack system-auth`. I didn't changed the line and haven't tested what are its effects. I don't know how `substack` or `include` affects the authentication. + collapsed:: true + - The following links may contain the answers and I still yet to read them: + collapsed:: true + - https://utcc.utoronto.ca/~cks/space/blog/linux/PAMStackingAndStopping + - https://www.redhat.com/sysadmin/pam-configuration-file + - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system-level_authentication_guide/pam_configuration_files + - https://www.linux.org/docs/man5/system-auth.html + - I didn't used the instructions from this repo since I want to use the Yubikey as a sufficient key to login for my computer. For `sudo` and changing `required` to `sufficient`, this works adequately but for the SDDM login screen, even after changing to `sufficient`, a password is still required. For the lockscreen, the instructions and changing to `sufficient` is adequate though. +- # +- ## Adding YubiKey as a Global (System Wide) Authentication key + - Adding the line (similar line used from the previous steps) `auth sufficient pam_u2f.so cue origin=pam://hostname appid=pam://hostname` as a first line in ``/etc/pam.d/system-auth`` would make the Yubikey a sufficient key for SDDM login. This would also include the KDE lockscreen, ``sudo``, and KDE PolicyKit Agent popup screens. Not yet tested if this works for `tty` screens. The `nouserok` flag is maybe needed after `cue` (or maybe replace it since `cue` does not do anything during prompts). So far, I did not used and there were no problems as far as I am concerned. Meanwhile information about the flag is on [Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key](((661df029-bbd1-4f3e-bf00-005aa8c2dc69))). + - This [website article](https://lucaweiss.eu/post/2016-07-23-sddm-login-with-yubikey/) is the reference for this step but it uses ``yubico-pam`` instead of ``pam-u2f``. +- \ No newline at end of file diff --git a/logseq/bak/pages/contents/2024-04-16T01_54_19.557Z.android.md b/logseq/bak/pages/contents/2024-04-16T01_54_19.557Z.android.md deleted file mode 100755 index 5c36892..0000000 --- a/logseq/bak/pages/contents/2024-04-16T01_54_19.557Z.android.md +++ /dev/null @@ -1,9 +0,0 @@ -- {{renderer :tocgen2, [[hp victus 16 resizable bar and vram configurations for linux]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[force all android apps to be rotatable.]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[enabling yubikey security key unlock for luks encrypted root partition]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[advanced bios settings for hp victus 16]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[enabling authentication in gdm,sudo and passkey in browsers using yubikey security key]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[hp victus 16 fan control]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[setting up linux rpi 4 with a broken screen. (notes on feb 22,2024 transferred from obsidian)]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[controlling external monitor options using ddc in kde]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[setting up linux rpi 4 with a broken screen. (notes on feb 22,2024 transferred from obsidian)]], calc(100vh - 135px)}} \ No newline at end of file diff --git a/logseq/bak/pages/contents/2024-04-16T01_55_03.706Z.android.md b/logseq/bak/pages/contents/2024-04-16T01_55_03.706Z.android.md deleted file mode 100755 index 71f2131..0000000 --- a/logseq/bak/pages/contents/2024-04-16T01_55_03.706Z.android.md +++ /dev/null @@ -1,9 +0,0 @@ -- {{renderer :tocgen2, [[hp victus 16 resizable bar and vram configurations for linux]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[force all android apps to be rotatable.]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[enabling yubikey security key unlock for luks encrypted root partition]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[advanced bios settings for hp victus 16]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[enabling authentication in gdm,sudo and passkey in browsers using yubikey security key]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[hp victus 16 fan control]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[controlling external monitor options using ddc in kde]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[setting up linux rpi 4 with a broken screen. (notes on feb 22,2024 transferred from obsidian)]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[yubikey for kde plasma 6 and linux]], calc(100vh - 135px)}} \ No newline at end of file diff --git a/logseq/bak/pages/contents/2024-04-16T06_14_58.487Z.android.md b/logseq/bak/pages/contents/2024-04-16T06_14_58.487Z.android.md deleted file mode 100755 index 0acc70e..0000000 --- a/logseq/bak/pages/contents/2024-04-16T06_14_58.487Z.android.md +++ /dev/null @@ -1,9 +0,0 @@ -- {{renderer :tocgen2, [[hp victus 16 resizable bar and vram configurations for linux]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[force all android apps to be rotatable.]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[enabling yubikey security key unlock for luks encrypted root partition]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[advanced bios settings for hp victus 16]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[enabling authentication in gdm,sudo and passkey in browsers using yubikey security key]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[hp victus 16 fan control]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[controlling external monitor options using ddc in kde]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[yubikey for kde plasma 6 and linux]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[setting up linux rpi 4 with a broken screen. (notes on feb 22,2024 transferred from obsidian)]], calc(100vh - 135px)}} \ No newline at end of file diff --git a/logseq/bak/pages/contents/2025-07-16T08_10_17.344Z.android.md b/logseq/bak/pages/contents/2025-07-16T08_10_17.344Z.android.md new file mode 100644 index 0000000..ff239cf --- /dev/null +++ b/logseq/bak/pages/contents/2025-07-16T08_10_17.344Z.android.md @@ -0,0 +1,14 @@ +- {{renderer :tocgen2, [[hp victus 16 resizable bar and vram configurations for linux]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[force all android apps to be rotatable.]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[enabling yubikey security key unlock for luks encrypted root partition]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[advanced bios settings for hp victus 16]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[enabling authentication in gdm,sudo and passkey in browsers using yubikey security key]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[hp victus 16 fan control]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[controlling external monitor options using ddc in kde]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)]] , calc(100vh - 135px)}} +- {{renderer :tocgen2, [[yubikey security key for kde plasma 6 sddm and lockscreen login in linux]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[automating ryzenadj limit on kde with password prompt]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[amd p-state epp scaling driver configuration for ryzen laptops]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[configuring the refind bootloader for custom boot menu stanzas]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[using supergfxcontrol for gpu mode switching at boot]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[mounting samba shared folders in linux]], calc(100vh - 135px)}} \ No newline at end of file diff --git a/logseq/bak/pages/contents/2025-07-25T07_26_03.428Z.Desktop.md b/logseq/bak/pages/contents/2025-07-25T07_26_03.428Z.Desktop.md new file mode 100644 index 0000000..d71feb7 --- /dev/null +++ b/logseq/bak/pages/contents/2025-07-25T07_26_03.428Z.Desktop.md @@ -0,0 +1,42 @@ +- [[hp victus 16 resizable bar and vram configurations for linux]] + logseq.order-list-type:: number +- [[force all android apps to be rotatable.]] + logseq.order-list-type:: number +- [[enabling yubikey security key unlock for luks encrypted root partition]] + logseq.order-list-type:: number +- [[advanced bios settings for hp victus 16]] + logseq.order-list-type:: number +- [[enabling authentication in gdm,sudo and passkey in browsers using yubikey security key]] + logseq.order-list-type:: number +- [[hp victus 16 fan control]] + logseq.order-list-type:: number +- [[controlling external monitor options using ddc in kde]] + logseq.order-list-type:: number +- [[Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)]] + logseq.order-list-type:: number +- [[yubikey security key for kde plasma 6 sddm and lockscreen login in linux]] + logseq.order-list-type:: number +- [[automating ryzenadj limit on kde with password prompt]] + logseq.order-list-type:: number +- [[amd p-state epp scaling driver configuration for ryzen laptops]] + logseq.order-list-type:: number +- [[configuring the refind bootloader for custom boot menu stanzas]] + logseq.order-list-type:: number +- [[using supergfxcontrol for gpu mode switching at boot]] + logseq.order-list-type:: number +- [[mounting samba shared folders in linux]] + logseq.order-list-type:: number +- [[installing arch linux with btrfs, luks with tpm2.0, secure boot and refind]] + logseq.order-list-type:: number +- [[Fixing Pipewire Crackling Sound in Proton-GE Wine Games]] + logseq.order-list-type:: number +- [[Lag using HDMI external display on dual GPU Nvidia Laptop (KDE)]] + logseq.order-list-type:: number +- logseq.order-list-type:: number +- [[CasaOS - VPN connection for Docker Container within CasaOS Using Gluetun. Windscribe VPN Provider]] + logseq.order-list-type:: number +- [[Waydroid on Arch Linux KDE Plasma 6 - AMD CPU and Nvidia GPU]] + logseq.order-list-type:: number +- [[SDDM Wayland Configuration]] + logseq.order-list-type:: number +- logseq.order-list-type:: number \ No newline at end of file diff --git a/logseq/bak/pages/contents/2025-07-25T07_26_25.537Z.Desktop.md b/logseq/bak/pages/contents/2025-07-25T07_26_25.537Z.Desktop.md new file mode 100644 index 0000000..d71feb7 --- /dev/null +++ b/logseq/bak/pages/contents/2025-07-25T07_26_25.537Z.Desktop.md @@ -0,0 +1,42 @@ +- [[hp victus 16 resizable bar and vram configurations for linux]] + logseq.order-list-type:: number +- [[force all android apps to be rotatable.]] + logseq.order-list-type:: number +- [[enabling yubikey security key unlock for luks encrypted root partition]] + logseq.order-list-type:: number +- [[advanced bios settings for hp victus 16]] + logseq.order-list-type:: number +- [[enabling authentication in gdm,sudo and passkey in browsers using yubikey security key]] + logseq.order-list-type:: number +- [[hp victus 16 fan control]] + logseq.order-list-type:: number +- [[controlling external monitor options using ddc in kde]] + logseq.order-list-type:: number +- [[Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)]] + logseq.order-list-type:: number +- [[yubikey security key for kde plasma 6 sddm and lockscreen login in linux]] + logseq.order-list-type:: number +- [[automating ryzenadj limit on kde with password prompt]] + logseq.order-list-type:: number +- [[amd p-state epp scaling driver configuration for ryzen laptops]] + logseq.order-list-type:: number +- [[configuring the refind bootloader for custom boot menu stanzas]] + logseq.order-list-type:: number +- [[using supergfxcontrol for gpu mode switching at boot]] + logseq.order-list-type:: number +- [[mounting samba shared folders in linux]] + logseq.order-list-type:: number +- [[installing arch linux with btrfs, luks with tpm2.0, secure boot and refind]] + logseq.order-list-type:: number +- [[Fixing Pipewire Crackling Sound in Proton-GE Wine Games]] + logseq.order-list-type:: number +- [[Lag using HDMI external display on dual GPU Nvidia Laptop (KDE)]] + logseq.order-list-type:: number +- logseq.order-list-type:: number +- [[CasaOS - VPN connection for Docker Container within CasaOS Using Gluetun. Windscribe VPN Provider]] + logseq.order-list-type:: number +- [[Waydroid on Arch Linux KDE Plasma 6 - AMD CPU and Nvidia GPU]] + logseq.order-list-type:: number +- [[SDDM Wayland Configuration]] + logseq.order-list-type:: number +- logseq.order-list-type:: number \ No newline at end of file diff --git a/logseq/bak/pages/contents/2025-07-25T07_26_30.245Z.Desktop.md b/logseq/bak/pages/contents/2025-07-25T07_26_30.245Z.Desktop.md new file mode 100644 index 0000000..ff239cf --- /dev/null +++ b/logseq/bak/pages/contents/2025-07-25T07_26_30.245Z.Desktop.md @@ -0,0 +1,14 @@ +- {{renderer :tocgen2, [[hp victus 16 resizable bar and vram configurations for linux]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[force all android apps to be rotatable.]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[enabling yubikey security key unlock for luks encrypted root partition]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[advanced bios settings for hp victus 16]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[enabling authentication in gdm,sudo and passkey in browsers using yubikey security key]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[hp victus 16 fan control]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[controlling external monitor options using ddc in kde]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)]] , calc(100vh - 135px)}} +- {{renderer :tocgen2, [[yubikey security key for kde plasma 6 sddm and lockscreen login in linux]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[automating ryzenadj limit on kde with password prompt]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[amd p-state epp scaling driver configuration for ryzen laptops]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[configuring the refind bootloader for custom boot menu stanzas]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[using supergfxcontrol for gpu mode switching at boot]], calc(100vh - 135px)}} +- {{renderer :tocgen2, [[mounting samba shared folders in linux]], calc(100vh - 135px)}} \ No newline at end of file diff --git a/logseq/config.edn b/logseq/config.edn old mode 100755 new mode 100644 index b2f2de1..e0ccbaa --- a/logseq/config.edn +++ b/logseq/config.edn @@ -421,4 +421,5 @@ ;; ;use Percent-encoding for other invalid characters :file/name-format :triple-lowbar :graph/settings {:builtin-pages? true - :journal? true}} + :journal? true} + :publishing/all-pages-public? true} diff --git a/pages/.directory b/pages/.directory deleted file mode 100644 index 40663ce..0000000 --- a/pages/.directory +++ /dev/null @@ -1,4 +0,0 @@ -[Dolphin] -Timestamp=2024,5,3,12,26,3.6790000000000003 -Version=4 -ViewMode=1 diff --git a/pages/CasaOS - VPN connection for Docker Container within CasaOS Using Gluetun. Windscribe VPN Provider.md b/pages/CasaOS - VPN connection for Docker Container within CasaOS Using Gluetun. Windscribe VPN Provider.md new file mode 100644 index 0000000..8150876 --- /dev/null +++ b/pages/CasaOS - VPN connection for Docker Container within CasaOS Using Gluetun. Windscribe VPN Provider.md @@ -0,0 +1,31 @@ +# Goal: + - Route a docker container within CasaOS to connect to a VPN. +- # Prerequisites + - Install `Portainer` docker container + - Install `Gluetun` docker container + - As of the writing of this page, CasaOS version 0.4.15 was used. BigBearCasaOS repository is preinstalled within the App Store. If the repo is not present, the previous two containers may not be present in the App Store. + - Docker container to be routed to the VPN. For my use case during the writing of this page, I want to connect a torrent client docker container `qBittorrent` to the VPN provider `windscribe`. +- # Setting up Gluetun to connec to Windscribe + - This section uses the [big-bear-casaos documentation](https://community.bigbeartechworld.com/t/added-gluetun-to-big-bear-casaos/175) as reference. + - Using the CasaOS WebUI, the following environment variables were used for the `Gluetun` container: + - ``` + OPENVPN_USER + OPENVPN_PASSWORD + SERVER_REGIONS + VPN_SERVICE_PROVIDER + VPN_TYPE + ``` + - The first two are obtained from [Windscribe's official OpenVPN Config Generator](https://windscribe.com/getconfig/openvpn). `SERVER_REGIONS` depends on the "Build a Plan" subscription. For more info: https://github.com/qdm12/gluetun-wiki/blob/main/setup/providers/windscribe.md + - Restart the container and check the container logs (can be accessed using the CasaOS WebUI) if the VPN connection is working. Can compare the public IP of your connection to the container's VPN IP. +- # Configuring a container to connect to Gluetun's Network and hence the VPN + - This section follows the steps outlined in this [website.](https://dbtechreviews.com/2021/02/10/run-all-your-docker-containers-through-a-gluetun-vpn-container/) + - Open the `Portainer` WebUI and access the container. This can be accessed on the `local` Environments. + - Click the `Duplicate/Edit` button. Delete the lines under the Port Mapping part after taking notes of them. + - Click ``Deploy the container `` + - Go to the `Gluetun` container page and use `Duplicate/Edit`. Enter the noted ports from the previous container into the Port Mapping part and deploy the container. + - Return to the previous container and click `Duplicate/Edit`. Navigate to "Advanced container settings and look for "Network". Change the "Network" option to "container" and the "Container" and "hostname" options to "gluetun" + - Deploy the container. + - Check the public IP of the container and compare to the VPN Public IP using the CasaOS WebUI and accessing the container's terminal. The following command can be used + - ``` + $ curl ifconfig.io + ``` \ No newline at end of file diff --git a/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key.md b/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key.md index b5ee102..d49f5e3 100644 --- a/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key.md +++ b/pages/Enabling Authentication in GDM,sudo and Passkey in browsers using Yubikey Security Key.md @@ -2,12 +2,14 @@ - Note: Copied From an .md file written on November 8,2023 background-color:: red - Note: The machine that is used here is running archlinux and is using yay as a third party package manager to be able to download AUR packages conviniently. -- $ yay -S libfido2 pam-u2f yubico-authenticator-bin +- ``` + $ yay -S libfido2 pam-u2f yubico-authenticator-bin + ``` - Add the key id:: 661dd702-b5fa-4e99-8259-534692b87edf ``` - $ mkdir ~/.config/Yubico + $ mkdir ~/.config/Yubico $ pamu2fcfg -o pam://hostname -i pam://hostname > ~/.config/Yubico/u2f_keys ``` diff --git a/pages/Fixing Pipewire Crackling Sound in Proton-GE Wine Games.md b/pages/Fixing Pipewire Crackling Sound in Proton-GE Wine Games.md new file mode 100644 index 0000000..b8c2931 --- /dev/null +++ b/pages/Fixing Pipewire Crackling Sound in Proton-GE Wine Games.md @@ -0,0 +1,36 @@ +# Motivations + - When playing `Elden Ring` using `Proton-GE`, all audio would then produce crackling sound specially at higher volumes/pitch. + - A lot were tried to fix the problem which includes changing the compatibility layer (proton versions) and turning off `gamemode` and `FSR`. +- # Fix + - Changing the highest requested RTC interrupt frequency from the default 64 hz to 2048 fixes the problem. This can be done using the following + - ``` + # echo 2048 > /sys/class/rtc/rtc0/max_user_freq + # echo 2048 > /proc/sys/dev/hpet/max-user-freq + ``` + - and restarting the `pipewire` service by + - ``` + systemctl --user restart wireplumber pipewire pipewire-pulse + ``` + - This fix would only be applicable until the device is powered off. Programs that uses the pipewire service (specially the screen recording function) needs to be restarted. + - To make this change persistent across boots, one can run the two first commands at boot by making a script and creating a `systemd` service as outline on the [Arch Wiki.](https://wiki.archlinux.org/title/Systemd/FAQ#How_can_I_make_a_script_start_during_the_boot_process?) . The other option is to use `systemd-tmpfiles-temporary files` as outline in [this Arch Wiki article.](https://wiki.archlinux.org/title/Systemd#systemd-tmpfiles_-_temporary_files) + - For the first option, one can easily create a bash script and make a service that would run the service on boot. + - For the second option, one can make two files on the directory `/etc/tmpfiles.d/` with a `.conf` file extension, each containing the following + - ``` + # Path Mode UID GID Age Argument + w /sys/class/rtc/rtc0/max_user_freq - - - - 2048 + ``` + - ``` + # Path Mode UID GID Age Argument + w /proc/sys/dev/hpet/max-user-freq - - - - 2048 + ``` +- # Relevant Links + - https://wiki.archlinux.org/title/Professional_audio + - Contains the fix under the System Configuration section. + - Discussions regarding similar problems which may or may not had mentioned the fix + - https://www.reddit.com/r/linuxaudio/comments/blot4q/how_i_got_under_3_ms_with_a_p4/ + - https://linuxmusicians.com/viewtopic.php?t=25625 + - https://gist.github.com/ammuench/164ea026909eb256ba379f9e3a99af85 + - https://bbs.archlinux.org/viewtopic.php?id=284875 + - https://bbs.archlinux.org/viewtopic.php?id=283324 + - + - \ No newline at end of file diff --git a/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux.md b/pages/HP Victus 16 Resizable Bar and VRAM configurations for Linux.md old mode 100755 new mode 100644 diff --git a/pages/Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.md b/pages/Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.md new file mode 100644 index 0000000..ebfd11d --- /dev/null +++ b/pages/Installing Arch Linux with BTRFS, LUKS with TPM2.0, Secure Boot and rEFInd.md @@ -0,0 +1,235 @@ +- This guide is based on this [lemmy.ml post](https://lemmy.ml/post/61254) which is also heavily based on this [blog post.](https://nerdstuff.org/posts/2020/2020-004_arch_linux_luks_btrfs_systemd-boot/) I have outlined here my steps in reinstalling my arch linux system after it had a hiccup which is time consuming to recover from and decided to nuke my system and reinstall it anew and might as well try to use BTRFS and TPM2.0 unlocking for my encrypted volumes. +- There are some problems I've encountered which deviate the steps a little from the previously said guides which maybe due to my setup. +- I've used the latest Arch Linux iso as of the writing of this guide Sep 22nd, 2024 (2024.09.01 Release). I've also used Ventoy to load the iso from a usb. It has a little bit of quirk that the live environment wont boot if using normal mode and would instead need to be booted in grub2 mode. This maybe due to a bug in Ventoy. + - I was planning to migrate from ventoy sometime in the future since it's been giving me problems in booting to live environments lately and specially with the [issue](https://lemmy.ml/post/20404494) the other day. + - Considering to use a fork or `glim` +- # Base Install +- An internet connection is needed for the whole process. I used an Ethernet cable but a WiFi connection can also be used but it needs to be configured first as outlined in the [Arch Wiki.](https://wiki.archlinux.org/title/Iwd#iwctl) For other connection types, refer to the [Arch Wiki Installation page.](https://wiki.archlinux.org/title/Installation_guide#Connect_to_the_internet) +- The system clock is to be synced first + - ``` + # timedatectl set-ntp true + ``` + - My first problem occurred here. Maybe due to the ISP servers or some unknown reason, my system clock can't sync. + - Due to the clock not synced up with the servers, the installation environment can't automatically run some commands in order to sync up with their servers. This would cause some problems in the installation of packages. To resolve, the following should be run + - ``` + # pacman-key --init + # pacman-key --populate archlinux + # pacman -Sy archlinux-keyring + ``` + - The system installed after would also need its time to be synced up. I followed up the steps from the top comment of [this post.](https://www.reddit.com/r/archlinux/comments/15zgd4y/time_sync_wont_sync_help/) + - Relevant Links + - https://bbs.archlinux.org/viewtopic.php?id=292688 +- Partitioning the Disks + - For my setup I'm installing Arch on `/dev/nvme0`. + - To partition the disk, we need to work on it using `gdisk` or `fdisk`. + - ``` + # gdisk /dev/nvme0 + ``` + - Create a new partition table by selecting `o` + - ``` + Command (? for help): o + ``` + - Create an EFI partition (I chose a size of 1G to fit more kernels sometime in the future. The hex code is `EF00` for the boot partition): + - ``` + Command (? for help): n + ``` + - Create a root partition by adopting the default values. + - ``` + Command (? for help): n + ``` + - Now write the new partitions to the disk. + - ``` + Command (? for help): w + ``` + - I've also created a swap partition right before the root partition. From the guides, they're using a swap file inside the encrypted partition. I may use that in the future and will be editing this guide. As for the hex code for the swap partition, it is `8200`. +- Encrypting the Disks + - First is to create an encrypted container for the root file system. A passphrase is needed to be defined. + - ``` + # cryptsetup luksFormat /dev/sda2 + ``` + - The encrypted container is needed to be unlocked for it to be used. Same with the guides, I used `luks` as the placeholder here. + - ``` + # cryptsetup open /dev/sda2 luks + ``` +- File System Creation + - Format the EFI partition with FAT32 and give it the label `EFI` - you can choose any other label name: + collapsed:: true + - ``` + # mkfs.vfat -F32 -n EFI /dev/sda1 + ``` + - Format the root partition with Btrfs and give it the label `ROOT` - you can choose any other label name. If you didn’t open the LUKS container under the name “`luks`” you must adjust the command accordingly: + collapsed:: true + - ``` + # mkfs.btrfs -L ROOT /dev/mapper/luks + ``` + - Create and Mount Sub Volumes + collapsed:: true + - Create [sub volumes](https://wiki.archlinux.org/index.php/Btrfs#Subvolumes) for root, home, the package cache, and the entire Btrfs file system: + - ``` + # mount /dev/mapper/luks /mnt + # btrfs sub create /mnt/@ + # btrfs sub create /mnt/@home + # umount /mnt + ``` + - The guide also made a sub volume for the snapshots. I will be using `timeshift` to create snapshots so it was not needed. Maybe in the future I will use it and configure my system accordingly. + - Mount the sub volumes: + - ``` + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@ /dev/mapper/luks /mnt + # mkdir -p /mnt/{boot,home} + # mount -o noatime,nodiratime,compress=zstd,space_cache=v2,ssd,subvol=@home /dev/mapper/luks /mnt/home + ``` + - Mount the EFI partition + - ``` + # mount /dev/nvme0n1p1 /mnt/boot + ``` + - Install Arch Linux (adjust this list to your needs): + - collapsed:: true + ``` + # pacstrap /mnt linux-zen linux-firmware base btrfs-progs intel-ucode vim + ``` + - I used `linux-zen` and `vim` here. The kernel lets me use `waydroid` without any new kernel modules but I must use the `dkms` version of nvidia drivers for the dgpu to work. + - Generate `/etc/fstab`: + - ``` + # genfstab -U /mnt >> /mnt/etc/fstab + ``` + - System Configuration + - `chroot` into the new system: + - ``` + # arch-chroot /mnt/ + ``` + - Set host name: + - ``` + # echo > /etc/hostname + ``` + - create a user and a password, first the root password: + - ``` + # passwd + ``` + - Create a user + - ``` + # useradd -mG wheel + ``` + - Now edit the sudoers file to give your user sudo permissions. I used `vim` as my text editor: + - ``` + # EDITOR=vim visudo + ``` + - Uncomment the following + - ``` + %wheel ALL=(ALL) ALL + ``` + - Add a password for the user + - ``` + passwd + ``` + - Set locale: + collapsed:: true + - ``` + # echo LANG=en_US.UTF-8 > /etc/locale.conf + ``` + - Uncomment the following rows of `/etc/locale.gen`: + - ``` + #en_US.UTF-8 UTF-8 + ``` + - I've uncommented out more lines so that I can use some more language and locales. + - Generate locale: + - ``` + # locale-gen + ``` + - Set time zone: + - ``` + # ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime + ``` + - Define hosts in `/etc/hosts`: + - ``` + # + 127.0.0.1 .localdomain + ::1 localhost.localdomain localhost + ``` + - Configuring the initramfs + - Configure the creation of [initramfs](https://wiki.archlinux.org/index.php/Arch_boot_process#initramfs) by editing `/etc/mkinitcpio.conf`. Change the line `HOOKS=...` to: + - ``` + HOOKS=(base udev systemd autodetect keyboard modconf block sd-encrypt filesystems resume) + ``` + - Recreate initramfs: + - ``` + # mkinitcpio -P + ``` + - Install some more useful packages. (Apparmor and Refind package included here) + - ``` + pacman -S linux-zen-headers networkmanager dialog wpa_supplicant mtools dosfstools git xdg-utils xdg-user-dirs alsa-utils pipewire pipewire-alsa pipewire-pulse apparmor refind + ``` + - Install `REFind` as the boot loader + - ``` + # refind-install + ``` + - Edit `/boot/EFI/refind/refind.conf` and add the following entry at the bottom. More info on configuring the `REFind` bootloader on [[Configuring the rEFInd Bootloader for Custom Boot Menu Stanzas]] Necessary parts here are the `rd.luks` and `root` parameters for the encrypted drives. + - ``` + menuentry "Arch Linux" { + icon /EFI/refind/themes/darkmini/icons/os_arch.png + volume "Arch Linux" + loader /vmlinuz-linux + initrd /initramfs-linux.img + options " rd.luks.name==luks root=/dev/mapper/luks rootflags=subvol=@ rd.luks.options==discard rw quiet lsm=lockdown,yama,apparmor,bpf quiet splash loglevel=3 systemd.show_status=auto rd.udev.log_level=3 nvidia_drm.modeset=1 amd_pstate=active acpi_enforce_resources=lax iommu=soft amd_iommu=fullflush" + } + } + ``` + - Exit the `chroot` and reboot the system. +- # Installing KDE,Yay, Timeshift and the Nvidia Drivers. +- After logging on the system, A desktop environment can then be installed along with the other drivers such as the Nvidia GPU drivers. + - For my system I installed the KDE Plasma DE + - ``` + $ sudo pacman -Syu plasma-meta + ``` + - More info on the [Arch wiki.](https://wiki.archlinux.org/title/KDE) + - Needs to install more applications such as `dolphin` for file manager + - Enable the Display Manager and Network Manager services. + - ``` + systemctl enable sddm.service + systemctl enable NetworkManager.service + ``` + - Nvidia Drivers + - Since I'm using the `linux-zen` kernel and want to use the beta drivers I first need to install `yay`, an AUR helper. + - ``` + $ sudo pacman -S --needed git base-devel && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si + ``` + - Then install the Nvidia drivers + - ``` + $ yay -S nvidia-open-beta-dkms nvidia-utils-beta + ``` + - Install `timeshift` + - ``` + $ sudo pacman -Syu timeshift + ``` +- # Enabling Secure Boot and TPM 2.0 + - Enabling Secure Boot in `rEFind` using Pre Signed Bootloader. + - Install `preloader-signed` from the `AUR` + - ``` + $ yay -Syu preloader-signed + ``` + - Run `refind-install` with some options + - ``` + # refind-install --preloader /usr/share/preloader-signed/PreLoader.efi + ``` + - After a reboot with Secure Boot enabled from the `UEFI` firmware menu, HashTool will launch and it is needed to enroll the hash of rEFInd `loader.efi` and the kernel `vmlinuz-linux-zen` + - TPM 2.0 + - Check if the system supports TPM 2.0 + - ``` + cat /sys/class/tpm/tpm0/device/description + ``` + - ``` + /sys/class/tpm/tpm0/tpm_version_major + ``` + - If the system supports it, run the following command to check if the system is configured properly (from the initramfs hooks earlier) + - ``` + systemd-cryptenroll --tpm2-device=list + ``` + - Run the following to enroll the TPM 2.0 key to our encrypted drive `/dev/nvme0n1p3` + - ``` + $ sudo systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0,7 /dev/nvme0n1p3 + ``` + - Add the following to the bootloader entry + - ``` + rd.luks.options=tpm2-device=auto + ``` + - Note for TPM 2.0 Key: If dual booting with Windows and/or messing with TPM 2.0 keys on the BIOS/UEFI, the keys can be reset/modified. This will result into the TPM 2.0 unlock key not be able to be used and during boot will be asked for the LUKS encryption passkey (VERY IMPORTANT TO SET A PASSKEY AS OUTLINED EARLIER IN THIS GUIDE and to remember this passkey, this will serve as backup). To re-enable TPM 2.0 unlock, just re-enroll the TPM 2.0 key. + - Updated on January 23, 2025 for the TPM 2.0 Note. The Dual-boot windows partition had an update and may have messed with the TPM 2.0 keys. \ No newline at end of file diff --git a/pages/Lag using HDMI external display on dual GPU Nvidia Laptop (KDE).md b/pages/Lag using HDMI external display on dual GPU Nvidia Laptop (KDE).md new file mode 100644 index 0000000..0c241e5 --- /dev/null +++ b/pages/Lag using HDMI external display on dual GPU Nvidia Laptop (KDE).md @@ -0,0 +1,27 @@ +- There is an issue when using external displays on dual GPU nvidia (hybrid) laptops like HP Victus 16 and connecting them to an HDMI port(mostly), the output is laggy/stuttering and looks like its being rendered with significantly lower frame rate than is set. The lag is apparent on animations that are expected to be smooth such as scrolling webpages, changing desktop workspace, etc. +- I've also experienced this on windows when inserting the monitor to an already booted up laptop. The issue disappears though after a restart. +- Reading through forum posts with people that experienced the same problem, the problem can be traced to how Linux handles GPU offloading, specifically on [Reverse PRIME.](https://wiki.archlinux.org/title/PRIME) So far I haven't seen someone with a dual GPU that is using an AMD GPU that has this problem. This may have been a problem for hybrid Nvidia laptops specially without a MUX switch since offloading is not optional for these kinds of laptops. A lot pins the blame on the Nvidia drivers, some on the compositor and/or the Wayland protocol. I haven't tried X11 on KDE to test if the problem persists there but as I remember, I had bad performance on X11 last time I used it. + - Posts read: + - https://www.reddit.com/r/pop_os/comments/o6mxpl/nvidiaintel_hybrid_mode_external_display/ + - https://www.reddit.com/r/pop_os/comments/1eo5rxp/nvidia_hybrid_graphics_feels_laggy_on_external/ + - https://www.reddit.com/r/archlinux/comments/1gpllol/super_laggy_2nd_display_on_hybrid_nvidia_machine/ + - https://forums.developer.nvidia.com/t/acer-nitro-anv15-51-7837-rtx-3050-bad-performance-when-trying-external-hdmi-video/336521 + - https://forums.developer.nvidia.com/t/nvidia-please-get-it-together-with-external-monitors-on-wayland/301684/59 + - https://www.reddit.com/r/archlinux/comments/134q5fz/external_monitor_input_feels_laggy_and_slow/ + - https://www.reddit.com/r/linuxquestions/comments/o9ilxc/linux_dual_monitor_lag/ +- As of writing this, I'm using KDE Plasma 6.4.3 on Arch Linux [[Jul 25th, 2025]]. I used Gnome in the past and also faced this issue. Other users using gnome also faces this issue up until recently based on the posts above. +- Tried using `envycontrol` to force the system to only use the Nvidia GPU but it did not work. Upon checking `nvidia-smi`, everything is still rendered using the iGPU. Also tried adjusting the refresh rates, scaling and other settings to match the Laptop display but to no avail. +- There's a workaround fix for this issue in KDE Plasma. The idea behind it is to render everything in the desktop to the Nvidia GPU and offloads it into the iGPU if using displays connected to it such as the built in display for laptops. The steps are outlined in [this article.](https://tongkl.com/kde-plasma-laggy-external-monitor/) + - Use `lspci | grep VGA` to determine the PCI address of the GPUs. + - Add the following line to `/etc/environment` with the corresponding PCI addresses of the GPUs obtained previously. + - ``` + KWIN_DRM_DEVICES="/dev/dri/by-path/pci-0000\:01\:00.0-card:/dev/dri/by-path/pci-0000\:07\:00.0-card" + ``` + - The PCI address for my Nvidia GPU is `01:00.0` + - For the AMD GPU `07:00.0` + - Related posts to the article: + - https://discussion.fedoraproject.org/t/display-rendering-is-slow-on-plasma-6-on-an-external-monitor/114143/19 + - https://invent.kde.org/plasma/kwin/-/wikis/Environment-Variables#kwin_drm_devices + - https://www.reddit.com/r/kde/comments/18tqx2k/laggy_display_when_using_egpu_on_fedora_kde_spin/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1 + - This workaround though increases power and resource usage. If only using battery, it will drain significantly faster with this. +- I opted to use a dongle with HDMI connected to the USB-C port on my laptop. This eliminates the lag/stutter issue. The DDC/CI for my monitor also works even through it. I suspect (and is highly probable) that the output from the USB-C is connected to the iGPU and that the HDMI port is connected to the Nvidia dGPU. The offloading to the dGPU may have been the issue and I also suspect that the cause is something related to the Nvidia proprietary drivers. [Someone](https://www.reddit.com/r/archlinux/comments/1gpllol/comment/lx3qg5y/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) tried the `nouveau` drivers and achieved a somewhat acceptable performance. \ No newline at end of file diff --git a/pages/NVIDIA Optimus Tweaks and Configurations on Arch Linux (AMD Ryzen, Victus 16).md b/pages/NVIDIA Optimus Tweaks and Configurations on Arch Linux (AMD Ryzen, Victus 16).md new file mode 100644 index 0000000..575285c --- /dev/null +++ b/pages/NVIDIA Optimus Tweaks and Configurations on Arch Linux (AMD Ryzen, Victus 16).md @@ -0,0 +1,37 @@ +# Preliminary Ideas + - As of 2024, Linux works most of the time on Nvidia GPUs. Drivers and support is improving with common devices/configurations/setups works right out of the box specially on bleeding edge distros. + - This page would detail the quirks and tweaks done on my Arch Linux system on an HP Victus 16 Laptop with an AMD Ryzen 5 5600H and rocking an Nvidia Optimus System with Nvidia RTX 3050ti mobile. The system is also on KDE Plasma 6.0.1 as of the writing. + - Some of the problems are not present when run on X.org rather than wayland such as some missing options on ``Nvidia Settings`` but it presents a whole lot of problems specially very laggy system and unstable windows with a lot of glitches. X.org is currently not supported by the KDE team as such only the wayland problems are outline here. + - Most of the working solutions here are from [this github repo.](https://github.com/ventureoo/nvidia-tweaks?tab=readme-ov-file) It is also useful for NVIDIA users. The Arch Wiki ought to have been updated using the information from this repo. +- # Very choppy and low framerate on external display connected to HDMI (port wired to the dGPU) + - When the external display is connected to the HDMI port of the laptop (which is directly wired to the dGPU), the output of the display is choppy/laggy and seems to have low frame rate. Even when adjusting the frame rate of the monitor, it will still persists. + - This problem is not present when using Windows (I dual boot), and as such it is not a hardware problem but maybe a software one. It may have come from the proprietary Nvidia drivers and/or the compositor (kwin) of KDE plasma. + - From the previously mentioned [github repo,](https://github.com/ventureoo/nvidia-tweaks?tab=readme-ov-file) the problem may have been from the compositor but the [commit](https://invent.kde.org/plasma/kwin/-/merge_requests/5115) that would have solved the issue was merged months ago. Running KDE Plasma 6.1, the issue still persists. + - From the [https://bugs.kde.org/show_bug.cgi?id=452219](https://bugs.kde.org/show_bug.cgi?id=452219), this kernel parameter somewhat solves the problem: + - ``` + nvidia.NVreg_EnableGpuFirmware=0 + ``` + - This disables the usage of the new firmware and so far I did not see any problems or glitches. This does not completely solves the problem though and it is very apparent when playing games. Framerates would not be as smooth. + - There's also this environment variable (``/etc/environment`` for global variables): + - ``` + OGL_DEDICATED_HW_STATE_PER_CONTEXT=ENABLE_ROBUST + ``` + - that supposedly would solve the problem but I still haven't tried. From the experience of a user in the bug page, it didn't work for them though. +- # Power Limit of Nvidia RTX 3050ti is capped at 65W compared to Windows that is able to run at 75W + - From my anecdotal experience, game performance on Windows and Arch linux (as of June 2024) is on par and maybe sometimes superior on the latter. Some games though run at lower framerates on Linux such as Counter Strike 2. + - Regarding Counter Strike 2, performance on the current (as of writing) release version of the NVIDIA and with default configurations was abysmal compared to windows with most of the time hovering at 60 fps with a lot of stutters and spike compared to around 120 fps on windows. After using the beta drivers, the framerates have stabilized at around 100 fps without stutters. + - All the framerate figures here are not from any rigorous tests but are only from numbers I see from the fps counters and guessing ballpark average values from them. The differences between the smoothness though are apparent which may have been reflected on my guessed figures. + - After tweaking with the nvidia configurations, I was able to observe from `nvidia-smi` that the power usage of the dGPU was only capped at 60W at first. After digging a bit, I found out that `Dynamic Boost` would have to be used to increase the power limit of the dGPU. + - Install the `nvidia-powerd` package, enable the systemd service and reboot to use Dynamic Boost. + - ``` + sudo systemctl enable --now nvidia-powerd.service + ``` + - This would only add 5W as a boost to the power limit of the dGPU though. + - https://forums.developer.nvidia.com/t/the-default-power-limit-of-my-4060-laptop-halves-its-performance/294699/10 + - https://forums.developer.nvidia.com/t/dynamic-boost-issues-with-rtx-4090-mobile-on-linux/283605/10 + - https://forums.developer.nvidia.com/t/has-anyone-been-able-to-run-an-rtx-3060-laptop-gpu-at-more-than-80w-on-linux/192959/112?page=4 + - https://forums.developer.nvidia.com/t/power-limit-on-3000-mobile-series/193443 + - https://github.com/AdnanHodzic/auto-cpufreq/issues/714 + - https://www.reddit.com/r/linux_gaming/comments/1diwsnb/rtx_4070_laptop_gpu_wont_reach_maximum_tgp/ + - https://forums.developer.nvidia.com/t/has-anyone-been-able-to-run-an-rtx-3060-laptop-gpu-at-more-than-80w-on-linux/192959/111 + - Dynamica Boost - https://download.nvidia.com/XFree86/Linux-x86_64/535.54.03/README/dynamicboost.html \ No newline at end of file diff --git a/pages/Using supergfxcontrol for GPU mode switching at boot.md b/pages/Using supergfxcontrol for GPU mode switching at boot.md index 7105ec8..12cfb08 100644 --- a/pages/Using supergfxcontrol for GPU mode switching at boot.md +++ b/pages/Using supergfxcontrol for GPU mode switching at boot.md @@ -11,4 +11,6 @@ - Install the Plasma 6 applet from the [AUR.](https://aur.archlinux.org/packages/plasma6-applets-supergfxctl/) - Reboot - # Adding GPU modes selection on Refind Bootloader - - Refer to ((6633b1dd-15b1-44ec-ace9-41dae827b72e)). \ No newline at end of file + - Refer to ((6633b1dd-15b1-44ec-ace9-41dae827b72e)). +- +- As of [[Jul 25th, 2025]], switching to integrated mode does not work and the dGPU is still active even after logging out and/or restarting. I opted to remove everything related to `supergfxcontrol` since the power savings are not that significant IMO. I tried this to test if switching modes work along with trying `envycontrol` again in my efforts to fix my problem in [[Lag using HDMI external display on dual GPU Nvidia Laptop (KDE)]]. \ No newline at end of file diff --git a/pages/Waydroid on Arch Linux KDE Plasma 6 - AMD CPU and Nvidia GPU.md b/pages/Waydroid on Arch Linux KDE Plasma 6 - AMD CPU and Nvidia GPU.md new file mode 100644 index 0000000..2811904 --- /dev/null +++ b/pages/Waydroid on Arch Linux KDE Plasma 6 - AMD CPU and Nvidia GPU.md @@ -0,0 +1,29 @@ +# Prerequisites + - Kernel with the necessary binder modules + - Can use DKMS modules. + - +- # Installation + - Install `waydroid` package from AUR. + - init Waydroid + - without GAPPS + ``` + # waydroid init + ``` + - with GAPPS + ```` + # waydroid init -s GAPPS + ``` + - Enable service + - ``` + sudo systemctl enable --now waydroid-container.service + ``` + - +- # Installing Libndk/Libhoudini for ARM apps + - ``` + git clone https://github.com/casualsnek/waydroid_script + cd waydroid_script + python3 -m venv venv + venv/bin/pip install -r requirements.txt + sudo venv/bin/python3 main.py + ``` + - \ No newline at end of file diff --git a/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux.md b/pages/YubiKey Security Key For KDE Plasma 6 SDDM and lockscreen login in Linux.md old mode 100755 new mode 100644 diff --git a/pages/contents.md b/pages/contents.md index ff239cf..12cfb08 100644 --- a/pages/contents.md +++ b/pages/contents.md @@ -1,14 +1,16 @@ -- {{renderer :tocgen2, [[hp victus 16 resizable bar and vram configurations for linux]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[force all android apps to be rotatable.]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[enabling yubikey security key unlock for luks encrypted root partition]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[advanced bios settings for hp victus 16]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[enabling authentication in gdm,sudo and passkey in browsers using yubikey security key]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[hp victus 16 fan control]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[controlling external monitor options using ddc in kde]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[Setting up Linux Raspberry Pi 4 with a broken monitor screen. (Notes on feb 22,2024 transferred from obsidian)]] , calc(100vh - 135px)}} -- {{renderer :tocgen2, [[yubikey security key for kde plasma 6 sddm and lockscreen login in linux]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[automating ryzenadj limit on kde with password prompt]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[amd p-state epp scaling driver configuration for ryzen laptops]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[configuring the refind bootloader for custom boot menu stanzas]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[using supergfxcontrol for gpu mode switching at boot]], calc(100vh - 135px)}} -- {{renderer :tocgen2, [[mounting samba shared folders in linux]], calc(100vh - 135px)}} \ No newline at end of file +# Prerequisites + - Needs a laptop to be Hybrid Laptop; With integrated graphics and a dedicated graphics. + - This controls gpu mode switching, similar to [envycontrol](https://github.com/bayasdev/envycontrol) and [optimus manager.](https://github.com/Askannz/optimus-manager) This can run (and is only supported) on Wayland like envycontrol but gpu mode can be picked on boot using kernel parameters. This also does not need a full reboot when switching modes and may only need a logout at most. + - For Optimus Laptops, the NVIDIA proprietary drivers are needed and no other GPU switcher tool installed. For more info refer to [ for Arch Linux systems](https://wiki.archlinux.org/title/Supergfxctl) or your own distro's documentations. +- # Installation and Setting up on KDE + - Install from the [AUR](https://aur.archlinux.org/packages/supergfxctl/). + - Enable the SystemD service + - ``` + sudo systemctl enable --now supergfxd.service + ``` + - Install the Plasma 6 applet from the [AUR.](https://aur.archlinux.org/packages/plasma6-applets-supergfxctl/) + - Reboot +- # Adding GPU modes selection on Refind Bootloader + - Refer to ((6633b1dd-15b1-44ec-ace9-41dae827b72e)). +- +- As of [[Jul 25th, 2025]], switching to integrated mode does not work and the dGPU is still active even after logging out and/or restarting. I opted to remove everything related to `supergfxcontrol` since the power savings are not that significant IMO. I tried this to test if switching modes work along with trying `envycontrol` again in my efforts to fix my problem in [[Lag using HDMI external display on dual GPU Nvidia Laptop (KDE)]]. \ No newline at end of file