You are not logged in.

#1 2024-03-21 09:51:31

gcb
Member
Registered: 2014-02-12
Posts: 212

[SOLVED] should i blacklist thunderbolt modules? (avoid pcie tunnel)

On an AMD machine with no thunderbolt or pcie4, i have thunderbolt module loaded. Already checked that rmmod'ing it causes no visible issues.

Should I black list it? or is the module necessary for some application to detect the absence of thunderbolt somehow? or does it provide any other utility besides enabling the missing hardware?

goal is to *not* have PCIe tunneling in any way.

Last edited by gcb (2024-04-03 18:44:29)

Offline

#2 2024-03-21 15:34:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,790

Re: [SOLVED] should i blacklist thunderbolt modules? (avoid pcie tunnel)

Anything visible in the journal about what triggers the module?
Or in lsmod whether and what other module uses it?
You can just try to add "modprobe.blacklist=thunderbolt" to the kernel parameter, this will prevent the module from being implicitly loaded but it can still be called in as dependency or explicitly, but I'd first check that you don't actually have some thunderbolt device (doubling as displayport, maybe - or t's the charger)?

Offline

#3 2024-04-03 17:30:10

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: [SOLVED] should i blacklist thunderbolt modules? (avoid pcie tunnel)

I have the thunderbolt option in the bios disabled (not even sure why it is there since, again, this AMD laptop doesn't have one). Maybe it have usb4 pci passtrhough something and bios call that "thunderbolt features" (but again, which is off)

 $ lsmod | g thund
116:thunderbolt           536576  0

no dependency.

$ journalclt -b0
...
Apr 03 13:49:56 elite systemd[1]: Started D-Bus System Message Bus.
Apr 03 13:49:56 elite systemd[1]: Reached target Basic System.
Apr 03 13:49:56 elite systemd[1]: Starting Bluetooth service...
Apr 03 13:49:56 elite systemd[1]: Starting Thunderbolt system service...
Apr 03 13:49:56 elite systemd[1]: Starting Netfilter Tables...
Apr 03 13:49:56 elite systemd[1]: Starting Power Profiles daemon...
Apr 03 13:49:56 elite systemd[1]: Starting User Login Management...

hum, probably systemd being a greedy bastard?

systemctl list-dependencies Thunderbolt --reverse --all

nothing seems to require it.

Last edited by gcb (2024-04-03 17:31:00)

Offline

#4 2024-04-03 17:48:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,790

Re: [SOLVED] should i blacklist thunderbolt modules? (avoid pcie tunnel)

Offline

#5 2024-04-03 18:08:23

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: [SOLVED] should i blacklist thunderbolt modules? (avoid pcie tunnel)

that seems to be it. love how systemd cannot get to use it's own tooling for knowing what started what.

status from bolt shows this log

udev: uuid is stable: no (for NHI: 0x162f)
device added, status: unknown, at /sys/devices/pci0000:00/0000:00:08.3/0000:04:00.6/domain1/1-0

which points to

04:00.6 USB controller: Advanced Micro Devices, Inc. [AMD] Rembrandt USB4/Thunderbolt NHI controller #2

Reading about that, it is indeed USB4 with PCIe tunneling. I guess people call that Thunderbolt?

Not sure i need those services if the feature is bios disabled? or if the bios flag is just a hint to the OS drivers?

Offline

#6 2024-04-03 18:15:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,790

Re: [SOLVED] should i blacklist thunderbolt modules? (avoid pcie tunnel)

Not sure i need those services

Why is the pacakge installed? gnome control center?
If you don't know why, you likely don't need it (but to fulfill a package dependency)

Offline

#7 2024-04-03 18:27:45

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: [SOLVED] should i blacklist thunderbolt modules? (avoid pcie tunnel)

my usb4 do get class changed (by nhi_probe()?) to 0x0c0340 which says it can receive pcie passthrough and 40gbps.

$ cd /sys/devices/pci....
$ diff -y $(<tail *)
... diffing all the device files without the module loaded on left, with thunderbolt module on right

==> ari_enabled <==						==> ari_enabled <==
0								0

==> broken_parity_status <==					==> broken_parity_status <==
0								0

==> class <==							==> class <==
0x0c0340							0x0c0340

==> config <==							==> config <==
(binary stuff i have no idea how to parse)

==> consistent_dma_mask_bits <==				==> consistent_dma_mask_bits <==
64								64

							      >	==> consumer:pci:0000:04:00.4 <==
							      >
==> current_link_speed <==					==> current_link_speed <==
16.0 GT/s PCIe							16.0 GT/s PCIe

==> current_link_width <==					==> current_link_width <==
16								16

==> d3cold_allowed <==						==> d3cold_allowed <==
1								1

==> device <==							==> device <==
0x162f								0x162f

==> dma_mask_bits <==						==> dma_mask_bits <==
64								64

							      >	==> domain1 <==
							      >
							      >	==> driver <==
							      >
==> driver_override <==						==> driver_override <==
(null)								(null)

==> enable <==							==> enable <==
0							      |	1

==> firmware_node <==						==> firmware_node <==

==> iommu <==							==> iommu <==

==> iommu_group <==						==> iommu_group <==

==> irq <==							==> irq <==
84								84

==> link <==							==> link <==

==> local_cpulist <==						==> local_cpulist <==
0-11								0-11

==> local_cpus <==						==> local_cpus <==
0fff								0fff

==> max_link_speed <==						==> max_link_speed <==
16.0 GT/s PCIe							16.0 GT/s PCIe

==> max_link_width <==						==> max_link_width <==
16								16

==> modalias <==						==> modalias <==
pci:v00001022d0000162Fsv00001022sd0000162Fbc0Csc03i40		pci:v00001022d0000162Fsv00001022sd0000162Fbc0Csc03i40

==> msi_bus <==							==> msi_bus <==
1								1

							      >	==> msi_irqs <==
							      >
==> numa_node <==						==> numa_node <==
-1								-1

							      >	==> pools <==
							      >	poolinfo - 0.1
							      >	thunderbolt_ctl    10   16  256  1
							      >
==> power <==							==> power <==

==> power_state <==						==> power_state <==
unknown							      |	D0

==> reset_method <==						==> reset_method <==
acpi pm								acpi pm

==> resource <==						==> resource <==
0x0000000000000000 0x0000000000000000 0x0000000000000000	0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000	0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000	0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000	0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000	0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000	0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000	0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000	0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000	0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000	0x0000000000000000 0x0000000000000000 0x0000000000000000

==> revision <==						==> revision <==
0x00								0x00

==> subsystem <==						==> subsystem <==

==> subsystem_device <==					==> subsystem_device <==
0x162f								0x162f

==> subsystem_vendor <==					==> subsystem_vendor <==
0x1022								0x1022

==> uevent <==							==> uevent <==
							      >	DRIVER=thunderbolt
PCI_CLASS=C0340							PCI_CLASS=C0340
PCI_ID=1022:162F						PCI_ID=1022:162F
PCI_SUBSYS_ID=1022:162F						PCI_SUBSYS_ID=1022:162F
PCI_SLOT_NAME=0000:04:00.6					PCI_SLOT_NAME=0000:04:00.6
MODALIAS=pci:v00001022d0000162Fsv00001022sd0000162Fbc0Csc03i4	MODALIAS=pci:v00001022d0000162Fsv00001022sd0000162Fbc0Csc03i4

==> vendor <==							==> vendor <==
0x1022								0x1022

==> wakeup <==							==> wakeup <==

I think the most import part is Enabled moving to 0 without the driver. But i notice no change in using the ports. It doesn't seem to be a virtual device. I only have enough ports as shown in lspci.

Offline

#8 2024-04-03 18:29:08

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: [SOLVED] should i blacklist thunderbolt modules? (avoid pcie tunnel)

seth wrote:

Not sure i need those services

Why is the pacakge installed? gnome control center?
If you don't know why, you likely don't need it (but to fulfill a package dependency)


kinda.

:: removing bolt breaks dependency 'bolt' required by plasma-thunderbolt

Offline

#9 2024-04-03 18:42:23

gcb
Member
Registered: 2014-02-12
Posts: 212

Re: [SOLVED] should i blacklist thunderbolt modules? (avoid pcie tunnel)

thanks for pointing me to bolt.

of course there's `boltctl` which shows more than the /sys files...

 $ boltctl domains
 ● domain0 f2...-ffff-ffffffffffff
   ├─ bootacl:  0/0
   └─ security: nopcie

 ● domain1 f2...-ffff-ffffffffffff
   ├─ bootacl:  0/0
   └─ security: nopcie

that magic string there, from https://gitlab.freedesktop.org/bolt/bolt

nopcie : PCIe tunneling is disabled/forbidden from the BIOS. Available in some USB4 systems.

tells me all I needed. It is in disabled pcie mode. Not "available but controlled by the driver auth shenanigans" which is what I was trying to avoid.

So I think I do need the driver/bolt/whole9yards ... but pcie tunnel is not possible despite what the driver is made to try (i hope, basing it on systemd docs, not code. yiikes).

Offline

Board footer

Powered by FluxBB