LTS Kernel 4.19 memory leakage with driver rtl8723be


While using the recommended LTS kernel 4.19.1-1, my memory slowly but surely fills up, and ends up freezing and using swap. It takes a couple of hours to fill up, but I can clearly see it happen using panel applets. I ran free and checked /proc/meminfo, seeing that available memory does indeed decrease. Running top showed no application causing such a thing, while showing that avail. memory is running out.

Now, after lots of googling I found this similar issue-
It seems like a group of users with rtl8723be driver experienced this issue not very long ago, and most likely it got fixed on arch linux. One of them shared a workaround, using an older kernel, i.e. 4.17.19-1 I’m using right now, and I can confirm that there is no memory leakage here. (I have the rtl8723be too.)

My question is, what should I do now? I know next to nothing about kernels, but I’d like to report this bug if possible.

My inxi -Fxxxzc0

System: Host: dempc Kernel: 4.17.19-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.2.0 Desktop: N/A wm: xfwm4
dm: LightDM 1.28.0 Distro: Manjaro Linux
Machine: Type: Laptop System: HP product: HP Notebook v: Type1ProductConfigId serial: Chassis: type: 10
Mobo: HP model: 80C2 v: 96.31 serial: UEFI: Insyde v: F.11 date: 07/23/2015
CPU: Topology: Dual Core model: Intel Core i5-5200U bits: 64 type: MT MCP arch: Broadwell rev: 4 L2 cache: 3072 KiB
flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 17565
Speed: 1097 MHz min/max: 500/2700 MHz Core speeds (MHz): 1: 939 2: 837 3: 884 4: 870
Graphics: Device-1: Intel HD Graphics 5500 vendor: Hewlett-Packard driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:1616
Device-2: AMD Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] vendor: Hewlett-Packard
driver: radeon v: kernel bus ID: 0d:00.0 chip ID: 1002:6660
Display: x11 server: 1.20.3 driver: intel resolution:
OpenGL: renderer: Mesa DRI Intel HD Graphics 5500 (Broadwell GT2) v: 4.5 Mesa 18.2.4 compat-v: 3.0
direct render: Yes
Audio: Device-1: Intel Broadwell-U Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus ID: 00:03.0
chip ID: 8086:160c
Device-2: Intel Wildcat Point-LP High Definition Audio vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
bus ID: 00:1b.0 chip ID: 8086:9ca0
Sound Server: ALSA v: k4.17.19-1-MANJARO
Network: Device-1: Realtek RTL810xE PCI Express Fast Ethernet vendor: Hewlett-Packard driver: r8169 v: 2.3LK-NAPI port: 5000
bus ID: 07:00.0 chip ID: 10ec:8136
IF: enp7s0 state: down mac:
Device-2: Realtek RTL8723BE PCIe Wireless Network Adapter vendor: Hewlett-Packard driver: rtl8723be v: kernel
port: 3000 bus ID: 13:00.0 chip ID: 10ec:b723
IF: wlp19s0 state: up mac:
Drives: Local Storage: total: 465.76 GiB used: 101.66 GiB (21.8%)
ID-1: /dev/sda vendor: HGST (Hitachi) model: HTS545050A7E680 size: 465.76 GiB speed: 6.0 Gb/s rotation: 5400 rpm
serial: rev: A350 scheme: GPT
Partition: ID-1: / size: 448.99 GiB used: 101.66 GiB (22.6%) fs: ext4 dev: /dev/sda2
ID-2: swap-1 size: 8.30 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda3
Sensors: System Temperatures: cpu: 48.5 C mobo: N/A gpu: radeon temp: 48 C
Fan Speeds (RPM): N/A
Info: Processes: 168 Uptime: 10h 22m Memory: 3.77 GiB used: 1.30 GiB (34.4%) Init: systemd v: 239 Compilers: gcc: 8.2.1
Shell: bash v: 4.4.23 running in: xfce4-terminal inxi: 3.0.27

1 Like
ASUS Z450UAK with Manjaro 18 XFCE - journald takes 90%+ of CPU and laptop freezes all the time
RAM usage more than expected total usage by processes

Which driver are you using with rtl8723be. That adapter is a constant headache to get working properly.


What do you mean? I’m using a laptop, and I got it by default. I used a script from github to get my wifi working, is that what you’re asking?
Here it is:


The default drivers are modules included in the kernel. The kernel modules don’t work that well for most people.

Thank you for posting the link. That is very helpful.

1 Like

Did you read this on the link you posted.

Edit “” to change antenna selection, default it will set antenna 2, if antenna 2 doesn’t work, set ant_sel=1.

The options file for rtl8723be are usually set in:


Add the following line (try both 1 and 2) to the conf file:

options rtl8723be ant_sel=1

The antenna select number changes on different kernels. To get it working on kernel 4.19 you may simply have to change the antenna select number.

You should also know that because you installed the driver from outside pacman you may have to reinstall the driver after every kernel update.

1 Like

Yes, I have it set to 0, that works best for me. :thinking: It has to do with the internet speeds though, doesn’t it? I’ll go try changing it and report back.
I didn’t know that I had to reinstall, it never caused any problems before I started using 4.19. I’ll try reinstalling and report back.
Thanks for the details!

Update 1: Using ant_sel=2 actually seems to have solved the issue, but the internet speed is awful. I’ll come back later, gonna have a rest!

Update 2: Using ant_sel=1 I got a lot better internet speed, but memory leakage still persists. Later I realized there was a kernel update, so I updated everything but sadly it didn’t fix this problem. Now I need your help about reinstalling the driver, would running the .sh file again be enough (the one I ran to get my wifi working)? Do I need to edit anything else? I will be sticking to kernel 4.17 for the time being. Thanks a lot for your time!

1 Like

Add this to /etc/modprobe.d/rtl8723be.conf

options rtl8723be swenc=1
options rtl8723be ips=0
#options rtl8723be rtw_power_mgnt=0
#options rtl8723be rtw_enusbss=0
#options rtl8723be swlps=1
#options rtl8723be fwlps=0
#options rtl8723be debug=1
#options rtl8723be disable_watchdog=1
#options rtl8723be msi=0

You can test any of these driver options in /etc/modprobe.d/rtl8723be.conf by uncommenting the entry.

Simply remove the “#” sign in front of any option to enable that option.

Placing a comment ("#") in front of any option will disable the option change.

You can also try flipping 1 to 0, or, 0 to 1, to reverse enabling/disabling any of these individual option settings.

Reboot after making any changes to the options in the rtl8723be.conf file.

swenc=1 enables software encryption (prefered)
swenc=0 enables hardware encryption
ips=0 disables all power saving
swlps=1 enables software control of power saving
fwlps=0 disables firmware control of power saving
rtw_power_mgnt=0 disables power saving
rtw_enusbss=0 disables USB autosuspend (only for USB adapters)
disable_watchdog=1 disable watchdog, if receiving watchdog related errors
msi=1 Set to 1 to use MSI interrupts mode (default 1)
debug=1 Set debug level (0-5) (default 0)
ant_sel=2 rtl8723be driver allows the ant_sel parameter (value 1, or 2)

“ips=0” disables all power saving, rendering swlps and fwlp redundent
“swlps=0” is the default
fwlps=1 is default, meaning the FW controls the power saving
“swenc=1” disables the HW encryption
“fwlps”, yes. 0/1 maps to N/Y, but you should use the values provided by modinfo (the parameters here are bool, but sometimes they’re integer and then the outcome is arbitrary)
If you already tried “ips=0” (confirmed by systool output?) most of this is moot and the only things left are the swenc=0 parameter and downgrading the firmware.

1 Like

That’s in turn pulling from lwfinger repo.
Fix is coming soon

1 Like

Ah, thank you for letting me know! :slight_smile:

closed #10

This topic was automatically closed after 180 days. New replies are no longer allowed.