You are not logged in.

#1 2017-03-29 20:02:12

Observer
Member
Registered: 2016-03-01
Posts: 16

Google Chrome try to use "passthroughed" GPU instead of iGPU

Hi,

my PC contains a Intel 7700K with iGPU (for my Arch Linux Host) and a GTX 970 for a Windows Gaming-VM (PCIe passthrough). To realise the VM I use this guide from the wiki and everything works like a charm (with vfio-pci): https://wiki.archlinux.org/index.php/PC … h_via_OVMF

Today I saw a problem with google chrome: Chrome detects that my system has two GPUs but it try to use the nvidia GTX for rendering. Some output from chrome://gpu

Canvas: Software only, hardware acceleration unavailable
Flash: Software only, hardware acceleration unavailable
Flash Stage3D: Software only, hardware acceleration unavailable

[...]

GPU0	VENDOR = 0x10de, DEVICE= 0x13c2 *ACTIVE*  <<---- nvidia GTX 970
GPU1	VENDOR = 0x8086, DEVICE= 0x5912  <<---- Intel iGPU
Optimus	true
AMD switchable	false
Driver vendor	NVIDIA
Driver version	378.13

[...]

Some things confuses me:

1. I never installed the nvidia and I blacklisted the open source driver. How can Chrome use this driver?
2. Maybe I had a wrong understanding of "PCIe passthrough" but I have so far thought that the GTX 970 is not usable for the host? Do I have to work with Bumblebee in my setup as with a notebook?

I found no integrated possbility into Google Chrome to change the used GPU. Some years ago Chrome had a option to select the used GPU but this possibility was removed sad Does anyone have a solution to this problem?

Offline

#2 2017-03-29 22:19:50

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,930

Re: Google Chrome try to use "passthroughed" GPU instead of iGPU

post lspci -k please.

Also glxinfo | grep -i opengl

What DE / WM are you using ?
If gnome, does this happen in a wayland session or an X session ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2017-03-30 17:32:44

Observer
Member
Registered: 2016-03-01
Posts: 16

Re: Google Chrome try to use "passthroughed" GPU instead of iGPU

Thank you for your reply!

The requested outputs:

lspci -k

00:00.0 Host bridge: Intel Corporation Device 591f (rev 05)
	Subsystem: Gigabyte Technology Co., Ltd Device 5000
00:01.0 PCI bridge: Intel Corporation Skylake PCIe Controller (x16) (rev 05)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:02.0 VGA compatible controller: Intel Corporation Device 5912 (rev 04)
	Subsystem: Gigabyte Technology Co., Ltd Device d000
	Kernel driver in use: i915
	Kernel modules: i915
00:08.0 System peripheral: Intel Corporation Skylake Gaussian Mixture Model
	Subsystem: Gigabyte Technology Co., Ltd Device 5000
00:14.0 USB controller: Intel Corporation Device a2af
	Subsystem: Gigabyte Technology Co., Ltd Device 5007
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
00:16.0 Communication controller: Intel Corporation Device a2ba
	Subsystem: Gigabyte Technology Co., Ltd Device 1c3a
	Kernel driver in use: mei_me
	Kernel modules: mei_me
00:17.0 SATA controller: Intel Corporation Device a282
	Subsystem: Gigabyte Technology Co., Ltd Device b005
	Kernel driver in use: ahci
	Kernel modules: ahci
00:1b.0 PCI bridge: Intel Corporation Device a2e7 (rev f0)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1b.2 PCI bridge: Intel Corporation Device a2e9 (rev f0)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1b.4 PCI bridge: Intel Corporation Device a2eb (rev f0)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1c.0 PCI bridge: Intel Corporation Device a290 (rev f0)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1c.1 PCI bridge: Intel Corporation Device a291 (rev f0)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1c.2 PCI bridge: Intel Corporation Device a292 (rev f0)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1c.4 PCI bridge: Intel Corporation Device a294 (rev f0)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1d.0 PCI bridge: Intel Corporation Device a298 (rev f0)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
00:1f.0 ISA bridge: Intel Corporation Device a2c5
	Subsystem: Gigabyte Technology Co., Ltd Device 5001
00:1f.2 Memory controller: Intel Corporation Device a2a1
	Subsystem: Gigabyte Technology Co., Ltd Device 5001
00:1f.3 Audio device: Intel Corporation Device a2f0
	Subsystem: Gigabyte Technology Co., Ltd Device a036
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
00:1f.4 SMBus: Intel Corporation Device a2a3
	Subsystem: Gigabyte Technology Co., Ltd Device 5001
	Kernel driver in use: i801_smbus
	Kernel modules: i2c_i801
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V
	Subsystem: Gigabyte Technology Co., Ltd Device e000
	Kernel driver in use: e1000e
	Kernel modules: e1000e
01:00.0 VGA compatible controller: NVIDIA Corporation GM204 [GeForce GTX 970] (rev a1)
	Subsystem: ZOTAC International (MCO) Ltd. Device 2370
	Kernel driver in use: vfio-pci
	Kernel modules: nouveau
01:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)
	Subsystem: ZOTAC International (MCO) Ltd. Device 2370
	Kernel driver in use: vfio-pci
	Kernel modules: snd_hda_intel
08:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
09:00.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
09:01.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
09:02.0 PCI bridge: Intel Corporation JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016] (rev 02)
	Kernel driver in use: pcieport
	Kernel modules: shpchp
0c:00.0 USB controller: Intel Corporation Device 15d4 (rev 02)
	Subsystem: Device 2222:1111
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
41:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a804
	Subsystem: Samsung Electronics Co Ltd Device a801
	Kernel driver in use: nvme
	Kernel modules: nvme

glxinfo | grep -i opengl

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Kabylake GT2 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.0.2
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.0.2
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 17.0.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Additional: "lsmod | grep -i nouveau" returns an empty list.

I use LightDM as DM and i3 as WM.

Offline

#4 2017-03-30 20:15:04

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Google Chrome try to use "passthroughed" GPU instead of iGPU

To put it simply, your passthrough is configured correctly and chrome can't touch this GPU. Unless we are talking chrome running inside the VM, that is.

There must be something wrong with this chrome://gpu thing. Maybe it needs CTRL+F5? big_smile

Offline

#5 2017-03-30 21:12:34

Observer
Member
Registered: 2016-03-01
Posts: 16

Re: Google Chrome try to use "passthroughed" GPU instead of iGPU

mich41 wrote:

Unless we are talking chrome running inside the VM, that is.

No, I have never checked the chrome://gpu tab inside the VM wink Currently, I only talk about the host.

If it was so simple I was happy. No, CTRL+F5 does not help. Reboot also not wink

Offline

#6 2017-03-30 22:21:06

saivert
Member
Registered: 2014-06-13
Posts: 19

Re: Google Chrome try to use "passthroughed" GPU instead of iGPU

According to Chromium source it does a simple PCI device scan and then uses a simple method to determine primary GPU:

https://cs.chromium.org/chromium/src/th … 2c82d&l=87

bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo> *devices)
{
    LibPCI pci;
    if (!pci.IsValid())
    {
        return false;
    }

    pci_access *access = pci.Alloc();
    ASSERT(access != nullptr);
    pci.Init(access);
    pci.ScanBus(access);

    for (pci_dev *device = access->devices; device != nullptr; device = device->next)
    {
        pci.FillInfo(device, PCI_FILL_IDENT | PCI_FILL_CLASS);

        // Skip non-GPU devices
        switch (device->device_class)
        {
            case PCI_CLASS_DISPLAY_VGA:
            case PCI_CLASS_DISPLAY_XGA:
            case PCI_CLASS_DISPLAY_3D:
                break;
            default:
                continue;
        }

        // Skip unknown devices
        if (device->vendor_id == 0 || device->device_id == 0)
        {
            continue;
        }

        GPUDeviceInfo info;
        info.vendorId = device->vendor_id;
        info.deviceId = device->device_id;

        devices->push_back(info);
    }

    pci.Cleanup(access);

    return true;
}

https://cs.chromium.org/chromium/src/th … c82d&l=134

void FindPrimaryGPU(SystemInfo *info)
{
    ASSERT(!info->gpus.empty());

    // On dual-GPU systems we assume the non-Intel GPU is the primary one.
    int primary   = 0;
    bool hasIntel = false;
    for (size_t i = 0; i < info->gpus.size(); ++i)
    {
        if (IsIntel(info->gpus[i].vendorId))
        {
            hasIntel = true;
        }
        if (IsIntel(info->gpus[primary].vendorId))
        {
            primary = static_cast<int>(i);
        }
    }

    // Assume that a combination of AMD or Nvidia with Intel means Optimus or AMD Switchable
    info->primaryGPUIndex = primary;
    info->isOptimus       = hasIntel && IsNvidia(info->gpus[primary].vendorId);
    info->isAMDSwitchable = hasIntel && IsAMD(info->gpus[primary].vendorId);
}

Unless I'm mistaken this means that Chromium is not using your discrete graphics card but the iGPU. It does not take into consideration that the NVIDIA card is bound to vfio-pci driver and thus unavailable. This should be submitted as a bug upstream by interested parties.

Last edited by saivert (2017-03-30 22:24:44)

Offline

#7 2017-03-31 08:35:48

mich41
Member
Registered: 2012-06-22
Posts: 796

Re: Google Chrome try to use "passthroughed" GPU instead of iGPU

saivert wrote:

Unless I'm mistaken this means that Chromium is not using your discrete graphics card but the iGPU.

Of course it isn't because nouveau is disabled and the GPU is bound to vfio-pci and Chrome doesn't ship with its own GPU drivers and hacks to bypass kernel's driver assignments. AFAIK, at least smile

saivert wrote:

It does not take into consideration that the NVIDIA card is bound to vfio-pci driver and thus unavailable.

That's insanity. No amount of heuristics will get it right. This is why reasonable applications query OpenGL for such information instead.

saivert wrote:

This should be submitted as a bug upstream by interested parties.

I think it deserves submission to TheDailyWTF.com even more smile Especially the part about made-up NVIDIA driver version. Seriously, Google?

Last edited by mich41 (2017-03-31 08:39:38)

Offline

#8 2017-03-31 12:57:28

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Google Chrome try to use "passthroughed" GPU instead of iGPU

mich41 wrote:
saivert wrote:

Unless I'm mistaken this means that Chromium is not using your discrete graphics card but the iGPU.

Of course it isn't because nouveau is disabled and the GPU is bound to vfio-pci and Chrome doesn't ship with its own GPU drivers and hacks to bypass kernel's driver assignments. AFAIK, at least smile

That's planned for a few versions down the line from now /s tongue

If everything is working properly I would just file this under the wtf category and move on, you can (and maybe should) report the bug upstream but don't expect it to be fixed asap given that there are many more important bugs still open (and apparently stale) that it seems no one cares or got around to trying to solve.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#9 2017-07-28 15:21:04

JoshH100
Member
Registered: 2013-03-04
Posts: 5

Re: Google Chrome try to use "passthroughed" GPU instead of iGPU

I've submitted a chromium bug report. https://bugs.chromium.org/p/chromium/is … =749922#c1

Offline

Board footer

Powered by FluxBB