Bug 23066 - Kernel update breaks wifi connection with Realtek 8723BE
Summary: Kernel update breaks wifi connection with Realtek 8723BE
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Kernel and Drivers maintainers
QA Contact:
URL: https://forums.mageia.org/en/viewtopi...
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2018-05-20 19:35 CEST by Dennis Nigbur
Modified: 2019-08-02 22:47 CEST (History)
4 users (show)

See Also:
Source RPM: kernel-desktop-4.14.40-1.mga6
CVE:
Status comment:


Attachments
logs as requested (278.51 KB, text/plain)
2018-05-21 00:47 CEST, Dennis Nigbur
Details
logs for the unsuccessful attempt with kernel 4.14.44 (305.38 KB, text/plain)
2018-05-30 10:59 CEST, Dennis Nigbur
Details
logs for kernel 4.14.30 with wifi working correctly (189.52 KB, text/plain)
2018-05-31 00:17 CEST, Dennis Nigbur
Details
logs for kernel 4.14.44-2 with wifi still not working (189.03 KB, text/plain)
2018-06-06 10:41 CEST, Dennis Nigbur
Details
logs for kernel 4.14.49-1 with wifi still not working (235.33 KB, text/plain)
2018-06-13 01:00 CEST, Dennis Nigbur
Details
logs for kernel 4.14.50-2 with wifi working correctly (193.87 KB, text/plain)
2018-06-25 10:42 CEST, Dennis Nigbur
Details

Description Dennis Nigbur 2018-05-20 19:35:06 CEST
Description of problem:
There seems to be a problem with connecting to wifi using Mageia 6 and an HP 15-ba-055na laptop using a wifi adapter recognised as Realtek 8723BE. The issues are documented in the Mageia Forum: https://forums.mageia.org/en/viewtopic.php?f=25&t=11589

Updates seemed to have fixed this problem, but it reappeared after the last kernel update to version 4.14.40. Basically, the wifi connection is very unreliable. Sometimes the device doesn't even scan for networks, sometimes it connects and then drops the connection. Driver settings don't seem to make a difference. 

Rolling back to kernel 4.14.30-desktop-3.mga6 fixes the problem for me. I now have a stable and reliable connection again. So I assume that the problem is with the kernel update. 

Steps to Reproduce:
1. Assuming the same hardware as I have, updating the kernel to 4.14.40 and restarting the system should result in problems with wifi connection. 

2. Uninstall kernel 4.14.40 and set the boot loader to load kernel 4.14.30 again.

3. Restart the system. Wifi should work again.
Comment 1 Marja Van Waes 2018-05-20 22:04:55 CEST
Network problems were mentioned, too, in bug 23060, but so far no one attached logs.

If you know how many boots ago you booted the 4.14.40 kernel, then please replace "N" in the next command with that number.

As *root*:

  journalctl -b -N > logs.txt

please attach logs.txt 

If it is too large to attach, then please compress with xz:

  xz logs.txt

and then attach logs.txt.xz

Thanks!

Assignee: bugsquad => kernel
CC: (none) => marja11
Keywords: (none) => NEEDINFO

Comment 2 Dennis Nigbur 2018-05-21 00:47:46 CEST
Created attachment 10178 [details]
logs as requested

I'm not entirely sure, but this should be one of the boots where the problem was encountered.

CC: (none) => d.nigbur

Comment 3 Dennis Nigbur 2018-05-21 00:49:32 CEST
I forgot to say that the first few lines of the logs mention version 4.14.40, so I hope it's useful. The problem appears always with kernel 4.14.40, and never with kernel 4.14.30.
Comment 4 Thomas Backlund 2018-05-21 06:54:34 CEST
There is a new kernel-4.14.42-1.mga6 in updates_testing, please test that one...

CC: (none) => tmb

Marja Van Waes 2018-05-25 16:22:37 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=23085

Marja Van Waes 2018-05-25 16:27:52 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=23060

Comment 5 Dennis Nigbur 2018-05-29 22:57:29 CEST
Boot speed seems normal here, so I'm not sure whether it's the same issue. 

I'd like to help by testing the new kernel, but I can't find 4.14.42-1. Also, since I use VirtualBox, wouldn't I need a virtualbox kernel to compare like with like?
Comment 6 Thomas Backlund 2018-05-29 23:21:09 CEST
The kernel in testing is now 4.14.44-2


the rtl8723be driver is now adapted to handle a lot of crap designed hw out there, so in 4.14.40 it got a big fix to allow everyone to use it...

The patch itself nicely explains the issue:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/releases/4.14.40/rtlwifi-cleanup-8723be-ant_sel-definition.patch

So you probably need to add a

options rtl8723be ant_sel=1

or

options rtl8723be ant_sel=2

to /etc/modprobe.conf
(or if you like a new file /etc/modprobe.d/rtl8723be.conf)

and reboot

to get proper wifi working
Comment 7 Dennis Nigbur 2018-05-30 10:57:55 CEST
Thank you. I'm familiar with the ant_sel function. It is already available via the Mageia Control Centre with kernel 4.14.30, but the driver has obviously changed. 

Unfortunately kernel 4.14.44 doesn't work for me. It has the same problem as 4.14.40. I installed 4.14.44 from Updates_Testing, rebooted my computer, and wifi was down. "iwlist wlo1 scan" returns no results or says that the device is unavailable. This is probably not because of any driver settings, which haven't changed. 

I uninstalled kernel 4.14.44 and set up the bootloader to boot into 4.14.30 again. I reboot, and wifi works - immediately and reliably.
Comment 8 Dennis Nigbur 2018-05-30 10:59:10 CEST
Created attachment 10206 [details]
logs for the unsuccessful attempt with kernel 4.14.44

I have attached the logs from the attempt with kernel 4.14.44. I hope this helps.
Comment 9 Thomas Backlund 2018-05-30 11:51:47 CEST
Yes, I know that ant_sel has been there before, but after the patch that landed in 4.14.40 you might need to change it if you already have been using it.

So have you tried the different options (0/1/2) for it ?
Comment 10 Dennis Nigbur 2018-05-30 14:57:42 CEST
If the new patch could potentially cause previously good settings to malfunction, it would cause problems for a lot of people. I had kept my settings because they had worked. 

I have now tried kernel 4.14.44 again and systematically varied the ant_sel setting. The short version of the story is that it still doesn't work. 

I installed kernel 4.14.44 and kept the previous driver settings (this is the same as described in my previous post). The wifi didn't detect any networks. 

I systematically varied ant_sel between the settings 0, 1, and 2. In all cases, the wifi didn't detect any networks. 

I systematically tried logging out and back in, and even rebooting, after changing the ant_sel setting. In all cases, the wifi didn't detect any networks. 

I set all settings for the wifi driver back to the defaults and rebooted. The wifi still didn't detect any networks. 

I systematically tried "iwlist wlo1 scan" from the command line, the Network Centre as user, and setting up a new connection as root from the Mageia Control Centre (just in case there are differences between these methods). In all cases, the wifi didn't detect any networks. 

I uninstalled kernel 4.14.44 and rebooted into 4.14.30. The wifi connection is back.
Comment 11 Thomas Backlund 2018-05-30 16:37:19 CEST
Ok, so something more subtle going on here then...

The only other rtl8723be specific changes between 4.14.30 and 4.14.40+ is one that is supposed to improve stability:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/releases/4.14.31/rtlwifi-rtl8723be-fix-loss-of-signal.patch

and a btcoexist one:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/releases/4.14.40/rtlwifi-btcoex-add-power_on_setting-routine.patch

Can you attach a log from a working 4.14.30 too so we can see if there is any hints between the kernels
Comment 12 Thomas Backlund 2018-05-30 16:52:10 CEST
Ok, so I just found a thread on wireless dev ml that those ant_sel + btcoex fixes actually depends on one more fix to work as intended...

I will try to build a new kernel for you to test...
Comment 13 Thomas Backlund 2018-05-30 17:13:11 CEST
Can you try 4.14.44-2.1 from:

http://ftp.free.fr/mirrors/mageia.org/people/tmb/mga6/bugs/23066/x86_64/
Comment 14 Dennis Nigbur 2018-05-31 00:17:40 CEST
Created attachment 10207 [details]
logs for kernel 4.14.30 with wifi working correctly

No problem to attach the logs from kernel 4.14.30 with wifi working correctly. Here they are. 

I'll try the new version of the kernel, thank you. But I won't have time to do this for a couple of days now.
Comment 15 Dennis Nigbur 2018-06-06 10:41:21 CEST
Created attachment 10224 [details]
logs for kernel 4.14.44-2 with wifi still not working

I have now tested kernel 4.14.44-2 as requested. It has not solved the problem. 

I tried all possible settings of ant_sel (0, 1, 2), once with all other settings set to default, and once with all power save options and the watchdog disabled. 

The result was always the same as with the previous version of the kernel: No wireless networks are detected. 

Booting back into kernel 4.14.30, again, gives a good wifi connection straight after login. 

The logs for the unsuccessful attempt with kernel 4.14.44-2 are attached.
Comment 16 Thomas Backlund 2018-06-07 21:39:58 CEST
OK, so the driver crashes which explains why you dont get any wireless...

 upstream maintainer pointed out two more missing fixes for this issue...

I have submitted a 4.14.48-1.mga6 to Core updates_testing (currently building) that also have the additional fixes for your issue added...

it will take some hours before it gets available on the mirrors...
Comment 17 Morgan Leijström 2018-06-08 20:08:09 CEST
I run 4.14.48 successfully on two machines but i can not find a bug to report back to...?

CC: (none) => fri

Comment 18 Thomas Backlund 2018-06-08 21:08:45 CEST
(In reply to Morgan Leijström from comment #17)
> I run 4.14.48 successfully on two machines but i can not find a bug to
> report back to...?

Thats because I never open up a bugreport until I consider it good /important enough for full QA
Comment 19 Thomas Backlund 2018-06-12 12:42:23 CEST
@Dennis:

There is now a kernel-4.14.49-1.mga6 in Core Updates Testing for you to test
Comment 20 Dennis Nigbur 2018-06-13 01:00:18 CEST
Created attachment 10238 [details]
logs for kernel 4.14.49-1 with wifi still not working

Sorry, still no luck. Something may be a little bit different because my home network (and *only* it - not the neighbours' networks that I can see using kernel 4.14.30) was detected on one of about a dozen attempts. But the signal was weak and disappeared, so I couldn't connect. All other attempts yielded only the familiar "no scan results". 

This is similar to the situation I had when Mageia 6 was released. Detecting networks was usually impossible, getting a stable connection was always impossible. Some update along the line must have fixed this problem. Kernel 4.14.30 is the last one that works in the same way. 

The new logs are attached.
Comment 21 Thomas Backlund 2018-06-18 00:01:12 CEST
There is now a 4.14.50-1 in testing.

I have now reverted the testfixes and the rtlwifi changes that landed in 4.14.40 that broke your system, lets see if that fixes it
Comment 22 Thomas Backlund 2018-06-25 00:09:43 CEST
kernel-4.14.50-2.mga6 now pushed to updates:
http://advisories.mageia.org/MGASA-2018-0296.html

Does it work for you?
Comment 23 Dennis Nigbur 2018-06-25 10:42:55 CEST
Created attachment 10252 [details]
logs for kernel 4.14.50-2 with wifi working correctly

Sorry, I never had time to test kernel 4.14.50-1. 

I have just installed 4.14.50-2. I have a strong and stable wireless connection, without the need to change any of the settings from 4.14.30. This works even after a couple of reboots, so I think your last fixes have solved the problem. The logs are attached.

I'll post here if any problems arise later on, but for the moment it really seems to me that the issue is fixed. Thank you for all your help.
Comment 24 Dennis Nigbur 2019-08-02 22:47:55 CEST
The problem has not come back and is also not present in Mageia 7. Thank you!

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.