View previous topic :: View next topic |
Author |
Message |
Bloxlord n00b

Joined: 06 Nov 2023 Posts: 9
|
Posted: Mon Nov 06, 2023 11:23 pm Post subject: No Display After Dracut and Grub Configuration |
|
|
Hello,
I was trying to set up a virtual machine for gaming by adapting this guide to enable GPU passthrough on my system. I added the following arguments to my Grub configuration: Code: | GRUB_CMDLINE_LINUX_DEFAULT="amd_iommu=on iommu=pt pci-stub.ids=10de:2204,10de:1aef rd.driver.pre=vfio-pci" | created the directory /etc/dracut.conf.d, created a local.conf file in that directory with the following text: Code: | add_drivers+=" vfio vfio_iommu_type1 vfio_pci vfio_virqfd "
| and ran the command Code: | sudo dracut -f --kver `uname -r` | before rebooting. Now when booting into Gentoo my monitor gets no signal and I am unable to use the OS. My BIOS is properly configured so I think my kernel is misconfigured. I am using an NVIDIA 3090 with the latest proprietary drivers; the PCI IDs in the Grub config belong to the 3090. Any help to either undo my changes or make the OS usable while keeping them would be appreciated. |
|
Back to top |
|
 |
alamahant Advocate

Joined: 23 Mar 2019 Posts: 3958
|
Posted: Wed Nov 08, 2023 10:07 pm Post subject: |
|
|
Welcome to Gentoo Forum!
Was your system booting properly before all this passthrough config?
Do you have a second gpu besides the nvidia one?
Most probably an amd integrated one.
Plz post
Code: |
grep svm /proc/cpuinfo ### just check if it is available.No need to post.
and
emerge --info
and
lspci -nnk | grep -iEA3 "3d|vga"
and
grep -i iommu /usr/src/linux/.config
|
To do that plz interrupt the boot process @grub by pressing "e" and edit the linux cmdline,removing all iommu staff.
I hope you will be able to boot.
Then please post the above. _________________
 |
|
Back to top |
|
 |
Bloxlord n00b

Joined: 06 Nov 2023 Posts: 9
|
Posted: Thu Nov 09, 2023 1:47 am Post subject: |
|
|
Thank you for the help fixing grub, that got me back into Gentoo
I have two GPUs, an integrated GPU in my AMD 7800x3d and my dedicated GPU the Nvidia RTX 3090. The system was booting before the grub configuration, and svm is available.
emerge --info returned:
Code: | Portage 3.0.51 (python 3.11.5-final-0, default/linux/amd64/17.1/desktop, gcc-13, glibc-2.37-r7, 6.1.57-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.1.57-gentoo-dist-x86_64-AMD_Ryzen_7_7800X3D_8-Core_Processor-with-glibc2.37
KiB Mem: 28377240 total, 25527476 free
KiB Swap: 33554428 total, 33554428 free
Timestamp of repository gentoo: Sat, 04 Nov 2023 02:30:01 +0000
Head commit of repository gentoo: 79476d4b145a4a6b0cbc0e73a6cefb5d584bf8fa
Head commit of repository brave-overlay: 9e859c375d61f5eda5cf0f180d895f290625f490
Timestamp of repository steam-overlay: Mon, 30 Oct 2023 19:02:02 +0000
Head commit of repository steam-overlay: c738cf4be600cc674dd666d9dc0ac50f0bc87067
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.40 p5) 2.40.0
app-misc/pax-utils: 1.3.5::gentoo
app-shells/bash: 5.1_p16-r6::gentoo
dev-lang/perl: 5.38.0-r1::gentoo
dev-lang/python: 3.11.5::gentoo
dev-lang/rust-bin: 1.71.1::gentoo
dev-util/cmake: 3.26.5-r2::gentoo
dev-util/meson: 1.2.1-r1::gentoo
sys-apps/baselayout: 2.14::gentoo
sys-apps/openrc: 0.48::gentoo
sys-apps/sandbox: 2.38::gentoo
sys-devel/autoconf: 2.71-r6::gentoo
sys-devel/automake: 1.16.5-r1::gentoo
sys-devel/binutils: 2.40-r5::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang: 16.0.6::gentoo
sys-devel/gcc: 13.2.1_p20230826::gentoo
sys-devel/gcc-config: 2.11::gentoo
sys-devel/libtool: 2.4.7-r1::gentoo
sys-devel/llvm: 16.0.6::gentoo
sys-devel/make: 4.4.1-r1::gentoo
sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.37-r7::gentoo
Repositories:
gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: False
sync-rsync-extra-opts:
sync-rsync-verify-jobs: 1
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-max-age: 24
brave-overlay
location: /var/db/repos/brave-overlay
sync-type: git
sync-uri: https://gitlab.com/jason.oliveira/brave-overlay.git
masters: gentoo
volatile: False
steam-overlay
location: /var/db/repos/steam-overlay
sync-type: git
sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
masters: gentoo
volatile: False
Binary Repositories:
gentoobinhost
priority: 1
sync-uri: https://gentoo.osuosl.org/releases/amd64/binpackages/17.1/x86-64_hardened
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg lcms libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS |
lspci -nnk | grep -iEA3 "3d|vga" returned:
Code: | 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA102 [GeForce RTX 3090] [10de:2204] (rev a1)
Subsystem: eVga.com. Corp. GA102 [GeForce RTX 3090] [3842:3982]
Kernel driver in use: nvidia
Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device [0403]: NVIDIA Corporation GA102 High Definition Audio Controller [10de:1aef] (rev a1)
Subsystem: eVga.com. Corp. GA102 High Definition Audio Controller [3842:3982]
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
02:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43f4] (rev 01)
--
16:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raphael [1002:164e] (rev cb)
Subsystem: Micro-Star International Co., Ltd. [MSI] Raphael [1462:7d70]
Kernel modules: amdgpu
16:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt Radeon High Definition Audio Controller [1002:1640] |
And grep -i iommu /usr/src/linux/.config returned:
Code: | CONFIG_IRQ_MSI_IOMMU=y
# CONFIG_GART_IOMMU is not set
CONFIG_VFIO_IOMMU_TYPE1=m
CONFIG_VFIO_NOIOMMU=y
CONFIG_IOMMU_IOVA=y
CONFIG_IOMMU_API=y
CONFIG_IOMMU_SUPPORT=y
# Generic IOMMU Pagetable Support
CONFIG_IOMMU_IO_PGTABLE=y
# end of Generic IOMMU Pagetable Support
# CONFIG_IOMMU_DEBUGFS is not set
# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
CONFIG_IOMMU_DMA=y
CONFIG_IOMMU_SVA=y
CONFIG_AMD_IOMMU=y
CONFIG_AMD_IOMMU_V2=m
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_SVM=y
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON=y
CONFIG_HYPERV_IOMMU=y
CONFIG_VIRTIO_IOMMU=y |
Now that my system boots my most immediate problem is solved. However I do plan to reapply those grub changes in order to complete the GPU passthrough setup. If you can identify what I was missing that caused me to have no display it would be greatly appreciated. |
|
Back to top |
|
 |
alamahant Advocate

Joined: 23 Mar 2019 Posts: 3958
|
Posted: Thu Nov 09, 2023 10:14 am Post subject: |
|
|
In order for you to passthrough the nvidia gpu you need to rely on the integrated one.
Try modifying make.conf
Code: |
VIDEO_CARDS="nvidia amdgpu radeonsi"
|
Followed by
Code: |
emerge -DUav @world
emerge -av linux-firmware
|
Then plz use "make menuconfig" to add
to your kernel config.
Make it a module (=m)
Then please rebuild and reinstall kernel and modules.
Then re add your IOMMU staff in grub.
Rebuild initramfs and update grub.
And reboot.
Lets see if we are luckier this time.
For details on amdgpu plz see
https://wiki.gentoo.org/wiki/AMDGPU _________________
 |
|
Back to top |
|
 |
Bloxlord n00b

Joined: 06 Nov 2023 Posts: 9
|
Posted: Thu Nov 09, 2023 11:12 pm Post subject: |
|
|
Unfortunately this doesn't work. Followed your steps and ensured that my integrated GPU could be utilized. However now the system hangs when loading the kernel. I tried following some more straightforward instructions from this guide but it produced the same results. It seems having any arguments in grub that isolate my GPU (ids 10de:2204,10de:1aef) causes system to hang. I'll keep trying things but at the moment I'm lost. |
|
Back to top |
|
 |
alamahant Advocate

Joined: 23 Mar 2019 Posts: 3958
|
Posted: Fri Nov 10, 2023 8:56 am Post subject: |
|
|
Lets see if amdgpu is working.
Plz try
Code: |
cd /etc/modprobe.d
mv nvidia.conf nvidia
echo "blacklist nvidia" > blacklist-nvidia.conf
reboot
|
Can you boot into graphical DE?
If yes then
Code: |
rm /etc/modprobe.d/blacklist-nvidia.conf
mv /etc/modprobe.d/nvidia /etc/modprobe.d/nvidia.conf
|
THEN remove all iommu staff from grub and just add
Update grub and reboot.
Then if successful plz post
Code: |
dmesg | grep -E "DMAR|IOMMU"
|
_________________
 |
|
Back to top |
|
 |
Bloxlord n00b

Joined: 06 Nov 2023 Posts: 9
|
Posted: Wed Nov 15, 2023 1:35 am Post subject: |
|
|
Followed your steps and it seems that my Nvidia card loads regardless. I am using a displayport cable for the 3090 and an hdmi cable for integrated; same results each time: X environment launches on the displayport while the hdmi displays tty1. If I switch to tty2 I need to switch to the hdmi input.
dmesg | grep -E "DMAR|IOMMU"
Code: | [ 0.301061] pci 0000:00:00.2: AMD-Vi: IOMMU performance counters supported
[ 0.302755] pci 0000:00:00.2: AMD-Vi: Found IOMMU cap 0x40
[ 0.344749] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank). |
Sorry for the delay, I seemed to be having issues with my integrated GPU - I could not get any display under any circumstances with the igpu, even in my BIOS - which led me to updating my BIOS, which removed my Gentoo boot menu entry and required me to create a new one with efibootmgr, it was all a learning experience. But now my igpu seems to be fully functional. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|