You are not logged in.

#1 2021-05-18 04:04:46

prk07
Member
Registered: 2018-12-16
Posts: 44

[Solved] Changing wifi logs out and stops Network Manager

Hi,

I have an XPS 7590 (Optimus laptop) which is running the latest KDE Plasma 5.21.5.
I have linux and linux-lts kernel installed nvidia and nvidia-lts.
After the recent updates, when I try to change the wifi connection, the desktop env logs out the user. And when I log back in I find the Network Manager is stopped.


linux mainline kernel version - 5.12.4-arch1-2
linux-lts kernel - 5.10.37-1

networkmanager - 1.30.4-3

Please help to resolve this issue.

Last edited by prk07 (2021-05-25 05:39:03)

Offline

#2 2021-05-18 05:44:37

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

It's more likely that your session or the display server crashes.
Please post a complete system journal covering such incident.
Also the output of "hostnamectl".

Offline

#3 2021-05-18 11:35:09

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

Journal -xe outputs the following just after being logged out from the system.

Journal Log

Hostnamectl output

Offline

#4 2021-05-18 11:47:34

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

"sudo journalctl -b", complete journal and please never use "-x", it's virtually spam.

From what's there:

May 18 16:53:35 resurrection systemd[1]: dbus.service: Deactivated successfully.
May 18 16:53:35 resurrection systemd[1]: dbus.service: Consumed 9.765s CPU time.
May 18 16:53:35 resurrection systemd[1]: nordvpnd.service: Deactivated successfully.
May 18 16:53:35 resurrection systemd[1]: nordvpnd.service: Consumed 59.566s CPU time.
May 18 16:53:35 resurrection systemd[1]: udisks2.service: Deactivated successfully.
May 18 16:53:35 resurrection systemd[1]: upower.service: Deactivated successfully.
May 18 16:53:35 resurrection systemd[1]: upower.service: Consumed 9.903s CPU time.
May 18 16:53:35 resurrection systemd[1]: accounts-daemon.service: Deactivated successfully.
May 18 16:53:35 resurrection systemd[1]: accounts-daemon.service: Consumed 1.127s CPU time.
May 18 16:53:35 resurrection systemd[1]: NetworkManager-dispatcher.service: Deactivated successfully.
May 18 16:53:35 resurrection systemd[1]: modprobe@drm.service: Deactivated successfully.
May 18 16:53:35 resurrection systemd[1]: Finished Load Kernel Module drm.
May 18 16:53:35 resurrection systemd[1]: systemd-journald.service: Scheduled restart job, restart counter is at 1.
May 18 16:53:35 resurrection systemd[1]: postgresql.service: Deactivated successfully.
May 18 16:53:35 resurrection systemd[1]: postgresql.service: Consumed 1.618s CPU time.
May 18 16:53:35 resurrection systemd[1]: Started D-Bus System Message Bus.
May 18 16:53:35 resurrection systemd[1]: Stopping Flush Journal to Persistent Storage...
May 18 16:53:35 resurrection systemd[1]: Starting User Login Management...
May 18 16:53:35 resurrection systemd[1]: Started Process Core Dump (PID 128708/UID 0).
May 18 16:53:35 resurrection systemd[1]: systemd-journal-flush.service: Deactivated successfully.
May 18 16:53:35 resurrection systemd[1]: Stopped Flush Journal to Persistent Storage.
May 18 16:53:35 resurrection systemd[1]: Stopped Journal Service.
May 18 16:53:35 resurrection systemd[1]: systemd-journald.service: Consumed 1.804s CPU time.
May 18 16:53:35 resurrection systemd[1]: Starting Journal Service...
May 18 16:53:35 resurrection systemd[1]: Started Process Core Dump (PID 128717/UID 0).
May 18 16:53:35 resurrection systemd[1]: wpa_supplicant.service: Deactivated successfully.

That looks like a weird response to a NIC change and esp. the drm modprobe is weird - and may explain why the display server crashes.
Do you run any custom connection scripts (eg. to handle the VPN)?

Offline

#5 2021-05-18 14:23:50

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

Journal Log as per your command is below.
journal log

This is an optimus laptop with discrete NVIDIA card. I have added a conf in modprobe.d containing

options nvidia-drm modeset=1

. Also, Optimus-manager is being used to handle the switching.

I do have nordvpn package installed but no custom script or nordvpn is active when I get this error.

Offline

#6 2021-05-18 14:42:54

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

May 18 19:39:51 resurrection systemd-journald[301]: Received SIGTERM from PID 660 (NetworkManager).

Why would NM SIGTERM systemd-journald?
Look at the https://wiki.archlinux.org/title/Networ … dispatcher scripts, I suspect something's going wild in there…

Offline

#7 2021-05-18 15:39:56

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

The status of the dispatcher service is below.

https://imgur.com/gallery/JWVdb2P

dispatcher.d directory has three empty directories namely, pre-down.d, pre-up.d and no-wait.d.
All of these directories are empty. Additionally, an executable 99tlp-rdw-nm is present. But I have masked tlp service a long time ago.

Last edited by prk07 (2021-05-18 15:41:02)

Offline

#8 2021-05-18 17:17:27

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

The error can also be reproduced when I closed the lid to suspend the system and open it up again. The system logs out the user. The xorg log is available below just after the system logs out.

https://pastebin.com/zS1nPdc8

Offline

#9 2021-05-18 18:39:41

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

That's from a running X11 server, you probably wanted to look at /var/log/Xorg.0.log.old?

The dispatcher script is from https://archlinux.org/packages/community/any/tlp-rdw/ - if you don't use TLP anyway, I'd drop that package (thus the dispatcher script) and see what happens.

Offline

#10 2021-05-19 02:13:31

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

I have removed the tlp, tlp-rdw and tlpgui package. I can still reproduce the error.
The Xorg logs are below.
Xorg.o.log.old

Xorg.1.log.old

The network manager status after logging back in from auto-logout failure is below.

Network Manager Failed status

Offline

#11 2021-05-19 06:00:55

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

[   551.654] (II) Server terminated successfully (0). Closing log file.
---
[ 48726.436] (II) Server terminated successfully (0). Closing log file.
---
May 19 07:30:57 resurrection NetworkManager[627]: <info>  [1621389657.6444] caught SIGTERM, shutting down normally.
May 19 07:30:57 resurrection NetworkManager[627]: <info>  [1621389657.9334] exiting (success)
May 19 07:30:57 resurrection systemd[1]: NetworkManager.service: Deactivated successfully.

It's like you're logging out and/or shutting down the system. There's no crash.
The ones in your previous journal are from clients that are not shut down explicitly and react badly to the X11 server terminating.
That kind of "crsah-on-exit" isn't "good" but not all that uncommon.

May 18 19:39:50 resurrection NetworkManager[660]: <info>  [1621346990.9150] device (wlp59s0): state change: ip-config -> deactivating (reason 'user-requested', sys-iface-state: 'managed')
May 18 19:39:50 resurrection NetworkManager[660]: <info>  [1621346990.9161] manager: NetworkManager state is now DISCONNECTING
May 18 19:39:50 resurrection audit[660]: USYS_CONFIG pid=660 uid=0 auid=4294967295 ses=4294967295 msg='op=device-disconnect interface="wlp59s0" ifindex=2 pid=1171 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
May 18 19:39:50 resurrection NetworkManager[660]: <info>  [1621346990.9177] audit: op="device-disconnect" interface="wlp59s0" ifindex=2 pid=1171 uid=1000 result="success"
May 18 19:39:50 resurrection kded5[1060]: plasma-nm: Unhandled active connection state change:  3
May 18 19:39:50 resurrection kernel: audit: type=1111 audit(1621346990.914:143): pid=660 uid=0 auid=4294967295 ses=4294967295 msg='op=device-disconnect interface="wlp59s0" ifindex=2 pid=1171 uid=1000 result=success exe="/usr/bin/NetworkManager" hostname=? addr=? terminal=? res=success'
May 18 19:39:50 resurrection kernel: wlp59s0: deauthenticating from d8:07:b6:c5:38:e9 by local choice (Reason: 3=DEAUTH_LEAVING)
May 18 19:39:50 resurrection wpa_supplicant[747]: wlp59s0: CTRL-EVENT-DISCONNECTED bssid=d8:07:b6:c5:38:e9 reason=3 locally_generated=1
May 18 19:39:50 resurrection NetworkManager[660]: <info>  [1621346990.9964] device (wlp59s0): state change: deactivating -> disconnected (reason 'user-requested', sys-iface-state: 'managed')

You disconnect, "reason 'user-requested'" and this somehow™ seems to trigger a log-out:

May 18 19:39:50 resurrection systemd-journald[301]: Journal stopped
May 18 19:39:51 resurrection systemd-journald[301]: Received SIGTERM from PID 660 (NetworkManager).
May 18 19:39:51 resurrection kernel: audit: type=1131 audit(1621346991.010:144): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-timesyncd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 18 19:39:51 resurrection kernel: traps: Bluez D-Bus thr[1536] trap int3 ip:558eb2cc2633 sp:7f610314fee0 error:0 in ferdi[558eb0e44000+53d8000]
May 18 19:39:51 resurrection kernel: audit: type=1701 audit(1621346991.014:145): auid=1000 uid=1000 gid=1000 ses=2 pid=1208 comm=426C75657A20442D42757320746872 exe="/opt/ferdi/ferdi" sig=5 res=1
May 18 19:39:51 resurrection kernel: audit: type=1131 audit(1621346991.017:146): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-udevd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 18 19:39:51 resurrection kernel: audit: type=1131 audit(1621346991.037:147): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=cpupower-gui-helper comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 18 19:39:51 resurrection kernel: audit: type=1334 audit(1621346991.047:148): prog-id=17 op=UNLOAD
May 18 19:39:51 resurrection kernel: audit: type=1131 audit(1621346991.064:149): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=accounts-daemon comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 18 19:39:51 resurrection kernel: audit: type=1131 audit(1621346991.064:150): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 18 19:39:51 resurrection kernel: audit: type=1334 audit(1621346991.067:151): prog-id=14 op=UNLOAD
May 18 19:39:51 resurrection systemd[1]: bluetooth.service: Deactivated successfully.
May 18 19:39:51 resurrection systemd[1]: dbus.service: Deactivated successfully.
May 18 19:39:51 resurrection systemd[1]: dbus.service: Consumed 3.446s CPU time.
May 18 19:39:51 resurrection systemd[1]: systemd-logind.service: Deactivated successfully.
…

Does this happen w/ a new user account?

Offline

#12 2021-05-19 08:15:34

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

It also happened with a new user account.

Offline

#13 2021-05-19 12:02:12

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

Grumpf.

Does switching the connection kick you out of eg. an openbox session?
(You can use nmcli to control  NM, https://wiki.archlinux.org/title/Networ … i_examples )

Offline

#14 2021-05-19 13:22:12

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

Till now, I was using the plasma network manager applet to switch the networks and getting logged out from the plasma session.
I have just tried

nmcli device wifi connect <SSID> password <password>

and this CLI command kicked the same erroneous behaviour.

Offline

#15 2021-05-19 13:24:47

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

The point is to not use plasma as a desktop session, not to avoid the NM plasmoid.

Offline

#16 2021-05-19 13:41:51

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

Can I try it in a tty session?
I don't want to install a different DE if it is avoidable.

Offline

#17 2021-05-19 13:59:40

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

Can I try it in a tty session?

Sure. The key point is to avoid plasma to rule out interference from that side.
The resulting journal will be less noisy, so best do so after a reboot - if it still happens, it might be easier to isolate the cause from there.

Offline

#18 2021-05-19 15:48:19

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

I first restarted the machine and once the sddm login appeared I switched to tty6. I tried to connect to a network with credentials using the cli command nut it didn't connected. So I entered into the DE and connected to the network. And then switched back to tty6.
When I tried to switch the networks now, the system logged me out.
Following are the logs.

Log from journalctl -b -1 -> https://pastebin.com/zHaVj8ji

Kernel Log -> https://pastebin.com/A4qD3A8x

Sddm log -> https://pastebin.com/wQVwcMY1

Network Manager Log -> https://pastebin.com/M8ic3TMw

Xorg.0.log.old -> https://pastebin.com/9Rv7r4de

Xorg.1.log.old -> https://pastebin.com/RWEJkstZ

Offline

#19 2021-05-19 20:20:34

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

But that means there's an active plasma session while this happens - and your sessions likely share the same user bus, plasmas…

I tried to connect to a network with credentials using the cli command but it didn't connected.

Can you please elaborate on this?

I don't want to install a different DE if it is avoidable.

Edit: might be worthwile to cut out sddm as well, see the second link in my signature.

Last edited by seth (2021-05-19 20:21:30)

Offline

#20 2021-05-20 07:10:30

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

I switched to multiuser.target and tried to reproduce the error using nmcli.
The system logged out again and the logs are as follows:

network manager log

Kernel Log

Boot log with journalctl -b -1

Offline

#21 2021-05-20 11:43:26

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

Do you do anything to restart or reload the systemd daemon at any given point for something™?
It's not only your session, postgres, udev, … everthing restarts at this moment.

Offline

#22 2021-05-20 11:57:32

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

My system setup was working fine until the recent kernel update which made the screen goes blank when I use Linux mainline kernel. I have posted about this earlier and was resolved with the kernel update.
But I cannot relate how this Network switching error occurred but Network manager started behaving in this way recently with those updates. Also, closing the lid or suspending the system and then reopening makes the system freeze too.

EDIT: Correct post https://bbs.archlinux.org/viewtopic.php?id=266328

Last edited by prk07 (2021-05-20 13:34:56)

Offline

#23 2021-05-20 13:14:21

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

But that was a year ago…
'key. Superficially: cut out optimus-manager.
Idk why it would respond to a network change, but what is suspicious is that your MAC changes (why?) and some udev rule might overshoot here.

Next up:

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Disable all non-essential services. If this "fixes" it, restore them one by one until things break again.

Offline

#24 2021-05-20 13:33:33

prk07
Member
Registered: 2018-12-16
Posts: 44

Re: [Solved] Changing wifi logs out and stops Network Manager

I attached a wrong post in my previous reply. The correct post is at this link: https://bbs.archlinux.org/viewtopic.php?id=266328.

Offline

#25 2021-05-20 13:58:15

seth
Member
Registered: 2012-09-03
Posts: 49,951

Re: [Solved] Changing wifi logs out and stops Network Manager

Which packages were in the udpate to May 17th?

Offline

Board footer

Powered by FluxBB