NetworkManager.state - remove and restart

I’ve been having intermittent problems with NetworkManager.

Frequently, my laptop can’t see my wireless network. I do the following:


rcnetwork stop
rm /var/lib/NetworkManager/NetworkManager.state
rcnetwork start

and my wireless auto-connects.

Can anyone tell me

(a) how to fix this so I don’t need to do anything; OR
(b) how to create a script which runs the commands automatically.

Thanks.

Please post:

cat /var/lib/NetworkManager/NetworkManager.state

There was a bug in this file.
There must be a line with the following:

NetworkingEnabled=true

Maybe this will help you also:
http://forums.opensuse.org/forums/english/get-technical-help-here/network-internet/470605-network-manager-disables-immediately-after-start-suse-11-4-a.html

Hi

Yes, the line appears to be there.


[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
WimaxEnabled=true

I don’t know if the file changes when the connection fails - but why should it?

Anyone got any suggestions?

Nobody at all? Every time I reboot, I need to go through the network stop / delete / restart routine. I’ve tried creating an autorun file to carry out these commands but to no avail.

Can anyone diagnose the problem, or at least point me in the right direction?

The only time I had to remove the .state file was after a sudden system lockup or after a suspend or hibernate that failed. So, its odd for sure to need to do this all of the time. You could perhaps add these to the after.local file. See my blog on the subject here:

systemd and using the after.local script in openSUSE 12.1 - Blogs - openSUSE Forums

Thank You,

Thanks - will give it a go when I get home and let you know.

Yes, please let us know if this proves useful or not so that we can come up with a different solution if needed.

Thank You,

Just to say, Alistair, you’re not alone. I’ve got this problem too, but only since the weekend. Network Manager can see networks up and down the street, but not mine in the next room ! Not at home at present, but I’ll work through the above when I have the chance.

Has there been some update, I wonder…

GRAHAM

openSUSE 12.1 64-bit, KDE 4.7, HP G60 laptop

Too early to say if it works…laptop seems OK tonight. I’ll know over the next day or so. Thanks for the advice!

Not working.:frowning:

Had to resort to the console window to fix.

So I am not so sure don’t need to go back to square one, even to determine exact hardware and how each is connecting to determine what is wrong. But, I will list what I call the kitchen sink fixes that redoes everthing and starts over.

This is what you are doing …

sudo rm /var/lib/NetworkManager/NetworkManager.state
sudo /etc/init.d/network restart

Problem was solved acccording to one user after having removed (ALL OF) these files:

rm -rf ~/.kde4/share/config/networkmanagementrc
rm -rf ~/.kde4/share/apps/networkmanagement
rm -rf ~/.kde4/share/config/kwalletrc (Warning, all kwallet passwords will be deleted and is only used for Wireless connections)
rm -rf ~/.kde4/share/apps/kwallet  (Warning, all kwallet passwords will be deleted and is only used for Wireless connections)
rm -rf ~/.kde4/share/apps/networkmanager
rm ~/.kde4/share/config/networkman*

Perhaps taking these radical steps might reset the issue.

Thank You,

:frowning: Have just bitten the bullet and gone through the drastic steps outlined - no joy. Still having to do the network stop/delete/start thing again. :frowning:

Cannot for the life of me think why this seems to be such an issue. Could it be anything to do with the file permissions on the NetworkManager.state file? I don’t want to change them without someone else reviewing this…

Thanks for the suggestion, anyway.

I found another suggestion to do this on each restart:

nmpid=/var/lib/NetworkManager/NetworkManager.state 
 -f $nmpid ] && rm $nmpid

You could add this to the /etc/init.d/boot.local or /etc/init.d/after.local in openSUSE 12.1 with the latter working if you followed my blog on the subject.

systemd and using the after.local script in openSUSE 12.1 - Blogs - openSUSE Forums

Thank You,

Thanks. Will give this a go.

I had tried your blog suggestion for the stop/remove/restart but it made no difference. For the nmpid code above, should I keep the stop/remove/restart code lines or remove them? If I keep them, does nmpid code go before or after this?

So I would put this first, but perhaps remark out the other lines just to see if they are really needed or not. This coding just removes the state file as well, but in a different way.

Thank You,

I’ve tried what you’ve suggested but still have the problem.:(. Guess I’ll need to live with it…

don’t know if this will help your thinking…

I have the same problem with my new load of 12.1 w/ KDE and have found an only slightly less inconvenient workaround. After the boot I click on the networkmanager icon in Task Manager (at that point the icon is simply a red circle with diagonal line). When the Network Manager window opens I click on the “Enable Wireless” box at the lower left corner to remove the check mark. I then wait about 2-3 seconds and click to replace the check mark. That’s all. The wireless connection then appears and links up just fine.

(Note: This problem did not appear on this PC with 11.4 and either KDE 4.7.4 or 4.8 but it does happen with 12.1 (both 32 bit and 64 bit) with 4.7.2 and 4.8)

Does anyone know if a Bug Report has been submitted for this yet?

…and the Kurse of Komplaining strikes again…

Problem has now changed to intermittent, rather than constant, so it’s a step in the right direction.

…and again tonight, laptop fired up with all connections working. Thanks, J D! I don’t know if it’s a permanent, every-time fix, but I’ll settle for sometimes rather than never.