quickpassthrough icon indicating copy to clipboard operation
quickpassthrough copied to clipboard

Screen running black after running the script

Open Fu3coco opened this issue 11 months ago • 1 comments

I have some issues after I've used quickpassthrough, my screen goes black and I do not understand why. Before I run it, I can switch between the HDMI on my screen between the iGPU and the external GPU, but on reboot after using the script, I get a completely black screen (tried changing between the HDMI inputs).

I've created a repo with details on my hardware as well as what steps I've taken to re-create the problem. and I also include log files and config files.

I'll attach my log file anyhow for the sake of traceability:

2025/02/19 16:12:57 
Welcome to Quickpassthrough c1f11ce!

2025/02/19 16:14:16 
/etc/modprobe.d found on the system
Creating config/etc/modprobe.d

2025/02/19 16:14:16 
/etc/default found on the system
Creating config/etc/default

2025/02/19 16:14:16 
/etc/mkinitcpio.conf found on the system
Creating config/etc/mkinitcpio.conf

2025/02/19 16:14:16 
/etc/default/grub found on the system
Creating config/etc/default/grub

2025/02/19 16:14:16 
Executing: utils/ls-iommu -g -F vendor:,prod_name,optional_revision:,device_id

2025/02/19 16:14:17 
ls-iommu query returned
IOMMU Group  12: Advanced Micro Devices, Inc. [AMD/ATI]: Navi 33 [Radeon RX 7600/7600 XT/7600M XT/7600S/7700S / PRO W7600] (rev c0): [1002:7480]

2025/02/19 16:15:36 
Executing: utils/ls-iommu -g -r -i 12 -F vendor:,prod_name,optional_revision:,device_id

2025/02/19 16:15:36 
ls-iommu query returned
IOMMU Group  12: Advanced Micro Devices, Inc. [AMD/ATI]: Navi 33 [Radeon RX 7600/7600 XT/7600M XT/7600S/7700S / PRO W7600] (rev c0): [1002:7480]

2025/02/19 16:16:06 
Executing: utils/ls-iommu -g -r -i 12 --id

2025/02/19 16:16:06 
ls-iommu query returned
1002:7480

2025/02/19 16:16:06 
Executing: utils/ls-iommu -g -i 12 --rom

2025/02/19 16:16:06 
ls-iommu query returned
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/rom

2025/02/19 16:16:06 
Writing utils/dump_vbios.sh

2025/02/19 16:19:29 
Adding vfio_pci.disable_vga=1 to config/kernel_args

2025/02/19 16:19:29 
User has disabled vfio video output on host, adding disable_vga=1 to the optional hardcoded vfio_pci options

2025/02/19 16:19:29 
Writing config/etc/modprobe.d/vfio.conf:
## This is an autogenerated file that stubs your graphic card for use with vfio
## This file should be placed inside /etc/modprobe.d/
# Uncomment the line below to "hardcode" your graphic card to be bound to the vfio-pci driver.
# In most cases this should not be neccessary, it will also prevent you from turning off vfio in the bootloader.
#options vfio_pci ids=1002:7480 disable_vga=1

# Make sure vfio_pci is loaded before these modules: nvidia, nouveau, amdgpu and radeon
softdep nvidia pre: vfio vfio_pci
softdep nouveau pre: vfio vfio_pci
softdep amdgpu pre: vfio vfio_pci
softdep radeon pre: vfio vfio_pci

2025/02/19 16:19:29 
Read /etc/mkinitcpio.conf:
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=(btrfs)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=(/usr/bin/btrfs)

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt filesystems fsck)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"

2025/02/19 16:19:29 
Replacing line in config/etc/mkinitcpio.conf:
MODULES=(btrfs)
With:
MODULES=(vfio_pci vfio vfio_iommu_type1 btrfs)

2025/02/19 16:19:29 
Configuring grub2 manually

2025/02/19 16:19:29 
Read /etc/default/grub:
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet iommu=pt intel_iommu=on"
GRUB_CMDLINE_LINUX="cryptdevice=UUID=40fa6c3d-5d76-3f69-b69c-a896203351dc:root zswap.enabled=0 rootfstype=btrfs"

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
#GRUB_DISABLE_OS_PROBER=false

2025/02/19 16:19:29 
Replacing line in config/etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet iommu=pt intel_iommu=on"
With:
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet iommu=pt intel_iommu=on vfio_pci.ids=1002:7480 vfio_pci.disable_vga=1"

2025/02/19 16:19:46 
Applying grub2 changes

2025/02/19 16:19:46 
Executing (elevated): sudo cp -v /home/fu3coco/Downloads/quickpassthrough/config/etc/default/grub /etc/default/grub

2025/02/19 16:19:46 
	'/home/fu3coco/Downloads/quickpassthrough/config/etc/default/grub' -> '/etc/default/grub'


2025/02/19 16:19:46 
Copied /home/fu3coco/Downloads/quickpassthrough/config/etc/default/grub to /etc/default/grub

2025/02/19 16:19:46 
Executing (elevated): sudo /usr/bin/grub-mkconfig -o /boot/grub/grub.cfg

2025/02/19 16:19:46 
	Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

2025/02/19 16:19:46 
Executing (elevated): sudo cp -v /home/fu3coco/Downloads/quickpassthrough/config/etc/modprobe.d/vfio.conf /etc/modprobe.d/vfio.conf

2025/02/19 16:19:46 
	'/home/fu3coco/Downloads/quickpassthrough/config/etc/modprobe.d/vfio.conf' -> '/etc/modprobe.d/vfio.conf'


2025/02/19 16:19:46 
Copied /home/fu3coco/Downloads/quickpassthrough/config/etc/modprobe.d/vfio.conf to /etc/modprobe.d/vfio.conf

2025/02/19 16:19:46 
Executing (elevated): sudo cp -v /home/fu3coco/Downloads/quickpassthrough/config/etc/mkinitcpio.conf /etc/mkinitcpio.conf

2025/02/19 16:19:46 
	'/home/fu3coco/Downloads/quickpassthrough/config/etc/mkinitcpio.conf' -> '/etc/mkinitcpio.conf'


2025/02/19 16:19:46 
Copied /home/fu3coco/Downloads/quickpassthrough/config/etc/mkinitcpio.conf to /etc/mkinitcpio.conf

2025/02/19 16:19:46 
Executing (elevated): sudo mkinitcpio -P

2025/02/19 16:20:13 
	==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img
==> Starting build: '6.13.2-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
  -> Running build hook: [encrypt]
==> WARNING: Possibly missing firmware for module: 'qat_420xx'
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
==> Using default configuration file: '/etc/mkinitcpio.conf'
  -> -k /boot/vmlinuz-linux -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: '6.13.2-arch1-1'
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [microcode]
  -> Running build hook: [modconf]
  -> Running build hook: [kms]
==> WARNING: Possibly missing firmware for module: 'ast'
  -> Running build hook: [keyboard]
==> WARNING: Possibly missing firmware for module: 'xhci_pci_renesas'
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: 'aic94xx'
==> WARNING: Possibly missing firmware for module: 'bfa'
==> WARNING: Possibly missing firmware for module: 'qed'
==> WARNING: Possibly missing firmware for module: 'qla1280'
==> WARNING: Possibly missing firmware for module: 'qla2xxx'
==> WARNING: Possibly missing firmware for module: 'wd719x'
  -> Running build hook: [encrypt]
==> WARNING: Possibly missing firmware for module: 'qat_420xx'
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-fallback.img'
  -> Early uncompressed CPIO image generation successful
==> Initcpio image generation successful

Any ideas on what can cause this?

Fu3coco avatar Feb 19 '25 16:02 Fu3coco

ls-iommu query returned
IOMMU Group  12: Advanced Micro Devices, Inc. [AMD/ATI]: Navi 33 [Radeon RX 7600/7600 XT/7600M XT/7600S/7700S / PRO W7600] (rev c0): [1002:7480]

log indicates only 1 gpu was visible the whole time, remove vfio_pci.ids=1002:7480 from grub and make sure your board supports using both the igpu and dgpu at the same time (some motherboards will not let you do this).

you can remove the portion by pressing E in the grub boot menu and remove the offending part from the linux line then CTRL+X to boot one time with the part removed

then remove vfio_pci.ids=1002:7480 from /etc/default/grub and rebuild grub with sudo grub-mkconfig -o /boot/grub/grub.cfg until you can make both gpus visible for utils/ls-iommu -g (this is the ls-iommu binary inside the utils folder in quickpassthrough)

HikariKnight avatar Feb 20 '25 23:02 HikariKnight