You are not logged in.

#1 2024-01-17 18:16:55

kou-kun42
Member
Registered: 2023-09-23
Posts: 11

[SOLVED] Cannot boot after assigning dedicated gpu to vfio

I'm following this guide: https://wiki.archlinux.org/title/PCI_pa … h_via_OVMF to passthrough my dedicated GPU for use in a VM.  I'm able to successfully retrieve IOMMU groups and assign the correct bus ID for my GPU in /etc/modprobe.d/vfio.conf.  My issue arises after following the instructions for section 3.2.2.1 mkinitcpio.  I'm setting the modules and regenerating the initramfs image, but after rebooting I get stuck on the boot message: [ok] reached target graphical interface.  The only way for me to boot again is by reverting the mkinitcpio changes and regenerating the initramfs image.  I'm running Hyprland and have already assigned my  iGPU as the primary GPU using these docs: https://wiki.hyprland.org/Configuring/M … gpu-to-use

Here is my Xorg log file

From what I can tell, it seems that I need to add a config for Xorg to use the iGPU?  I'm not sure what exactly is missing.  Any help would be greatly appreciated.

Last edited by kou-kun42 (2024-01-18 18:35:41)

Offline

#2 2024-01-17 19:54:26

pcallycat
Member
Registered: 2010-01-11
Posts: 5

Re: [SOLVED] Cannot boot after assigning dedicated gpu to vfio

Sounds like it's booting fine (otherwise you wouldn't see the message that it's reached the graphical interface, that's when the init system hands over control to userspace).  It's probably a dumb question but having spent a lifetime in desktop support I've gotta start at the obvious.... is your monitor plugged into your igpu port on your motherboard.  If you've properly isolated the pcie device xorg won't even be able to see your dedicated gpu, so when you reach the graphical environment it'll look like the system just stopped responding cuz your login manager will have loaded on the igpu.  Up until the graphical environment loads though, you'll see terminal scroll on both video cards.  Assuming that you've properly isolated the dgpu and your monitor is plugged into the port associated with the igpu, xorg should just work, but only on the igpu.

Offline

#3 2024-01-17 20:26:03

kou-kun42
Member
Registered: 2023-09-23
Posts: 11

Re: [SOLVED] Cannot boot after assigning dedicated gpu to vfio

My mobo only has display out through usb-c ports which can be utilized by either the igpu or dgpu.  I'm pretty confident that I've isolated out my dgpu as when I check the terminal after getting stuck in startup it shows that the dgpu is bound to vfio-pci.  The Xorg log shows that there is a fatal server error so I don't think it's actually starting the graphical interface.

Offline

#4 2024-01-18 04:26:52

pcallycat
Member
Registered: 2010-01-11
Posts: 5

Re: [SOLVED] Cannot boot after assigning dedicated gpu to vfio

What is the error you get from xorg?

Offline

#5 2024-01-18 09:50:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,044

Re: [SOLVED] Cannot boot after assigning dedicated gpu to vfio

I'm running Hyprland … it seems that I need to add a config for Xorg

hyprland is a wayland compositor, the X11 display server isn't relevant for its basic function.

Please post your complete system journal for a boot w/ passed through GPU, eg.:

sudo journalctl -b -1 | curl -F 'file=@-' 0x0.st

for the previous ("-1") one.
From the xorg log it looks like you're passing through 1002:744c but thats also the primary GPU and likely where the outputs are attached?

Xorg log wrote:

Please specify busIDs

Here's a pattern for that, https://wiki.archlinux.org/title/PRIME#Configuration
Ignore the parts that seek to inactivate "nvidia" and of course "intel" is a somewhat misleading identifier in your case (but identifiers are free text, you can name that "rubbishigp" if you want)

Offline

#6 2024-01-18 16:56:47

kou-kun42
Member
Registered: 2023-09-23
Posts: 11

Re: [SOLVED] Cannot boot after assigning dedicated gpu to vfio

Here is my system journal for the passed through GPU where I get stuck on the "reached target graphical interface" boot message: https://0x0.st/H0W7.txt

Also here are my BusIDs for both my dGPU and iGPU:

IOMMU Group 14:
        03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX] [1002:744c] (rev c8)

IOMMU Group 24:
        6d:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev c9)

Also, I've tried messing around with the outputs to my monitor after getting stuck on the graphical interface boot message.  If I connect directly to my dGPU I don't receive any output signal.  I only get an output when connecting to the display out via USB-C on my motherboard and that output is simply the screen showing the boot messages.

The only way for me to proceed from this screen is to invoke the terminal and undo the mkinitcpio changes and recreate the initramfs and reboot.

Last edited by kou-kun42 (2024-01-18 18:05:28)

Offline

#7 2024-01-18 18:00:44

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,044

Re: [SOLVED] Cannot boot after assigning dedicated gpu to vfio

You're passing through the Navi31 chipand then SDDM fails to start the X11 server b/c of  the errors in your xorg log.

Try /etc/X11/xorg.conf.d/20-raphael.conf

Section "ServerLayout"
        Identifier "layout"
        Screen 0 "raphael"
EndSection

Section "Device"
        Identifier "raphael"
        Driver "modesetting"
        BusID "PCI:109:0:0"
EndSection

Section "Screen"
        Identifier "raphael"
        Device "raphael"
EndSection

You'll most likely get away even w/ only the device  section

Edit: and please remove the oversized image.

Last edited by seth (2024-01-18 18:01:03)

Offline

#8 2024-01-18 18:35:10

kou-kun42
Member
Registered: 2023-09-23
Posts: 11

Re: [SOLVED] Cannot boot after assigning dedicated gpu to vfio

Awesome this worked.  Thanks!

Offline

#9 2024-01-21 22:21:36

ArchUser2001
Member
Registered: 2024-01-15
Posts: 3

Re: [SOLVED] Cannot boot after assigning dedicated gpu to vfio

Hi,

I wanted to let you know that your suggestion about the display server configuration issue was spot on! After making the changes you recommended, my problem has been resolved. For anyone else who might be facing the same issue, what worked for me was adding a new file at `/etc/X11/xorg.conf.d/20-raphael.conf` with the following contents:

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "raphael"
EndSection

Section "Device"
    Identifier "raphael"
    Driver "modesetting"
    BusID "PCI:109:0:0"
EndSection

Section "Screen"
    Identifier "raphael"
    Device "raphael"
EndSection


Just remember to change the line BusID "PCI#.." from the hex value identified in lspci to decimal. Your insights were incredibly helpful and I appreciate the time you took to share your knowledge. The thread is now marked as solved. Thank you so much for your assistance!

Offline

Board footer

Powered by FluxBB