0

Linux noob here. Fresh installed Ubuntu 20.04. Trying to get my wireless adapter to work (https://www.tp-link.com/us/support/download/archer-t2uhp/#Driver).

I tried tons of suggestions found online but none worked, I'm sorry i didn't document them all but a few i did: One of the last thing i found was https://www.myria.de/computer/1308-tp-link-archer-t2u-ac600-unter-linux-nutzen , which if google translator doesn't let me down, says driver should be included in kernel 5.0? although I'm not sure how that works.

I also found Problems configuring my usb ac051 wifi adapter, but after running "sudo dkms install mt7610u/1" (in the last part of the answer) i get.

Building module:
cleaning build area...
'make' all KVER=5.8.0-38-generic...(bad exit status: 2)
ERROR (dkms apport): binary package for mt7610u: 1 not found
Error! Bad return status for module build on kernel: 5.8.0-38-generic (x86_64)
Consult /var/lib/dkms/mt7610u/1/build/make.log for more information.

lsusb

Bus 002 Device 003: ID 0781:5591 SanDisk Corp. Ultra Flair
Bus 002 Device 006: ID 2357:010b TP-Link 
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

thanks

after running as suggested by jeremy sudo sed -i 's/0105/010b/' /lib/modules/$(uname -r)/kernel/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0u.ko

sudo depmod -a

seba@Loldserv:~/src$ sudo sed -i 's/0105/010b/' /lib/modules/$(uname -r)/kernel/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0u.ko
seba@Loldserv:~/src$ sudo depmod -a

there was no feedback in console and the last command seems to be waiting for another imput. Anyway i tried again the steps in his other post i cited but keep getting the error thats up here.

also checked make.log, content below, not sure if i sould run what is says there,or where to run it.

DKMS make.log for mt7610u-1 for kernel 5.8.0-38-generic (x86_64)
dom 17 ene 2021 19:43:30 -03
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.8.0-38-generic/build M=/var/lib/dkms/mt7610u/1/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.8.0-38-generic'

ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it.

make[1]: *** [Makefile:746: include/config/auto.conf] Error 1 make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-38-generic' make: *** [Makefile:374: modules] Error 2

SeViC
  • 3

1 Answers1

0

A quick hack of a fix is

sudo sed -i 's/0105/010b/' /lib/modules/$(uname -r)/kernel/drivers/net/wireless/mediatek/mt76/mt76x0/mt76x0u.ko
sudo depmod -a

Reboot

This will replace an existing entry in the module alias file

For now do sudo apt install --reinstall linux-modules-extra-$(uname -r) Reboot then try sudo modprobe mt76x0u then do echo 2357 010b | sudo tee /sys/bus/usb/drivers/mt76x0u/new_id See if it works

Lets try a udev rule

sudo touch /etc/udev/rules.d/98-wifi.rules
gedit admin:///etc/udev/rules.d/98-wifi.rules

Paste this into the file

ACTION=="add", ATTRS{idVendor}=="2357", ATTRS{idProduct}=="010b", RUN+="/sbin/modprobe mt76x0u" RUN+="/bin/sh -c 'echo 2357 010b > /sys/bus/usb/drivers/mt76x0u/new_id'"

Reboot and see if it works

Jeremy31
  • 12,602
  • 10
  • 58
  • 114
  • ty for answering. maybe im missing something. this commands didn't give me any feedback, goinna edit my question with my response. – SeViC Jan 17 '21 at 22:48
  • That is good, that means there weren't any errors – Jeremy31 Jan 17 '21 at 22:49
  • oh i see, but it still not working sry, – SeViC Jan 17 '21 at 23:02
  • Ok, I can work on a better fix – Jeremy31 Jan 17 '21 at 23:04
  • First of all, thank you so much, the adapter now works and i can connect. The only issue is it wont connect to 5ghz networks, that's why i took so long to reply, was trying to fix that issue by myself (to no avail sadly). I don't want to burden you anymore, so my only question is if it's a known issue with the driver, or i should be able to solve it. Thank you once again – SeViC Jan 18 '21 at 22:44
  • I don't have one of those devices, so I can't be sure why 5GHz doesn't work. You might want to look at https://ubuntuforums.org/showthread.php?t=2354328&p=13614520&#post13614520 there is a bit there about setting your country code and that may help. Please file a bug report against package linux, see https://help.ubuntu.com/community/ReportingBugs as otherwise those commands will have to be run after every boot unless a udev rule is made or this is fixed upstream in the kernel – Jeremy31 Jan 18 '21 at 23:38
  • No problem, already did the country thing, gonna check that link. That explains why it didn't work after rebooting lol. i will also check the bug report. Ty one again for all your help. – SeViC Jan 18 '21 at 23:45
  • i'm sorry i wasn't expecting you would also provide me with the udev rule so i didn't check. I just tried and it worked perfectly. Dude you are really awesome, if there is some way i can show you my gratitude or help you back let me know (maybe start ko-fi page :P) – SeViC Jan 19 '21 at 04:33