Hey guys, not sure if this is a good place for this, so let me know if this post would be better suited elsewhere.

Also, I know, I know, make sure your device is compatible with linux-- but when Newegg said “compatible with ubuntu” I naively thought that put me in the clear. Now I know better, and I’ll be checking the wifi card compatibility. Anways, here’s the situation:

I’m running debian bookworm on an MSI Modern notebook. On every distro I’ve tried, I’ve had an issue where my wifi acts extremely inconsistently. For a while upon a fresh install of any OS, it works wihout issue. Then, after a few weeks, and especially after too much uptime, one or more of a few different issues will start happening, seemingly at random:

  • The network manager will suddenly fail to detect that there is any wifi adapter installed at all. (For some reason, this can be fixed by discharging the motherboard battery and restarting).
  • Wifi networks will be visible, but will not be able to authenticate, even with correct credentials. This can occur even with unsecured wifi networks. (The time before last that this happened, it randomly fixed itself).

After about two weeks of using my system after it magically fixed itself, the wifi adapter stopped being recognized, so I did the motherboard discharge and reboot, and when I could access the wifi settings again, the authentication issue had reappeared. After several days of use, it hasn’t fixed itself. So now I’m posting here, after many months of being unable to figure out a good solution.

I’ve tried and failed to troubleshoot this problem over many hours. Some related issues/factors that might help explain what the problem is:

  • After some research, I’ve noted that other people have had problems with the wifi card in this laptop (MEDIATEK MT7921K (RZ608) Wi-Fi 6E 80MHz).
  • Despite debian supporting secure boot, if I ever try to enable secure boot, I am given a “secure boot violation”.

If anyone could help me get pointed in the right direction, show me what I could potentially reinstall or reset without having to reinstall my OS every time this happens, I would super appreciate it. And of course if I didn’t include some spec please let me know and I’ll update this post with the necessary spec.

  • Skull giver@popplesburger.hilciferous.nl
    link
    fedilink
    arrow-up
    6
    ·
    11 months ago

    The network manager will suddenly fail to detect that there is any wifi adapter installed at all. (For some reason, this can be fixed by discharging the motherboard battery and restarting).

    That sounds like the firmware on the wireless adapter crashed. Disconnecting the power and powering it up again would probably boot a fresh copy of the firmware. Check the output of dmesg and other system logs right after the adapter dies, maybe that’ll give you a hint of what’s going on.

    Wifi networks will be visible, but will not be able to authenticate, even with correct credentials

    That could be a firmware bug as well.

    For the WiFi issue, I’d recommend finding firmware updates or installing a better WiFi card if no firmware is available. Firmware updates may need to be installed through Windows if fwupdmgr doesn’t list any updates. It could be that the problem is with buggy firmware that crashes because the driver does something unexpected, which would mask the bug in Windows (so for most people).

    Despite debian supporting secure boot, if I ever try to enable secure boot, I am given a “secure boot violation”.

    MSI had its signing keys leaked so it’s possible they’ve loaded up their new laptops with new keys. The signed Debian bootloader may not be signed with a key these devices trust. I’m also not sure if the Microsoft secure boot vulnerability has altered the key store somehow.

    Either way, your laptop isn’t trusting the certificate that signed the Debian installer. If you want to use secure boot, you’ll have to use your own, custom keys (and the Microsoft key if you want to boot Windows).

    • duckington@lemmy.worldOP
      link
      fedilink
      arrow-up
      4
      ·
      11 months ago

      Wow thank you so much for the insights and advice. This is exactly the kind of thing I was trying to find but didn’t have the knowledge to know what to search. I’ll look into these!

  • Sentau@lemmy.one
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    11 months ago

    I have the a wifi card from the MT7921 family as well in my MSI laptop and from what I can gather, the issue seems to the power ASPM state that the wifi card is in. This is especially a problem when rebooting your laptop as the card is in unexpected/wrong (for a lack of a better word) power ASPM state during boot up and hence the mt7921e kernel module fails to run. Fastboot also contributes to this so disable that if that is enabled.

    The engineer from mediatek who is responsible for the mt7921 and associated modules was aware of the first issue and has submitted several patches to fix the issue. The most recent seems to have it becuase I dont face this problem anymore. I will link the thread where this issue was discussed if I find it.

    Edit - GitHub thread discussing issue

    Mediatek engineer describing what the issue may have been

  • Bedpanbrian@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    It sure what your resolution is, but I’ve been experiencing the first problem as well. MSI support has been great and after a few weeks it’s not happened. They did tell me if it does they will repair it even though it’s outside of warranty. Have you called them?

    • duckington@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      I’ve called them a few times but it’s been hard since their hours aren’t very long and I have a busy job. But to be honest I wasn’t banking on support since I haven’t ever had good tech support experience. Hearing that you’ve had a good experience, though, I think I’ll get in touch with them, thanks.

  • duckington@lemmy.worldOP
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    … aaand it started working for no reason again. I guess it just measures whether you want it bad enough.