LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 08-10-2023, 04:05 PM   #1
osmank
LQ Newbie
 
Registered: Aug 2023
Posts: 4

Rep: Reputation: 0
Configuring Linux to Use Specific GPU on Boot with IOMMU Setup


I have two GPUs on my computer (4070Ti and GT730). I have Windows on one disk and Linux (Mint) on another. I've done the setup related to IOMMU. I want to use the GT730 with Linux and reserve the 4070Ti for a guest. After opening Linux, I launched a Windows guest operating system using virt manager. At this point, I connect my second monitor's display port to the 4070Ti. Windows recognizes and uses the GPU without issues. However, after finishing my tasks and restarting the host, Mint attempts to boot with the 4070Ti instead of the GT730. Since the graphics card is disabled during the boot process, I can only see the terminal screen. But if I remove the display port from the 4070Ti before booting, everything works normally. I don't want to plug and unplug the cable each time I start the guest.

Additionally, if I boot with the Windows (host) on my other disk, it starts with the 4070Ti and then activates the GT730.

How can I inform Linux in advance about which GPU it should use?

Code:
GRUB_CMDLINE_LINUX="amd_iommu=on iommu=pt rd.driver.pre=vfio-pci"
 
Old 08-11-2023, 09:12 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Welcome to Linuxquestions!

No replies. I think there is video=<device> you can pass to your kernel. I recall once I had an Intel NUC which had 4 video ports in hardware but only two on its back panel. The kernel back then wasn't detecting this situation properly and booted with video defaulting to a non-existing output. So I vaguely remember I fixed it with video=<correctoutput> ... That's all I remember.
 
Old 08-11-2023, 04:04 PM   #3
osmank
LQ Newbie
 
Registered: Aug 2023
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you for your response. I tried sending the "video" parameter, but unfortunately, it didn't work. Initially, I attempted to send the video parameter along with the device parameter, and then I also tried sending the port name using xrandr. However, neither of these approaches worked.
 
Old 08-11-2023, 04:23 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
xrandr is definitely not the tool to use, it manages X environment, you are trying to configure boot. What documentation did you use to specify correct video parameter, syntax is paramount?
 
Old 08-11-2023, 05:02 PM   #5
osmank
LQ Newbie
 
Registered: Aug 2023
Posts: 4

Original Poster
Rep: Reputation: 0
I initially used the following parameter:

Code:
video=10da:1283,nvidia-drm.modeset=1
Where "10da:1283" is the ID of my PCI device.

Later on, I also tried sending the following parameter using xrandr --listmonitors:

Code:
video=HDMI-A-1:1920x1080@60
Unfortunately, neither of these methods yielded successful results.
 
Old 08-11-2023, 06:35 PM   #6
osmank
LQ Newbie
 
Registered: Aug 2023
Posts: 4

Original Poster
Rep: Reputation: 0
I think I've solved the problem. I created an xorg.conf file as follows:

Code:
Section "Device"
    Identifier "NVIDIA-GPU"
    Driver "nvidia" 
    BusID "PCI:12:0:0" 
EndSection
During boot, we start without providing any special parameters. Both GPUs continue to operate at this stage. Afterward, during the login phase, the GPU specified by the BusID becomes active.

I used to think that the previous steps determined which GPU would be active.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IOMMU boot parameter on Virtual Server dezix Linux - Newbie 0 09-25-2020 10:45 AM
how can I setup the amd GPU as a default gpu instead of intel graphics? divinefishersmith Linux - Newbie 33 08-22-2015 06:03 PM
[SOLVED] virt-manager PCI passthrough gives error "No IOMMU Found" even w/ Intel IOMMU enabled jessetaylor84 Linux - Virtualization and Cloud 6 09-26-2014 08:14 PM
Fedora 20 - Unble to boot from installation medium: ioapic 2 has no mapping iommu... Fedalot Fedora 3 01-08-2014 05:11 PM
Linux refuses to boot with the IOMMU feature enabled. g00ey Linux - Hardware 3 04-23-2011 01:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 12:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration