I forgot to add - I use the sleep button from the GUI and it works well.
Thank you for reminding me about it, as I tried another solution, based
on this forum post: https://forum.garudalinux.org/t/rtl8822ce-wifi-
problems-asus-tuf-gaming-a15/1940/7

I created a SystemD service, called `network-restart` with the following 
contents:
```
# cat /etc/systemd/system/network-restart.service
# systemctl enable --now network-restart.service
# systemctl start network-restart.service
# systemctl stop network-restart.service
# systemctl disable --now network-restart.service
# systemctl status network-restart.service
# systemctl daemon-reload

[Unit]
Description=Network Suspend/Resume Service 
Before=sleep.target
StopWhenUnneeded=yes

[Service]
User=root
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/bin/nmcli networking off
ExecStart=/usr/bin/sleep 1
ExecStart=-/usr/bin/systemctl stop NetworkManager
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/bin/ip link set wlp3s0 down
ExecStart=/usr/bin/sleep 1
ExecStart=/usr/sbin/modprobe -r rtw88_8822ce
ExecStop=/usr/bin/sleep 5
ExecStop=/usr/sbin/modprobe rtw88_8822ce
ExecStop=/usr/bin/sleep 2
ExecStop=/usr/bin/ip link set wlp3s0 up
ExecStop=/usr/bin/sleep 2
ExecStop=/usr/bin/systemctl start NetworkManager
ExecStop=/usr/bin/sleep 2
ExecStop=/usr/bin/nmcli networking on
ExecStop=/usr/bin/sleep 1
ExecStop=/usr/bin/nmcli r wifi off
ExecStop=/usr/bin/sleep 1
ExecStop=/usr/bin/nmcli r wifi on

[Install]
WantedBy=sleep.target
```

I saw no changes, except goind to sleep taking more time. It didn't
succeed in "resurrecting" the wi-fi card after returning from sleep,
stopping at the line `/usr/bin/ip link set wlp3s0 up` with the error
that no such interface exists. Seeing that it didn't help, I removed
this service from the system.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1952403

Title:
  Realtek 8822CE wireless card fails to work after laptop discharge in
  sleep

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1952403/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to