Bug 165907

Summary: KDE with Networkmanager is broken
Product: [openSUSE] SUSE Linux 10.1 Reporter: Marcel Hilzinger <marcel>
Component: KDEAssignee: Will Stephenson <wstephenson>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Blocker    
Priority: P5 - None CC: matz, suse-beta
Version: RC 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: NetworkManager Log
System log

Description Marcel Hilzinger 2006-04-13 14:54:40 UTC
If NetworkManager is not working under KDE, then KDE cannot get online, even if you setup the internet connection manually. I had this bug already with beta4/5? Then it got fixed, but other users (see opensuse list) had the same problem with beta8/9. I hit it now again with rc1.
Comment 1 Marcel Hilzinger 2006-04-13 15:10:03 UTC
Created attachment 78324 [details]
NetworkManager Log
Comment 2 Marcel Hilzinger 2006-04-13 15:10:44 UTC
Created attachment 78326 [details]
System log
Comment 3 Will Stephenson 2006-04-13 15:30:57 UTC
What's the output of

# nm-tool | grep State
# dcop kded networkstatus status NM

?
Comment 4 Will Stephenson 2006-04-13 15:35:24 UTC
Just saw the 'not' in your report.  The log says that NM connected to eth1 successfully - is that information incorrect?  Did NM fail to connect, then you set up the connection by hand with i[wf]config?  If this isn't clear, what does ifconfig say?
Comment 5 Marcel Hilzinger 2006-04-15 12:08:08 UTC
NetworkManager arrived to connect, after I set up the _hidden_ essid on command line manually. That's why you can find a successful attempt in the logs.

But even then, KDE applications (konqueror, kmail) were not able to go online. I had to reboot in runlevel 3, start the internet manually then run KDE to be able to go online.

Cannot give you more logs now, as I'm on vaccation until easter thuesday, sorry. But I'm sure other users will have similar problems. Unfortunately I could not find my the previous bug report with the same problem, which was fixed fot beta8. There you can find more informations
Comment 6 Stephan Kulow 2006-04-18 07:39:33 UTC
Michael had the same problem: NetworkManager is offline (from it's own perspective) and KDE only believes that information - even if you quit knetworkmanager. 

I think, this is a NM bug though. It should either signal that it doesn't handle any devices or it should figure, something went online without it.
Comment 7 Will Stephenson 2006-04-19 12:39:12 UTC
Timo, NM should be Asleep rather than offline if it failed to set anything up, right?  That's the assumption that Networkstatus works on.

What if NM is disconnected and the user manually sets up with iwconfig - will NM update its state accordingly?  This is a corner case and probably outside of NM's spec thought.
Comment 8 Timo Hoenig 2006-04-19 13:48:38 UTC
(In reply to comment #7)

> Timo, NM should be Asleep rather than offline if it failed to set anything up,
> right?  That's the assumption that Networkstatus works on.

Actually, NM is in state NM_STATE_ASLEEP if it was sent to sleep via the D-BUS interface.  It is in state NM_STATE_DISCONNECTED if it failed to connect to a network.  Why should it set itself to NM_STATE_ASLEEP? 

If, for example, NM failed to connect to a wireless network because it wasn't found, which lateron appears, NM will connect to it.  This would not be the case if NM would enter NM_STATE_ASLEEP once it could not connect to any network.

> What if NM is disconnected and the user manually sets up with iwconfig - will
> NM update its state accordingly?  This is a corner case and probably outside
> of NM's spec thought.

No, NM will not update its state.  And it shouldn't, really.

We had lengthly discussion whether it is reasonable to allow a mixture of NM and another network-managing instance (ifplugd, manual ifconfig, ...) and we refused to allow such an option.
Comment 9 Michael Matz 2006-04-19 14:05:15 UTC
Um, oh.  I hope you realize that for people who have a DSL connection
on their machine NM will not only be useless, but actively interfering with
work?  So I have to chose between either having the nice wireless features
of NM, or working connectivity.
Comment 10 Timo Hoenig 2006-04-19 14:08:06 UTC
No, you can set an interface to be user-controlled and NetworkManager will not touch it.  You're free to do anything you want with this interface.
Comment 11 Michael Matz 2006-04-19 14:16:52 UTC
Forgive my ignorance, but where can I do that?  (It might also be because
I had a too old beta, beta7).  In knetworkmanager itself?
Comment 12 Stephan Kulow 2006-04-19 14:17:41 UTC
#10: will NM still be NM_STATE_DISCONNECTED then? If so, NM _is_ hindering your work, because KDE will think it's offline
Comment 13 Timo Hoenig 2006-04-19 14:54:23 UTC
(In reply to comment #11)

> Forgive my ignorance, but where can I do that?  (It might also be because
> I had a too old beta, beta7).  In knetworkmanager itself?

It *should* work as before.  Use kinternet to connect/disconnect.

(In reply to comment #12)

> #10: will NM still be NM_STATE_DISCONNECTED then? If so, NM _is_ hindering 
> your work, because KDE will think it's offline

Yes it will.

Fix KDE to not only show the state of NM then.  NM just can not monitor what a user or another daemon might do behind its back.
Comment 14 Marcel Hilzinger 2006-04-19 15:52:58 UTC
Why does KDE fully depend on the network informations it gets from NM?
Why doesn't NM check for existing (manual setup) internet connections?

To #10: AFAIK you can only choose if you want to use NM or old-style mode. At least in YaST there is no option to set this per interface. In the fist screen YaST asks you, which you want to use. Later there is no option to change per device.
Comment 15 Will Stephenson 2006-04-19 21:40:15 UTC
Ok, I can see how this failed - NM is DISCONNECTED and kinternet defaults to not provide info to kded_networkstatus. So we take NM's info as gospel.  I thought NM went ASLEEP if it was not managing anything, in which case kded doesn't inhibit any network ops.

If I turn on kinternet's kded_networkstatus feed by default and it works for all the ppp flavours and non NM managed ethernets, we should be alright again.

But I would still like NM more if it could differentiate between not managing any networks and managing networks but being disconnected.
Comment 16 Stephan Kulow 2006-04-20 10:20:07 UTC
Perhaps you can doubt NM if knetworkmanager isn't running? This would fit my expectations as user
Comment 17 Timo Hoenig 2006-04-20 10:47:43 UTC
This looks like a bad idea to me.

What if a user chooses to use nm-applet or his own cooked NM client?  Other than that, it is also possible to feed known networks to NM not using the applet but YaST.  NM parses the /etc/sysconfig/network/ifcfg-wlan-* for this.
Comment 18 Michael Matz 2006-04-20 14:36:11 UTC
Well, parsing *-wlan-* doesn't seem helpful for the DSL case.  And Will:
kinternet simply wasn't running.  It wasn't even installed on that machine.
I had to use cinternet to manage the DSL interface.  The workaround from
coolo would have helped me indeed.
Comment 19 Will Stephenson 2006-04-21 08:09:30 UTC
I'm testing a KNetworkManager that talks to kded on behalf of NM - in KNM I have detailed info on NM's state, so if it doesn't know of any devices I can differentiate between DISCONNECTED and DISCONNECTED_USELESS.  This implements coolo's workaround too, and replaces the direct NM link in kded.  It's not as clean as the direct link but it's too much work to make the dbus code in KNM a library right now.
Comment 20 Will Stephenson 2006-04-24 13:35:44 UTC
submitted, please test.
Comment 21 Will Stephenson 2006-04-24 13:36:25 UTC
Updated kdepim3* and kinternet are also necessary to test.