Cant install Mediatek MT7612U Drivers

Hey guys, i cant install My USB Wifi Adapter.
Nix doesn’t recognize it, how should I install the driver?

Where are you getting the driver from? How are you trying to install it?

i get this MediaTek | MT7612U but idk how to install it with nix(i have my nvidia old driver loaded, printer, but idk how to deal with this wifi card)

" MT7612U_DPO_LinuxSTA_3.0.0.1_20140718"

Can we get an lsmod and a dmesg? That dongle should be supported by one of the mt76 kernel drivers.

You may need to figure out the exact one and explicitly add it to boot.kernelModules or such, but I think something else is wrong here.

[e@nixos:~]$ lsmod
Module                  Size  Used by
ccm                    20480  3
af_packet              65536  8
qrtr                   53248  4
snd_seq_dummy          12288  0
snd_hrtimer            12288  1
snd_seq               102400  7 snd_seq_dummy
xt_conntrack           12288  2
nf_conntrack          188416  1 xt_conntrack
nf_defrag_ipv6         24576  1 nf_conntrack
nf_defrag_ipv4         12288  1 nf_conntrack
ip6t_rpfilter          12288  1
ipt_rpfilter           12288  1
xt_pkttype             12288  2
xt_LOG                 16384  2
nf_log_syslog          24576  2
xt_tcpudp              16384  3
nft_compat             20480  11
nf_tables             344064  125 nft_compat
libcrc32c              12288  2 nf_conntrack,nf_tables
nfnetlink              20480  2 nft_compat,nf_tables
sch_fq_codel           20480  1
rtl8xxxu              229376  0
nvidia_drm             77824  12
nvidia_uvm           1363968  0
intel_rapl_msr         16384  0
mac80211             1253376  1 rtl8xxxu
nvidia_modeset       1511424  30 nvidia_drm
snd_hda_codec_hdmi     90112  1
edac_mce_amd           40960  0
edac_core              86016  0
intel_rapl_common      32768  1 intel_rapl_msr
eeepc_wmi              12288  0
asus_wmi               69632  1 eeepc_wmi
crc32_pclmul           12288  0
snd_hda_intel          61440  1
polyval_clmulni        12288  0
battery                28672  1 asus_wmi
polyval_generic        12288  1 polyval_clmulni
gf128mul               16384  1 polyval_generic
ledtrig_audio          12288  1 asus_wmi
ghash_clmulni_intel    16384  0
sha512_ssse3           45056  0
snd_intel_dspcfg       32768  1 snd_hda_intel
sparse_keymap          12288  1 asus_wmi
sha512_generic         16384  1 sha512_ssse3
platform_profile       12288  1 asus_wmi
wmi_bmof               12288  0
video                  69632  1 asus_wmi
snd_intel_sdw_acpi     16384  1 snd_intel_dspcfg
aesni_intel           360448  2
snd_usb_audio         409600  1
libaes                 12288  1 aesni_intel
cfg80211             1282048  2 mac80211,rtl8xxxu
snd_usbmidi_lib        49152  1 snd_usb_audio
snd_rawmidi            49152  1 snd_usbmidi_lib
crypto_simd            16384  1 aesni_intel
snd_seq_device         16384  2 snd_seq,snd_rawmidi
cryptd                 28672  2 crypto_simd,ghash_clmulni_intel
snd_hda_codec         204800  2 snd_hda_codec_hdmi,snd_hda_intel
rapl                   20480  0
mc                     81920  1 snd_usb_audio
acpi_cpufreq           32768  0
snd_hda_core          135168  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
sp5100_tco             16384  0
snd_hwdep              20480  2 snd_usb_audio,snd_hda_codec
rfkill                 40960  5 asus_wmi,cfg80211
snd_pcm               180224  5 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core
watchdog               40960  1 sp5100_tco
libarc4                12288  1 mac80211
snd_timer              49152  3 snd_seq,snd_hrtimer,snd_pcm
drm_kms_helper        237568  1 nvidia_drm
k10temp                12288  0
i2c_piix4              28672  0
syscopyarea            12288  1 drm_kms_helper
sysfillrect            12288  1 drm_kms_helper
sysimgblt              12288  1 drm_kms_helper
tiny_power_button      12288  0
nls_iso8859_1          12288  1
snd                   139264  17 snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_timer,snd_pcm,snd_rawmidi
nls_cp437              16384  1
gpio_amdpt             16384  0
mousedev               24576  0
vfat                   20480  1
input_leds             12288  0
evdev                  28672  30
led_class              20480  3 input_leds,asus_wmi,rtl8xxxu
soundcore              16384  1 snd
wmi                    36864  3 video,asus_wmi,wmi_bmof
fat                    98304  1 vfat
gpio_generic           20480  1 gpio_amdpt
mac_hid                12288  0
joydev                 24576  0
uas                    32768  0
button                 24576  0
nvidia              40656896  1500 nvidia_uvm,nvidia_modeset
ctr                    12288  1
atkbd                  36864  0
libps2                 20480  1 atkbd
serio                  28672  1 atkbd
vivaldi_fmap           12288  1 atkbd
loop                   32768  0
tun                    69632  0
tap                    28672  0
macvlan                36864  0
bridge                380928  0
stp                    12288  1 bridge
llc                    16384  2 bridge,stp
kvm_amd               184320  0
ccp                   135168  1 kvm_amd
rng_core               20480  1 ccp
kvm                  1286144  1 kvm_amd
drm                   692224  16 drm_kms_helper,nvidia,nvidia_drm
irqbypass              12288  1 kvm
deflate                16384  1
fuse                  176128  3
backlight              28672  3 video,asus_wmi,drm
efi_pstore             12288  0
i2c_core              126976  4 drm_kms_helper,nvidia,i2c_piix4,drm
configfs               61440  1
efivarfs               24576  1
dmi_sysfs              20480  0
ip_tables              28672  0
x_tables               53248  8 xt_conntrack,ip6t_rpfilter,nft_compat,xt_LOG,xt_tcpudp,ipt_rpfilter,xt_pkttype,ip_tables
autofs4                57344  0
ext4                 1085440  1
crc32c_generic         12288  0
crc16                  12288  1 ext4
mbcache                16384  1 ext4
jbd2                  188416  1 ext4
hid_logitech_hidpp     65536  0
sd_mod                 61440  0
sr_mod                 28672  0
hid_logitech_dj        40960  0
cdrom                  77824  1 sr_mod
hid_generic            12288  0
usb_storage            86016  1 uas
usbhid                 73728  2 hid_logitech_dj,hid_logitech_hidpp
hid                   163840  4 usbhid,hid_generic,hid_logitech_dj,hid_logitech_hidpp
ahci                   49152  0
libahci                57344  1 ahci
nvme                   57344  3
xhci_pci               24576  0
xhci_pci_renesas       16384  1 xhci_pci
libata                430080  2 libahci,ahci
nvme_core             180224  5 nvme
xhci_hcd              344064  1 xhci_pci
t10_pi                 20480  2 sd_mod,nvme_core
crc64_rocksoft         16384  1 t10_pi
crc64                  16384  1 crc64_rocksoft
crc_t10dif             16384  1 t10_pi
crct10dif_generic      12288  0
usbcore               389120  9 xhci_hcd,snd_usb_audio,usbhid,snd_usbmidi_lib,usb_storage,xhci_pci,rtl8xxxu,uas,hid_logitech_hidpp
scsi_mod              307200  5 sd_mod,usb_storage,uas,libata,sr_mod
crc32c_intel           16384  3
crct10dif_pclmul       12288  1
crct10dif_common       12288  3 crct10dif_generic,crc_t10dif,crct10dif_pclmul
usb_common             16384  2 xhci_hcd,usbcore
scsi_common            12288  5 scsi_mod,usb_storage,uas,libata,sr_mod
rtc_cmos               28672  1
dm_mod                180224  0
dax                    53248  1 dm_mod

--------------------
The  device use m76x2u drivers in the same systm with pop_os, the rtl is 1 temporary wifi card.

Have you tried setting:

boot.kernelModules = [
  "m76x2u"
];

Have you tried setting:

boot.kernelModules = [ “m76x2u” ];

That’s not the issue here (that module doesn’t exist as part of the vanilla kernel).

OP found an out-of-tree module and wants to start using that.

1 Like
boot.kernelModules = [
  "m76x2u"
];

Dont work…

dont work, i try diferent kernels two.

lsusb might also be helpful. I doubt the mentioned tarball with the out-of-tree module will compile (it looks like it’s from 2014) against the linux kernel versions we carry.

o\ I thought I saw it in the kernel, but the u is missing, sorry for the noise!

I can see the device connected like an Optical storage(Iniside there is a win installer).

Here is lsusb

[nix-shell:~]$ lsusb 
Bus 006 Device 002: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2/50
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 0951:16b7 Kingston Technology HyperX Alloy FPS Mechanical Gaming Keyboard
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0e8d:2870 MediaTek Inc. Љ
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 0bda:818b Realtek Semiconductor Corp. RTL8192EU 802.11b/g/n WLAN Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Let’s take a step back here.

A few things need to be figured out:

  1. does this device work on another linux distribution using the built-in modules? If so, which module?
  2. it looks like it needs to be switched from cd-mode to network-mode. There’s a standard component that does that (cannot remember off the top of my head and I need to get to bed)
  3. if switching it to network mode still doesn’t do the trick and it isn’t supported by linux upstream, then we need to see how we can make the out-of-tree driver compile against our kernels. That may be straight-forward or a pain in the rear, but in any case work is needed to figure it out.
2 Likes

1- Yes it should and works plug-play, that’s why i buy the adapter. How i can se the module in my other linux?

Im have only 4 months with Linux, sry.

2-3. Go Bed man, we continue later if you want, tnx for the support.

You certaintly shouldn’t need any out-of-tree driver - it’s supported by mt76.

Though, like @peterhoeg suggests the device needs to be mode switched. We seem to have a wwan related module which installs usb-modeswitch.

Add the following to your configuration.nix, rebuild and replug the dongle:

hardware.usbWwan.enable = true;

Check whether the usb id has at least changed if that doesn’t help.

1 Like

You certaintly shouldn’t need any out-of-tree driver - it’s supported by mt76.

Always helpful when people have the hardware!

We seem to have a wwan related module which installs usb-modeswitch.

That was the one - couldn’t remember the name.

I fix it,
Let me explain what happends.
Im using NVIDIA 470 drivers, i install using nomodeset option in the graphical installer.
And then my my first boot is adding “vga=1024x768 and nomodeset”, then i install the drivers on configuration.nix.
If i forgot to add vga=… nomodeset (like happens the first time i try to install nix)i need to cut he power off because the system hangs on login.
And if that happens when i restart the system the Wifi card is not working.
So i need to boot on popos live cd because that os let me use the wifi card, when i reboot from popos shooting down menu the problem is fixed on Nix OS.
So, if i have a bad shutting down when i log back nixos miss the wifi, to fix it i need to start from a livecd pop_os.
I dont know why works on pop and not in nix, but that was the problem.

Also testing with other bios versions the result was the same. Im running and old asus mobo and also i figured there is a lot of setting to adjust to be able to install linux on it, not only secure boot and fast boot.

I hope this post can help someone else.
And sry my bad English xD

It’s a USB device, right? Have you tried unplugging and replugging it when it isn’t detect properly? Maybe get a USB ethernet adapter to use while troubleshooting this so you can at least SSH in to do a proper restart (and troubleshooting).