$ cd pranavchip.com && cd /docs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

BLACKLISTING iGPU ON CachyOS
============================

This procedure allows the Intel iGPU to be blacklisted on a Dell G7
15 7500 running an Intel i7-10750H and Nvidia RTX 2060 Mobile.

Preparation
===========

1. Navigate to boot loader entries

	$ cd /boot/loader/entries

2. You should see the following:

	$ ls

	linux-cachyos.conf  linux-cachyos-lts.conf

3. Clone linux-cachyos.conf

	$ cp linux-cachyos.conf linux-cachyos-nvidia.conf

Modify the boot parameters
==========================

These are the original boot parameters:
- ---------------------------------------
title Linux Cachyos
options root=UUID=f5ee83c9-2bea-4d58-a950-e17a46f0f4e8
rw rootflags=subvol=/@
cryptdevice=UUID=223ebbfd-f800-47ab-bef4-064f4dc253a9:luks-223ebbfd-f800-47ab-bef4-064f4dc253a9
zswap.enabled=0 nowatchdog quiet splash
linux /vmlinuz-linux-cachyos
initrd /initramfs-linux-cachyos.img

This is what we want the dGPU config to be:
- -------------------------------------------
title Linux Cachyos
options root=UUID=f5ee83c9-2bea-4d58-a950-e17a46f0f4e8
rw rootflags=subvol=/@
cryptdevice=UUID=223ebbfd-f800-47ab-bef4-064f4dc253a9:luks-223ebbfd-f800-47ab-bef4-064f4dc253a9
zswap.enabled=0 nowatchdog splash nvidia-drm.modeset=1
nvidia-drm.fbdev=1 modprobe.blacklist=i915 video=card0-Unknown-1:d
linux /vmlinuz-linux-cachyos
initrd /initramfs-linux-cachyos.img

Changes made
- ------------
1. Intel GPU driver blacklisted

	modprobe.blacklist=i915

2. NVIDIA DRM kernel mode setting enabled

	nvidia-drm.modeset=1

Allows the NVIDIA driver to handle kernel mode setting

3. NVIDIA framebuffer enabled

	nvidia-drm.fbdev=1

4. Specific display output disabled

	video=card0-Unknown-1:d

Disables a particular connector/output detected by the kernel.

5. Boot verbosity difference

	quiet (removed)

I'm not sure why I did this - it might've been me removing it by
accident, but it's been so long that I don't remember why.

Set default boot config
=======================

1. Navigate back up one directory

	$ cd ..
OR
	$ cd /boot/loader

2. Edit loader.conf:

	$ micro loader.conf

default linux-cachyos.conf
timeout 1
console-mode keep

Conclusion
==========

If all goes according to plan, this ought to make the laptop boot as
a full desktop (using the dGPU) and should greatly improve latency
and performance when used as an ad-hoc desktop.

Reference: $ bootctl status
===========================
// Not sure what QubesOS is still doing here but it's best I don't
touch it.

System:
      Firmware: UEFI 2.70 (Dell 1.00)
 Firmware Arch: x64
   Secure Boot: disabled (unknown)
  TPM2 Support: yes
  Measured UKI: no
  Boot into FW: supported

Current Boot Loader:
       Product: systemd-boot 259.3-1-arch
     Features: ✓ Boot counting
	       ✓ Menu timeout control
	       ✓ One-shot menu timeout control
	       ✓ Default entry control
	       ✓ One-shot entry control
	       ✓ Support for XBOOTLDR partition
	       ✓ Support for passing random seed to OS
	       ✓ Load drop-in drivers
	       ✓ Support Type #1 sort-key field
	       ✓ Support @saved pseudo-entry
	       ✓ Support Type #1 devicetree field
	       ✓ Enroll SecureBoot keys
	       ✓ Retain SHIM protocols
	       ✓ Menu can be disabled
	       ✓ Multi-Profile UKIs are supported
	       ✓ Loader reports network boot URL
	       ✓ Support Type #1 uki field
	       ✓ Support Type #1 uki-url field
	       ✓ Loader reports active TPM2 PCR banks
     Partition:
     /dev/disk/by-partuuid/e6fbffde-8258-4070-b7df-f6c714271c5e
	Loader: └─/boot//EFI/systemd/systemd-bootx64.efi
 Current Entry: linux-cachyos-nvidia.conf
 Default Entry: linux-cachyos-nvidia.conf

Random Seed:
 System Token: set
       Exists: yes

Available Boot Loaders on ESP:
	  ESP: /boot
	  (/dev/disk/by-partuuid/e6fbffde-8258-4070-b7df-f6c714271c5e)
	 File: ├─/boot//EFI/systemd/systemd-bootx64.efi
	 (systemd-boot 259.3-1-arch)
	       └─/boot//EFI/BOOT/BOOTX64.EFI (systemd-boot
	       259.3-1-arch)

Boot Loaders Listed in EFI Variables:
	Title: Linux Boot Manager
	   ID: 0x0006
       Status: active, boot-order
    Partition:
    /dev/disk/by-partuuid/e6fbffde-8258-4070-b7df-f6c714271c5e
	 File: └─/boot//EFI/systemd/systemd-bootx64.efi

	Title: Qubes OS
	   ID: 0x0002
       Status: active, boot-order
    Partition:
    /dev/disk/by-partuuid/d1783fec-d7ca-4f31-aa42-53872b4cc472
	 File: └─/boot//EFI/qubes/grubx64.efi

	Title: UEFI Micron 2300 NVMe 1024GB 21032C79FEF4 1
	   ID: 0x0004
       Status: active, boot-order
    Partition:
    /dev/disk/by-partuuid/e6fbffde-8258-4070-b7df-f6c714271c5e
	 File: └─/boot//EFI/Boot/BootX64.efi

Boot Loader Entry Locations:
	  ESP: /boot
	  (/dev/disk/by-partuuid/e6fbffde-8258-4070-b7df-f6c714271c5e,
	  $BOOT)
       config: /boot//loader/loader.conf
	token: cachyos

Default Boot Loader Entry:
	 type: Boot Loader Specification Type #1 (.conf)
	title: Linux Cachyos (linux-cachyos-nvidia.conf)
	   id: linux-cachyos-nvidia.conf
       source: /boot//loader/entries/linux-cachyos-nvidia.conf (on
       the EFI System Partition)
	linux: /boot//vmlinuz-linux-cachyos
       initrd: /boot//initramfs-linux-cachyos.img
      options: root=UUID=f5ee83c9-2bea-4d58-a950-e17a46f0f4e8 rw
      rootflags=subvol=/@ cryptdevic> [truncated]


-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQSJp6PBWSJCR8aCbbXYWutBuYPnewUCabIzSgAKCRDYWutBuYPn
e4z9AP9x9XRcM3g/iaKCrEn3o489UO67KHbuXAguN8oDhQLT1gEA97O/RWS5Z3Lg
ouHOL8FpwqHnxKYgKt6VOtB1eRMrpw4=
=xUHE
-----END PGP SIGNATURE-----