[SOLVED] Cannot restart when using wireless

Archived topics about LMDE 1 and LMDE 2
Locked
woodsman

[SOLVED] Cannot restart when using wireless

Post by woodsman »

Thinkpad T400, LMDE 2 MATE, fully updated. I use the standard MATE menu and not Mint Menu. I am not using a boot splash.

When I am using the laptop wireless I am unable to restart (or shut down) the computer. The problem occurs only with wireless and only when attempting to restart directly in MATE.

* Press Ctrl+Alt+Del or from the MATE start menu select Shut Down.
* Select the dialog Restart button.
* There is an annoying beep.
* The system returns to the console.
* The wireless LED stops blinking and goes off.
* The system never completes the restart.

When I connect the network cable the problem never occurs.

When I select Log Out from the menu, then select Restart from MDM, the problem never occurs.

Something is clobbering the wireless connection, which affects the restart effort.

Digging a bit further I find the actual hang is caused by NFS. The problem is a combination of something prematurely killing wireless and then NFS not knowing what to do. When I use the laptop in my home I connect to some public NFS shares from my server. When the wireless is prematurely killed, that causes NFS to hang, a symptom for which NFS is quite infamous. Yet the root cause is something killing wireless when attempting to restart directly from within MATE.

I suspect I do not see the problem when I first Log Out to MDM because MDM probably reinitializes the wireless.

Disabling the NFS server before starting LMDE 2, or manually terminating the NFS connections before restarting, allows the system to restart. Something still is not right because the wireless is being killed prematurely, unlike with wired.

While I can first Log Out and then Restart from MDM, or manually disconnect the NFS shares, this is an extra step.

Any ideas where to continue troubleshooting?

Edit: Looks like NetworkManager is being killed prematurely.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Zill

Re: Cannot restart when using wireless

Post by Zill »

woodsman: I stumbled over this problem way back in 2013 with Debian Wheezy - see this CrunchBang thread for full details. Unless things have changed since then (and they may have!) the problem is that NFS mounts need to be unmounted before shutdown (or reboot). While this is not normally a problem with a wired connection (defined in /etc/network/interfaces), wireless connections established via network-manager are dropped as soon as the active user logs out. There are two possible workarounds:
  • Use autofs to mount and umount nfs mounts automatically, rather than defining mounts in fstab and needing to umount manually.
  • Replace network-manager with Wicd as this runs at system level rather than user level and therefore stays connected after user logout.
You can use either or both these mods depending on your own preferences but they work well for me, including with my Jessie-based systems.
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: Cannot restart when using wireless

Post by Monsta »

Launch network-manager's connection editor (nm-connection-editor) -> Edit -> General tab -> check "All users may connect to this network" checkbox. This should make the connection system-wide. Its parameters will be stored in a file in /etc/NetworkManager/system-connections/ dir.
woodsman

Re: Cannot restart when using wireless

Post by woodsman »

I resolved the problem for my particular use case.

The NetworkManager (NM) "All users may connect to this network" checkbox has been enabled on my systems for a few years. Yet there is something not quite right with the way NM falters with wireless and not wired. I do not know whether that oddity contributed or masked my specific use case.

In my use case I was mounting the NFS shares in fstab like so:

Code: Select all

homeserver:/home/public /home/public nfs defaults,noatime,noauto,users,exec,tcp,soft,intr,bg,timeo=30,nfsvers=3 0 0
Notice the noauto option.

In my rc.local I run a ping test for the availability of my home server. I use this test because sometimes I use the laptop outside my home. When the server is unavailable the laptop uses local mapping of the same directory names as the NFS shares. Files get synced when the server is again available. When the ping test is successful, the rc.local script ran this command:

Code: Select all

mount homeserver:/home/public /home/public
That command proved to be the culprit.

I changed that command to:

Code: Select all

mount /home/public
Without digging into the nuances of NFS, the first rc.local mount command overrides the fstab mount, effectively mounting the share as root rather than non-root. The new rc.local mount command does not override or conflict.

Curiously, I have the same snippet in a Fedora 21 rc.local on the same laptop and never had a problem restarting or shutting down using the original mount command. Fedora 21 uses systemd. And not to forget I never saw the problem when using wired.
Locked

Return to “LMDE Archive”