You are not logged in.

#1 2018-01-28 14:39:54

teras
Member
Registered: 2018-01-28
Posts: 19

[SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

Hello people

I have successfully managed to install QEMU & KVM and PCI passthrough, running Windows, following the instructions on the Arch site.

My passthrough card is

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK104 [GeForce GTX 660 Ti] [10de:1183] (rev a1) (prog-if 00 [VGA controller])
	Subsystem: Gigabyte Technology Co., Ltd GK104 [GeForce GTX 660 Ti] [1458:3552]
	Flags: fast devsel, IRQ 16
	Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
	Memory at e0000000 (64-bit, prefetchable) [size=128M]
	Memory at e8000000 (64-bit, prefetchable) [size=32M]
	I/O ports at e000 [size=128]
	Expansion ROM at f7000000 [disabled] [size=512K]
	Capabilities: [60] Power Management version 3
	Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
	Capabilities: [78] Express Endpoint, MSI 00
	Capabilities: [b4] Vendor Specific Information: Len=14 <?>
	Capabilities: [100] Virtual Channel
	Capabilities: [128] Power Budgeting <?>
	Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
	Capabilities: [900] #19
	Kernel driver in use: vfio-pci
	Kernel modules: nouveau, nvidia_drm, nvidia

while my host card is

00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [8086:0162] (rev 09) (prog-if 00 [VGA controller])
	Subsystem: Gigabyte Technology Co., Ltd Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller [1458:d000]
	Flags: bus master, fast devsel, latency 0, IRQ 33
	Memory at f7400000 (64-bit, non-prefetchable) [size=4M]
	Memory at d0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at f000 [size=64]
	[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
	Capabilities: [d0] Power Management version 2
	Capabilities: [a4] PCI Advanced Features
	Kernel driver in use: i915
	Kernel modules: i915

The problem is that if I change to X.org, then I get this error

[   183.049] (--) controlling tty is VT number 2, auto-enabling KeepTty
[   183.052] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
[   183.052] (II) xfree86: Adding drm device (/dev/dri/card0)
[   183.053] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[   183.055] (--) PCI:*(0:0:2:0) 8086:0162:1458:d000 rev 9, Mem @ 0xf7400000/4194304, 0xd0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/131072
[   183.055] (--) PCI: (0:1:0:0) 10de:1183:1458:3552 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/134217728, 0xe8000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
[   183.055] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[   183.055] (II) LoadModule: "glx"
[   183.055] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[   183.056] (II) Module glx: vendor="X.Org Foundation"
[   183.056]    compiled for 1.19.6, module version = 1.0.0
[   183.056]    ABI class: X.Org Server Extension, version 10.0
[   183.056] (II) LoadModule: "nvidia"
[   183.056] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[   183.056] (II) Module nvidia: vendor="NVIDIA Corporation"
[   183.056]    compiled for 4.0.2, module version = 1.0.0
[   183.056]    Module class: X.Org Video Driver
[   183.056] (II) NVIDIA dlloader X Driver  387.34  Tue Nov 21 01:38:22 PST 2017
[   183.056] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   183.056] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[   183.056] (EE) No devices detected.
[   183.056] (EE) 
Fatal server error:
[   183.056] (EE) no screens found(EE) 
[   183.056] (EE) 

while when I use Wayland, it perfectly works.

Since I am missing a few things from X.org, like the ability to use xrand to turn off the monitor, any ideas what to do to make Xorg work again?

Last edited by teras (2018-02-12 13:40:28)

Offline

#2 2018-01-28 15:55:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,744

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

If this is your intended general mode of operation, either comment out everything in /usr/share/X11/xorg.conf.d/10-nvidia-drm-outputclass.conf or remove the file altogether and add it to the NoExtract= directive, (and make sure you remember that should you want to use the nvidia card standalone again.

Offline

#3 2018-01-28 17:09:30

teras
Member
Registered: 2018-01-28
Posts: 19

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

I put aside the file altogether and tried again, same problem.

Since I *can* have X session under Wayland, but not under X.org, I suspect the problem is somewhere else.

For reference, the new X.org error log:

...
[    59.973] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c5
[    59.974] (II) xfree86: Adding drm device (/dev/dri/card0)
[    59.974] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 12 paused 0
[    59.976] (--) PCI:*(0:0:2:0) 8086:0162:1458:d000 rev 9, Mem @ 0xf7400000/4194304, 0xd0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/131072
[    59.976] (--) PCI: (0:1:0:0) 10de:1183:1458:3552 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/134217728, 0xe8000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
[    59.976] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    59.976] (II) LoadModule: "glx"
[    59.976] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    59.977] (II) Module glx: vendor="X.Org Foundation"
[    59.977]    compiled for 1.19.6, module version = 1.0.0
[    59.977]    ABI class: X.Org Server Extension, version 10.0
[    59.977] (II) LoadModule: "nvidia"
[    59.977] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[    59.977] (II) Module nvidia: vendor="NVIDIA Corporation"
[    59.977]    compiled for 4.0.2, module version = 1.0.0
[    59.977]    Module class: X.Org Video Driver
[    59.977] (II) NVIDIA dlloader X Driver  387.34  Tue Nov 21 01:38:22 PST 2017
[    59.977] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[    59.977] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[    59.977] (EE) No devices detected.
[    59.977] (EE) 

And the contents of the 10-nvidia-drm-outputclass.conf file:

Section "OutputClass"
    Identifier "intel"
    MatchDriver "i915"
    Driver "modesetting"
EndSection

Section "OutputClass"
    Identifier "nvidia"
    MatchDriver "nvidia-drm"
    Driver "nvidia"
    Option "AllowEmptyInitialConfiguration"
    Option "PrimaryGPU" "yes"
    ModulePath "/usr/lib/nvidia/xorg"
    ModulePath "/usr/lib/xorg/modules"
EndSection

Offline

#4 2018-01-29 17:16:08

NeroBurner
Member
Registered: 2013-09-05
Posts: 30

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

Just to clarify your first statement: PCI Passthrough is working with a Windows guest. It is also working with a Arch Linux guest when using Wayland. It is NOT working with the same Arch Linux guest when using X.Org. Did I understand your description correctly?

Could you post your dmesg output of your Arch Linux guest using X.Org. I suspect you have the same or a simmilar error as myself. See https://bbs.archlinux.org/viewtopic.php?id=233949

Maybe this post is also related: https://bbs.archlinux.org/viewtopic.php?id=233958

Offline

#5 2018-01-29 22:48:38

teras
Member
Registered: 2018-01-28
Posts: 19

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

OK let me clarify the exact situation.

I am always using Arch as host, and Windows 10 as guest.
Arch's visuals/X11 system is launched through GDM.

If Wayland is enabled, then I do have visuals.
If X.org is selected instead (force to disable Wayland) then visuals fail with the error I provide.
Nvidia is always disabled for host, this is the desired situation.

Thus, I don't have dmesg for Arch host.
I do have of course for guest.
Here it is.

(unfortunately the link is not really my case)

Last edited by teras (2018-01-29 22:49:14)

Offline

#6 2018-01-30 17:46:42

NeroBurner
Member
Registered: 2013-09-05
Posts: 30

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

It seems that your arch host is loading the nvidia module

[    5.470475] nvidia-nvlink: Nvlink Core is being initialized, major device number 238
[    5.470628] NVRM: The NVIDIA probe routine was not called for 1 device(s).
[    5.470629] NVRM: This can occur when a driver such as:
               NVRM: nouveau, rivafb, nvidiafb or rivatv
               NVRM: was loaded and obtained ownership of the NVIDIA device(s).
[    5.470629] NVRM: Try unloading the conflicting kernel module (and/or
               NVRM: reconfigure your kernel without the conflicting
               NVRM: driver(s)), then try loading the NVIDIA kernel module
               NVRM: again.
[    5.470630] NVRM: No NVIDIA graphics adapter probed!
[    5.470694] nvidia-nvlink: Unregistered the Nvlink Core, major device number 238

try to blacklist the nvidia module on your arch host. I assume you want to use the Intel GPU for your arch host


Your clarification has conflicting statements

I am always using Arch as host, and Windows 10 as guest.

vs

Thus, I don't have dmesg for Arch host.

Regarding the dmesg output

I do have of course for guest.

The dmsg output can't be from the guest, because you said, that the guest is always Windows 10, and I don't think Windows 10 has dmesg

Please explain the situation to me again, because I don't understand it

Offline

#7 2018-01-31 09:26:55

teras
Member
Registered: 2018-01-28
Posts: 19

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

NeroBurner wrote:

Please explain the situation to me again, because I don't understand it

Indeed I made a typo, & you understood correctly.

So let me start again.

  • Host is Arch Linux

  • Guest is Windows (although I believe it doesn't matter)

  • PCI passthrough works perfectly - I have no problem at all with this - and it rocks!

  • dmesg is from Arch linux (i.e. host)

  • Indeed I want to use Intel card for host, NVidia card for guest.

  • The problem appears before I even think of using any qemu-related command

  • GDM under Wayland works perfectly

  • GMD without Wayland, or when calling directly with X.org target (e.g. startx), fails with error.

The explanation why I suspect is QEMU-setup is the reason for the problem, is because before changing the configuration, X.org with inter card worked, but now it doesn't.

Some more information.

  • I just disabled nvidia, with these commands in a separate modproble.d file:

    blacklist nvidia
    blacklist nouveau
  • I am using this option in /etc/default/grub

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on,igfx_off"

    The option igfx_off is required or else an error appears and no initialization is performed at all.

In case it is required, here is the new dmesg output.

Offline

#8 2018-01-31 15:11:56

teras
Member
Registered: 2018-01-28
Posts: 19

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

I found that due to the nvidia-settings configuration , there was an xorg.conf file.

I removed it and thus here is the new X11 error log:

[    40.371] 
X.Org X Server 1.19.6
Release Date: 2017-12-20
[    40.371] X Protocol Version 11, Revision 0
[    40.371] Build Operating System: Linux 4.14.12-1-ARCH x86_64 
[    40.371] Current Operating System: Linux pegasos 4.14.15-1-ARCH #1 SMP PREEMPT Tue Jan 23 21:49:25 UTC 2018 x86_64
[    40.371] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=fd9a780c-67a7-41d8-8547-e20ad3ee345b rw quiet splash intel_iommu=on,igfx_off
[    40.371] Build Date: 26 January 2018  10:25:18AM
[    40.371]  
[    40.371] Current version of pixman: 0.34.0
[    40.371] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[    40.371] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    40.372] (==) Log file: "/home/teras/.local/share/xorg/Xorg.1.log", Time: Wed Jan 31 17:00:17 2018
[    40.372] (==) Using config directory: "/etc/X11/xorg.conf.d"
[    40.372] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    40.372] (==) No Layout section.  Using the first Screen section.
[    40.372] (==) No screen section available. Using defaults.
[    40.372] (**) |-->Screen "Default Screen Section" (0)
[    40.372] (**) |   |-->Monitor "<default monitor>"
[    40.372] (==) No monitor specified for screen "Default Screen Section".
	Using a default monitor configuration.
[    40.372] (==) Automatically adding devices
[    40.372] (==) Automatically enabling devices
[    40.372] (==) Automatically adding GPU devices
[    40.372] (==) Automatically binding GPU devices
[    40.372] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    40.372] (WW) The directory "/usr/share/fonts/Type1/" does not exist.
[    40.372] 	Entry deleted from font path.
[    40.372] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/100dpi/".
[    40.372] 	Entry deleted from font path.
[    40.372] 	(Run 'mkfontdir' on "/usr/share/fonts/100dpi/").
[    40.372] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/75dpi/".
[    40.372] 	Entry deleted from font path.
[    40.372] 	(Run 'mkfontdir' on "/usr/share/fonts/75dpi/").
[    40.372] (==) FontPath set to:
	/usr/share/fonts/misc/,
	/usr/share/fonts/TTF/,
	/usr/share/fonts/OTF/
[    40.372] (==) ModulePath set to "/usr/lib/xorg/modules"
[    40.372] (II) The server relies on udev to provide the list of input devices.
	If no devices become available, reconfigure udev or disable AutoAddDevices.
[    40.372] (II) Loader magic: 0x5636c2920d60
[    40.372] (II) Module ABI versions:
[    40.372] 	X.Org ANSI C Emulation: 0.4
[    40.372] 	X.Org Video Driver: 23.0
[    40.372] 	X.Org XInput driver : 24.1
[    40.372] 	X.Org Server Extension : 10.0
[    40.373] (++) using VT number 2

[    40.373] (--) controlling tty is VT number 2, auto-enabling KeepTty
[    40.374] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c2
[    40.375] (II) xfree86: Adding drm device (/dev/dri/card0)
[    40.375] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[    40.378] (--) PCI:*(0:0:2:0) 8086:0162:1458:d000 rev 9, Mem @ 0xf7400000/4194304, 0xd0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/131072
[    40.378] (--) PCI: (0:1:0:0) 10de:1183:1458:3552 rev 161, Mem @ 0xf6000000/16777216, 0xe0000000/134217728, 0xe8000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288
[    40.378] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[    40.378] (II) LoadModule: "glx"
[    40.378] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    40.379] (II) Module glx: vendor="X.Org Foundation"
[    40.379] 	compiled for 1.19.6, module version = 1.0.0
[    40.379] 	ABI class: X.Org Server Extension, version 10.0
[    40.379] (II) Applying OutputClass "intel" to /dev/dri/card0
[    40.379] 	loading driver: (null)
[    40.379] (==) Assigned the driver to the xf86ConfigLayout
[    40.379] (EE) No drivers available.
[    40.379] (EE) 
Fatal server error:
[    40.379] (EE) no screens found(EE) 
[    40.379] (EE) 
Please consult the The X.Org Foundation support 
	 at http://wiki.x.org
 for help. 
[    40.379] (EE) Please also check the log file at "/home/teras/.local/share/xorg/Xorg.1.log" for additional information.
[    40.379] (EE) 
[    40.428] (EE) Server terminated with error (1). Closing log file.

The references of NVidia are gone, still no way to launch X.org backed visuals.

Offline

#9 2018-02-12 10:43:44

teras
Member
Registered: 2018-01-28
Posts: 19

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

Hello again, still haven't found a way to run X.org display with intel graphics card.

Do you think this is a problem I should report upstream?
And if yes, what do you believe is the best way to do it?

Offline

#10 2018-02-12 11:22:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,744

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

No this is purely a configuration issue. If you have blacklisted nvidia now, what xorg.log do you get if you comment the entire nvidia section from the outputclass file? And FWIW You might want to add the PrimaryGPU directive to the intel definition.

If that doesn't work, try to be more explicit and add a Device section to the tune of e.g.

Section "Device"
       Identifier "intel"
       Driver "modesetting"
       BusID "PCI:0:2:0"
EndSection 

Last edited by V1del (2018-02-12 11:37:56)

Offline

#11 2018-02-12 13:38:27

teras
Member
Registered: 2018-01-28
Posts: 19

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

The log was posted above, and there wasn't any reference to NVidia.

I used the section that oyu mentioned and HURRAY! it works!

Thank you for your help!

Offline

#12 2018-02-12 14:11:46

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,744

Re: [SOLVED]i915 working only in Wayland,not Xorg,if using PCI passthrough

Hmm would've thought that keeping the outputclass should suffice, apparently not. Also you might want to make sure that you add that snippet in /etc/X11/xorg.conf.d because if you added that to the same 10-nvidia-drm-outputclass.conf file it will get overwritten on the next nvidia-utils update. Just as a heads-up.

However glad to hear this helped, I'm not all that knowledgeable on manual xorg.conf necessities and they mostly are educated guesses, so it's nice to hear that they work out as I expect them to tongue

Offline

Board footer

Powered by FluxBB