Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build and driver installation log and logbook #2

Open
henri26mobu opened this issue Mar 19, 2024 · 24 comments · Fixed by #3
Open

build and driver installation log and logbook #2

henri26mobu opened this issue Mar 19, 2024 · 24 comments · Fixed by #3
Assignees
Labels
bug Something isn't working

Comments

@henri26mobu
Copy link

henri26mobu commented Mar 19, 2024

Errors when trying to build and install.

henri26mobu@7902pop:~$ sudo dkms status --verbose -m mt7902-dkms -v 0.0.1
mt7902-dkms/0.0.1: added
henri26mobu@7902pop:~$ sudo dkms build --verbose -m mt7902-dkms -v 0.0.1   # NEEDS TESTING
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/mt7902-dkms/0.0.1/source/dkms.conf)

Building module:
make -C /lib/modules/6.8.0-11-generic/build M=/var/lib/dkms/mt7902-dkms/0.0.1/build clean
make : on entre dans le répertoire « /usr/src/linux-headers-6.8.0-11-generic »
make : on quitte le répertoire « /usr/src/linux-headers-6.8.0-11-generic »

{ make -j16 KERNELRELEASE=6.8.0-11-generic -C /lib/modules/6.8.0-11-generic/build M=/var/lib/dkms/mt7902-dkms/0.0.1/build; } >> /var/lib/dkms/mt7902-dkms/0.0.1/build/make.log 2>&1
(bad exit status: 2)
ERROR (dkms apport): binary package for mt7902-dkms: 0.0.1 not found
Error! Bad return status for module build on kernel: 6.8.0-11-generic (x86_64)
Consult /var/lib/dkms/mt7902-dkms/0.0.1/build/make.log for more information.

Install on the new ubuntu noble 24.04.

@samveen
Copy link
Owner

samveen commented Mar 20, 2024

Henri, Thank you for the testing 🙏

Please attach /var/lib/dkms/mt7902-dkms/0.0.1/build/make.log to the ticket.

@henri26mobu
Copy link
Author

make.log
The main problem, as far as I can see, is that there are no rules for making the target, because the gcc compiler isn't the same, but this would be more of a warning for the second problem. I'll let you read the logs, which are quite short.

@henri26mobu
Copy link
Author

henri26mobu commented Mar 20, 2024

Henri, Thank you for the testing 🙏

Please attach /var/lib/dkms/mt7902-dkms/0.0.1/build/make.log to the ticket.

it's the minimum and that way one day my wifi card will have the wifi icon on linux. And to buy a PC with this kind of wifi card costs around €1,000. I could give you the pc model if you want.

@samveen
Copy link
Owner

samveen commented Mar 20, 2024

If you are interested in sponsoring the cost of a test machine, I would greatly appreciate that.

Please contact me via email (samveen at samveen dot in), and we can discuss the the details.

@samveen
Copy link
Owner

samveen commented Mar 22, 2024

@henri26mobu

I've managed to get the Ubuntu packaging build for kernel 6.8 for focal running in my environment (TuxInvader/focal-mainline-builder#47) . Once I have the build successfully complete, I should be able to start figuring out the build issues and proceed ahead from there.

@henri26mobu
Copy link
Author

henri26mobu commented Mar 22, 2024

I will must update the source for see the build.

@samveen
Copy link
Owner

samveen commented Mar 26, 2024

@henri26mobu I've managed to get the driver build:

  • Build

Creating symlink /var/lib/dkms/mt7902/0.0.1/source ->
                 /usr/src/mt7902-0.0.1

DKMS: add completed.
samveen@samveen-x220:/usr/src/mt7902$ sudo dkms build --verbose mt7902/0.0.1 -k 6.8.0-19-generic

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
make -C mt76/mt7902 clean
make: Entering directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'
make -C /lib/modules/6.8.0-19-generic/build M=/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 clean
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-19-generic'
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-19-generic'
make: Leaving directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'

{ bash build.sh --kver 6.8.0-19-generic; } >> /var/lib/dkms/mt7902/0.0.1/build/make.log 2>&1

Signing module:
 - /var/lib/dkms/mt7902/0.0.1/6.8.0-19-generic/x86_64/module/mt7902-common.ko
 - /var/lib/dkms/mt7902/0.0.1/6.8.0-19-generic/x86_64/module/mt7902.ko
Secure Boot not enabled on this system.
make -C mt76/mt7902 clean
make: Entering directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'
make -C /lib/modules/6.8.0-19-generic/build M=/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 clean
make[1]: Entering directory '/usr/src/linux-headers-6.8.0-19-generic'
  CLEAN   /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/Module.symvers
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-19-generic'
make: Leaving directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'


DKMS: build completed.
  • install
samveen@samveen-x220:/usr/src/mt7902$ sudo dkms install --verbose mt7902/0.0.1 -k 6.8.0-19-generic

mt7902-common.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-19-generic/updates/dkms/

mt7902.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.8.0-19-generic/updates/dkms/

do_depmod 6.8.0-19-generic


DKMS: install completed.
  • Status
samveen@samveen-x220:/usr/src/mt7902$ sudo dkms status mt7902
mt7902, 0.0.1, 6.8.0-19-generic, x86_64: installed

Please check out the latest code, with the updated instruction to test

@samveen samveen reopened this Mar 26, 2024
@henri26mobu
Copy link
Author

I can see having to uninstall and reinstall because the source names aren't mt7902 for me, they're mt-7902-dkms.

@samveen
Copy link
Owner

samveen commented Mar 26, 2024

Please check out the latest code, with the updated instruction to test

Yes. I needed to update the usage while getting it to work with dkms . As mentioned, I updated the instructions.

Once you have managed to install the module, please test loading the module with modprobe mt7902 and paste the kernel log from that event.

samveen referenced this issue Mar 26, 2024
Signed-off-by: Samveen <[email protected]>
@henri26mobu
Copy link
Author

henri26mobu commented Mar 26, 2024

Here are the logs : `henri26mobu@7902pop:/usr/src$ sudo dkms build --verbose -m mt7902 -v 0.0.1
sudo dkms install --verbose -m mt7902 -v 0.0.1
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
Deprecated feature: REMAKE_INITRD (/usr/src/mt7902-0.0.1/dkms.conf)
Creating symlink /var/lib/dkms/mt7902/0.0.1/source -> /usr/src/mt7902-0.0.1

Building module:
make -C mt76/mt7902 clean
make : on entre dans le répertoire « /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 »
make -C /lib/modules/6.8.0-11-generic/build M=/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 clean
make[1] : on entre dans le répertoire « /usr/src/linux-headers-6.8.0-11-generic »
make[1] : on quitte le répertoire « /usr/src/linux-headers-6.8.0-11-generic »
make : on quitte le répertoire « /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 »

{ bash build.sh --kver 6.8.0-11-generic; } >> /var/lib/dkms/mt7902/0.0.1/build/make.log 2>&1

Signing module /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/mt7902-common.ko
Signing module /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/mt7902.ko
make -C mt76/mt7902 clean
make : on entre dans le répertoire « /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 »
make -C /lib/modules/6.8.0-11-generic/build M=/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 clean
make[1] : on entre dans le répertoire « /usr/src/linux-headers-6.8.0-11-generic »
CLEAN /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/Module.symvers
make[1] : on quitte le répertoire « /usr/src/linux-headers-6.8.0-11-generic »
make : on quitte le répertoire « /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 »

Deprecated feature: REMAKE_INITRD (/var/lib/dkms/mt7902/0.0.1/source/dkms.conf)

mt7902-common.ko.zst:
Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/6.8.0-11-generic/updates/dkms/

mt7902.ko.zst:
Running module version sanity check.

  • Original module
    • No original module exists within this kernel
  • Installation
    • Installing to /lib/modules/6.8.0-11-generic/updates/dkms/
      do_depmod 6.8.0-11-generic

henri26mobu@7902pop:/usr/src$ sudo dkms status --verbose -m mt7902 -v 0.0.1
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/mt7902/0.0.1/source/dkms.conf)
mt7902/0.0.1, 6.8.0-11-generic, x86_64: installed
`

@tm4ig
Copy link

tm4ig commented Mar 26, 2024

I have ASUS Vivobook M6500XV Laptop with mt7902 wireless adapter and archlinux with 6.8.1 kernel

I have builded and installed mt7902 driver from this repo.

[root@cosx ~]#  git clone https://github.com/samveen/mt7902-dkms /usr/src/mt7902
Cloning into '/usr/src/mt7902'...
remote: Enumerating objects: 129, done.
remote: Counting objects: 100% (129/129), done.
remote: Compressing objects: 100% (93/93), done.
remote: Total 129 (delta 57), reused 105 (delta 34), pack-reused 0
Receiving objects: 100% (129/129), 131.34 KiB | 707.00 KiB/s, done.
Resolving deltas: 100% (57/57), done.
[root@cosx ~]# cd /usr/src/mt7902/
[root@cosx mt7902]# ls -lh
total 60K
-rw-r--r-- 1 root root  764 Mar 26 16:07 build.sh
-rw-r--r-- 1 root root  379 Mar 26 16:07 dkms.conf
-rwxr-xr-x 1 root root  887 Mar 26 16:07 dkms-patchmodule.sh
drwxr-xr-x 2 root root   45 Mar 26 16:07 firmware
-rw-r--r-- 1 root root  35K Mar 26 16:07 LICENSE
drwxr-xr-x 3 root root 4.0K Mar 26 16:07 mt76
-rw-r--r-- 1 root root  514 Mar 26 16:07 mt9721e_pci_state.patch
-rw-r--r-- 1 root root 2.8K Mar 26 16:07 README.md
[root@cosx mt7902]# ln -s /usr/src/mt7902 /usr/src/mt7902-0.0.1
[root@cosx mt7902]# cd ../
[root@cosx src]# ls -lh
total 0
drwxr-xr-x 6 root root  76 Mar 17 09:38 debug
lrwxrwxrwx 1 root root  34 Mar 16 20:15 linux -> ../lib/modules/6.8.1-arch1-1/build
lrwxrwxrwx 1 root root  33 Mar 16 09:20 linux-lts -> ../lib/modules/6.6.22-1-lts/build
drwxr-xr-x 5 root root 187 Mar 26 16:07 mt7902
lrwxrwxrwx 1 root root  15 Mar 26 16:07 mt7902-0.0.1 -> /usr/src/mt7902
drwxr-xr-x 5 root root 110 Mar 13 09:57 vboxhost-7.0.14_OSE
[root@cosx src]# dkms add --verbose -m mt7902 -v 0.0.1
Deprecated feature: REMAKE_INITRD (/usr/src/mt7902-0.0.1/dkms.conf)
Creating symlink /var/lib/dkms/mt7902/0.0.1/source -> /usr/src/mt7902-0.0.1
[root@cosx src]# dkms build --verbose -m mt7902 -v 0.0.1
Sign command: /usr/lib/modules/6.8.1-arch1-1/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/mt7902/0.0.1/source/dkms.conf)

Building module:
make -C mt76/mt7902 clean
make: Entering directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'
make -C /lib/modules/6.8.1-arch1-1/build M=/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 clean
make[1]: Entering directory '/usr/lib/modules/6.8.1-arch1-1/build'
make[1]: Leaving directory '/usr/lib/modules/6.8.1-arch1-1/build'
make: Leaving directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'

{ bash build.sh --kver 6.8.1-arch1-1; } >> /var/lib/dkms/mt7902/0.0.1/build/make.log 2>&1

Signing module /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/mt7902-common.ko
Signing module /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/mt7902.ko
make -C mt76/mt7902 clean
make: Entering directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'
make -C /lib/modules/6.8.1-arch1-1/build M=/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 clean
make[1]: Entering directory '/usr/lib/modules/6.8.1-arch1-1/build'
  CLEAN   /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/Module.symvers
make[1]: Leaving directory '/usr/lib/modules/6.8.1-arch1-1/build'
make: Leaving directory '/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902'

[root@cosx src]# dkms install --verbose -m mt7902 -v 0.0.1
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/mt7902/0.0.1/source/dkms.conf)

mt7902-common.ko.zst:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /usr/lib/modules/6.8.1-arch1-1/updates/dkms/

mt7902.ko.zst:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /usr/lib/modules/6.8.1-arch1-1/updates/dkms/
do_depmod 6.8.1-arch1-1

[root@cosx src]# lsmod | grep mt7902
[root@cosx src]# dkms status --verbose -m mt7902 -v 0.0.1
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/mt7902/0.0.1/source/dkms.conf)
mt7902/0.0.1, 6.8.1-arch1-1, x86_64: installed
[root@cosx src]# lsmod | grep 7902
[root@cosx src]# modprobe mt7902
[root@cosx src]# lsmod | grep 7902
mt7902                 24576  0
mt7902_common          86016  1 mt7902
mt792x_lib             73728  2 mt7902,mt7902_common
mt76_connac_lib       102400  3 mt792x_lib,mt7902,mt7902_common
mt76                  135168  4 mt792x_lib,mt7902,mt7902_common,mt76_connac_lib
mac80211             1576960  4 mt792x_lib,mt76,mt7902_common,mt76_connac_lib
cfg80211             1347584  4 mt76,mt7902_common,mac80211,mt76_connac_lib
[root@cosx src]# modprobe -r mt7902
[root@cosx src]# lsmod | grep 7902

After load kernel module mt7902 wireless adapter doesn't work.
Also in my system journaL I have

Mar 26 16:09:15 cosx kernel: mt7902 0000:02:00.0: Message 00000010 (seq 4) timeout
Mar 26 16:09:15 cosx kernel: mt7902 0000:02:00.0: Failed to get patch semaphore
Mar 26 16:09:18 cosx kernel: mt7902 0000:02:00.0: Message 00000010 (seq 5) timeout
Mar 26 16:09:18 cosx kernel: mt7902 0000:02:00.0: Failed to get patch semaphore
Mar 26 16:09:21 cosx kernel: mt7902 0000:02:00.0: Message 00000010 (seq 6) timeout
Mar 26 16:09:21 cosx kernel: mt7902 0000:02:00.0: Failed to get patch semaphore
Mar 26 16:09:24 cosx kernel: mt7902 0000:02:00.0: Message 00000010 (seq 7) timeout
Mar 26 16:09:24 cosx kernel: mt7902 0000:02:00.0: Failed to get patch semaphore
Mar 26 16:09:28 cosx kernel: mt7902 0000:02:00.0: Message 00000010 (seq 8) timeout
Mar 26 16:09:28 cosx kernel: mt7902 0000:02:00.0: Failed to get patch semaphore
Mar 26 16:09:31 cosx kernel: mt7902 0000:02:00.0: Message 00000010 (seq 9) timeout
Mar 26 16:09:31 cosx kernel: mt7902 0000:02:00.0: Failed to get patch semaphore
Mar 26 16:09:34 cosx kernel: mt7902 0000:02:00.0: Message 00000010 (seq 10) timeout
Mar 26 16:09:34 cosx kernel: mt7902 0000:02:00.0: Failed to get patch semaphore
Mar 26 16:09:34 cosx kernel: mt7902 0000:02:00.0: hardware init failed

@tm4ig
Copy link

tm4ig commented Mar 26, 2024

and also

Mar 26 16:17:24 cosx kernel: ------------[ cut here ]------------
Mar 26 16:17:24 cosx kernel: tasklet SCHED state not set: func 0x0
Mar 26 16:17:24 cosx kernel: WARNING: CPU: 3 PID: 38 at kernel/softirq.c:751 tasklet_clear_sched+0x64/0x70
Mar 26 16:17:24 cosx kernel: Modules linked in: mt792x_lib mt76_connac_lib mt76 mac80211 libarc4 exfat udp_diag tcp_diag inet_diag veth snd_seq_dummy snd_hrtimer snd_seq snd_seq_device ove>
Mar 26 16:17:24 cosx kernel:  snd_intel_dspcfg snd_pcm_dmaengine kvm_amd btintel videobuf2_vmalloc snd_intel_sdw_acpi snd_pci_ps btbcm uvc btmtk videobuf2_memops snd_rpl_pci_acp6x hid_mult>
Mar 26 16:17:24 cosx kernel:  i2c_algo_bit gf128mul drm_ttm_helper ghash_clmulni_intel ttm sha512_ssse3 drm_exec serio_raw sha256_ssse3 gpu_sched atkbd sha1_ssse3 aesni_intel drm_suballoc_>
Mar 26 16:17:24 cosx kernel: Unloaded tainted modules: mt7902_common(OE):1 mt7902(OE):1 [last unloaded: mt7902_common(OE)]
Mar 26 16:17:24 cosx kernel: CPU: 3 PID: 38 Comm: ksoftirqd/3 Tainted: P           OE      6.8.1-arch1-1 #1 52f97d9bb37be6168651745a1a9f8f7240d21ce5
Mar 26 16:17:24 cosx kernel: Hardware name: ASUSTeK COMPUTER INC. Vivobook_ASUSLaptop M6500XV_M6500XV/M6500XV, BIOS M6500XV.309 12/04/2023
Mar 26 16:17:24 cosx kernel: RIP: 0010:tasklet_clear_sched+0x64/0x70
Mar 26 16:17:24 cosx kernel: Code: 00 48 c7 c0 db c3 fc 97 48 8b 57 18 48 c7 c6 f9 98 fc 97 48 0f 45 f0 48 c7 c7 a0 47 03 98 c6 05 1b 8e f0 01 01 e8 ec 74 ff ff <0f> 0b eb b3 0f 1f 84 00 0>
Mar 26 16:17:24 cosx kernel: RSP: 0018:ffffbd27c02d7e38 EFLAGS: 00010282
Mar 26 16:17:24 cosx kernel: RAX: 0000000000000000 RBX: ffff9a9ede4f5800 RCX: 0000000000000027
Mar 26 16:17:24 cosx kernel: RDX: ffff9aa1de8e19c8 RSI: 0000000000000001 RDI: ffff9aa1de8e19c0
Mar 26 16:17:24 cosx kernel: RBP: 0000000000000000 R08: 0000000000000000 R09: ffffbd27c02d7cc0
Mar 26 16:17:24 cosx kernel: R10: 0000000000000003 R11: ffffffff988ca688 R12: ffff9aa1de8e14d0
Mar 26 16:17:24 cosx kernel: R13: ffff9a9ede4f58a8 R14: 0000000000000040 R15: 0000000000000006
Mar 26 16:17:24 cosx kernel: FS:  0000000000000000(0000) GS:ffff9aa1de8c0000(0000) knlGS:0000000000000000
Mar 26 16:17:24 cosx kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 26 16:17:24 cosx kernel: CR2: 00005aab452e4b00 CR3: 00000003dbc20000 CR4: 0000000000f50ef0
Mar 26 16:17:24 cosx kernel: PKRU: 55555554
Mar 26 16:17:24 cosx kernel: Call Trace:
Mar 26 16:17:24 cosx kernel:  <TASK>
Mar 26 16:17:24 cosx kernel:  ? tasklet_clear_sched+0x64/0x70
Mar 26 16:17:24 cosx kernel:  ? __warn+0x81/0x130
Mar 26 16:17:24 cosx kernel:  ? tasklet_clear_sched+0x64/0x70
Mar 26 16:17:24 cosx kernel:  ? report_bug+0x171/0x1a0
Mar 26 16:17:24 cosx kernel:  ? prb_read_valid+0x1b/0x30
Mar 26 16:17:24 cosx kernel:  ? srso_alias_return_thunk+0x5/0xfbef5
Mar 26 16:17:24 cosx kernel:  ? handle_bug+0x3c/0x80
Mar 26 16:17:24 cosx kernel:  ? exc_invalid_op+0x17/0x70
Mar 26 16:17:24 cosx kernel:  ? asm_exc_invalid_op+0x1a/0x20
Mar 26 16:17:24 cosx kernel:  ? tasklet_clear_sched+0x64/0x70
Mar 26 16:17:24 cosx kernel:  ? tasklet_clear_sched+0x64/0x70
Mar 26 16:17:24 cosx kernel:  tasklet_action_common.isra.0+0xa8/0x240
Mar 26 16:17:24 cosx kernel:  __do_softirq+0xc9/0x2c8
Mar 26 16:17:24 cosx kernel:  ? __pfx_smpboot_thread_fn+0x10/0x10
Mar 26 16:17:24 cosx kernel:  run_ksoftirqd+0x2c/0x40
Mar 26 16:17:24 cosx kernel:  smpboot_thread_fn+0xd9/0x1d0
Mar 26 16:17:24 cosx kernel:  kthread+0xe5/0x120
Mar 26 16:17:24 cosx kernel:  ? __pfx_kthread+0x10/0x10
Mar 26 16:17:24 cosx kernel:  ret_from_fork+0x31/0x50
Mar 26 16:17:24 cosx kernel:  ? __pfx_kthread+0x10/0x10
Mar 26 16:17:24 cosx kernel:  ret_from_fork_asm+0x1b/0x30
Mar 26 16:17:24 cosx kernel:  </TASK>
Mar 26 16:17:24 cosx kernel: ---[ end trace 0000000000000000 ]---

@samveen
Copy link
Owner

samveen commented Mar 26, 2024

After load kernel module mt7902 wireless adapter doesn't work. Also in my system journaL I have:

@tm4ig

  • First thank you for testing.
  • Second, can you give me the dmesg log from before the modprobe that loads the module into the kernel? I want to see the messages about the firmware.

As there is no firmware as of now, there is nothing much I can do to other than try and figure out where the firmware is. I have a few possiblities that I can try, but only if I can get detailed logs of the module loading.

@tm4ig
Copy link

tm4ig commented Mar 26, 2024

[Tue Mar 26 16:09:03 2024] mt7902 0000:02:00.0: Direct firmware load for mediatek/mt7902_wm.bin failed with error -2
[Tue Mar 26 16:09:03 2024] mt7902 0000:02:00.0: ASIC revision: 79020000
[Tue Mar 26 16:09:06 2024] mt7902 0000:02:00.0: Message 00000010 (seq 1) timeout
[Tue Mar 26 16:09:06 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 16:09:09 2024] mt7902 0000:02:00.0: Message 00000010 (seq 2) timeout
[Tue Mar 26 16:09:09 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 16:09:12 2024] mt7902 0000:02:00.0: Message 00000010 (seq 3) timeout
[Tue Mar 26 16:09:12 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 16:09:15 2024] mt7902 0000:02:00.0: Message 00000010 (seq 4) timeout
[Tue Mar 26 16:09:15 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 16:09:19 2024] mt7902 0000:02:00.0: Message 00000010 (seq 5) timeout
[Tue Mar 26 16:09:19 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 16:09:22 2024] mt7902 0000:02:00.0: Message 00000010 (seq 6) timeout
[Tue Mar 26 16:09:22 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 16:09:25 2024] mt7902 0000:02:00.0: Message 00000010 (seq 7) timeout
[Tue Mar 26 16:09:25 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 16:09:28 2024] mt7902 0000:02:00.0: Message 00000010 (seq 8) timeout
[Tue Mar 26 16:09:28 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 16:09:31 2024] mt7902 0000:02:00.0: Message 00000010 (seq 9) timeout
[Tue Mar 26 16:09:31 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 16:09:35 2024] mt7902 0000:02:00.0: Message 00000010 (seq 10) timeout
[Tue Mar 26 16:09:35 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 16:09:35 2024] mt7902 0000:02:00.0: hardware init failed
[Tue Mar 26 16:17:24 2024] ------------[ cut here ]------------
[Tue Mar 26 16:17:24 2024] tasklet SCHED state not set: func 0x0
[Tue Mar 26 16:17:24 2024] WARNING: CPU: 3 PID: 38 at kernel/softirq.c:751 tasklet_clear_sched+0x64/0x70
[Tue Mar 26 16:17:24 2024] Modules linked in: mt792x_lib mt76_connac_lib mt76 mac80211 libarc4 exfat udp_diag tcp_diag inet_diag veth snd_seq_dummy snd_hrtimer snd_seq snd_seq_device overlay bnep ipt_REJECT nf_reject_ipv4 xt_comment wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 libcurve25519_generic xt_limit libchacha ip6_udp_tunnel xt_addrtype udp_tunnel xt_tcpudp bridge stp xt_conntrack llc nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 cfg80211 ip6_tables iptable_filter vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) ext4 vfat mbcache fat jbd2 nvidia_drm(POE) nvidia_uvm(POE) nvidia_modeset(POE) nvidia(POE) joydev snd_soc_dmic snd_soc_acp6x_mach snd_acp6x_pdm_dma r8153_ecm cdc_ether snd_sof_amd_acp63 intel_rapl_msr usbnet intel_rapl_common snd_sof_amd_vangogh snd_sof_amd_rembrandt snd_sof_amd_renoir snd_sof_amd_acp snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_hda_codec_realtek snd_sof_utils snd_hda_codec_generic snd_hda_codec_hdmi snd_soc_core btusb snd_compress snd_hda_intel ac97_bus uvcvideo btrtl
[Tue Mar 26 16:17:24 2024]  snd_intel_dspcfg snd_pcm_dmaengine kvm_amd btintel videobuf2_vmalloc snd_intel_sdw_acpi snd_pci_ps btbcm uvc btmtk videobuf2_memops snd_rpl_pci_acp6x hid_multitouch videobuf2_v4l2 snd_hda_codec snd_acp_pci kvm asus_nb_wmi snd_acp_legacy_common snd_hda_core videodev bluetooth asus_wmi snd_pci_acp6x snd_hwdep ledtrig_audio videobuf2_common platform_profile snd_pcm r8152 irqbypass ecdh_generic sparse_keymap mc mousedev crc16 mii rfkill rapl wmi_bmof snd_pci_acp5x ucsi_acpi snd_rn_pci_acp3x snd_timer pcspkr typec_ucsi sp5100_tco snd_acp_config i2c_hid_acpi snd_soc_acpi typec snd i2c_hid k10temp amd_pmc thunderbolt snd_pci_acp3x soundcore roles i2c_piix4 mac_hid i2c_dev crypto_user tcp_bbr fuse loop nfnetlink ip_tables x_tables xfs libcrc32c crc32c_generic ses enclosure scsi_transport_sas dm_crypt cbc encrypted_keys trusted asn1_encoder tee dm_mod hid_logitech_hidpp hid_logitech_dj hid_generic uas usbhid usb_storage amdgpu crct10dif_pclmul crc32_pclmul crc32c_intel amdxcp polyval_clmulni polyval_generic
[Tue Mar 26 16:17:24 2024]  i2c_algo_bit gf128mul drm_ttm_helper ghash_clmulni_intel ttm sha512_ssse3 drm_exec serio_raw sha256_ssse3 gpu_sched atkbd sha1_ssse3 aesni_intel drm_suballoc_helper libps2 nvme drm_buddy vivaldi_fmap crypto_simd drm_display_helper nvme_core xhci_pci cryptd video ccp i8042 cec nvme_auth xhci_pci_renesas serio wmi
[Tue Mar 26 16:17:24 2024] Unloaded tainted modules: mt7902_common(OE):1 mt7902(OE):1 [last unloaded: mt7902_common(OE)]
[Tue Mar 26 16:17:24 2024] CPU: 3 PID: 38 Comm: ksoftirqd/3 Tainted: P           OE      6.8.1-arch1-1 #1 52f97d9bb37be6168651745a1a9f8f7240d21ce5
[Tue Mar 26 16:17:24 2024] Hardware name: ASUSTeK COMPUTER INC. Vivobook_ASUSLaptop M6500XV_M6500XV/M6500XV, BIOS M6500XV.309 12/04/2023
[Tue Mar 26 16:17:24 2024] RIP: 0010:tasklet_clear_sched+0x64/0x70
[Tue Mar 26 16:17:24 2024] Code: 00 48 c7 c0 db c3 fc 97 48 8b 57 18 48 c7 c6 f9 98 fc 97 48 0f 45 f0 48 c7 c7 a0 47 03 98 c6 05 1b 8e f0 01 01 e8 ec 74 ff ff <0f> 0b eb b3 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90
[Tue Mar 26 16:17:24 2024] RSP: 0018:ffffbd27c02d7e38 EFLAGS: 00010282
[Tue Mar 26 16:17:24 2024] RAX: 0000000000000000 RBX: ffff9a9ede4f5800 RCX: 0000000000000027
[Tue Mar 26 16:17:24 2024] RDX: ffff9aa1de8e19c8 RSI: 0000000000000001 RDI: ffff9aa1de8e19c0
[Tue Mar 26 16:17:24 2024] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffbd27c02d7cc0
[Tue Mar 26 16:17:24 2024] R10: 0000000000000003 R11: ffffffff988ca688 R12: ffff9aa1de8e14d0
[Tue Mar 26 16:17:24 2024] R13: ffff9a9ede4f58a8 R14: 0000000000000040 R15: 0000000000000006
[Tue Mar 26 16:17:24 2024] FS:  0000000000000000(0000) GS:ffff9aa1de8c0000(0000) knlGS:0000000000000000
[Tue Mar 26 16:17:24 2024] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[Tue Mar 26 16:17:24 2024] CR2: 00005aab452e4b00 CR3: 00000003dbc20000 CR4: 0000000000f50ef0
[Tue Mar 26 16:17:24 2024] PKRU: 55555554
[Tue Mar 26 16:17:24 2024] Call Trace:
[Tue Mar 26 16:17:24 2024]  <TASK>
[Tue Mar 26 16:17:24 2024]  ? tasklet_clear_sched+0x64/0x70
[Tue Mar 26 16:17:24 2024]  ? __warn+0x81/0x130
[Tue Mar 26 16:17:24 2024]  ? tasklet_clear_sched+0x64/0x70
[Tue Mar 26 16:17:24 2024]  ? report_bug+0x171/0x1a0
[Tue Mar 26 16:17:24 2024]  ? prb_read_valid+0x1b/0x30
[Tue Mar 26 16:17:24 2024]  ? srso_alias_return_thunk+0x5/0xfbef5
[Tue Mar 26 16:17:24 2024]  ? handle_bug+0x3c/0x80
[Tue Mar 26 16:17:24 2024]  ? exc_invalid_op+0x17/0x70
[Tue Mar 26 16:17:24 2024]  ? asm_exc_invalid_op+0x1a/0x20
[Tue Mar 26 16:17:24 2024]  ? tasklet_clear_sched+0x64/0x70
[Tue Mar 26 16:17:24 2024]  ? tasklet_clear_sched+0x64/0x70
[Tue Mar 26 16:17:24 2024]  tasklet_action_common.isra.0+0xa8/0x240
[Tue Mar 26 16:17:24 2024]  __do_softirq+0xc9/0x2c8
[Tue Mar 26 16:17:24 2024]  ? __pfx_smpboot_thread_fn+0x10/0x10
[Tue Mar 26 16:17:24 2024]  run_ksoftirqd+0x2c/0x40
[Tue Mar 26 16:17:24 2024]  smpboot_thread_fn+0xd9/0x1d0
[Tue Mar 26 16:17:24 2024]  kthread+0xe5/0x120
[Tue Mar 26 16:17:24 2024]  ? __pfx_kthread+0x10/0x10
[Tue Mar 26 16:17:24 2024]  ret_from_fork+0x31/0x50
[Tue Mar 26 16:17:24 2024]  ? __pfx_kthread+0x10/0x10
[Tue Mar 26 16:17:24 2024]  ret_from_fork_asm+0x1b/0x30
[Tue Mar 26 16:17:24 2024]  </TASK>
[Tue Mar 26 16:17:24 2024] ---[ end trace 0000000000000000 ]---

@tm4ig
Copy link

tm4ig commented Mar 26, 2024

In my laptop I can to connect to WiFi from UEFI bios. Can this help?

@samveen
Copy link
Owner

samveen commented Mar 26, 2024

[Tue Mar 26 16:09:03 2024] mt7902 0000:02:00.0: Direct firmware load for mediatek/mt7902_wm.bin failed with error -2
[Tue Mar 26 16:09:03 2024] mt7902 0000:02:00.0: ASIC revision: 79020000

What are the 20 lines before this?

I think I have a link to firmware drivers from asus website. Maybe we can try that. I'll update instructions in the README to download, extract and install the firmware.

@tm4ig
Copy link

tm4ig commented Mar 26, 2024

Before

[Tue Mar 26 16:09:03 2024] mt7902 0000:02:00.0: Direct firmware load for mediatek/mt7902_wm.bin failed with error -2
[Tue Mar 26 16:09:03 2024] mt7902 0000:02:00.0: ASIC revision: 79020000

other old events not related to the problem

@samveen
Copy link
Owner

samveen commented Mar 26, 2024

@tm4ig Updated code, and added firmware download and install script (see README for the updated intructions for firmware install)

other old events not related to the problem

Ok.

@tm4ig
Copy link

tm4ig commented Mar 26, 2024

After code update

[Tue Mar 26 20:26:10 2024] mt7902 0000:02:00.0: ASIC revision: 79020000
[Tue Mar 26 20:26:13 2024] mt7902 0000:02:00.0: Message 00000010 (seq 1) timeout
[Tue Mar 26 20:26:13 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 20:26:16 2024] mt7902 0000:02:00.0: Message 00000010 (seq 2) timeout
[Tue Mar 26 20:26:16 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 20:26:19 2024] mt7902 0000:02:00.0: Message 00000010 (seq 3) timeout
[Tue Mar 26 20:26:19 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 20:26:22 2024] mt7902 0000:02:00.0: Message 00000010 (seq 4) timeout
[Tue Mar 26 20:26:22 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 20:26:26 2024] mt7902 0000:02:00.0: Message 00000010 (seq 5) timeout
[Tue Mar 26 20:26:26 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 20:26:29 2024] mt7902 0000:02:00.0: Message 00000010 (seq 6) timeout
[Tue Mar 26 20:26:29 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 20:26:32 2024] mt7902 0000:02:00.0: Message 00000010 (seq 7) timeout
[Tue Mar 26 20:26:32 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 20:26:35 2024] mt7902 0000:02:00.0: Message 00000010 (seq 8) timeout
[Tue Mar 26 20:26:35 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 20:26:38 2024] mt7902 0000:02:00.0: Message 00000010 (seq 9) timeout
[Tue Mar 26 20:26:38 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 20:26:42 2024] mt7902 0000:02:00.0: Message 00000010 (seq 10) timeout
[Tue Mar 26 20:26:42 2024] mt7902 0000:02:00.0: Failed to get patch semaphore
[Tue Mar 26 20:26:42 2024] mt7902 0000:02:00.0: hardware init failed

@samveen
Copy link
Owner

samveen commented Mar 26, 2024

@tm4ig From the log it seems that the firmware was loaded, but the device didn't respond as expected. Is that correct?

@tm4ig
Copy link

tm4ig commented Mar 26, 2024

@samveen
Yes, it is correct

@samveen
Copy link
Owner

samveen commented Mar 26, 2024

Did the kernel oops trigger after firmware install, or no oops?

@tm4ig
Copy link

tm4ig commented Mar 26, 2024

There is no kernel oops after firmware install

@henri26mobu
Copy link
Author

Here are the logs : `henri26mobu@7902pop:/usr/src$ sudo dkms build --verbose -m mt7902 -v 0.0.1 sudo dkms install --verbose -m mt7902 -v 0.0.1 Sign command: /usr/bin/kmodsign Signing key: /var/lib/shim-signed/mok/MOK.priv Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der Deprecated feature: REMAKE_INITRD (/usr/src/mt7902-0.0.1/dkms.conf) Creating symlink /var/lib/dkms/mt7902/0.0.1/source -> /usr/src/mt7902-0.0.1

Building module: make -C mt76/mt7902 clean make : on entre dans le répertoire « /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 » make -C /lib/modules/6.8.0-11-generic/build M=/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 clean make[1] : on entre dans le répertoire « /usr/src/linux-headers-6.8.0-11-generic » make[1] : on quitte le répertoire « /usr/src/linux-headers-6.8.0-11-generic » make : on quitte le répertoire « /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 »

{ bash build.sh --kver 6.8.0-11-generic; } >> /var/lib/dkms/mt7902/0.0.1/build/make.log 2>&1

Signing module /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/mt7902-common.ko Signing module /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/mt7902.ko make -C mt76/mt7902 clean make : on entre dans le répertoire « /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 » make -C /lib/modules/6.8.0-11-generic/build M=/var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 clean make[1] : on entre dans le répertoire « /usr/src/linux-headers-6.8.0-11-generic » CLEAN /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902/Module.symvers make[1] : on quitte le répertoire « /usr/src/linux-headers-6.8.0-11-generic » make : on quitte le répertoire « /var/lib/dkms/mt7902/0.0.1/build/mt76/mt7902 »

Deprecated feature: REMAKE_INITRD (/var/lib/dkms/mt7902/0.0.1/source/dkms.conf)

mt7902-common.ko.zst: Running module version sanity check.

* Original module
  
  * No original module exists within this kernel

* Installation
  
  * Installing to /lib/modules/6.8.0-11-generic/updates/dkms/

mt7902.ko.zst: Running module version sanity check.

* Original module
  
  * No original module exists within this kernel

* Installation
  
  * Installing to /lib/modules/6.8.0-11-generic/updates/dkms/
    do_depmod 6.8.0-11-generic

henri26mobu@7902pop:/usr/src$ sudo dkms status --verbose -m mt7902 -v 0.0.1 Deprecated feature: REMAKE_INITRD (/var/lib/dkms/mt7902/0.0.1/source/dkms.conf) mt7902/0.0.1, 6.8.0-11-generic, x86_64: installed `

It's installed now and the driver should work, which is the next step in the task list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants