keepsoftware / mt7902-dkms

Driver MT7902
GNU General Public License v3.0
28 stars 2 forks source link

stargrab :/ ( discussion, state of development, help ) #2

Open TruncatedDinoSour opened 8 months ago

TruncatedDinoSour commented 8 months ago

update im pretty sure this repo is just a stargrab :/ converted this issue into a discussion

hello

ive been meaning to ask abt the state for this driver for a while now, so i am lol, whats up ? any progress ? eta ? should i look into into other projects, if yes do you know which ?, as i cant find much myself

would b nice to see a commit history of attempts and whatnot to determine the state of the driver :)

thanks for the answers in advance

TruncatedDinoSour commented 4 months ago

i have decided to buy and replace my wifi card ( mt7902 ) with an intel ax210, i bought it off https://itwork.lt/intel-wifi-6e-ax210-netzwerkadapter1 and it works great + not that hard

  • buy an ax210
  • open up ur laptop ( asus vivobooks need to have open screws and then u need to use some sort of sharpish tool to unlatch the back and take it off, ull need to use some force )
  • find the wifi card, a small chip that is connected by one white and one black ( usually ) wires and has sorta a slot, on it look for writing such as 'main' ( black wire ) and 'aux' ( white wire ), possibly 'made in china' and a data matrix code on it, basically an average mt7902 card ( https://avatars.mds.yandex.net/i?id=a2840bf8d69a36557056fa56c58a76157ddc8ded-7051630-images-thumbs&n=13 )
  • take off the black and white wires from the card
  • take off that screw u can see on the card
  • put in the new card
  • screw it on
  • put the white wire on 'aux' and black on 'main', usually how it is, though note ur configuration
  • screw ur laptop back together
  • enjoy

it is not a 'hard and tedious' process how ive seen users describe it, this was one of the best 18 euro of my life ( w vat and delivery ) and one of the easiest repairs ive ever done, probably why ive kept myself from doing it lol

TruncatedDinoSour commented 4 months ago

ill reopen this

pablodz commented 4 months ago

wtf, works on MX ? https://linux-hardware.org/?id=pci:14c3-7902-1a3b-5520&hwid=1b3bb45cd6fb

TruncatedDinoSour commented 4 months ago

wtf, works on MX ? https://linux-hardware.org/?id=pci:14c3-7902-1a3b-5520&hwid=1b3bb45cd6fb

oh shit ??

... maybe its a thing like it was for me with some driver idr, just detected, maybe it doesnt actually work or maybe its just a mistake ?

its hard to believe it works, but cant test it right now because i dont wanna take my laptop back apart to test it :/

TruncatedDinoSour commented 4 months ago

image

yeah i thnk the 'worked' was either a false positive or it ACTUALLY worked

1337kid commented 4 months ago

wtf, works on MX ? https://linux-hardware.org/?id=pci:14c3-7902-1a3b-5520&hwid=1b3bb45cd6fb

oh shit ??

... maybe its a thing like it was for me with some driver idr, just detected, maybe it doesnt actually work or maybe its just a mistake ?

its hard to believe it works, but cant test it right now because i dont wanna take my laptop back apart to test it :/

looks like support for MT7902 was added in 6.6.12-liquorix... so it works on MX linux

https://linux-hardware.org/?probe=96859b01b7

TruncatedDinoSour commented 4 months ago

wtf, works on MX ? https://linux-hardware.org/?id=pci:14c3-7902-1a3b-5520&hwid=1b3bb45cd6fb

oh shit ?? ... maybe its a thing like it was for me with some driver idr, just detected, maybe it doesnt actually work or maybe its just a mistake ? its hard to believe it works, but cant test it right now because i dont wanna take my laptop back apart to test it :/

looks like support for MT7902 was added in 6.6.12-liquorix... so it works on MX linux

https://linux-hardware.org/?probe=96859b01b7

holy, that's great news

1337kid commented 4 months ago

wtf, works on MX ? https://linux-hardware.org/?id=pci:14c3-7902-1a3b-5520&hwid=1b3bb45cd6fb

oh shit ?? ... maybe its a thing like it was for me with some driver idr, just detected, maybe it doesnt actually work or maybe its just a mistake ? its hard to believe it works, but cant test it right now because i dont wanna take my laptop back apart to test it :/

looks like support for MT7902 was added in 6.6.12-liquorix... so it works on MX linux

https://linux-hardware.org/?probe=96859b01b7

holy, that's great news

Looks like the report was false positive. I installed MX Linux and ran the HW-detect tool.. MT-7902 was just detected

TruncatedDinoSour commented 4 months ago

wtf, works on MX ? https://linux-hardware.org/?id=pci:14c3-7902-1a3b-5520&hwid=1b3bb45cd6fb

oh shit ?? ... maybe its a thing like it was for me with some driver idr, just detected, maybe it doesnt actually work or maybe its just a mistake ? its hard to believe it works, but cant test it right now because i dont wanna take my laptop back apart to test it :/

looks like support for MT7902 was added in 6.6.12-liquorix... so it works on MX linux https://linux-hardware.org/?probe=96859b01b7

holy, that's great news

Looks like the report was false positive. I installed MX Linux and ran the HW-detect tool.. MT-7902 was just detected

ah, oof

Texmozito commented 4 months ago

Hi, is there any way to check how two cards' driver of the same lineup are made of? I.e. mt7902 might be similar to another card which driver has been released, unlike the first card, to try to mod some driver to apply to the mt7092 one. I recently purcharsed an Asus Vivobook, which I love in any other way, but I have no wifi and bluetooth working.

TruncatedDinoSour commented 4 months ago

Hi, is there any way to check how two cards' driver of the same lineup are made of? I.e. mt7902 might be similar to another card which driver has been released, unlike the first card, to try to mod some driver to apply to the mt7092 one. I recently purcharsed an Asus Vivobook, which I love in any other way, but I have no wifi and bluetooth working.

cant say for sure, but broadcom drivers seem to be working in a way where it gets detected ( https://wiki.archlinux.org/title/broadcom_wireless ), ive tried on my own when i was on mt7902 and it showed as detected, so still something

you can probably enumerate some wifi drivers manually and use like lspci and whatnot to check

lspci -k | grep -A 3 -i network
lspci -nnk | grep -iA3 net

the output will tell u the driver thts used by the card

samveen commented 3 months ago

Looking in the mt79* driver subdirs under the https://github.com/torvalds/linux/tree/master/drivers/net/wireless/mediatek/mt76 dir, would it be possible to clone one of the them into mt7902 (say mt7915, which is numerically the closest) and start modifying it?

TruncatedDinoSour commented 3 months ago

Looking in the mt79* driver subdirs under the https://github.com/torvalds/linux/tree/master/drivers/net/wireless/mediatek/mt76 dir, would it be possible to clone one of the them into mt7902 (say mt7915, which is numerically the closest) and start modifying it?

i've heard it's extremely tedious to do that, but maybe ? just maybe ? or maybe start from the broadcom driver, or something

samveen commented 3 months ago

@TruncatedDinoSour Do you have the link to the windows drivers for the MT7902 as provided by you laptop or card manufacturer? That will probably contain a binary firmware that is usually required.

Edit: Got it from the acer website at https://global-download.acer.com/GDFiles/Driver/Wireless%20LAN/Wireless%20LAN_MTK_3.3.0.633_W11x64_A.zip?acerid=638041027988808845&Step1=&Step2=&Step3=ASPIRE%20A314-23P&OS=ALL&LC=en&BC=ACER&SC=PA_6

samveen commented 3 months ago

@TruncatedDinoSour

https://github.com/samveen/mt7902-dkms/issues/1

TruncatedDinoSour commented 3 months ago

@TruncatedDinoSour Do you have the link to the windows drivers for the MT7902 as provided by you laptop or card manufacturer? That will probably contain a binary firmware that is usually required.

Edit: Got it from the acer website at https://global-download.acer.com/GDFiles/Driver/Wireless%20LAN/Wireless%20LAN_MTK_3.3.0.633_W11x64_A.zip?acerid=638041027988808845&Step1=&Step2=&Step3=ASPIRE%20A314-23P&OS=ALL&LC=en&BC=ACER&SC=PA_6

i don't have it, i didn't ever even boot widows on this thing xD, but i got https://www.telia.lt/prekes/kompiuteriai/nesiojami/asus-vivobook-m1605-16-ryz5-8gb-512gb

TruncatedDinoSour commented 3 months ago

oops

samveen commented 3 months ago

@1337kid Care to help me test https://github.com/samveen/mt7902-dkms ? I don't have a build environment I can use for this - Requires 6.8 kernel - quick setup is Ubuntu Noble with Ubuntu Mainline v6.8 kernel.

samveen commented 3 months ago

@TruncatedDinoSour Ari, I have a buildable dkms setup ready. Need some testing, if you still have that mt7902 handy.

StreetXHasu commented 3 months ago

@samveen My good man, does this work only with the new kernel? Can my Fedora 39 with kernel 6.5 take a rest for now?

samveen commented 3 months ago

@StreetXHasu You need to try it on the 6.5 kernel . It "should" be self contained, but only testing will let both you and I know where (not if) I've messed up.

I personally do not have an mt7902, so I cannot test it unfortunately.

More details as below:

@TruncatedDinoSour

samveen/mt7902-dkms#1

danieltkach commented 3 months ago

I have a mediatek 7902, on an asus A620M-plus motherboard. I followed the steps at: https://github.com/samveen/mt7902-dkms It still didn't work, I don't know what else to try:

lsmod | grep mt7902

mt7902 24576 0 mt7902_common 86016 1 mt7902 mt792x_lib 77824 2 mt7902,mt7902_common mt76_connac_lib 106496 3 mt792x_lib,mt7902,mt7902_common mt76 139264 4 mt792x_lib,mt7902,mt7902_common,mt76_connac_lib mac80211 1417216 5 mt792x_lib,mt76,mt7902_common,rtl8xxxu,mt76_connac_lib cfg80211 1339392 5 mt76,mt7902_common,mac80211,rtl8xxxu,mt76_connac_lib

catmasterX commented 3 months ago

@samveen if you need help in testing I can help, I have that network card and spare time to spare.

samveen commented 3 months ago

@catmasterX I'm stalled as I personally do not have that network card in either of my laptops.

Please review the issues listed in the repo https://github.com/samveen/mt7902-dkms to see the state of where the other testers are stuck. All issues are shallow with enough eyes to review.

requeijaum commented 2 months ago

I'm trying to make this work on a brazilian Acer laptop from last year that ships with Gutta Linux (UOS Linux variant?)

photo_2024-04-12_17-08-03 photo_2024-04-12_17-08-01 photo_2024-04-12_17-07-57

Unfortunately I don't have that distro on disk anymore and I don't know where to download it.

samveen commented 2 months ago

@requeijaum Rafael, are you able to get a copy of an installed OS from a display piece at any Acer distributor? The driver in there might just make life easy for all the rest.

catmasterX commented 1 month ago

Any progress? , I urgently need driver support, I have a USB dongle connected that, apart from taking up a slot, is too slow. I have a dual boot with Windows 11, but it has become too slow and invasive, making the point of considering it a privacy issue and even malware.

TruncatedDinoSour commented 1 month ago

Any progress? , I urgently need driver support, I have a USB dongle connected that, apart from taking up a slot, is too slow. I have a dual boot with Windows 11, but it has become too slow and invasive, making the point of considering it a privacy issue and even malware.

i personally just replaced my wifi card im sorry, @samveen seems to be successfully working on https://github.com/samveen/mt7902-dkms ( previous commit was last week ) and yeah :/

samveen commented 1 month ago

@TruncatedDinoSour Can I request you for that unused mt7902 as a donation?

TruncatedDinoSour commented 1 month ago

@TruncatedDinoSour Can I request you for that unused mt7902 as a donation?

where would i need to ship it ?

TruncatedDinoSour commented 1 month ago

i could ship it tmrw because post office opens tmrw, bc im unsure if the post machine can ship internationally

TruncatedDinoSour commented 4 weeks ago

@samveen ive looked up the price and the shipping isnt wild, if u could email me a shipping address at ari@ari.lt as well as a name i can do it, my gpg key is 4FAD63E936B305906A6C4894A50D5B4B599AF8A2 btw

u can also reach out to me by other means such as @ari:ari.lt matrix, ari@ari.lt xmpp, and @ari@ak.ari.lt on fedi :)

this is only an offer ofc, theres no pressure or anything, i very much understand why u wouldnt like to give me any shipping address as a random person xD - u can ofc order it pretty cheap online too

image

image

cerg2010cerg2010 commented 4 weeks ago

Hello guys, I think I have found official Mediatek driver for this device, here's the repo: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/

Looks like the chip is codenamed "besra" and was a part of their openwrt package, but it was removed later for unknown reason. So I pulled it from git history, applied the changes from upstream openwrt repo for newer kernel (I use Linux 6.5.0-35-generic from Ubuntu 22.04), and it compiled. Here's the result: https://github.com/cerg2010cerg2010/mt76

Unfortunately I can't test it because I did this for my friend. So you have to try and build it yourself at your own risk. The build command that I think is correct is:

make -C /lib/modules/$(uname -r)/build M=$(pwd) CONFIG_BESRA=m CONFIG_MT76_USB=n CONFIG_MT76_SDIO=n CONFIG_MT76x02_LIB=n CONFIG_MT76x02_USB=n CONFIG_MT76_CONNAC_LIB=m CONFIG_MT76x0_COMMON=n CONFIG_MT76x2_COMMON=n CONFIG_MT7603E=n CONFIG_MT7615_COMMON=n CONFIG_MT7915E=n CONFIG_MT7921_COMMON=n modules
catmasterX commented 3 weeks ago

@cerg2010cerg2010 Gracias, lo probare hoy mismo. (for some strange reason your comment appeared in Spanish)

pablodz commented 3 weeks ago

Hello guys, I think I have found official Mediatek driver for this device, here's the repo: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/

Looks like the chip is codenamed "besra" and was a part of their openwrt package, but it was removed later for unknown reason. So I pulled it from git history, applied the changes from upstream openwrt repo for newer kernel (I use Linux 6.5.0-35-generic from Ubuntu 22.04), and it compiled. Here's the result: https://github.com/cerg2010cerg2010/mt76

Unfortunately I can't test it because I did this for my friend. So you have to try and build it yourself at your own risk. The build command that I think is correct is:

make -C /lib/modules/$(uname -r)/build M=$(pwd) CONFIG_BESRA=m CONFIG_MT76_USB=n CONFIG_MT76_SDIO=n CONFIG_MT76x02_LIB=n CONFIG_MT76x02_USB=n CONFIG_MT76_CONNAC_LIB=m CONFIG_MT76x0_COMMON=n CONFIG_MT76x2_COMMON=n CONFIG_MT7603E=n CONFIG_MT7615_COMMON=n CONFIG_MT7915E=n CONFIG_MT7921_COMMON=n modules

I really hate Mediatek, bro

catmasterX commented 3 weeks ago

/home/cat/Downloads/mt76-master/./trace.h: In function 'trace_event_raw_event_dev_reg_evt': /home/cat/Downloads/mt76-master/./trace.h:17:25: error: implicit declaration of function 'strlcpy'; Did you mean "strscpy"? [-Werror=implicit-function-declaration] 17 | #define DEVICE_ASSIGN strlcpy(entry->wiphy_name, \ | ^~~ ./include/trace/trace_events.h:402:11: note: in macro definition 'DECLARE_EVENT_CLASS' 402 | { assign; } \ | ^~ /home/cat/Downloads/mt76-master/./trace.h:39:9: note: expanding macro 'TP_fast_assign' 39 | TP_fast_assign( | ^~~~~~~ /home/cat/Downloads/mt76-master/./trace.h:40:17: note: expanding macro 'DEVICE_ASSIGN' 40 | DEVICE_ASSIGN; | ^~~~~ cc1: all warnings are treated as errors make[2]: [scripts/Makefile.build:243: /home/cat/Downloads/mt76-master/trace.o] Error 1 make[1]: [/usr/src/linux-headers-6.8.9-5-liquorix-amd64/Makefile:1932: /home/cat/Downloads/mt76-master] Error 2 do: *** [Makefile:240: sub-make] Error 2 make: sold from directory '/usr/src/linux-headers-6.8.9-5-liquorix-amd64'

catmasterX commented 3 weeks ago

After replacing strlcpy : make -C /lib/modules/$(uname - r)/build M=$$(pwd) CONFIG_BESRA=m CONFIG_MT76_USB=n CONFIG_MT76_SDIO=n CONFIG_MT76x02_LIB=n CONFIG_MT76x02_USB=n CONFIG_MT76_CONNAC_LIB=m CONFIG_MT76x0_COMMON=n CONFIG_MT76x2_COMMON=n CONFIG_MT76x2_COMMON=n CONFIG_MT7603E=n CONFIG_MT7615_COMMON=n CONFIG_MT7915E=n CONFIG_MT7921_COMMON=n modules make: enter directory '/usr/src/linux-headers-6.8.9-5-liquorix-amd64'. CC [M] /home/cat/Downloads/mt76-master/besra/pci.o CC [M] /home/cat/Downloads/mt76-master/besra/mmio.o LD [M] /home/cat/Downloads/mt76-master/besra/besra.o CC [M] /home/cat/Downloads/mt76-master/mmio.o CC [M] /home/cat/Descargas/mt76-master/trace.o CC [M] /home/cat/Downloads/mt76-master/dma.o CC [M] /home/cat/Downloads/mt76-master/mac80211.o CC [M] /home/cat/Downloads/mt76-master/debugfs.o CC [M] /home/cat/Downloads/mt76-master/eeprom.o CC [M] /home/cat/Downloads/mt76-master/tx.o CC [M] /home/cat/Downloads/mt76-master/agg-rx.o CC [M] /home/cat/Downloads/mt76-master/mcu.o CC [M] /home/cat/Downloads/mt76-master/pci.o CC [M] /home/cat/Downloads/mt76-master/testmode.o LD [M] /home/cat/Downloads/mt76-master/mt76.o CC [M] /home/cat/Downloads/mt76-master/mt76_connac_mcu.o CC [M] /home/cat/Downloads/mt76-master/mt76_connac_mac.o LD [M] /home/cat/Downloads/mt76-master/mt76-connac-lib.o MODPOST /home/cat/Downloads/mt76-master/Module.symvers CC [M] /home/cat/Downloads/mt76-master/mt76.mod.o LD [M] /home/cat/Downloads/mt76-master/mt76.ko BTF [M] /home/cat/Downloads/mt76-master/mt76.ko BTF generation for /home/cat/Descargas/mt76-master/mt76.ko is skipped due to unavailability of vmlinux. CC [M] /home/cat/Downloads/mt76-master/mt76-connac-lib.mod.o LD [M] /home/cat/Downloads/mt76-master/mt76-connac-lib.ko BTF [M] /home/cat/Downloads/mt76-master/mt76-connac-lib.ko BTF generation for /home/cat/Downloads/mt76-master/mt76-connac-lib.ko is skipped due to the unavailability of vmlinux. CC [M] /home/cat/Downloads/mt76-master/besra/besra.mod.o LD [M] /home/cat/Downloads/mt76-master/besra/besra.ko BTF [M] /home/cat/Downloads/mt76-master/besra/besra/besra.ko BTF generation for /home/cat/Descargas/mt76-master/besra/besra/besra.ko is skipped due to unavailability of vmlinux. make: exits directory '/usr/src/linux-headers-6.8.9-5-liquorix-amd64'.

catmasterX commented 3 weeks ago

sudo insmod /home/cat/Downloads/mt76-master/besra/besra.ko insmod: ERROR: could not insert module /home/cat/Descargas/mt76-master/besra/besra/besra.ko: Unknown symbol in the module

cat@PerfectSystemBook:~$ sudo insmod /home/cat/Downloads/mt76-master/mt76.ko insmod: ERROR: could not insert module /home/cat/Descargas/mt76-master/mt76.ko: File exists

cerg2010cerg2010 commented 3 weeks ago

@catmasterX You need to insert modules in special order, I think mt76 should be the first, then mt76-connac-lib, and finally besra. You may have mt76 already compiled in you Linux distibution, you better rmmod it (and mt76-connac-lib) before insertion.

catmasterX commented 3 weeks ago

@cerg2010cerg2010 I did the procedure correctly and loaded the modules with rmmod, what else do I have to do?

catmasterX commented 3 weeks ago

Captura desde 2024-06-12 04-38-22

image

cerg2010cerg2010 commented 3 weeks ago

@catmasterX modprobe inserts modules that came with you Linux distribution, you need to use insmod to load modules that you've built. Call insmod mt76.ko first, then insmod mt76-connac-lib.ko, then insmod besra.ko, it should work.

catmasterX commented 3 weeks ago

@cerg2010cerg2010 that's exactly what I did but the error persists: image

cerg2010cerg2010 commented 3 weeks ago

@catmasterX looks like you have loaded mt76 and mt76-connac-lib from your installed kernel, you need to unload them with rmmod - call rmmod mt76 mt76-connac-lib and then insmod the modules that you've built.

catmasterX commented 3 weeks ago

@cerg2010cerg2010 image

i will try compiling the binaries again

cerg2010cerg2010 commented 3 weeks ago

@catmasterX FYI the modules load correctly for me, like this: изображение But I can't test it because I don't have this card

catmasterX commented 3 weeks ago

@cerg2010cerg2010 image

cerg2010cerg2010 commented 3 weeks ago

@catmasterX congrats, it's loaded, now check dmesg for errors, if it's successful then you have (hopefully) working wifi interface (check ip link/iwconfig)

catmasterX commented 3 weeks ago

@cerg2010cerg2010 image

image

not working for me.

catmasterX commented 3 weeks ago

This is my discord, catmaster3188, I will lend my computer with rustdesk to all those who want to test to generate a driver and make sure it works.