Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lspci: Unable to load libkmod resources: error -12 #20683

Closed
bjornfor opened this issue Nov 24, 2016 · 3 comments
Closed

lspci: Unable to load libkmod resources: error -12 #20683

bjornfor opened this issue Nov 24, 2016 · 3 comments
Assignees

Comments

@bjornfor
Copy link
Contributor

Issue description

On NixOS 16.09:

$ lspci -v >/dev/null
lspci: Unable to load libkmod resources: error -12

On Ubuntu 16.04:

$ lspci -v >/dev/null
(no error message)

Here is a full diff of the output (unfortunately without the error message which was printed to stderr, I forgot to redirect it):

$ diff -u lspci_v_nixos.txt lspci_v_ubuntu.txt
--- lspci_v_nixos.txt	2016-11-24 09:53:22.270048691 +0100
+++ lspci_v_ubuntu.txt	2016-11-24 09:52:14.290152365 +0100
@@ -4,15 +4,17 @@
 	Capabilities: <access denied>
 	Kernel driver in use: bdw_uncore
 
-00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09) (prog-if 00 [VGA controller])
+00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09) (prog-if 00 [VGA controller])
+	DeviceName:  Onboard IGD
 	Subsystem: Device 1991:5591
-	Flags: bus master, fast devsel, latency 0, IRQ 51
+	Flags: bus master, fast devsel, latency 0, IRQ 48
 	Memory at b1000000 (64-bit, non-prefetchable) [size=16M]
 	Memory at c0000000 (64-bit, prefetchable) [size=256M]
 	I/O ports at 4000 [size=64]
 	Expansion ROM at <unassigned> [disabled]
 	Capabilities: <access denied>
 	Kernel driver in use: i915
+	Kernel modules: i915
 
 00:03.0 Audio device: Intel Corporation Broadwell-U Audio Controller (rev 09)
 	Subsystem: Intel Corporation Broadwell-U Audio Controller
@@ -20,27 +22,30 @@
 	Memory at b2214000 (64-bit, non-prefetchable) [size=16K]
 	Capabilities: <access denied>
 	Kernel driver in use: snd_hda_intel
+	Kernel modules: snd_hda_intel
 
 00:14.0 USB controller: Intel Corporation Wildcat Point-LP USB xHCI Controller (rev 03) (prog-if 30 [XHCI])
-	Subsystem: Intel Corporation Device 7270
+	Subsystem: Intel Corporation Wildcat Point-LP USB xHCI Controller
 	Flags: bus master, medium devsel, latency 0, IRQ 45
 	Memory at b2200000 (64-bit, non-prefetchable) [size=64K]
 	Capabilities: <access denied>
 	Kernel driver in use: xhci_hcd
 
 00:16.0 Communication controller: Intel Corporation Wildcat Point-LP MEI Controller #1 (rev 03)
-	Subsystem: Intel Corporation Device 7270
-	Flags: bus master, fast devsel, latency 0, IRQ 47
+	Subsystem: Intel Corporation Wildcat Point-LP MEI Controller
+	Flags: bus master, fast devsel, latency 0, IRQ 49
 	Memory at b221c000 (64-bit, non-prefetchable) [size=32]
 	Capabilities: <access denied>
 	Kernel driver in use: mei_me
+	Kernel modules: mei_me
 
 00:1b.0 Audio device: Intel Corporation Wildcat Point-LP High Definition Audio Controller (rev 03)
-	Subsystem: Intel Corporation Device 7270
-	Flags: bus master, fast devsel, latency 32, IRQ 48
+	Subsystem: Intel Corporation Wildcat Point-LP High Definition Audio Controller
+	Flags: bus master, fast devsel, latency 32, IRQ 51
 	Memory at b2210000 (64-bit, non-prefetchable) [size=16K]
 	Capabilities: <access denied>
 	Kernel driver in use: snd_hda_intel
+	Kernel modules: snd_hda_intel
 
 00:1c.0 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #1 (rev e3) (prog-if 00 [Normal decode])
 	Flags: bus master, fast devsel, latency 0, IRQ 42
@@ -50,6 +55,7 @@
 	Prefetchable memory behind bridge: 00000000b0300000-00000000b04fffff
 	Capabilities: <access denied>
 	Kernel driver in use: pcieport
+	Kernel modules: shpchp
 
 00:1c.2 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #3 (rev e3) (prog-if 00 [Normal decode])
 	Flags: bus master, fast devsel, latency 0, IRQ 43
@@ -59,6 +65,7 @@
 	Prefetchable memory behind bridge: 00000000d0000000-00000000d00fffff
 	Capabilities: <access denied>
 	Kernel driver in use: pcieport
+	Kernel modules: shpchp
 
 00:1c.3 PCI bridge: Intel Corporation Wildcat Point-LP PCI Express Root Port #4 (rev e3) (prog-if 00 [Normal decode])
 	Flags: bus master, fast devsel, latency 0, IRQ 44
@@ -66,23 +73,25 @@
 	Memory behind bridge: b2000000-b20fffff
 	Capabilities: <access denied>
 	Kernel driver in use: pcieport
+	Kernel modules: shpchp
 
 00:1d.0 USB controller: Intel Corporation Wildcat Point-LP USB EHCI Controller (rev 03) (prog-if 20 [EHCI])
-	Subsystem: Intel Corporation Device 7270
+	Subsystem: Intel Corporation Wildcat Point-LP USB EHCI Controller
 	Flags: bus master, medium devsel, latency 0, IRQ 23
 	Memory at b221a000 (32-bit, non-prefetchable) [size=1K]
 	Capabilities: <access denied>
 	Kernel driver in use: ehci-pci
 
 00:1f.0 ISA bridge: Intel Corporation Wildcat Point-LP LPC Controller (rev 03)
-	Subsystem: Intel Corporation Device 7270
+	Subsystem: Intel Corporation Wildcat Point-LP LPC Controller
 	Flags: bus master, medium devsel, latency 0
 	Capabilities: <access denied>
 	Kernel driver in use: lpc_ich
+	Kernel modules: lpc_ich
 
 00:1f.2 SATA controller: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode] (rev 03) (prog-if 01 [AHCI 1.0])
-	Subsystem: Intel Corporation Device 7270
-	Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 46
+	Subsystem: Intel Corporation Wildcat Point-LP SATA Controller [AHCI Mode]
+	Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 47
 	I/O ports at 40b0 [size=8]
 	I/O ports at 40a0 [size=4]
 	I/O ports at 4090 [size=8]
@@ -91,21 +100,24 @@
 	Memory at b2219000 (32-bit, non-prefetchable) [size=2K]
 	Capabilities: <access denied>
 	Kernel driver in use: ahci
+	Kernel modules: ahci
 
 00:1f.3 SMBus: Intel Corporation Wildcat Point-LP SMBus Controller (rev 03)
-	Subsystem: Intel Corporation Device 7270
+	Subsystem: Intel Corporation Wildcat Point-LP SMBus Controller
 	Flags: medium devsel, IRQ 3
 	Memory at b2218000 (64-bit, non-prefetchable) [size=256]
 	I/O ports at 4040 [size=32]
+	Kernel modules: i2c_i801
 
 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)
-	Subsystem: Realtek Semiconductor Co., Ltd. Device 0123
-	Flags: bus master, fast devsel, latency 0, IRQ 49
+	Subsystem: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
+	Flags: bus master, fast devsel, latency 0, IRQ 46
 	I/O ports at 3000 [size=256]
 	Memory at b2100000 (64-bit, non-prefetchable) [size=4K]
 	Memory at d0000000 (64-bit, prefetchable) [size=16K]
 	Capabilities: <access denied>
 	Kernel driver in use: r8169
+	Kernel modules: r8169
 
 03:00.0 Network controller: Intel Corporation Wireless 3160 (rev 83)
 	Subsystem: Intel Corporation Dual Band Wireless AC 3160
@@ -113,4 +125,5 @@
 	Memory at b2000000 (64-bit, non-prefetchable) [size=8K]
 	Capabilities: <access denied>
 	Kernel driver in use: iwlwifi
+	Kernel modules: iwlwifi

Looks like fixing the error will allow NixOS to print the Kernel modules: line. The other diff is due to lspci v3.3.1 in Ubuntu vs v3.5.1 in NixOS and different IRQ assignments.

I also ran with sudo ... and sudo -E .... No change.

Technical details

@vcunat
Copy link
Member

vcunat commented Nov 24, 2016

It uses hardcoded path /lib/modules/...

@vcunat vcunat self-assigned this Nov 24, 2016
@vcunat vcunat closed this as completed in 286c836 Nov 24, 2016
vcunat added a commit that referenced this issue Nov 24, 2016
vcunat added a commit that referenced this issue Nov 24, 2016
Fixes #20683.

(cherry picked from commit ceda8cb)
It seems safe enough to unify the behavior with libkmod,
especially on nixos.
@bjornfor
Copy link
Contributor Author

Thank you!

@vcunat
Copy link
Member

vcunat commented Nov 24, 2016

Sent patch upstream, as it seems generally useful.

adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
Fixes NixOS#20683.

(cherry picked from commit ceda8cb)
It seems safe enough to unify the behavior with libkmod,
especially on nixos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants