Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] constant NM logs to terminal (on systemd)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
NameNotQuality
n00b
n00b


Joined: 27 Apr 2024
Posts: 17

PostPosted: Sun Apr 28, 2024 8:35 pm    Post subject: [SOLVED] constant NM logs to terminal (on systemd) Reply with quote

Edit: to see the answer, scroll to the 16th post and look at highlighted text

After doing systemctl enable NetworkManager, rebooting, selecting my WPA/WPA2 wifi network through nmtui, testing the successful network and emerging a package and powering off again,
at boot I was greeted by something like this (by that I mean these logs exclude the [number] at the start and I tried typing in these logs based off of my quick photo, which means it could be 90% of the lines instead of 100) being printed out at the login prompt:
Code:
wlp1s0: authenticate with (Probably Sensitive PS)
wlp1s0: send auth to (PS)
wlp1s0: authenticated
wlp1s0: associate with (PS) (try 1/3)
wlp1s0: RX AssocResp from (PS) (capab=0xc11 status=0 aid=2)
wlp1s0: associated
systemd-journald[361]: Time jumped backwards, rotating.

and the same constant lines being printed over and over again every few seconds:
Code:
rtw_8821ce 0000:01:00.0: unhandled c2h firmware interrupt


How do I silence it? Is there an NM/Network Manager or systemd config or something to do so or redirect these to a file instead? Do these logs mean something too?
Seriously, I didn't meet these after enabling NM and rebooting and before the reboot after doing nmtui.


Note: I'm on a phone right now, and typing things like logs and stuff is pretty hard, so more time consuming and tyop-...possible.
Edit: https://postimg.cc/YGD74Syg


Last edited by NameNotQuality on Tue Apr 30, 2024 1:37 pm; edited 2 times in total
Back to top
View user's profile Send private message
NameNotQuality
n00b
n00b


Joined: 27 Apr 2024
Posts: 17

PostPosted: Mon Apr 29, 2024 9:03 am    Post subject: Reply with quote

Update: After going to a GNOME NM site about debugging (https://wiki.gnome.org/Projects/NetworkManager/Debugging#wpa_supplicant) I found out about a file /usr/share/dbus-1/system-services/fi.w1.wpa_supplicant1.service, which actually has some sort of config:
[D-BUS service]
Name=fi.w1.wpa_supplicant1
Exec=/usr/sbin/wpa_supplicant -u
User=root
SystemdService=wpa_supplicant.service

Could appending -f (file) to Exec potentially work?

Edit: No, it doesn't. I still got the intrusive messages at the login prompt.

How am I supposed to fix these messages appearing??
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22636

PostPosted: Mon Apr 29, 2024 2:49 pm    Post subject: Reply with quote

Welcome to the forums.

Generally, if post length permits, you should edit extra information into your first post instead of replying to it. Some users run a canned search for threads with zero replies as a way of finding posts to answer. When you replied to yourself, you removed your thread from that list, even though you were not replying to announce that the thread was solved. Thus, they would no longer see your thread on the list of unanswered threads.

The messages you showed here look to me like they come from the kernel, not from NetworkManager. Do you have your kernel's verbosity set unusually high? What is the output of cat /proc/cmdline?
Back to top
View user's profile Send private message
NameNotQuality
n00b
n00b


Joined: 27 Apr 2024
Posts: 17

PostPosted: Mon Apr 29, 2024 3:16 pm    Post subject: Reply with quote

Ok, I won't post replies next time, so the topic won't seem answered.

I created my kernel by doing the full automatic method in the handbook, emerging gentoo-kernel, because I'm new to gentoo.
Here's cat /proc/cmdline:
Code:
BOOT_IMAGE=/boot/gentoo dokeymap looptype=squashfs loop=/image.squashfs cdroot


Edit: I remember I also got a few messages printed after plugging in my portable ssd, which may tell a bit more about how verbose my kernel is.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22636

PostPosted: Mon Apr 29, 2024 3:41 pm    Post subject: Reply with quote

Is that from the booted kernel that produces excessive output, or from the LiveCD you used to install the system? I wanted to see the former, since that is the kernel that is not behaving the way you want.
Back to top
View user's profile Send private message
NameNotQuality
n00b
n00b


Joined: 27 Apr 2024
Posts: 17

PostPosted: Mon Apr 29, 2024 3:50 pm    Post subject: Reply with quote

For me, the livecd has absolutely no problems, and doesn't even have systemd, which I mentioned in the title of this topic.
The intrusive messages appear in the final system, not the livecd.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22636

PostPosted: Mon Apr 29, 2024 4:07 pm    Post subject: Reply with quote

Right, why is why I asked if the cat /proc/cmdline output you provided above is from the LiveCD or from the affected system, because it looks to me like it is from the LiveCD. If so, then it is not useful for understanding why the affected system is misbehaving.
Back to top
View user's profile Send private message
NameNotQuality
n00b
n00b


Joined: 27 Apr 2024
Posts: 17

PostPosted: Mon Apr 29, 2024 4:23 pm    Post subject: Reply with quote

Oh, I see what you mean. I did the command while being arch-chrooted into my system, it shouldn't be from the livecd.
But I just booted my system (not livecd), and it actually is slightly different:
Code:
BOOT_IMAGE=/boot/kernel-6.6.28-gentoo-dist root=UUID=e74cc875-0d73-473a-8d5e-710d2748e649 ro


I'm sorry, I didn't know it doesn't work with chroot.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22636

PostPosted: Mon Apr 29, 2024 6:23 pm    Post subject: Reply with quote

/proc is a virtual filesystem, so it always comes from the running kernel.

I see nothing in that output that would justify the kernel running at an unusually high verbosity level.

These messages appear to be printed by sdata_info, which after expanding macros, will be either _sdata_info or pr_info, depending on whether you defined CONFIG_MAC80211_MESSAGE_TRACING. The associated help text suggests to me that this is a debug option, which you probably want disabled. Is it enabled or disabled in your kernel?
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1912

PostPosted: Mon Apr 29, 2024 6:44 pm    Post subject: Reply with quote

What does cat /proc/sys/kernel/printk output when booted into where it echos these printk warnings?

Mine says:
Code:
1       4       1       7
The first number in the output is the console log level, the second is the default log level, third is the minimum log level and the fourth is the maximum log level.
Code:
#define KERN_EMERG "<0>" /* system is unusable*/
#define KERN_ALERT "<1>" /* action must be taken immediately*/
#define KERN_CRIT "<2>" /* critical conditions*/
#define KERN_ERR "<3>" /* error conditions*/
#define KERN_WARNING "<4>" /* warning conditions*/
#define KERN_NOTICE "<5>" /* normal but significant condition*/
#define KERN_INFO "<6>" /* informational*/
#define KERN_DEBUG "<7>" /* debug-level messages*/
Back to top
View user's profile Send private message
NameNotQuality
n00b
n00b


Joined: 27 Apr 2024
Posts: 17

PostPosted: Mon Apr 29, 2024 7:25 pm    Post subject: Reply with quote

Hu, I'm not sure how to check kernel variables and configs, even after searching for a little bit in the gentoo wiki. I installed and compiled a distribution kernel by following the fully automatic kernel config part in the handbook.

grknight, I think that's it! Look at my output :!:
cat /proc/sys/kernel/printk
Code:
7 4 1 7

https://postimg.cc/K3MYWXH3
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1912

PostPosted: Mon Apr 29, 2024 8:07 pm    Post subject: Reply with quote

NameNotQuality wrote:
grknight, I think that's it! Look at my output :!:
cat /proc/sys/kernel/printk
Code:
7 4 1 7

https://postimg.cc/K3MYWXH3

echo 1 > /proc/sys/kernel/printk to make it more sensible. Then find out what is making it 7. I don't know anything about systemd (if it needs this) but having 7 as console is a bit extreme IMO.
Back to top
View user's profile Send private message
NameNotQuality
n00b
n00b


Joined: 27 Apr 2024
Posts: 17

PostPosted: Mon Apr 29, 2024 8:27 pm    Post subject: Reply with quote

Is there some sort of config I can do to stop this being 7? Or could anything like a service do this?
I didn't even set any kernel config at all. I'm pretty sure all I've done is:
    -Install gentoo and emerge something like wpa_supplicant and vim
    -Boot the installed system and think it's broken but in reality it just printed out a few of the boot messages into the login prompt for some reason
    -Unsuccessfully configure wpa_supplicant and with the -B argument already see intrusive logs being printed to terminal < maybe already had 7 for console logs
    -Getting into the livecd and installing NM on my system through arch-chroot
    -Enable NM and, after reboot which somehow didn't have the boot messages from earlier anymore on the login prompt
    -Choose my wpa/wpa2 network through nmtui and see a few lines being printed over the blue tui < could also already had 7 for console logs
    -Install something like smartmontools
    -Power off and reboot to see those intrusive messages of right now.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1912

PostPosted: Mon Apr 29, 2024 8:39 pm    Post subject: Reply with quote

Create/modify /etc/sysctl.d/local.conf with kernel.printk=1 to make this permanent
Back to top
View user's profile Send private message
NameNotQuality
n00b
n00b


Joined: 27 Apr 2024
Posts: 17

PostPosted: Mon Apr 29, 2024 8:54 pm    Post subject: Reply with quote

Alright, I'll try it, but unfortunately now for me it's gotten late and I'm already now in bed. Worst timing!!!
But in the morning I'll instantly apply it and reply again.
Also, I just wanted to thank you so much guys, both hu and grknight, for trying to help me! I really appreciate it :D
Back to top
View user's profile Send private message
NameNotQuality
n00b
n00b


Joined: 27 Apr 2024
Posts: 17

PostPosted: Tue Apr 30, 2024 7:01 am    Post subject: Reply with quote

Okay, I'm back, and for some reason I can't create the file at all. When I arch-chrooted into my system, I tried creating the file with vim, but it said it couldn't open it for writing. I then booted the system but the same problem here, I can't touch or echo > into the file, it just says that it doesn't exist, even while being root. I even tried going into the livecd and not arch-chrooting, but it's the same story.
Edit: Nevermind, it actually didn't work because I didn't create the directory sysctl.d itself!
And yes, it works! Yess! That's the solution! Finally! Once again thank you so much

For people that wanna quickly know the answer, this is it (systemd only according to sysctl.d manpage):
-Create directory /etc/sysctl.d
-In it, create a file local.conf (but probably other names with .conf work too)
-In the file, write "kernel.printk=1" <- this variable defines the kernel console log verbosity
Done!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22636

PostPosted: Tue Apr 30, 2024 1:51 pm    Post subject: Reply with quote

Those steps can be distilled to a simple shell fragment:
Code:
# This must be run as root
mkdir -p -m755 /etc/sysctl.d && printf '%s\n' 'kernel.printk=1' > /etc/sysctl.d/local.conf
I have not tested this, and am only converting your prose instructions into a shell fragment.

I am still curious how your kernel ended up with the default verbosity set so high. I get the same values that grknight showed in the post describing how this works.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum