# [SOLVED] Kernel freezing after 5.1* kernel cause o RTL8821CE

## Ari_archer

Hello, I recently switched to gentoo full time, I had this issue before on other distros too, for example arch, since 5,13 (or is it 5.12?)kernel my wifi card (RTL8821CE 802.11ac) got support officially in the kernel, the network forks flawlessly, but the wifi driver keeps freezing the kernel itself which is getting really annoying, for a bit i had a work-around, installing the wifi driver from ubuntu: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1927808, but now not even that works anymore, when my card had no support I used to install this driver: https://github.com/tomaspinho/rtl8821ce but it bumps up my RAM usage by 300MB which is scary as I only have 4GB, so my question is that "is there any other workaround/fix?"

KERNEL CONFIG: https://raw.githubusercontent.com/TruncatedDinosour/dotfiles-cleaned/gentoo/dotfiles/linux/.config

LSPCI: https://pastebin.com/MYSY4EZh

LAPTOP: https://support.hp.com/us-en/document/c06193977 (HP 250 G7 Notebook PC)

DRACUT.CONF: https://pastebin.com/xdNwBNXG

GRUB: https://pastebin.com/jjNUS1sP

LSMOD: https://pastebin.com/gBs5BVfi

SERVICES: https://pastebin.com/vSLftRLw

GENTOO: no-multilib, openRC, stage3

UNAME:

```

$ uname -a

Linux ari-gentoo 5.13.13-gentoo #61 SMP Tue Aug 31 20:49:57 EEST 2021 x86_64 Intel(R) Core(TM) i3-8130U CPU @ 2.20GHz

GenuineIntel GNU/Linux

```

thanks for anyone answering, i have been trying to solve this for a while on other distros.

----------

## NeddySeagoon

Ari_archer,

Why do you think that its the wifi driver that is freezing the kernel.

Is there anything in dmesg?

Put dmesg onto a pastebin.

-- edit --

I've just noticed Evil wifi card Realtek RTL8821CE 802.11b/g/n/ac not working

----------

## wless123

Hey,

try  to resolve it by adding the line

 *Quote:*   

> 
> 
> options rtw88_pci disable_aspm=1
> 
> 

 

in any file in the directory /etc/mobprobe.d/.

 *Quote:*   

> 
> 
> There is nothing dangerous about using this module option. The fact that it works indicates that your BIOS is buggy, but it has always been buggy. No new "danger" has been introduced. Complain to your computer vendor!
> 
> 

 

Source: https://github.com/tomaspinho/rtl8821ce/issues/142#issuecomment-904873497

----------

## Tony0945

 *wless123 wrote:*   

> in any file in the directory /etc/mobprobe.d/.

 

Elliott Ness has been dead a long time. /etc/modprobe.d  , although I thnk that has been deprecated????

----------

## wless123

i confess being member of the copy&paste mafia.

----------

## NeddySeagoon

Tony0945,

```
$ ls -l /etc/modprobe.d/

total 20

-rw-r--r-- 1 root root 1186 Feb 10  2020 aliases.conf

-rw-r--r-- 1 root root 1025 May 19  2013 alsa.conf

-rw-r--r-- 1 root root  122 Feb 10  2020 i386.conf

-rw-r--r-- 1 root root  299 Jan 10  2019 ppp.conf

-rw-r--r-- 1 root root  170 Jun 25 17:42 vboxdrv.conf
```

It looks like it still gets populated here. That's not to say it gets used though.

----------

## Tony0945

 *wless123 wrote:*   

> i confess being member of the copy&paste mafia.

 

I had meant to add a smiley to that post. As to the error: "Been there. Done that. Too many times."

Yeah, I knew it was an honest error. Just got tickled by "mobprode".

P.S. Glad you have a sense of humor.

----------

## Tony0945

 *NeddySeagoon wrote:*   

> Tony0945,
> 
> ```
> $ ls -l /etc/modprobe.d/
> 
> ...

 

```
~ $ ls /etc/modprobe.d

aliases.conf  blacklist.conf  i386.conf     nouveau.conf

alsa.conf     cx18.conf       k10temp.conf  v4l.conf
```

I run such old versions of OpenRC, eudev, and baselayout that I wasn't sure. I seem to remember talk of it being changed to /etc/modules

----------

## cboldt

/etc/conf.d/mobules

Plus /etc/mobprobe.d

Typos?  What typos?

----------

## Tony0945

 *cboldt wrote:*   

> /etc/conf.d/mobules
> 
> Plus /etc/mobprobe.d
> 
> Typos?  What typos?

 

LOL!

----------

## Ari_archer

 *wless123 wrote:*   

> Hey,
> 
> try  to resolve it by adding the line
> 
>  *Quote:*   
> ...

 

Hey, sorry I was really busy for a bit, but thanks, I will now try it, will update you in the next day or so

----------

## Ari_archer

 *NeddySeagoon wrote:*   

> Ari_archer,
> 
> Why do you think that its the wifi driver that is freezing the kernel.
> 
> Is there anything in dmesg?
> ...

 

Sorry I have lost the debug and when it crashes I can't get it as there's no journalctl heh, but it's usuallt like this before it crashes:

```

[   37.878133] rtw_8821ce 0000:02:00.0: firmware failed to leave lps state

[   42.869858] rtw_8821ce 0000:02:00.0: firmware failed to leave lps state

[   45.877862] rtw_8821ce 0000:02:00.0: firmware failed to leave lps state

[   47.437826] rtw_8821ce 0000:02:00.0: timed out to flush queue 1

[   47.548070] rtw_8821ce 0000:02:00.0: timed out to flush queue 2

```

----------

## NeddySeagoon

Ari_archer,

Lack of logging when the kernel panics/locks up is common but I thought I would ask anyway. 

Did you try the module parameter in the topic I linked?

----------

## Ari_archer

 *NeddySeagoon wrote:*   

> Ari_archer,
> 
> Lack of logging when the kernel panics/locks up is common but I thought I would ask anyway. 
> 
> Did you try the module parameter in the topic I linked?

 

I tried adding  options rtw88_pci disable_aspm=1  in /etc/modprobe.d/wifi.conf, currently it's working, but I will keep this issue unsolved for at least one day just in case, but i'm sorry for not having that much logs, I tried looking for my old ones and I don't see them

----------

## Ari_archer

 *wless123 wrote:*   

> Hey,
> 
> try  to resolve it by adding the line
> 
>  *Quote:*   
> ...

 

worked, thank you

----------

