Hi all,
I’ve been doing some digging around and I’m pretty sure at this time that it can’t be done because of Mutter but just in case I missed something obvious in my configurations I’m asking for some help. I’m trying to get Wayland running again with Gnome after I added an AMD GPU to my system and I wanted to do some comparative testing with my new high refresh rate monitor since I noticed prior to adding the card and running Wayland on the Intel chip that even though it says 100Hz both in Display options and on the monitor OSD, it’s definitely not 100Hz. Adding the AMD card has forced X11, which is displaying 100Hz correctly but sometimes I can see a “scan line” when watching videos or playing games with or without using Looking Glass, the tearing caused by that is noticable so I leave it at 95 Hz and it seems to not do that but I still have some dropped frames with Chrome/Chromium, especially on 60 FPS videos though it seems Firefox is fine. A while back I had similar issues with dropped frames on X11 and switching to Wayland fixed it, hence why I wanted to try it again, but I didn’t have a high refresh monitor at that time.
I mainly want to see if it will fix the tearing at 100Hz but another big reason I added another GPU was because the Intel iGPU cannot keep up with the demand from Looking Glass to display that many frames at 1440p, intel_gpu_top
showed it was basically pegged even once overclocked. I have a few AMD cards lying around from when I used to mine Litecoin so I figure why not try to use one? Yes I realize that I am not benefiting from Gsync by doing this but I am trying to achieve the best of both worlds, I’m waiting for the L1T 2 monitor KVM switch to ship because my current KVM switch cannot do 100Hz so for the games that I can get 60+ FPS in anyway or just generally using Windows I’m very happy using Looking Glass and will 100% be using the Gsync capabilities of the monitor when the situation calls for it. I’m using the KVM switch for USB only right now.
Mobo: Asus Z270E
CPU: i7 7700K w/ HD 630
Top slot: GTX 1080Ti - Used for vfio passthrough only, no Nvidia drivers installed, noueveu blacklisted
Middle slot: R9 280X
Monitor: Asus PG348Q (3440x1440, 60-100Hz)
Linux 4.14.12-3 (linux-ck, I added ACS override patch but not i915 VGA arbiter from linux-vfio)
GPU placement is restricted because I run a hardline watercooled build so unless I drain the loop and make new tubes I can’t move the hardware around (AMD card still air cooled), but if I know I can get it working I have no problem spending some time on that. I can’t move the AMD GPU to the bottom slot right now because there’s a tube in the way but I don’t think that’s a factor here.
I cannot disable the Intel iGPU from the BIOS, it must be set as the primary otherwise when I boot the Nvidia card cannot be properly grabbed by vfio, and I can’t pick a secondary card so it will use the top slot, the options are Auto, iGFX, and PEG. Unless I aggressively blacklist i915 it will still be loaded when GDM starts (which starts with Wayland when i915 is loaded). Preventing i915 from loading disables the option of logging in with Wayland and I had to manually configure X11 to use the AMD GPU due to multiple IDs otherwise GDM would not start.
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X]
/etc/modprobe.d/blacklist.conf
#Ignore nouveau
blacklist nouveau
#Ignore radeon so we use amdgpu instead for sure
blacklist radeon
#Ignore the intel driver
blacklist i915
install i915 /bin/false
/usr/share/X11/xorg.conf.d/20-amdgpu.conf
Section "OutputClass"
Identifier "AMDgpu"
MatchDriver "amdgpu"
Driver "amdgpu"
EndSection
Section "Device"
Identifier "Screen0"
Driver "amdgpu"
BusID "PCI:2:0:0"
Option "DRI" "3"
Option "TearFree" "on"
EndSection
/etc/mkinitcpio.conf
MODULES="dm_mod vfio vfio_iommu_type1 vfio_pci vfio_virqfd amdgpu nct6775"
Jan 08 21:35:36 archlinux kernel: Command line: initrd=\intel-ucode.img initrd=\initramfs-linux-ck.img root=/dev/mapper/lessaj--desktop_lvm-root rw acpi_enforce_resources=lax intel_iommu=on intel_iommu=igfx_off pcie_acs_override=downstream default_hugepagesz=1G hugepagesz=1GB hugepages=12 quiet pci=noaer radeon.si_support=0 radeon.cik_support=0 amdgpu.si_support=1 amdgpu.cik_support=1
I have added MUTTER_ALLOW_HYBRID_GPUS=1
to /etc/environment
which will allow me to log in to an X session on the AMD card from a Wayland GDM, but of course I can’t see GDM unless I move one of my monitors from the AMD card to the iGPU because it is defaulting there and a Wayland session will just load on the iGPU.
From what I can tell from researching, the main reason Wayland is not available is this:
1441:Jan 08 21:35:41 lessaj-desktop gnome-shell[566]: Can't initialize KMS backend: could not find drm kms device
However I can also see the below occuring prior to the above, which makes me think I’m just missing something:
825:Jan 08 21:35:36 archlinux kernel: [drm] amdgpu kernel modesetting enabled.
828:Jan 08 21:35:36 archlinux kernel: [drm] initializing kernel modesetting (TAHITI 0x1002:0x6798 0x1458:0x3001 0x00).
.
.
.
Having said all that, if it is not possible at this time to use Wayland with the AMD card given the rest of the hardware in the system, is it possible to configure X to offload work to the AMD card and display it on the Intel iGPU? This would allow me to actually be able to see the boot process, not have to redo my loop, achieve better framerates with OpenGL, and possibly allow 100Hz correctly as well but I’m still unsure about that.
Any and all help/advice would be greatly appreciately, if any additional info is required I can certainly provide that.