RTL8125 NIC - Force ASPM via shell failed

Hi all,

I try to force ASPM on my Realtek RTL8125. But I get a permission denied despite using sudo. Used the same NIC prior (moved to a new mainboard) and had no problems doing this.

Any ideas?

lspci output:
00:1d.0 PCI bridge: Intel Corporation Device 7ab6 (rev 11) (prog-if 00 [Normal decode])
LnkCap: Port #15, Speed 16GT/s, Width x1, ASPM not supported
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
pcilib: sysfs_read_vpd: read failed: No such device
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 <64us
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+

Force command output:
sudo echo 1 > /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm
zsh: permission denied: /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm

Thanks in advance :slight_smile:

Forgot a potentially important info… I am using TrueNAS Scale 24.10.1

In this case, SUDO won’t work. You see, the I/O redirect is at the USER level, not root level. It’s a quirk of Unix.

This can work;
echo 1 | sudo tee -a /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm
Or you can switch user IDs to root.

1 Like

Thanks for the hints :slight_smile: Unforgently, it doesnt work or I did something wrong.

Heres the “journey”:

root@truenas[~]# sudo echo 1 > /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm
zsh: permission denied: /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm
root@truenas[~]# sudo lspci -vv | awk ‘/ASPM/{print $0}’ RS= | grep --color -P ‘( ^ [a-z0-9:.]+|ASPM |Diabled; |Enabled;)’
00:1d.0 PCI bridge: Intel Corporation Device 7ab6 (rev 11) (prog-if 00 [Normal decode])
LnkCap: Port #15, Speed 16GT/s, Width x1, ASPM not supported
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
pcilib: sysfs_read_vpd: read failed: No such device
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 <64us
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
root@truenas[~]# sudo echo 1 > /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm
zsh: permission denied: /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm
root@truenas[~]# echo 1 | sudo tee -a /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm
tee: ‘/sys/bus/pci/devices/0000:01:00.0/link/l1_aspm’: Permission denied
1
root@truenas[~]# sudo -i

Warning: the supported mechanisms for making configuration changes
are the TrueNAS WebUI, CLI, and API exclusively. ALL OTHERS ARE
NOT SUPPORTED AND WILL RESULT IN UNDEFINED BEHAVIOR AND MAY
RESULT IN SYSTEM FAILURE.

root@truenas[~]# sudo lspci -vv | awk ‘/ASPM/{print $0}’ RS= | grep --color -P ‘( ^ [a-z0-9:.]+|ASPM |Diabled; |Enabled;)’
00:1d.0 PCI bridge: Intel Corporation Device 7ab6 (rev 11) (prog-if 00 [Normal decode])
LnkCap: Port #15, Speed 16GT/s, Width x1, ASPM not supported
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
pcilib: sysfs_read_vpd: read failed: No such device
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 <64us
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
root@truenas[~]# sudo echo 1 > /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm
zsh: permission denied: /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm
root@truenas[~]# echo 1 | sudo tee -a /sys/bus/pci/devices/0000:01:00.0/link/l1_aspm
tee: ‘/sys/bus/pci/devices/0000:01:00.0/link/l1_aspm’: Permission denied
1

You are already user root so you don’t use SUDO. The original message was not clear.

Now if you can’t set the parameter when switched to user root, then I don’t know.