LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 01-03-2021, 04:22 PM   #1
polnareff
LQ Newbie
 
Registered: Jan 2021
Posts: 5

Rep: Reputation: Disabled
No more wifi after suspend on honor magicBook 14 2020


Hi all,

I have an Honor magicBook 14 (2020) laptop running Fedora 33.

Everything works perfectly except when waking up from suspend. When that happens, no more wifi and lots of log errors. The only solution to recover the wifi: reboot. I can restart networkmanager, nothing change. The wifi part is still down.

The model is so new that I can't find any info on the web about it. The processor is a Ryzen 4500u with a Realtek rtl8822ce network card.

I understand it's a problem of power state change of the wifi card.

I admit that it becomes too technical for me and I find it difficult to understand what exactly is going on.
Is it the wifi card that is causing the problem or maybe it's still upstream on the PCI part?

If anyone has any idea on this issue that would be great.

Thank you in advance !

Here are the error logs:

Code:
sudo journalctl -p err
janv. 01 19:35:27 kernel: pcieport 0000:00:01.2: can't change power state from D3hot to D0 (config space inaccessible)
janv. 01 19:35:27 kernel: rtw_8822ce 0000:01:00.0: can't change power state from D3hot to D0 (config space inaccessible)
janv. 01 19:35:27 kernel: rtw_8822ce 0000:01:00.0: failed to poll offset=0x5 mask=0x2 value=0x0
janv. 01 19:35:27 kernel: rtw_8822ce 0000:01:00.0: mac power on failed
janv. 01 19:35:27 kernel: rtw_8822ce 0000:01:00.0: failed to power on mac
janv. 01 19:35:27 kernel: PM: dpm_run_callback(): wiphy_resume+0x0/0x120 [cfg80211] returns -114
janv. 01 19:35:27 kernel: PM: Device phy0 failed to resume async: error -114
janv. 01 19:35:29 abrt-notification[2633]: System encountered a non-fatal error in amdgpu_dm_backlight_update_status()
janv. 01 19:35:29 kernel: rtw_8822ce 0000:01:00.0: failed to poll offset=0x5 mask=0x2 value=0x0
janv. 01 19:35:29 kernel: rtw_8822ce 0000:01:00.0: mac power on failed
janv. 01 19:35:29 kernel: rtw_8822ce 0000:01:00.0: failed to power on mac
janv. 01 19:35:30 abrt-notification[2643]: System encountered a non-fatal error in _cond_resched()
janv. 01 19:35:31 abrt-notification[2652]: System encountered a non-fatal error in ieee80211_do_stop()
janv. 01 19:35:32 wpa_supplicant[844]: Could not set interface wlp1s0 flags (UP): Operation already in progress
janv. 01 19:35:32 kernel: rtw_8822ce 0000:01:00.0: failed to poll offset=0x5 mask=0x2 value=0x0
janv. 01 19:35:32 kernel: rtw_8822ce 0000:01:00.0: mac power on failed
janv. 01 19:35:32 kernel: rtw_8822ce 0000:01:00.0: failed to power on mac
janv. 01 19:35:32 wpa_supplicant[844]: nl80211: Could not set interface 'wlp1s0' UP
janv. 01 19:35:32 abrt-notification[2662]: System encountered a non-fatal error in ieee80211_do_stop()
janv. 01 19:35:34 wpa_supplicant[844]: Could not set interface wlp1s0 flags (UP): Operation already in progress
janv. 01 19:35:34 kernel: rtw_8822ce 0000:01:00.0: failed to poll offset=0x5 mask=0x2 value=0x0
janv. 01 19:35:34 kernel: rtw_8822ce 0000:01:00.0: mac power on failed
janv. 01 19:35:34 kernel: rtw_8822ce 0000:01:00.0: failed to power on mac
janv. 01 19:35:34 NetworkManager[769]: <error> [1609526134.1560] device (wlp1s0): Couldn't initialize supplicant interface: GDBus.Error:fi.w1.wpa_supplicant1.U>
janv. 01 19:35:34 wpa_supplicant[844]: WEXT: Could not set interface 'wlp1s0' UP
janv. 01 19:35:34 wpa_supplicant[844]: wlp1s0: Failed to initialize driver interface
janv. 01 19:35:46 wpa_supplicant[844]: Could not set interface wlp1s0 flags (UP): Operation already in progress

etc...
And informations abaout my configuration if needed :

Code:
sudo inxi -F
System:    Host: ordi Kernel: 5.9.16-200.fc33.x86_64 x86_64 bits: 64 Console: tty 0 
           Distro: Fedora release 33 (Thirty Three) 
Machine:   Type: Laptop System: HUAWEI product: NBLL-WXX9 v: M1040 serial: 87KPM209841 
           Mobo: HUAWEI model: NBLL-WXX9-PCB v: M1040 serial: PM13P5001481 UEFI: HUAWEI v: 1.05 date: 07/20/2020 
Battery:   ID-1: BAT1 charge: 27.7 Wh condition: 55.9/54.9 Wh (102%) 
CPU:       Info: 6-Core model: AMD Ryzen 5 4500U with Radeon Graphics bits: 64 type: MCP L2 cache: 3072 KiB 
           Speed: 1397 MHz min/max: 1400/2375 MHz Core speeds (MHz): 1: 1397 2: 1397 3: 1397 4: 1396 5: 1397 6: 1397 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Renoir driver: amdgpu v: kernel 
           Device-2: IMC Networks ov9734_azurewave_camera type: USB driver: uvcvideo 
           Display: server: Fedora Project X.org 1.20.10 driver: amdgpu note: display driver n/a resolution: 1920x1080~60Hz 
           OpenGL: renderer: AMD RENOIR (DRM 3.39.0 5.9.16-200.fc33.x86_64 LLVM 11.0.0) v: 4.6 Mesa 20.2.6 
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] driver: snd_hda_intel 
           Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor driver: N/A 
           Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio driver: snd_hda_intel 
           Sound Server: ALSA v: k5.9.16-200.fc33.x86_64 
Network:   Device-1: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter driver: rtw_8822ce 
           IF: wlp1s0 state: up mac: 5c:3a:45:dc:84:xx 
           IF-ID-1: virbr0 state: down mac: 52:54:00:67:ee:xx
           IF-ID-2: virbr0-nic state: down mac: 52:54:00:67:ee:xx
Drives:    Local Storage: total: 476.94 GiB used: 8.87 GiB (1.9%) 
           ID-1: /dev/nvme0n1 vendor: Western Digital model: PC SN530 SDBPNPZ-512G-1027 size: 476.94 GiB 
Partition: ID-1: / size: 338.12 GiB used: 8.70 GiB (2.6%) fs: ext4 dev: /dev/nvme0n1p7 
Swap:      ID-1: swap-1 type: partition size: 15.62 GiB used: 0 KiB (0.0%) dev: /dev/nvme0n1p6 
           ID-2: swap-2 type: zram size: 3.57 GiB used: 0 KiB (0.0%) dev: /dev/zram0 
Sensors:   System Temperatures: cpu: 32.4 C mobo: N/A gpu: amdgpu temp: 32.0 C 
           Fan Speeds (RPM): N/A 
Info:      Processes: 249 Uptime: 28m Memory: 7.14 GiB used: 2.22 GiB (31.1%) Shell: Bash inxi: 3.1.08
Code:
lspci -tvv
-[0000:00]-+-00.0  Advanced Micro Devices, Inc. [AMD] Renoir Root Complex
           +-00.2  Advanced Micro Devices, Inc. [AMD] Renoir IOMMU
           +-01.0  Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
           +-01.2-[01]----00.0  Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
           +-02.0  Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
           +-02.4-[02]----00.0  Sandisk Corp WD Blue SN550 NVMe SSD
           +-08.0  Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
           +-08.1-[03]--+-00.0  Advanced Micro Devices, Inc. [AMD/ATI] Renoir
           |            +-00.1  Advanced Micro Devices, Inc. [AMD/ATI] Device 1637
           |            +-00.2  Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
           |            +-00.3  Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1
           |            +-00.4  Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1
           |            +-00.5  Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor
           |            \-00.6  Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
           +-14.0  Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller
           +-14.3  Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge
           +-18.0  Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0
           +-18.1  Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1
           +-18.2  Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2
           +-18.3  Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3
           +-18.4  Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4
           +-18.5  Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5
           +-18.6  Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6
           \-18.7  Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7
 
Old 01-04-2021, 08:52 AM   #2
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 3,644
Blog Entries: 2

Rep: Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169
Can you unload the kernel module then reload it?
Code:
lspci -k
Code:
man modprobe
Then bring the interface up with your network manager.

This: rtw_8822ce

If so, then you can make a link, or script to do that all at once.
 
Old 01-04-2021, 08:59 AM   #3
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 3,644
Blog Entries: 2

Rep: Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169
You have 1 post. Ok.

Bring the ethernet interface down, if it is not already. Then:
Code:
modprobe -r rtw_8822ce
Wait a few seconds
Code:
modprobe rtw_8822ce
Bring the interface up with your network manager

I know that does not fix the problem. Until the firmware is fixed, that is a work around, so that you can use the box.
 
Old 01-04-2021, 01:10 PM   #4
polnareff
LQ Newbie
 
Registered: Jan 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi teckk

Thank you for your help.

First of all here is the output of lspci -k:

Code:
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Root Complex
	Subsystem: QUANTA Computer Inc Device 126b
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir IOMMU
	Subsystem: QUANTA Computer Inc Device 126b
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge
	Kernel driver in use: pcieport
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe GPP Bridge
	Kernel driver in use: pcieport
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
	Kernel driver in use: pcieport
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
	Subsystem: QUANTA Computer Inc Device 126b
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
	Subsystem: QUANTA Computer Inc Device 126b
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3
	Kernel driver in use: k10temp
	Kernel modules: k10temp
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
	Subsystem: Electronics & Telecommunications RSH Device 1e25
	Kernel driver in use: rtw_8822ce
	Kernel modules: rtw88_8822ce
02:00.0 Non-Volatile memory controller: Sandisk Corp WD Blue SN550 NVMe SSD (rev 01)
	Subsystem: Sandisk Corp WD Blue SN550 NVMe SSD
	Kernel driver in use: nvme
	Kernel modules: nvme
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Renoir (rev c3)
	Subsystem: QUANTA Computer Inc Device 126b
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 1637
	Subsystem: QUANTA Computer Inc Device 126b
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
03:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
	Subsystem: QUANTA Computer Inc Device 126b
	Kernel driver in use: ccp
	Kernel modules: ccp
03:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1
	Subsystem: QUANTA Computer Inc Device 126b
	Kernel driver in use: xhci_hcd
03:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir USB 3.1
	Subsystem: QUANTA Computer Inc Device 126b
	Kernel driver in use: xhci_hcd
03:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor (rev 01)
	Subsystem: QUANTA Computer Inc Device 126b
	Kernel modules: snd_pci_acp3x, snd_rn_pci_acp3x
03:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
	Subsystem: QUANTA Computer Inc Device 126b
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
Then, I did the maipulation of deactivating / activating the rtw88_8822ce module (waiting a few seconds between) then restarting Netwokmanager: but nothing helped.

Here are the errors, always with the famous "can't change power state from D3hot to D0 (config space inaccessible)".

Code:
janv. 04 19:55:23 kernel: rtw_8822ce 0000:01:00.0: can't change power state from D3hot to D0 (config space inaccessible)
janv. 04 19:55:23 kernel: rtw_8822ce 0000:01:00.0: mac power on failed
janv. 04 19:55:23 kernel: rtw_8822ce 0000:01:00.0: failed to power on mac
janv. 04 19:55:23 kernel: rtw_8822ce 0000:01:00.0: failed to setup chip efuse info
janv. 04 19:55:23 kernel: rtw_8822ce 0000:01:00.0: failed to setup chip information
If you have another idea, it would be nice

thank you
 
Old 01-05-2021, 03:43 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 17,934
Blog Entries: 11

Rep: Reputation: 5409Reputation: 5409Reputation: 5409Reputation: 5409Reputation: 5409Reputation: 5409Reputation: 5409Reputation: 5409Reputation: 5409Reputation: 5409Reputation: 5409
Are you sure you did it exactly like this:
Quote:
Originally Posted by teckk View Post
Bring the ethernet interface down, if it is not already. Then:
Code:
modprobe -r rtw_8822ce
Wait a few seconds (or 30)
Code:
modprobe rtw_8822ce
Bring the interface up with your network manager
???

You could repeat that with the -v option added:
Code:
modprobe -v -r rtw_8822ce
Wait 10-20-30 seconds
Code:
modprobe -v rtw_8822ce
And show us.

Quote:
Originally Posted by polnareff View Post
The model is so new that I can't find any info on the web about it. The processor is a Ryzen 4500u with a Realtek rtl8822ce network card.
But you can find info on the realtek wifi adapter:
https://duckduckgo.com/?q=linux+RTL8...+after+suspend
 
Old 01-05-2021, 07:05 AM   #6
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 3,644
Blog Entries: 2

Rep: Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169Reputation: 1169
One more thing. Do you have fast boot enabled on the machine? (UEFI or BIOS) setup.
Dual booting with windows? Windows can leave hardware in a quasi weird state. Hence, make windows shut down all the way down.

How about
Code:
rfkill list
rtl8822ce
How about a different kernel?
https://bbs.archlinux.org/viewtopic.php?id=259975
https://www.reddit.com/r/archlinux/c...mbo_is_broken/
 
Old 01-05-2021, 07:10 AM   #7
polnareff
LQ Newbie
 
Registered: Jan 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
hi ondoho,

Note that the module is "rtw88_8822ce" and not "rtw_8822ce".

Code:
$ sudo modprobe -v -r rtw_8822ce
modprobe: FATAL: Module rtw_8822ce not found.

$ sudo modprobe -v rtw_8822ce
modprobe: FATAL: Module rtw_8822ce not found in directory /lib/modules/5.9.16-200.fc33.x86_64
but :

Code:
$ sudo modprobe -v -r rtw88_8822ce
rmmod rtw88_8822ce
rmmod rtw88_pci
rmmod rtw88_8822c
rmmod rtw88_core
rmmod mac80211
rmmod libarc4
rmmod cfg80211

$ sudo modprobe -v rtw88_8822ce
insmod /lib/modules/5.9.16-200.fc33.x86_64/kernel/lib/crypto/libarc4.ko.xz 
insmod /lib/modules/5.9.16-200.fc33.x86_64/kernel/net/wireless/cfg80211.ko.xz 
insmod /lib/modules/5.9.16-200.fc33.x86_64/kernel/net/mac80211/mac80211.ko.xz 
insmod /lib/modules/5.9.16-200.fc33.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_core.ko.xz 
insmod /lib/modules/5.9.16-200.fc33.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_pci.ko.xz 
insmod /lib/modules/5.9.16-200.fc33.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822c.ko.xz 
insmod /lib/modules/5.9.16-200.fc33.x86_64/kernel/drivers/net/wireless/realtek/rtw88/rtw88_8822ce.ko.xz
 
Old 01-05-2021, 07:27 AM   #8
polnareff
LQ Newbie
 
Registered: Jan 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi teckk,

My bios options are really minimal and I don't have an option to enable or disable fastboot.
For Windows, indeed, I have it in double boot (to be able to update the bios if necessary) but I do not use it.
In any case, I had to boot and reboot the machine on Fedora about 30 times since the last time I started Windows. I think it no longer acts negatively.

Finally, for the subject of the kernel, I see the idea but I am not yet able to patch, recompile or tweak myself unfortunately

here is the output of rfkill:

Code:
sudo rfkill list
0: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no
2: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
Thank you
 
Old 01-05-2021, 10:01 AM   #9
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,862

Rep: Reputation: 343Reputation: 343Reputation: 343Reputation: 343
There's usually a key combination for activating and deactivating wireless. After booting and having wireless come up, try deactivating and then activating just to see if you can bring wireless back up after deactivating. If you can do that successfully, try deactivating wireless before suspending and then reactivating after resuming. If that works, you can try suspending as usual and on resume, deactivate and reactivate and see if wireless comes up.
 
Old 01-05-2021, 12:45 PM   #10
polnareff
LQ Newbie
 
Registered: Jan 2021
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi kilgoretrout,

Good idea your method. I tried and unfortunately it didn't work.

As long as the PC has not been suspended, all is well. I can deactivate / activate wifi (via the "airplane mode" button) without any problem. everything is going well.

On the other hand, I deactivate the network, I suspend, and when I return from suspend: impossible to reactivate. I still have the same error in the logs

Thanks for helping out.
 
Old 09-10-2021, 12:50 PM   #11
RenjiSann
LQ Newbie
 
Registered: Sep 2021
Location: France
Distribution: Arch
Posts: 1

Rep: Reputation: Disabled
Hi,

I'm having the exact same problem with the exact same laptop (Honor Magicbook 14 2020, AMD Ryzen 5 4500U), running Arch. I have tried everything mentioned here so far but no miracle :/

I have also tried running the LTS 5.10 arch kernel, as well as the current one, 5.14.

Have a good day!
 
Old 10-12-2021, 02:09 AM   #12
QuaintLizard
LQ Newbie
 
Registered: Oct 2021
Posts: 3

Rep: Reputation: Disabled
I'm very happy to find this thread, as I have been struggling with this myself, running openSUSE Leap 15.3, with default kernels.

I can confirm that the usual module removing and re-installing tricks do not work on the issue. It's as though the wireless hardware no longer exists after suspending.

I made a little progress by following one set of advice which made two suggestions, one of which "feels" right, and that was to add these lines to /etc/NetworkManager/NetworkManager.conf:

Quote:
[connection]
wifi.powersave = 2
[device]
wifi.scan-rand-mac-address=no
But the real change came with a suggestion about turning off iommu. I have only had time to try one such setting, adding "amd_iommu=fullflush" to grub, after which, on one occasion. wifi came up quickly after a suspend. I am not yet certain whether this grub line needs rto be "amd_iommu" or just "iommu", which I think may be Intel-related. Also, it seems there are security implications of simply switching off iommu.

Also, after suspending, it's worth while noting that a "journalctl -f" has an entry to the effect that the hardware is no longer there.
I do run tlp, and need to check to see if some sleep state from tlp is affecting the hardware. I am also wondering whether it is worth trying setting some parameters to the rtw88_core module in /etc/modprobe.d. I suspect not, if the old module removal and re-install doesn't work, and that more hardware-related iommu setting may bear more fruit.

I'll try some more options when I get the chance.
 
1 members found this post helpful.
Old 10-12-2021, 10:41 AM   #13
QuaintLizard
LQ Newbie
 
Registered: Oct 2021
Posts: 3

Rep: Reputation: Disabled
OK, I've done a little more testing, and in some ways I'm no further forward, but maybe a pointer or two can help someone else more knowledgeable.

The problem is that the hardware does not wake up after a suspend. The journald entry is quite clear

Quote:
Oct 12 15:46:58 hobo kernel: rtw_8822ce 0000:01:00.0: failed to poll offset=0x5 mask=0x2 value=0x0
Oct 12 15:46:58 hobo kernel: rtw_8822ce 0000:01:00.0: mac power on failed
Oct 12 15:46:58 hobo kernel: rtw_8822ce 0000:01:00.0: failed to power on mac
This explains why attempting to re-install the relevant modules doesn't work - there's nothing there as far as the hardware is concerned.

However, just playing around with various options, if I boot and include in the grub line "iommu=off", the machine starts, but with no wifi. It's as though the hardware isn't there; in other words, it feels rather similar to the situation after suspending. This is the fact I am hoping someone more knowledgeable can extrapolate from.

It seems the "iommu=fullflush" option is now deprecated. The more correct format is now "iommu.strict=1". This is also an interesting option. It usually fails to resolve the problem, but if you reboot with this grub option, then immediately suspend, wifi works properly and suspend is fully functional. Wait an extra minute or so, and suspend fails. It makes me wonder if some process, possibly to do with power saving, happens during that time, but I have not been able to find it.

Also, just for completeness, it does not seem to matter is you use iommu or amd_iommu, although it is possible that these do different things - I'm no kernel guru, and reading about these options and associated acronyms makes my head spin.

Other options which had no effect were "iommu=soft" and "iommu=pt" or its latest preferable option "iommu.passthrough=1".
The next port of call may be to find some settings in the modules themselves. For example, rtw88_core has a parameter, which you can see if you do a a"modinfo rtw88_core" (some systems name the modules slightly differently, I think):

Quote:
parm: lps_deep_mode: Deeper PS mode. If 0, deep PS is disabled (uint)
I can't help but wonder if supporting a deeper sleep mode may affect coming back from the dead, which is what seems to be the trouble here. Similar the module rtw88_pci has these options:

Quote:
parm: disable_msi:Set Y to disable MSI interrupt support (bool)
parm: disable_aspm:Set Y to disable PCI ASPM support (bool)
Again, I don't know exactly what those do, but one can see that the issue enumerating the hardware after a suspend /may/ be affected by one of those.

Gah! It feels so close to a solution.... I do hope someone is able to build on these observations.

QL
 
Old 10-13-2021, 04:53 AM   #14
QuaintLizard
LQ Newbie
 
Registered: Oct 2021
Posts: 3

Rep: Reputation: Disabled
OK, I think I have a workaround to this problem. The more I tried various options to invoke a known change, in an effort to understand this better, the more it felt like something to do with the driver. So I tried manually removing all the wifi modules and suspending, then adding them again when the system woke up. Amazingly, the wireless fired up. I tried again, and once again, it worked perfectly. So it is a workaround, but seems to resolve the issue.

To make it work every time, I added an executable script to /usr/lib/systemd/system-sleep. I called the script wifi-suspending.sh but the name doesn't matter. The file contains:

Quote:
#!/bin/sh

[ "$1" = "post" ] && exec /usr/sbin/modprobe rtw88_8822ce
[ "$1" = "pre" ] && exec /usr/sbin/rmmod rtw88_8822ce rtw88_8822c rtw88_pci rtw88_core

exit 0
Don't forget to "chmod +x" to make it executable. I restarted at this point and tested again.

Note that I have removed the entire stack of modules, but it's only necessary to add the main driver, which brings in the others automatically. Also, I have not bothered to see if I can just remove one of those modules, ie, the problematic one only. I don't think there's any harm in cleaning out the whole problematic stack, though, in a workaround like this.

Thanks to polnareff for starting this thread, as this issue has been bugging me since I got my magicbook, which is otherwise a fabulous machine. But I still think this is a workaround rather than a solution.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Setting up KVM Hypervisor on SparkyLinux 2020.9 rolled forward up to 11/08/2020 (VENV) LXer Syndicated Linux News 0 11-08-2020 04:21 PM
[SOLVED] Please help,i have a error while upgrading my kali linux 2020.1 to 2020.3 Deep2 Linux - Newbie 2 08-28-2020 09:24 AM
LXer: Akademy 2020 and GUADEC 2020 Linux Events Move to Online Conferences LXer Syndicated Linux News 0 04-18-2020 03:33 AM
Trying to set up a linux Medal of Honor Server lucid Linux - Software 1 01-11-2004 05:22 AM
metal of honor: allied assault chrismiceli Linux - Software 2 11-12-2002 10:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 09:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration