Score:0

Error using pciutils.lspci on Ubuntu Core

uz flag

I have installed Ubuntu Core on a IoT device and I am going through a number of steps to figure out why a cellular modem is not being detected on it with modem manager.

I want to run the lspci command, so in order to get it on Ubuntu Core I ran the following command:

sudo snap install pciutils

After installing the Snap, I ran the command and now an error is being displayed:

user@ubuntu:~$ sudo pciutils.lspci
lspci: Cannot open /sys/bus/pci/devices
user@ubuntu:~$ 

What do I need to do next to have this command work without the error?

Do I need to run the snap connect ... command, if so how would I know what to connect it to?

Score:0
bg flag

The first thing you can check is to type snap connections or snap interfaces to check if pciutils snap has connected to the specific interfaces. By default, iirc, pciutils didn't configure auto-connection capability on store, so yes you need to snap connect to the interfaces it needs to grant.

e.g. `snap connect pciutils:<plug> :system-observe

https://snapcraft.io/docs/supported-interfaces

Kris avatar
uz flag
Thanks, running the command `snap connect pciutils:hardware-observe :hardware-observe` made it work. To find the available plugs I used the command `snap connections pciutils`.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.