Help to install tn40xx-driver on PVE 7.3

kors20

New Member
Mar 11, 2023
7
0
1
Hi all. Faced a problem. For knowledgeable people a trifle, but I can not do anything for two days. I am very weak in Linux. I'm using PVE 7.3. The problem is the following - I installed an SFP + network card https://www.lr-link.com/products/lrec6860af-sfp_.html. But there are no drivers for it in the kernel. I found the driver on github https://github.com/acooks/tn40xx-driver and installation instructions

# git clone -b release/tn40xx-004 https://github.com/acooks/tn40xx-driver.git /usr/src/tn40xx-004
# dkms add -m tn40xx -v 004

# dkms install -m tn40xx -v 004

And after this command I get the following:

error! Your kernel headers for kernel 5.15.74-1-pve cannot be found.
Please install the linux-headers-5.15.74-1-pve package,
or use the --kernelsourcedir option to tell DKMS where it's located

No matter what I do, nothing works.
Please help
 
error! Your kernel headers for kernel 5.15.74-1-pve cannot be found.
Please install the linux-headers-5.15.74-1-pve package,
or use the --kernelsourcedir option to tell DKMS where it's located
This is not uncommon as the Proxmox kernel headers are not installed by default and the packages have a non-default name. For pve-kernel-5.15.74-1-pve, you need to install pve-headers-5.15.74-1-pve. To have the headers installed automatically with each new kernel in the future, also install pve-headers.
No matter what I do, nothing works.
I don't know if you tried apt install pve-headers-5.15.74-1-pve but i would expect that to fix the missing headers.
 
I don't know if you tried apt install pve-headers-5.15.74-1-pve but i would expect that to fix the missing headers.
Of course, I also tried it, but there are always some errors.

root@pve:~# apt install pve-headers-5.15.74-1-pve
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package pve-headers-5.15.74-1-pve
E: Couldn't find any package by glob 'pve-headers-5.15.74-1-pve'
 
Of course, I also tried it, but there are always some errors.

root@pve:~# apt install pve-headers-5.15.74-1-pve
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package pve-headers-5.15.74-1-pve
E: Couldn't find any package by glob 'pve-headers-5.15.74-1-pve'
Did you run apt update with the right repository (see the Proxmox manual on how to configure the update repository)? Did you ever update your Proxmox (kernel version 5.15.74-1 is not the latest)? What is the output of apt update?
I'm sorry if you did all this already. I'm just working backwards from the error messages and guessing at what might be the problem.
 
thank you for your help! Yes, I did an apt update and an apt upgrade. I downloaded the proxmox image a couple of weeks ago and still use it. The repository is the one that was originally when installing proxmox. I looked at the manual, on the Proxmox website it is the same as it is set by default. perhaps the repository needs to be changed, I tried several options, but the result is always the same.
 
root@pve:~# apt-get update
Hit:1 http://ftp.debian.org/debian bullseye InRelease
Get:2 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Hit:3 http://ftp.debian.org/debian bullseye-updates InRelease
Err:4 https://enterprise.proxmox.com/debian/pve bullseye InRelease
401 Unauthorized [IP: 212.224.123.70 443]
Reading package lists... Done
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/bullseye/InRelease 401 Unauthorized [IP: 212.224.123.70 443]
E: The repository 'https://enterprise.proxmox.com/debian/pve bullseye InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@pve:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@pve:~# apt install pve-headers-5.15.74-1-pve
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package pve-headers-5.15.74-1-pve
E: Couldn't find any package by glob 'pve-headers-5.15.74-1-pve'
root@pve:~#
 
thank you for your help! Yes, I did an apt update and an apt upgrade.
Please never do apt upgrade but always apt dist-upgrade (as the manual explicitly specifies) to prevent problems (which do happen as threads on this forum will show).
I downloaded the proxmox image a couple of weeks ago and still use it. The repository is the one that was originally when installing proxmox.
The installed repository is the enterprise repository, which requires a paid subscription. Otherwise, it does not give you any updates and that is show in the output of apt update.
root@pve:~# apt-get update
Hit:1 http://ftp.debian.org/debian bullseye InRelease
Get:2 http://security.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Hit:3 http://ftp.debian.org/debian bullseye-updates InRelease
Err:4 https://enterprise.proxmox.com/debian/pve bullseye InRelease
401 Unauthorized [IP: 212.224.123.70 443]
Reading package lists... Done
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/bullseye/InRelease 401 Unauthorized [IP: 212.224.123.70 443]
E: The repository 'https://enterprise.proxmox.com/debian/pve bullseye InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
As you can see here, the enterprise repository does not allow you to use it (without a paid subscription). That's why it reports Unauthorized.
I looked at the manual, on the Proxmox website it is the same as it is set by default. perhaps the repository needs to be changed, I tried several options, but the result is always the same.
You need to disable the enterprise repository and add the no-subscription repository if you don't have a subscription.
This is a common issue when people first install Proxmox without a paid subscription and there are several threads about this on the forum.
 
Last edited:
You need to disable the enterprise repository and add the no-subscription repository if you don't have a subscription.
This is a common issue when people first install Proxmox without a paid subscription and there are several threads about this on the forum.
Oh thanks! I did not know this nuance. I will now try to change the repository. sorry for my stupid questions, i've never worked with linux.) But proxmox is very handy for some things!
 
Last edited:
Please never do apt upgrade but always apt dist-upgrade (as the manual explicitly specifies) to prevent problems (which do happen as threads on this forum will show).

The installed repository is the enterprise repository, which requires a paid subscription. Otherwise, it does not give you any updates and that is show in the output of apt update.

As you can see here, the enterprise repository does not allow you to use it (without a paid subscription). That's why it reports Unauthorized.

You need to disable the enterprise repository and add the no-subscription repository if you don't have a subscription.
This is a common issue when people first install Proxmox without a paid subscription and there are several threads about this on the forum.
Hello! I reinstalled proxmox, changed repositories like you said. Made an update and an upgrade. After that, it turned out to install the headers. But when installing the drivers again there was a problem. Can you tell me what could be wrong this time. Here is the system response:


root@pve:~# apt install pve-headers-5.15.85-1-pve

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

The following NEW packages will be installed:

pve-headers-5.15.85-1-pve

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 12.5 MB of archives.

After this operation, 86.9 MB of additional disk space will be used.

Get:1 http://download.proxmox.com/debian/pve bullseye/pve-no-subscription amd64 pve-headers-5.15.85-1-pve amd64 5.15.85-1 [12.5 MB]

Fetched 12.5 MB in 1s (13.0 MB/s)

Selecting previously unselected package pve-headers-5.15.85-1-pve.

(Reading database ... 100642 files and directories currently installed.)

Preparing to unpack .../pve-headers-5.15.85-1-pve_5.15.85-1_amd64.deb ...

Unpacking pve-headers-5.15.85-1-pve (5.15.85-1) ...

Setting up pve-headers-5.15.85-1-pve (5.15.85-1) ...



root@pve:~# dkms install -m tn40xx -v 004



Kernel preparation unnecessary for this kernel. Skipping...



Building module:

cleaning build area...

make -j12 KERNELRELEASE=5.15.85-1-pve -C /lib/modules/5.15.85-1-pve/build M=/var/lib/dkms/tn40xx/004/build...(bad exit status: 2)

Error! Bad return status for module build on kernel: 5.15.85-1-pve (x86_64)

Consult /var/lib/dkms/tn40xx/004/build/make.log for more information.

root@pve:~#




And here is the content of the log file:



DKMS make.log for tn40xx-004 for kernel 5.15.85-1-pve (x86_64)

Sun 12 Mar 2023 09:45:44 PM EET

make: Entering directory '/usr/src/linux-headers-5.15.85-1-pve'

CC [M] /var/lib/dkms/tn40xx/004/build/tn40.o

CC [M] /var/lib/dkms/tn40xx/004/build/CX4.o

CC [M] /var/lib/dkms/tn40xx/004/build/CX4_Linux.o

CC [M] /var/lib/dkms/tn40xx/004/build/QT2025_phy.o

CC [M] /var/lib/dkms/tn40xx/004/build/QT2025_phy_Linux.o

CC [M] /var/lib/dkms/tn40xx/004/build/TLK10232_phy.o

CC [M] /var/lib/dkms/tn40xx/004/build/TLK10232_phy_Linux.o

CC [M] /var/lib/dkms/tn40xx/004/build/AQR105_phy.o

CC [M] /var/lib/dkms/tn40xx/004/build/AQR105_phy_Linux.o

/var/lib/dkms/tn40xx/004/build/tn40.c: In function ‘bdx_ethtool_ops’:

/var/lib/dkms/tn40xx/004/build/tn40.c:4097:19: error: initialization of ‘int (*)(struct net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)’ from incompatible pointer type ‘int (*>

4097 | .get_coalesce = bdx_get_coalesce,

| ^~~~~~~~~~~~~~~~

/var/lib/dkms/tn40xx/004/build/tn40.c:4097:19: note: (near initialization for ‘bdx_ethtool_ops.get_coalesce’)

/var/lib/dkms/tn40xx/004/build/tn40.c:4098:19: error: initialization of ‘int (*)(struct net_device *, struct ethtool_coalesce *, struct kernel_ethtool_coalesce *, struct netlink_ext_ack *)’ from incompatible pointer type ‘int (*>

4098 | .set_coalesce = bdx_set_coalesce,

| ^~~~~~~~~~~~~~~~

/var/lib/dkms/tn40xx/004/build/tn40.c:4098:19: note: (near initialization for ‘bdx_ethtool_ops.set_coalesce’)

cc1: some warnings being treated as errors

make[1]: *** [scripts/Makefile.build:297: /var/lib/dkms/tn40xx/004/build/tn40.o] Error 1

make: *** [Makefile:1906: /var/lib/dkms/tn40xx/004/build] Error 2

make: Leaving directory '/usr/src/linux-headers-5.15.85-1-pve'
 
Hello! I reinstalled proxmox, changed repositories like you said. Made an update and an upgrade. After that, it turned out to install the headers. But when installing the drivers again there was a problem. Can you tell me what could be wrong this time. Here is the system response:
Maybe the driver does not work with kernel 5.15? Have a look at this issue on their github. Someone managed to work-around it and get it to work with Proxmox kernel 5.15.
 
it's same issues with every new upgrade/kernel. Lr-link and this chip is not used anymore. Driver over esxi made it work somehow, but cause error to pump every 2 sec. cheap to just get a 25g card instead and passthrough the card to a vm and the nas will handle the card directly as being built-in supported.
 
I have also wasted significant amount of time with drivers for this NIC. Got it running on Ubuntu eventually and the same drivers are working fine on Proxmox 7.4-1. Unfortunately I have absolutely no idea where I have downloaded it. Like seriously. It had to be some Github fork though. Feel free to diff it with a standard 003 branch from acooks.
 

Attachments

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!