Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

locks up on fedora32: systemd-udevd hogs cpu #8

Open
karlp opened this issue Jun 4, 2021 · 25 comments
Open

locks up on fedora32: systemd-udevd hogs cpu #8

karlp opened this issue Jun 4, 2021 · 25 comments

Comments

@karlp
Copy link

karlp commented Jun 4, 2021

I realize this might not be the clearest or most helpful, but I'm not even sure where to proceed.

I have some rtl8723bu and du modules. The bu modules actually appear to "just work" with the rtl8xxxu driver, and I've reported that to Jens. However, the du modules... don't. Out of the box (no driver from here, standard fedora32 system, whatever that might mean), the btusb driver sees the bluetooth portion, but within a second or two the usb device disconnects, as if the device firmware has crashed.

I've built and installed this driver, and have blacklisted btrtl and rtl8xxxu and have then plugged in my rtl8723du module. Kernel log below, for Linux strem 5.11.22-100.fc32.x86_64 #1 SMP Wed May 19 18:58:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

The "tracker" stuff is I think a red herring, but what I see is that "systemd-udevd" instantly goes to 100% cpu on one core. It stays like this until a few seconds after I disconnect the rtl8723du device. "iw list" or similar commands hang, and can't be killed. Even sudo kill -9 from another terminal will hang. Firefox won't launch, but things that were already running seem to continue working.

Rebooting is the only recovery, and normally requires a hard power off, as network manager hangs trying to "cleanup"

Further, the line Unknown symbol __rtw_dbg (err -2) is presumably why there's no debug info from the driver itself.

Jun 04 16:14:49 strem kernel: usb 1-3: new high-speed USB device number 21 using xhci_hcd
Jun 04 16:14:49 strem kernel: usb 1-3: New USB device found, idVendor=0bda, idProduct=d723, bcdDevice= 2.00
Jun 04 16:14:49 strem kernel: usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun 04 16:14:49 strem kernel: usb 1-3: Product: 802.11n WLAN Adapter
Jun 04 16:14:49 strem kernel: usb 1-3: Manufacturer: Realtek
Jun 04 16:14:49 strem kernel: usb 1-3: SerialNumber: 00e04c000001
Jun 04 16:14:49 strem kernel: Bluetooth: hci1: RTL: examining hci_ver=08 hci_rev=000d lmp_ver=08 lmp_subver=8723
Jun 04 16:14:49 strem systemd[1]: Starting Load/Save RF Kill Switch Status...
Jun 04 16:14:49 strem kernel: Bluetooth: hci1: RTL: rom_version status=0 version=2
Jun 04 16:14:49 strem kernel: Bluetooth: hci1: RTL: loading rtl_bt/rtl8723d_fw.bin
Jun 04 16:14:49 strem kernel: Bluetooth: hci1: RTL: loading rtl_bt/rtl8723d_config.bin
Jun 04 16:14:49 strem kernel: Bluetooth: hci1: RTL: cfg_sz 10, total sz 33266
Jun 04 16:14:49 strem mtp-probe[4400]: checking bus 1, device 21: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3"
Jun 04 16:14:49 strem mtp-probe[4400]: bus: 1, device: 21 was not an MTP device
Jun 04 16:14:49 strem systemd[1]: Started Load/Save RF Kill Switch Status.
Jun 04 16:14:49 strem audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/>
Jun 04 16:14:49 strem upowerd[1397]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3
Jun 04 16:14:49 strem kernel: rtw88_8723d: loading out-of-tree module taints kernel.
Jun 04 16:14:49 strem kernel: rtw88_8723d: module verification failed: signature and/or required key missing - tainting kernel
Jun 04 16:14:49 strem kernel: rtw88_8723d: Unknown symbol __rtw_dbg (err -2)
Jun 04 16:14:49 strem kernel: usbcore: registered new interface driver rtl8723du
Jun 04 16:14:49 strem NetworkManager[898]: <info>  [1622823289.9355] device (wlan0): driver supports Access Point (AP) mode
Jun 04 16:14:49 strem NetworkManager[898]: <info>  [1622823289.9361] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/11)
Jun 04 16:14:49 strem mtp-probe[4410]: checking bus 1, device 21: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3"
Jun 04 16:14:49 strem mtp-probe[4410]: bus: 1, device: 21 was not an MTP device
Jun 04 16:14:49 strem upowerd[1397]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.2
Jun 04 16:14:49 strem systemd-udevd[4405]: Using default interface naming scheme 'v245'.
Jun 04 16:14:49 strem systemd-udevd[4405]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Jun 04 16:14:49 strem wireless[4417]: setting regulatory domain to IS based on timezone (Atlantic/Reykjavik)
Jun 04 16:14:49 strem kernel: rtl8723du 1-3:1.2 wlp0s20f0u3i2: renamed from wlan0
Jun 04 16:14:49 strem NetworkManager[898]: <info>  [1622823289.9639] rfkill5: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.2/ieee80211/phy1/rfki>
Jun 04 16:14:49 strem NetworkManager[898]: <info>  [1622823289.9654] device (wlan0): interface index 10 renamed iface from 'wlan0' to 'wlp0s20f0u3i2'
Jun 04 16:14:49 strem NetworkManager[898]: <info>  [1622823289.9721] device (wlp0s20f0u3i2): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 04 16:14:49 strem systemd-udevd[4425]: Using default interface naming scheme 'v245'.
Jun 04 16:14:50 strem kernel: Bluetooth: hci1: RTL: fw version 0x828a96f1
Jun 04 16:14:50 strem bluetoothd[873]: Endpoint registered: sender=:1.106 path=/MediaEndpoint/A2DPSink/sbc
Jun 04 16:14:50 strem bluetoothd[873]: Endpoint registered: sender=:1.106 path=/MediaEndpoint/A2DPSource/sbc
Jun 04 16:14:52 strem ModemManager[871]: <info>  Couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-3': not supported by any plugin
Jun 04 16:14:54 strem systemd[1]: systemd-rfkill.service: Succeeded.
Jun 04 16:14:54 strem audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/s>
Jun 04 16:14:57 strem systemd[1786]: tracker-extract.service: Succeeded.
Jun 04 16:15:08 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:15:16 strem tracker-store[4139]: OK
Jun 04 16:15:16 strem systemd[1786]: tracker-store.service: Succeeded.
Jun 04 16:15:17 strem gnome-shell[2058]: Received error from D-Bus search provider firefox.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is no>
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem systemd[1786]: Starting Tracker metadata database store and lookup manager...
Jun 04 16:15:17 strem systemd[1786]: Started Tracker metadata database store and lookup manager.
Jun 04 16:15:17 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:15:17 strem gnome-shell[2058]: Received error from D-Bus search provider firefox.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is no>
Jun 04 16:15:17 strem systemd[1786]: Started dbus-:[email protected].
Jun 04 16:15:17 strem gnome-shell[2058]: Received error from D-Bus search provider org.gnome.seahorse.Application.desktop during GetResultMetas: Gio.DBusError: GDBus.Error:org.freedesk>
Jun 04 16:15:17 strem gnome-shell[2058]: Wrong number of result metas returned by search provider org.gnome.seahorse.Application.desktop: expected 2 but got 0
Jun 04 16:15:17 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:15:17 strem PackageKit[1412]: resolve transaction /7900_dbabcaed from uid 1000 finished with success after 4ms
Jun 04 16:15:17 strem systemd[1786]: Started Application launched by gnome-shell.
Jun 04 16:15:18 strem audit[4694]: NETFILTER_CFG table=filter family=7 entries=0 op=xt_register pid=4694 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 comm=495043204C61756>
Jun 04 16:15:27 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:15:27 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:15:29 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:15:37 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:15:47 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:15:47 strem gnome-contacts-[4438]: Failed to reach quiescence normally (0 backends and 5 persona stores still haven't reached quiescence). Forcing IndividualAggregator quiesc>
Jun 04 16:15:47 strem tracker-store[4492]: OK
Jun 04 16:15:47 strem systemd[1786]: tracker-store.service: Succeeded.
Jun 04 16:15:50 strem systemd-udevd[634]: wlp0s20f0u3i2: Worker [4425] processing SEQNUM=4521 is taking a long time
Jun 04 16:15:50 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:15:50 strem systemd[1786]: dbus-:[email protected]: Consumed 25.562s CPU time.
Jun 04 16:15:57 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:16:14 strem kernel: usb 1-3: USB disconnect, device number 21
Jun 04 16:16:14 strem bluetoothd[873]: Endpoint unregistered: sender=:1.106 path=/MediaEndpoint/A2DPSink/sbc
Jun 04 16:16:14 strem bluetoothd[873]: Endpoint unregistered: sender=:1.106 path=/MediaEndpoint/A2DPSource/sbc
Jun 04 16:16:14 strem systemd[1]: Starting Load/Save RF Kill Switch Status...
Jun 04 16:16:14 strem systemd[1]: Started Load/Save RF Kill Switch Status.
Jun 04 16:16:14 strem audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/>
Jun 04 16:16:17 strem systemd[1786]: dbus-:[email protected]: Succeeded.
Jun 04 16:16:20 strem systemd[1]: systemd-rfkill.service: Succeeded.
Jun 04 16:16:19 strem audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/s>
Jun 04 16:17:23 strem gnome-shell[2058]: Received error from D-Bus search provider firefox.desktop: Gio.DBusError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is no>
Jun 04 16:17:23 strem systemd[1786]: Started dbus-:[email protected].
@lwfinger
Copy link
Owner

lwfinger commented Jun 7, 2021

I do not see this problem with openSUSE TW; however, NetworkManager does not see the device. I tried creating a virtual machine with Fedora34, but that crashed in Setup when I was entering my password. I then downloaded F32 server as I could not find an iso for F32 Workstation. On that VM, I was able to build and install the driver, but I did not get any wifi. The device is shown in dmesg, but no wifi interface is presented. How do you connect?

@lwfinger
Copy link
Owner

lwfinger commented Jun 9, 2021

I just pushed a new branch, v5.13.4. Please try it to see if it helps.

@Hume2
Copy link

Hume2 commented Sep 16, 2021

I had a similar issue and the branch v5.13.4 solved it.

@hsnhrn
Copy link

hsnhrn commented Jan 21, 2022

Hi i am relatively new to linux. can you please help me understanding how can i install these drivers? Thank you !!

@lwfinger
Copy link
Owner

I am not sure the path that Fedora has taken to get this driver into your system, but that lockuo was caused by a change in the kernel. I have seen it before, and I think this repo is fixed. The reason for uncertainty is that I have no device to test.

You can install this repo with these commands:
git clone git://github.com/lwfinger/rtl8723du.git -b v5.13.4
cd rtl8723du

It is best practice to do all builds as a normal user. That way, a typo can only mess up your files, but it will not destroy the system!

The first time you build an external module, you must install the distro components needed to build external modules. File README.md shows the commands for a number of distros. For Fedora, the commands are
sudo dnf install kernel-headers kernel-devel
sudo dnf group install "C Development Tools and Libraries"

Once you have the necessary components, build the driver with
make
sudo make install

As Fedora has the driver already installed, you may need to blacklist it. In the locked-up condition, run the command
lsmod | grep 8723

If the resulting driver is named anything other than "8723du", you will need to blacklist it in /etc/modprobe.d/50-blacklist.conf.

You should look at README.md, particularly about the steps to be taken when your kernel changes.

@hsnhrn
Copy link

hsnhrn commented Jan 21, 2022 via email

@lwfinger
Copy link
Owner

I have no idea why you needed to cross compile it. When you say you loaded the file, whet exactly did you do?

If you installed the module correctly, all you need to do is plug it in.

@hsnhrn
Copy link

hsnhrn commented Jan 21, 2022 via email

@lwfinger
Copy link
Owner

You need line 19. Removal of line 35 is OK.

@lwfinger
Copy link
Owner

@karlp - your issue should now be fixed. Do a 'git pull' and remake.

@hsnhrn - Your recipe is getting the master branch. Proper implementation of cfg80211 requires branch v5.13.4. You need to find out how to do that in line 8. Line 9 is not needed - the source has been fixed for that problem.

@hsnhrn
Copy link

hsnhrn commented Jan 24, 2022

Thanks a lot!
i am able to build the branch v5.13.4. and its installed in the image. but still the same problem.
the logs which i get are these..
[ 49.143664] usb 1-1: new high-speed USB device number 4 using ehci-platform
[ 49.354966] usb 1-1: New USB device found, idVendor=7392, idProduct=d611, bcdDevice= 2.00
[ 49.361746] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 49.383673] usb 1-1: Product: 802.11n WLAN Adapter
[ 49.387044] usb 1-1: Manufacturer: Realtek
[ 49.391126] usb 1-1: SerialNumber: 00e04c000001

but i dont see anything by typing ifconfig.
can you please help me if i am missing something? thanks a lot!

@lwfinger
Copy link
Owner

Your device was not in the tables, but now added. Do a 'git pull', 'make', and 'sudo make install'.

@hsnhrn
Copy link

hsnhrn commented Jan 25, 2022

I took the new commit and build it again..
Its showing me the same logs as before.
I tried loading the module manually and it shows me these logs below
root:~# insmod /lib/modules/5.10.10/8723du.ko
[ 335.679956] 8723du: loading out-of-tree module taints kernel.
[ 335.854377] RTW: module init start
[ 335.856342] RTW: rtl8723du v5.13.4-17-ga6e5ee6.20210514_COEX20200103-3535
[ 335.863132] RTW: rtl8723du BT-Coex version = COEX20200103-3535
[ 335.871274] RTW: rtw_inetaddr_notifier_register
[ 335.875567] usbcore: registered new interface driver rtl8723du
[ 335.880585] RTW: module init ret=0

root@# lsmod
Module Size Used by
8723du 1949696 0
cfg80211 622592 1 8723du
sch_fq_codel 20480 2

@lwfinger
Copy link
Owner

There is something funky about the ARM build. On my laptop after modprobe of the module, I get
finger@localhost:/rtl8723du>lsmod | grep 8723
8723du 2498560 0
cfg80211 1089536 5 iwlmvm,rtw89_core,iwlwifi,8723du,mac80211
usbcore 352256 7 xhci_hcd,ehci_pci,uvcvideo,ehci_hcd,8723du,btusb,xhci_pci
finger@localhost:
/rtl8723du>

You can ignore the other drivers that need cfg80211, but 8723du definitely does.

What CONFIG_PLATFORM variable are you setting in the Makefile?

@hsnhrn
Copy link

hsnhrn commented Jan 27, 2022

I havent changed anything in the Makefile

@lwfinger
Copy link
Owner

What branch are you using?

@hsnhrn
Copy link

hsnhrn commented Jan 27, 2022 via email

@lwfinger
Copy link
Owner

With a better read, I see that 8723du is referencing cfg80211, thus you have built the driver correctly. I did some web searching on how to control wireless networks using Yocto. Unfortunately, I did not find any clear description on how to accomplish this. With a normal Linux distribution, one would use NetworkManager, some other similar package. I use the former, which controls the device and sets up the encryption parameters and communicates with wpa_supplicant to connect to the network.

What is the output of "iw list'?

How about "sudo iw dev wlan0 scan"?

@hsnhrn
Copy link

hsnhrn commented Feb 1, 2022

both are empty.

@lwfinger
Copy link
Owner

lwfinger commented Feb 1, 2022

Please run 'dmesg > dmesg.txt' and attach file dmesg.txt.

@hsnhrn
Copy link

hsnhrn commented Feb 2, 2022

here is the .txt file
dmesg.txt
I tried to enable "CONFIG_CFG80211_WEXT" in kernel. but after i enable, it broke my my build

@lwfinger
Copy link
Owner

lwfinger commented Feb 2, 2022

That build should have worked.

From your dmesg.txt, I could see the kernel finding your device, but it never loaded the driver. The problem is that I put the new device in the wrong place. Please pull and build again.

@hsnhrn
Copy link

hsnhrn commented Feb 2, 2022

Thanks a lot! the build worked with CONFIG_CFG80211_WEXT=y and now i can see wlan0 with internet connectivity.
But there are now some logs coming continuously like these below..

.363244] RTW: rtl8723d_set_FwPwrMode_cmd(): FW LPS mode = 0, SmartPS=2
[ 425.615284] RTW: rtw_set_ps_mode(wlan0) Enter 802.11 power save - WIFI-TRAFFIC_IDLE
[ 425.622219] RTW: rtl8723d_set_FwPwrMode_cmd(): FW LPS mode = 2, SmartPS=2
[ 433.391210] RTW: rtw_set_ps_mode(wlan0) Leave 802.11 power save - WIFI-LPS_CTRL_RX_TRAFFIC_LEAVE
[ 433.398687] RTW: rtl8723d_set_FwPwrMode_cmd(): FW LPS mode = 0, SmartPS=2
[ 436.017672] RTW: rtw_set_ps_mode(wlan0) Enter 802.11 power save - WIFI-TRAFFIC_IDLE
[ 436.026495] RTW: rtl8723d_set_FwPwrMode_cmd(): FW LPS mode = 2, SmartPS=2
[ 443.570366] RTW: rtw_set_ps_mode(wlan0) Leave 802.11 power save - WIFI-LPS_CTRL_RX_TRAFFIC_LEAVE
[ 443.577747] RTW: rtl8723d_set_FwPwrMode_cmd(): FW LPS mode = 0, SmartPS=2
[ 448.499470] RTW: rtw_set_ps_mode(wlan0) Enter 802.11 power save - WIFI-TRAFFIC_IDLE
[ 448.506597] RTW: rtl8723d_set_FwPwrMode_cmd(): FW LPS mode = 2, SmartPS=2

full logs are : dmesg2.txt
can you please help in this regard as well? what are these? and how to turn it off? :)

@lwfinger
Copy link
Owner

lwfinger commented Feb 2, 2022

I turned those off. When I get a chance, I will remove a lot of the other messages that you are getting.

At least we have made progress.

@hsnhrn
Copy link

hsnhrn commented Feb 2, 2022

Yes. Thanks a lot for your help! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants