Skip to content

Instantly share code, notes, and snippets.

@meetnick
Last active October 23, 2024 13:32
Show Gist options
  • Save meetnick/8e71beb0b92b5f6d8659f14c76611be1 to your computer and use it in GitHub Desktop.
Save meetnick/8e71beb0b92b5f6d8659f14c76611be1 to your computer and use it in GitHub Desktop.
ROG Zephyrus M16 on Linux

Add the following on the file /etc/modprobe.d/alsa-base.conf:

options snd-hda-intel model=1043:1f11,headset-mic
# Virtual Box in Fedora
sudo /sbin/vboxconfig
sudo mkdir -p /var/lib/shim-signed/mok
sudo openssl req -nodes -new -x509 -newkey rsa:2048 -outform DER -addext "extendedKeyUsage=codeSigning" -keyout /var/lib/shim-signed/mok/MOK.priv -out /var/lib/shim-signed/mok/MOK.der
sudo mokutil --import /var/lib/shim-signed/mok/MOK.der
sudo reboot
# Restart "rcvboxdrv setup" after system is rebooted
# Virtual Box in Fedora
sudo /sbin/vboxconfig
sudo mkdir -p /var/lib/shim-signed/mok
sudo openssl req -nodes -new -x509 -newkey rsa:2048 -outform DER -addext "extendedKeyUsage=codeSigning" -keyout /var/lib/shim-signed/mok/MOK.priv -out /var/lib/shim-signed/mok/MOK.der
sudo mokutil --import /var/lib/shim-signed/mok/MOK.der
sudo reboot
# Restart "rcvboxdrv setup" after system is rebooted
https://ubuntuhandbook.org/index.php/2021/08/enable-hibernate-ubuntu-21-10/
https://askubuntu.com/questions/6769/hibernate-and-resume-from-a-swap-file
cat << EOF | sudo tee /etc/udev/rules.d/00-video-cameras.rules
SUBSYSTEM=="video4linux", ATTR{index}=="0", ATTR{name}=="USB2.0 HD UVC WebCam: USB2.0 IR", SYMLINK+="video_ir"
EOF

Set IR camera in howdy config: device_path = /dev/video_ir

if presenting error Unknown error: 1, run the following:

sudo mkdir /usr/lib64/security/howdy/snapshots

Reference

# Download drivers and dependencies
sudo dnf groupinstall multimedia
sudo dnf install intel-media-driver libva libva-utils gstreamer1-vaapi ffmpeg intel-gpu-tools mesa-dri-drivers mpv
echo "export LIBVA_DRIVER_NAME=iHD" | tee -a $HOME/.bashrc

cat << EOF | sudo tee -a /etc/modprobe.d/i915.conf
options i915 enable_guc=3
options i915 enable_fbc=1
options i915 fastboot=1
EOF

sudo dracut --force

Reference Intel Graphics on Fedora - Best practices

https://community.frame.work/t/guide-setup-tpm2-autodecrypt/39005
https://0pointer.net/blog/unlocking-luks2-volumes-with-tpm2-fido2-pkcs11-security-hardware-on-systemd-248.html
https://www.reddit.com/r/Fedora/comments/rmh7cc/how_to_unlock_root_luks_partition_with_key_on_usb/?utm_source=share&utm_medium=ios_app&utm_name=iossmf

sudo grubby --args="rd.driver.blacklist=rtsx_pci rd.driver.blacklist=rtsx_pci_sdmmc modprobe.blacklist=rtsx_pci modprobe.blacklist=rtsx_pci_sdmmc" --update-kernel=ALL

# nvidia
# Reference: https://forums.developer.nvidia.com/t/systemds-suspend-then-hibernate-not-working-in-nvidia-optimus-laptop/213690
# https://forums.developer.nvidia.com/t/occassional-failure-to-resume-pci-pm-suspend-nv-pmops-suspend-0x0-0x20-nvidia-returns-5/187091
suspend-then-hibernate.service
[Unit]
Description=NVIDIA system suspend-then-hibernate actions
Before=systemd-suspend-then-hibernate.service
[Service]
Type=oneshot
ExecStart=/usr/bin/logger -t suspend -s "nvidia-suspend-then-hibernate.service"
ExecStart=/usr/bin/nvidia-sleep.sh "hibernate"
[Install]
WantedBy=systemd-suspend-then-hibernate.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment