You are not logged in.

#1 2015-12-29 20:32:31

anarki@buttereblume
Member
Registered: 2015-12-29
Posts: 18

Can't load module for second GPU

Hey, i'm running an external GPU via a PCIe over Express Card extension to play Steam games on my notebook.

To get the eGPU, i just have to plug it in and reboot. For some reason, my notebook prefers the eGPU and boots Arch using it (graphical output is on the external monitor, only). To use the internal Intel HD, i have to unplug the eGPU and reboot again.

That work's nice, but i want to get rid of the reboots and instead, start a second Xorg using the eGPU when needed. So i hotplug the eGPU and lspci finds both adaptors:

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)
05:00.0 VGA compatible controller: NVIDIA Corporation GF104 [GeForce GTX 460] (rev a1)

But loading module nvidia fails:

$ modprobe -vv nvidia
insmod /lib/modules/4.2.5-1-ARCH/extramodules/nvidia.ko.gz 
modprobe: INFO: Failed to insert module '/lib/modules/4.2.5-1-ARCH/extramodules/nvidia.ko.gz': No such device
modprobe: ERROR: could not insert 'nvidia': No such device

And thus, Xorg cannot open the device.

[  3269.641] (EE) NVIDIA: Failed to initialize the NVIDIA kernel module. Please see the
[  3269.641] (EE) NVIDIA:     system's kernel log for additional error messages and
[  3269.641] (EE) NVIDIA:     consult the NVIDIA README for details.

Otherwise, when booting with the eGPU plugged in, module nvidia is loaded without errors. So my question is: Why can't i modprobe nvidia after hotplugging the eGPU? I assume, it might have something to do with Express Card hotplug capabilities. I tried module pciehp, but that isn't available on Arch. Any ideas?

Last edited by anarki@buttereblume (2015-12-30 02:30:29)

Offline

#2 2015-12-29 21:01:29

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Can't load module for second GPU

Can you get into your notebook's BIOS configuration? I don't know laptops etc, but on desktop boards it's common to have a BIOS option allowing you to choose which device to 'initialize first' or use 'as primary'.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2015-12-30 02:49:00

anarki@buttereblume
Member
Registered: 2015-12-29
Posts: 18

Re: Can't load module for second GPU

Thanks for your thoughts. There isn't such an option:) i think my notebook isn't intended to have a second GPU. My point is: When i hotplug the eGPU while Arch is running, i can see it as a PCI device with a specific BusID. But i cant modprobe it's nvidia module:

$ insmod /lib/modules/4.2.5-1-ARCH/extramodules/nvidia.ko.gz
/lib/modules/4.2.5-1-ARCH/extramodules/nvidia.ko.gz: No such device

That 'no device' statement confuses me. And otherwise, when i boot into Arch with present eGPU, the module gets loaded automatically and then works fine. But i'd prefer hotplugging it without a reboot.

Last edited by anarki@buttereblume (2015-12-30 02:55:47)

Offline

#4 2015-12-30 11:59:55

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,592

Re: Can't load module for second GPU

That path has 2 symlinks in it ( /lib and extramodules ) ,maybe insmod can't handle paths with symlinks ?

does insmod /usr/lib/modules/extramodules-4.2-ARCH/nvidia.ko.g work ?

Last edited by Lone_Wolf (2015-12-30 12:00:09)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2015-12-30 14:03:20

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: Can't load module for second GPU

If it wasn't intended to have second GPU, I doubt it would default to it when booted with it plugged in. wink

Have you tried plugging it in during boot menu? Might be an interim solution until you build pcie_hp. I wonder why it's not built by default. Anyway, I guess that explains why my experiment hot-plugging a PCIe card didn't work...


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#6 2015-12-30 19:09:48

anarki@buttereblume
Member
Registered: 2015-12-29
Posts: 18

Re: Can't load module for second GPU

Now that I plugged it in during Grub menu, I can see that the PCIe device is enabled, which wasn't the case before

$cat /sys/bus/pci/devices/0000:05:00.0/enable
1 

Where 05:00.0 is the BusID of the eGPU. But inserting its module is still not possible, even by using the alternative path, as Lone_Wolf suggested.

Offline

#7 2015-12-30 19:34:46

anarki@buttereblume
Member
Registered: 2015-12-29
Posts: 18

Re: Can't load module for second GPU

Ha! Here's what dmesg says, after plugging the eGPU in:

[   34.585515] vgaarb: device added: PCI:0000:05:00.0,decodes=io+mem,owns=none,locks=none
[   34.585521] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=none:owns=io+mem

(the second devices is the onboard Intel HD) and then whoa, panic!

[   34.694085] nvidia 0000:05:00.0: enabling device (0000 -> 0003)
[   34.694150] NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:
               NVRM: BAR1 is 0M @ 0x0 (PCI:0000:05:00.0)
[   34.694152] NVRM: The system BIOS may have misconfigured your GPU.
[   34.694156] nvidia: probe of 0000:05:00.0 failed with error -1
[   34.694177] nvidia-nvlink: Nvlink Core is being initialized, major device number 243
[   34.694408] NVRM: The NVIDIA probe routine failed for 1 device(s).
[   34.694411] NVRM: None of the NVIDIA graphics adapters were initialized!
[   34.694414] [drm] Module unloaded
[   34.694536] NVRM: NVIDIA init module failed!

The same for device 05:00.1, which seems to be the eGPU's sound card. But I'm not clever enough to understand what happens there. I tried to force a PCI rescan by doing:

$ echo 1 > /sys/bus/pci/devices/0000:05:00.0/remove
$ echo 1 > /sys/bus/pci/devices/0000:05:00.0/rescan

which makes my Arch crash.

Last edited by anarki@buttereblume (2015-12-30 19:41:59)

Offline

#8 2015-12-30 21:45:44

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

Re: Can't load module for second GPU

[   34.694150] NVRM: This PCI I/O region assigned to your NVIDIA device is invalid:
               NVRM: BAR1 is 0M @ 0x0 (PCI:0000:05:00.0)

Apparently the device isn't getting its BAR allocations from Linux.

I'm not sure how it's supposed to happen - maybe you need pciehp, maybe it's driver's job - check if nouveau works, maybe you need to echo 1 somewhere...

Offline

#9 2016-02-07 20:50:10

kazpar
Member
Registered: 2016-02-07
Posts: 1

Re: Can't load module for second GPU

Hello, I had a similar problem with my egpu (it's Nvidia GT610 with Acer Extensa 5220 and GMA X3100)

NVRM: BAR1 is 0M

What I had to do was to remove PCI bridge devices, in my case it looks like this:

#lspci
...
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 04)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 04)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 04)
..

so lets remove those devices and rescan again:

echo 1 > /sys/bus/pci/devices/0000\:00\:1c.0/remove
echo 1 > /sys/bus/pci/devices/0000\:00\:1c.1/remove
echo 1 > /sys/bus/pci/devices/0000\:00\:1c.2/remove
echo 1 > /sys/bus/pci/rescan

modprobe nvidia

after this driver is loaded correctly and my egpu is running great.

Offline

#10 2018-10-31 17:39:32

wangcow
Member
Registered: 2018-04-12
Posts: 7

Re: Can't load module for second GPU

I'd hate to raise this from the dead, but did you get this to work? I'm having the exact same issue. I did some combination of things and have gotten the screen to work one time. Every other time is giving me the same dmesg output. Think pad X230T

Offline

#11 2018-10-31 19:44:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 14,467

Re: Can't load module for second GPU

Please open up your own thread with logs and information from your own - and more importantly - relevantly up to date system.

https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.

Offline

Board footer

Powered by FluxBB