Wireguard problem on Xavier

Hi there,

I’m currently experiencing some issues with the Wireguard protocol on my Jetson device. Even though I’ve installed it successfully, it doesn’t seem to be working as expected. Whenever I try to run it, an error message pops up.

$ sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
Error: Unknown device type.
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"

When I try to load Wirguard module by hand:

$ sudo modprobe wireguard && lsmod | grep -i wireguard
modprobe: FATAL: Module wireguard not found in directory /lib/modules/5.10.104-tegra

and When I try to build Wireguard module from the source:

$ make -C wireguard-linux-compat/src -j$(nproc)
make: Entering directory '/home/imperiumdrive/javad/wireguard-linux-compat/src'
  CC [M]  /home/imperiumdrive/javad/wireguard-linux-compat/src/main.o
  CC [M]  /home/imperiumdrive/javad/wireguard-linux-compat/src/noise.o
  CC [M]  /home/imperiumdrive/javad/wireguard-linux-compat/src/device.o
  CC [M]  /home/imperiumdrive/javad/wireguard-linux-compat/src/peer.o
  CC [M]  /home/imperiumdrive/javad/wireguard-linux-compat/src/timers.o
  CC [M]  /home/imperiumdrive/javad/wireguard-linux-compat/src/queueing.o
  CC [M]  /home/imperiumdrive/javad/wireguard-linux-compat/src/send.o
  CC [M]  /home/imperiumdrive/javad/wireguard-linux-compat/src/receive.o
In file included from <command-line>:
/home/imperiumdrive/javad/wireguard-linux-compat/src/compat/compat.h:38:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
   38 | #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
      |  ^~~~~
In file included from <command-line>:
/home/imperiumdrive/javad/wireguard-linux-compat/src/compat/compat.h:38:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
   38 | #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
      |  ^~~~~
In file included from <command-line>:
/home/imperiumdrive/javad/wireguard-linux-compat/src/compat/compat.h:38:2: error: #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."
   38 | #error "WireGuard has been merged into Linux >= 5.6 and therefore this compatibility module is no longer required."

I believe the issue is tied to the Kernel header since Tegra utilizes a personalized kernel. Is there a solution available to resolve this problem?

** Host Info **

$ head -n 1 /etc/nv_tegra_release
# R35 (release), REVISION: 3.1, GCID: 32827747, BOARD: t186ref, EABI: aarch64, DATE: Sun Mar 19 15:19:21 UTC 2023
$ sudo apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Version: 5.1.1-b56
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-jetpack-runtime (= 5.1.1-b56), nvidia-jetpack-dev (= 5.1.1-b56)
Homepage: http://developer.nvidia.com/jetson
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_5.1.1-b56_arm64.deb
Size: 29304
SHA256: 7b6c8c6cb16028dcd141144b6b0bbaa762616d0a47aafa3c3b720cb02b2c8430
SHA1: 387e4e47133c4235666176032af0f2ec86461dbb
MD5sum: 0a8692031bf35cc46f7a498e2937bda9
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
[*] other

SDK Manager Version
1.9.1.10844
[*] other

Host Machine Version
native Ubuntu 18.04
[*] other (20.04)

Hi!

I had the same issue with Wireguard, but on the Orin NX plattform. I guess it’s the same procedure for the AGX, like for the Orin NX. The issue is, that Wireguard moved from 5.6 Linux Kernel to a official kernel module. This kernel module isn’t activated by the JetPack on default, but you can active it on the Jetson device. I’ve wrote a Wiki-Entry for that: Build new Kernel on EdgeKit · PCB-Arts/edgekit Wiki · GitHub

After that it’s possible to add the wg0 interface:

root@edgekit-desktop:/boot# ip a | grep wg
12: wg0-client-OSl: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN group default qlen 1000

Hope this helps!

3 Likes

Hi,
We don’t have much experience on this. Thank saber.kaygusuz for sharing suggestion.

Thanks a lot,
On 18.04 I installed it by following Wireguard instructions on building from the source (Compilation from Source Code - WireGuard)
I will test your method on 20.04

Make sense, that it worked on 18.04, since it is the 4.9 kernel (without the build-in Wireguard-module).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.