1234Next
Return to list New
View: 6482|Reply: 31

No wifi after sleep-suspend Ubuntu

[Copy link]

12

Threads

49

Posts

316

Credits

Full Member

Rank: 3Rank: 3

Credits
316
Post time 2022-09-12 02:10:51 | Show all posts |Read mode
Hi all, I have this problem where if the mini pc goes into sleep mode then when it wakes up it has no wifi connection. I have tried different distros even diferent kernel, I also tried to reset wifi card but no success, only turn it off and turn it on does the trick.


So I wonder if anyone here uses linux with their SER pc and had this same problem with the wifi card.

Thanks
Reply

Use magic Report

2

Threads

12

Posts

74

Credits

Member

Rank: 2

Credits
74
Post time 2022-11-29 10:15:57 | Show all posts
supercharging replied at 2022-11-29 08:59
hi Magister,
I did create file /etc/pm/config.d/config and put those two lines, but on wake up wif ...

Hi, I'm here to answer my own question, ubuntu uses systemd, so create file in /etc/pm/config.d/config will NOT work. on ubuntu, you will need to use the script posted by Magister:
$ cat /usr/lib/systemd/system-sleep/remove-mt7921e.sh
#!/bin/bash
[ "$1" = "post" ] && exec /usr/sbin/modprobe mt7921e
[ "$1" = "pre" ] && exec /usr/sbin/modprobe -r mt7921e
exit 0

And I can confirm this works for me! (ubuntu 22.04 LTS + SER5 5600H)
Reply Support 0 Not support 1

Use magic Report

4

Threads

114

Posts

882

Credits

Senior Member

Rank: 4

Credits
882
Post time 2022-11-29 04:29:48 | Show all posts
try with a script, make it executable

$ cat /usr/lib/systemd/system-sleep/remove-mt7921e.sh
#!/bin/bash
[ "$1" = "post" ] && exec /usr/sbin/modprobe mt7921e
[ "$1" = "pre" ] && exec /usr/sbin/modprobe -r mt7921e
exit 0
SER5 5600H 32/500 - MX Linux
Reply Support 1 Not support 0

Use magic Report

12

Threads

49

Posts

316

Credits

Full Member

Rank: 3Rank: 3

Credits
316
 Author| Post time 2022-11-17 19:30:08 | Show all posts
Magister replied at 2022-11-12 02:12
I created a simple /etc/pm/config.d/config containing

HOOK_BLACKLIST="wireless"

Hi, I just tried Fedora 37 with the newest kernel 6.0 and the issue still persist so clearly it's not a liner kernel fault but a BIOS problem, also I need to mentiones that I am using intel AX210 wifi card which is well supported at this point.
Reply Support 1 Not support 0

Use magic Report

1

Threads

282

Posts

110K

Credits

Veteran

Rank: 8Rank: 8

Credits
14767
Post time 2022-09-12 05:22:58 | Show all posts
Edited by rmarion59 at 2022-09-12 07:19

You must tell Ubuntu not to put your WiFi card on Suspend Mode. If your machine wakes from sleep/suspend mode the WiFi wont't work or won't connect back to the previously connected network. Here is a simple way to fix WiFi not working after sleep/suspend in Ubuntu 20.04.x


Open terminal and run the following command


sudo nano /lib/systemd/system-sleep/wififix


After entering your password, It will open the nano editor so Paste the code below;


!/bin/sh
set -e
if [ "$2" = "suspend" ] || [ "$2" = "hybrid-sleep" ]; then
     case "$1" in
             pre) true ;;
             post) sleep 1 && service network-manager restart ;;
       esac
fi



Press Ctrl-O and Enter to save it and press Ctrl-X to close the file. Now, make this an executable using this command;


sudo chmod +x /lib/systemd/system-sleep/wififix


The problem should now be gone now!
Reply Support Not support

Use magic Report

12

Threads

49

Posts

316

Credits

Full Member

Rank: 3Rank: 3

Credits
316
 Author| Post time 2022-09-14 15:07:46 | Show all posts
rmarion59 replied at 2022-09-12 05:22
You must tell Ubuntu not to put your WiFi card on Suspend Mode. If your machine wakes from sleep/sus ...

Hi, many thanks for your reply, unfortunately problem still persists even with your solution, I guess this mini pc motherboard is not fully compatible with linux because I haven´t encounter any problems with windows 11.

I asked in another thread whether there may be a new BIOS that is more compatible with linux.
Reply Support Not support

Use magic Report

1

Threads

282

Posts

110K

Credits

Veteran

Rank: 8Rank: 8

Credits
14767
Post time 2022-09-14 19:36:20 | Show all posts
Hi Andor, I will revise my script this weekend and will get back to you. R.
Reply Support Not support

Use magic Report

12

Threads

49

Posts

316

Credits

Full Member

Rank: 3Rank: 3

Credits
316
 Author| Post time 2022-09-14 23:41:32 | Show all posts
rmarion59 replied at 2022-09-14 19:36
Hi Andor, I will revise my script this weekend and will get back to you. R.

There are other people reporting same problem on reddit so i do not know whether it is  kernel or bios related
Reply Support Not support

Use magic Report

1

Threads

282

Posts

110K

Credits

Veteran

Rank: 8Rank: 8

Credits
14767
Post time 2022-09-15 05:57:39 | Show all posts
I have tested my script and it seems to work. Is it working because it is "the" solution or it is also due to other libraries and software I have installed and/or re-compiled.  I will get back to you. Thanks!
Reply Support Not support

Use magic Report

1

Threads

9

Posts

49

Credits

Newbie

Rank: 1

Credits
49
Post time 2022-09-15 06:33:43 | Show all posts
У меня такая же проблема возникает после пробуждения Мини Пк, wi-fi  так же пропадает и приходится делать перезагрузку.
Reply Support Not support

Use magic Report

1

Threads

9

Posts

49

Credits

Newbie

Rank: 1

Credits
49
Post time 2022-09-15 06:38:35 | Show all posts
Andor replied at 2022-09-14 15:07
Hi, many thanks for your reply, unfortunately problem still persists even with your solution, I gu ...

У меня такая проблема с пропаданием wi-fi после пробуждения возникает как с Windows 10, так и Windows 11. Как это будет с Linux Ubuntu я не проверял, но думаю будет так же.
Reply Support Not support

Use magic Report

1

Threads

9

Posts

49

Credits

Newbie

Rank: 1

Credits
49
Post time 2022-09-15 06:40:55 | Show all posts
rmarion59 replied at 2022-09-15 05:57
I have tested my script and it seems to work. Is it working because it is "the" solution or it is al ...

Уважаемый rmarion59, а Вы можете такой скрипт для wi-fi здесь написать для Windows 10. Буду Вам очень благодарен!!!
Reply Support Not support

Use magic Report

1

Threads

282

Posts

110K

Credits

Veteran

Rank: 8Rank: 8

Credits
14767
Post time 2022-09-15 08:46:07 | Show all posts
Привет Мастермайнд! Ты знаешь меня? Откуда ты знаешь, что я говорю по-русски? ...В данный момент я занят, но посмотрю на этих выходных. Ваше здоровье!
Reply Support Not support

Use magic Report

You have to log in before you can reply Login | Sign up

Points Rules

Quick Reply To Top Return to the list