Wireguard not working on Silverblue

On Fedora Silverblue 31 I cannot get Wireguard to work.
This is my rpm-ostree status:

● ostree://fedora:fedora/31/x86_64/silverblue
                   Version: 31.20200422.0 (2020-04-22T20:58:35Z)
                BaseCommit: 70bde311366d9ae9f0191e56c2c90c338ae000f2ad6938f030cb486622b466cc
              GPGSignature: Valid signature by 7D22D5867F2A4236474BF7B850CB390B3C3359C4
           LayeredPackages: asciinema chromium ffmpeg-libs fuse-exfat gnome-tweaks ifuse moby-engine mosh ncdu nmap python3-pyyaml qemu qemu-kvm virt-install
                            virt-manager virt-manager-common wireguard zsh
             LocalPackages: rpmfusion-free-release-31-1.noarch rpmfusion-nonfree-release-31-1.noarch

When I try to create wireguard interface I get this error:

abr 26 12:00:38 localhost.localdomain wg-quick[12355]: [#] ip link add wg0 type wireguard
abr 26 12:00:38 localhost.localdomain wg-quick[12355]: Error: Unknown device type.
abr 26 12:00:38 localhost.localdomain wg-quick[12355]: Unable to access interface: Protocol not supported

Hi pmontepagano. Welcome to the forum. After you installed the wireguard package, did you reboot your system? What does lsmod command show?

Yes, I rebooted. I also tried with the package wireguard-tools, which conflicts with wireguard. In both cases I rebooted after installing with rpm-ostree.

With wireguard package installed, lsmod outputs this:

    Module                  Size  Used by
    xt_state               16384  0
    nf_nat_h323            24576  0
    nf_conntrack_h323      81920  1 nf_nat_h323
    nf_nat_pptp            20480  0
    nf_conntrack_pptp      20480  1 nf_nat_pptp
    nf_nat_sip             20480  0
    nf_conntrack_sip       45056  1 nf_nat_sip
    nf_nat_irc             20480  0
    nf_conntrack_irc       20480  1 nf_nat_irc
    nf_nat_ftp             20480  0
    nf_conntrack_ftp       24576  1 nf_nat_ftp
    ccm                    20480  0
    rndis_host             20480  0
    cdc_ether              24576  1 rndis_host
    usbnet                 53248  2 rndis_host,cdc_ether
    mii                    16384  1 usbnet
    uas                    32768  0
    usb_storage            81920  1 uas
    ip6_udp_tunnel         16384  0
    udp_tunnel             16384  0
    nls_utf8               16384  1
    uinput                 20480  0
    isofs                  49152  1
    rfcomm                 90112  0
    xt_CHECKSUM            16384  1
    xt_MASQUERADE          20480  3
    nf_nat_tftp            16384  0
    nf_conntrack_tftp      20480  3 nf_nat_tftp
    tun                    57344  1
    bridge                208896  0
    stp                    16384  1 bridge
    llc                    16384  2 bridge,stp
    nf_conntrack_netbios_ns    16384  1
    nf_conntrack_broadcast    16384  1 nf_conntrack_netbios_ns
    xt_CT                  16384  3
    ip6t_REJECT            16384  12
    nf_reject_ipv6         20480  1 ip6t_REJECT
    ip6t_rpfilter          16384  1
    ipt_REJECT             16384  5
    nf_reject_ipv4         16384  1 ipt_REJECT
    xt_conntrack           16384  36
    ebtable_nat            16384  1
    ebtable_broute         16384  1
    ip6table_nat           16384  1
    ip6table_mangle        16384  1
    ip6table_raw           16384  1
    ip6table_security      16384  1
    iptable_nat            16384  1
    nf_nat                 53248  9 nf_nat_irc,ip6table_nat,nf_nat_ftp,nf_nat_tftp,nf_nat_pptp,nf_nat_h323,iptable_nat,xt_MASQUERADE,nf_nat_sip
    iptable_mangle         16384  1
    iptable_raw            16384  1
    iptable_security       16384  1
    nf_conntrack          163840  19 xt_conntrack,nf_nat_irc,nf_nat,nf_conntrack_tftp,nf_nat_ftp,xt_state,nf_conntrack_pptp,nf_conntrack_netbios_ns,nf_nat_tftp,nf_conntrack_sip,nf_conntrack_h323,nf_nat_pptp,nf_conntrack_broadcast,nf_conntrack_irc,nf_conntrack_ftp,xt_CT,nf_nat_h323,xt_MASQUERADE,nf_nat_sip
    nf_defrag_ipv6         24576  1 nf_conntrack
    nf_defrag_ipv4         16384  1 nf_conntrack
    ip_set                 57344  0
    nfnetlink              16384  1 ip_set
    ebtable_filter         16384  1
    ebtables               40960  3 ebtable_nat,ebtable_filter,ebtable_broute
    ip6table_filter        16384  1
    ip6_tables             36864  7 ip6table_filter,ip6table_raw,ip6table_nat,ip6table_mangle,ip6table_security
    iptable_filter         16384  1
    cmac                   16384  5
    bnep                   28672  2
    sunrpc                491520  1
    snd_sof_pci            20480  0
    vfat                   20480  2
    fat                    86016  1 vfat
    snd_sof_intel_byt      20480  1 snd_sof_pci
    snd_sof_intel_ipc      20480  1 snd_sof_intel_byt
    snd_sof_xtensa_dsp     16384  1 snd_sof_pci
    snd_sof_intel_hda_common    81920  1 snd_sof_pci
    snd_soc_hdac_hda       24576  1 snd_sof_intel_hda_common
    snd_sof_intel_hda      20480  1 snd_sof_intel_hda_common
    snd_sof               126976  4 snd_sof_pci,snd_sof_intel_hda_common,snd_sof_intel_byt,snd_sof_intel_ipc
    snd_soc_skl           180224  0
    snd_soc_sst_ipc        20480  1 snd_soc_skl
    snd_soc_sst_dsp        40960  1 snd_soc_skl
    snd_hda_codec_hdmi     73728  1
    snd_hda_ext_core       36864  4 snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_soc_skl,snd_sof_intel_hda
    x86_pkg_temp_thermal    20480  0
    intel_powerclamp       20480  0
    coretemp               20480  0
    snd_soc_acpi_intel_match    32768  3 snd_sof_pci,snd_sof_intel_hda_common,snd_soc_skl
    snd_soc_acpi           16384  3 snd_sof_pci,snd_soc_acpi_intel_match,snd_soc_skl
    kvm_intel             311296  0
    iwlmvm                454656  0
    snd_soc_core          294912  4 snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_soc_skl
    snd_hda_codec_realtek   126976  1
    snd_hda_codec_generic    94208  1 snd_hda_codec_realtek
    ledtrig_audio          16384  3 snd_hda_codec_generic,snd_hda_codec_realtek,snd_sof
    kvm                   802816  1 kvm_intel
    mac80211              991232  1 iwlmvm
    snd_compress           28672  1 snd_soc_core
    ac97_bus               16384  1 snd_soc_core
    snd_pcm_dmaengine      16384  1 snd_soc_core
    snd_hda_intel          53248  4
    libarc4                16384  1 mac80211
    snd_intel_dspcfg       28672  4 snd_hda_intel,snd_sof_pci,snd_sof_intel_hda_common,snd_soc_skl
    iwlwifi               339968  1 iwlmvm
    mei_hdcp               24576  0
    iTCO_wdt               16384  0
    btusb                  57344  0
    snd_hda_codec         163840  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda
    iTCO_vendor_support    16384  1 iTCO_wdt
    btrtl                  24576  1 btusb
    uvcvideo              114688  0
    btbcm                  16384  1 btusb
    snd_hda_core          102400  10 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hda,snd_soc_skl,snd_sof_intel_hda
    intel_rapl_msr         20480  0
    snd_hwdep              16384  1 snd_hda_codec
    btintel                32768  1 btusb
    snd_seq                86016  0
    snd_seq_device         16384  1 snd_seq
    bluetooth             634880  33 btrtl,btintel,btbcm,bnep,btusb,rfcomm
    snd_pcm               126976  9 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_core,snd_soc_skl,snd_hda_core,snd_pcm_dmaengine
    videobuf2_vmalloc      20480  1 uvcvideo
    videobuf2_memops       20480  1 videobuf2_vmalloc
    irqbypass              16384  1 kvm
    videobuf2_v4l2         28672  1 uvcvideo
    intel_cstate           20480  0
    cfg80211              843776  3 iwlmvm,iwlwifi,mac80211
    videobuf2_common       57344  2 videobuf2_v4l2,uvcvideo
    intel_uncore          147456  0
    snd_timer              40960  2 snd_seq,snd_pcm
    intel_rapl_perf        20480  0
    videodev              266240  3 videobuf2_v4l2,uvcvideo,videobuf2_common
    snd                   102400  20 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm
    asus_nb_wmi            28672  0
    wmi_bmof               16384  0
    asus_wmi               36864  1 asus_nb_wmi
    pcspkr                 16384  0
    mei_me                 45056  1
    sparse_keymap          16384  1 asus_wmi
    soundcore              16384  1 snd
    i2c_i801               32768  0
    spi_pxa2xx_platform    32768  0
    dw_dmac                16384  0
    mei                   122880  3 mei_hdcp,mei_me
    mc                     61440  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common
    joydev                 28672  0
    ecdh_generic           16384  2 bluetooth
    processor_thermal_device    20480  0
    idma64                 20480  0
    ecc                    36864  1 ecdh_generic
    rfkill                 28672  9 asus_wmi,bluetooth,cfg80211
    intel_rapl_common      32768  2 intel_rapl_msr,processor_thermal_device
    intel_soc_dts_iosf     20480  1 processor_thermal_device
    int3403_thermal        16384  0
    int340x_thermal_zone    16384  2 int3403_thermal,processor_thermal_device
    int3400_thermal        20480  0
    acpi_thermal_rel       16384  1 int3400_thermal
    acpi_tad               16384  0
    acpi_pad              184320  0
    ip_tables              32768  5 iptable_filter,iptable_security,iptable_raw,iptable_nat,iptable_mangle
    dm_crypt               49152  2
    mmc_block              53248  3
    i915                 2453504  5
    hid_multitouch         32768  0
    i2c_algo_bit           16384  1 i915
    drm_kms_helper        233472  1 i915
    crct10dif_pclmul       16384  1
    crc32_pclmul           16384  0
    sdhci_pci              57344  0
    drm                   585728  6 drm_kms_helper,i915
    cqhci                  32768  1 sdhci_pci
    ghash_clmulni_intel    16384  0
    sdhci                  73728  1 sdhci_pci
    nvme                   49152  3
    serio_raw              20480  0
    nvme_core             110592  5 nvme
    mmc_core              184320  4 sdhci,cqhci,mmc_block,sdhci_pci
    wmi                    36864  2 asus_wmi,wmi_bmof
    i2c_hid                32768  0
    pinctrl_cannonlake     36864  2
    video                  53248  2 asus_wmi,i915
    pinctrl_intel          32768  2 pinctrl_cannonlake
    btrfs                1486848  0
    blake2b_generic        20480  0
    xor                    24576  1 btrfs
    zstd_compress         188416  1 btrfs
    raid6_pq              122880  1 btrfs
    libcrc32c              16384  3 nf_conntrack,nf_nat,btrfs
    crc32c_intel           24576  9
    zstd_decompress        90112  1 btrfs
    fuse                  139264  7

modprobe fails:

sudo modprobe wireguard
modprobe: ERROR: could not insert 'wireguard': Operation not permitted

the problem with fc31 and kernel 5.5 is that the userspace utilities are there but the wireguard kernel modules only come with kernel 5.6. my current silverblue build, updated a few days ago already comes with kernel 5.6 so it should work now. i’ll test is ASAP because i was also waiting for wg support.

Thanks. Rebasing to F32 made it work, since it uses kernel 5.6.

2 Likes

FYI, as of today SB31 now has the 5.6 kernel, so wireguard should work there too.

1 Like