How to suppress messages from a Wifi driver?

Having issues with your DietPi installation or found a bug? Post it here.
ben61694
Posts: 26
Joined: Tue Oct 30, 2018 2:06 pm

How to suppress messages from a Wifi driver?

Post by ben61694 »

I have a TP-Link Archer T4U v3. I just compiled the RTL88X2BU driver for ARCH=arm64, copied 88x2bu.ko to /lib/modules/3.16.85+/kernel/drivers/net/wireless/, ran sudo depmod -a, sudo modprobe 88x2bu, then lsmod to ensure that the driver is working. Here is the drivers from the official site:
https://www.tp-link.com/my/support/down ... v3/#Driver
I also attached the driver itself that I compiled.

So the wifi works well, the only problem is it spams my Odroid board with messages:
https://imgur.com/a/zKEOu00

If I connect my odroid to hdmi and view the screen, it'll always show what I'm guessing is wifi status messages. If I log in to any user/switch user, I'll still get these messages. But if I SSH into it, I don't seem to get any messages. Is there any way to fix this?
Attachments
88x2bu.zip
(983.64 KiB) Downloaded 35 times
User avatar
MichaIng
Site Admin
Posts: 3097
Joined: Sat Nov 18, 2017 6:21 pm

Re: How to suppress messages from a Wifi driver?

Post by MichaIng »

Depending on system defaults and settings, it is normal that kernel messages are printed to the local console, i.e. /dev/tty1, not SSH which is connected through /dev/pts/0. You can control the log level via: dmesg -n X with X being the level from 1 to 8 that must be understood by the message. So dmesg -n 1 will disable console log basically, dmesg -n 8 will show all messages, dmesg -n 4 should be default and show errors only. Interestingly the WiFi messages don't look like errors, as they are not red coloured. Please try with 4 first and see whether it disables them already, else use 1 and see if that does it. So either something on the Odroid changes the default kernel log level or the WiFi diver prints its status in a wrong log level, in which case the drivers maintainer should be asked to change that.
ben61694
Posts: 26
Joined: Tue Oct 30, 2018 2:06 pm

Re: How to suppress messages from a Wifi driver?

Post by ben61694 »

Yeah it just looks like idle messages. dmesg -n 4 worked, so I guess it wasn't default? I put it in rc.local.
User avatar
MichaIng
Site Admin
Posts: 3097
Joined: Sat Nov 18, 2017 6:21 pm

Re: How to suppress messages from a Wifi driver?

Post by MichaIng »

Jep then the default was unexpected, while it's still not great of a driver regularly creates expected kernel messages. I'll have a look into it, probably the default can be changed via boot.ini cmdline options right in the first place.
ben61694
Posts: 26
Joined: Tue Oct 30, 2018 2:06 pm

Re: How to suppress messages from a Wifi driver?

Post by ben61694 »

If my wifi keeps dropping randomly such that I have to unplug and plug it back in to get connection, I'm assuming it has to deal with power management.

I went into /etc/modprobe.d/dietpi-disable_wifi_powersaving.conf
And added the line:
options 88x2bu rtw_power_mgnt=0

Do I need to do anything else? Should I use either of these?
rtw_enusbss=0
rtw_ips_mode=0
User avatar
MichaIng
Site Admin
Posts: 3097
Joined: Sat Nov 18, 2017 6:21 pm

Re: How to suppress messages from a Wifi driver?

Post by MichaIng »

iwconfig wlan0 power off should actually do it. It only lasts until reboot but is called automatically when the interface is configured by the wireless-power off line in /etc/network/interfaces.
ben61694
Posts: 26
Joined: Tue Oct 30, 2018 2:06 pm

Re: How to suppress messages from a Wifi driver?

Post by ben61694 »

Running that command gives me

Error for wireless request "Set Power Management" (8B2C) :
SET failed on device wlan0 ; Operation not permitted.

I ran sudo modprobe 88x2bu ps_enable=0 and it didn't give me an error or anything but I'm also not sure if it works.
User avatar
MichaIng
Site Admin
Posts: 3097
Joined: Sat Nov 18, 2017 6:21 pm

Re: How to suppress messages from a Wifi driver?

Post by MichaIng »

You used sudo for iwconfig as well, right?

Another test:

Code: Select all

sudo iw wlan0 set power_save off
ben61694
Posts: 26
Joined: Tue Oct 30, 2018 2:06 pm

Re: How to suppress messages from a Wifi driver?

Post by ben61694 »

Yes I did run it with sudo. If I didn't use sudo, it would say the command iwconfig doesn't exist.
I ran this:
sudo iw wlan0 set power_save off
and it ran without any errors/or any other message for that matter.

I'm guessing sudo modprobe 88x2bu ps_enable=0 didn't work because I was unable to connect again until I plugged the wifi adapter back in.

Either that or I have a different issue. Is there a better way to diagnose my connectivity issues?

Edit: I'm wondering if it's either a bad adapter or bad drivers, sometimes I'll connect to it and it'll be super laggy (10mbps or lower, down from a normal ~200mbps) before disconnecting me completely.
ben61694
Posts: 26
Joined: Tue Oct 30, 2018 2:06 pm

Re: How to suppress messages from a Wifi driver?

Post by ben61694 »

Here's a dmesg log after I got a disconnect. Can you tell me why it disconnected/why I can't reconnect?
Attachments
dmesg.zip
Dmesg log
(56.42 KiB) Downloaded 38 times
Post Reply