IRC log of #maemo-ssu for Sunday, 2012-08-12

*** taziff1 has joined #maemo-ssu01:28
*** taziff has quit IRC01:31
*** luf has quit IRC01:36
*** mase76 has quit IRC02:04
*** taziff has joined #maemo-ssu02:07
*** taziff1 has quit IRC02:08
*** Lava_Croft has quit IRC02:09
*** Lava_Croft has joined #maemo-ssu02:15
*** NIN101 has quit IRC02:26
*** _xnt14 has quit IRC03:33
*** chainsawbike has quit IRC03:35
*** Sicelo has quit IRC03:35
*** Sicelo has joined #maemo-ssu03:35
*** _xnt14 has joined #maemo-ssu03:37
*** chainsawbike has joined #maemo-ssu03:39
*** SpacedOut has joined #maemo-ssu04:18
SpacedOutmerlin1991: MohammadAG: I posted a merge request to osso-wlan on gitorious '#1: fix endless failed connection attempts'04:30
SpacedOutTrivial fix, someone forgot to NULL terminate the killall argument string.04:31
nox-`oops'04:43
*** LaoLang_cool has joined #maemo-ssu04:51
*** LaoLang_cool has quit IRC05:06
*** amiconn has quit IRC05:17
*** amiconn_ has joined #maemo-ssu05:17
*** amiconn_ is now known as amiconn05:17
*** taziff has quit IRC05:40
*** taziff has joined #maemo-ssu05:41
SpacedOutAt least osso-wlan has source, I'm not as sure what to do about 50_ipv4_network_setup which comes in a package that doesn't.  That will call `ifconfig wlan0 0.0.0.0` to clear the ip address, but when it is run last it actually brings the interface up and sucks the battery dry, which happens frequently when I leave the access point, my solution is to change it to `ifconfig $interface 0.0.0.0 down`05:56
*** LaoLang_cool has joined #maemo-ssu06:17
*** LaoLang_cool has quit IRC06:23
*** taziff1 has joined #maemo-ssu06:32
*** taziff has quit IRC06:34
*** M13 has joined #maemo-ssu06:43
*** nox- has quit IRC06:43
*** taziff1 has quit IRC07:19
*** taziff has joined #maemo-ssu07:19
*** taziff1 has joined #maemo-ssu07:35
*** taziff has quit IRC07:37
DocScrutinizer05SpacedOut: niiiice09:47
*** LaoLang_cool has joined #maemo-ssu10:04
*** LaoLang_cool has quit IRC10:43
*** LaoLang_cool has joined #maemo-ssu10:51
*** LaoLang_coo_ has joined #maemo-ssu11:00
*** LaoLang_coo_ has quit IRC11:03
*** LaoLang_cool has quit IRC11:03
*** Free-MG has joined #maemo-ssu11:06
*** luf has joined #maemo-ssu11:25
*** M4rtinK has joined #maemo-ssu12:09
*** NIN101 has joined #maemo-ssu12:11
*** Free-MG has quit IRC12:25
*** M13 has quit IRC12:58
*** LaoLang_cool has joined #maemo-ssu13:26
*** mase76 has joined #maemo-ssu13:30
*** M13 has joined #maemo-ssu13:41
*** mase76 has quit IRC14:52
*** mase76 has joined #maemo-ssu14:52
*** zeq has joined #maemo-ssu15:09
*** LaoLang_cool has quit IRC15:33
*** LaoLang_cool has joined #maemo-ssu15:34
*** mase76 has quit IRC15:51
*** MrPingu has joined #maemo-ssu15:58
*** LaoLang_cool has quit IRC16:55
*** MrPingu has quit IRC16:56
*** _rd has joined #maemo-ssu16:57
*** MrPingu has joined #maemo-ssu17:02
*** mase76 has joined #maemo-ssu17:15
*** zeq has quit IRC17:15
*** DocScrutinizer has quit IRC17:18
*** DocScrutinizer has joined #maemo-ssu17:18
*** DocScrutinizer05 has quit IRC17:18
*** DocScrutinizer05 has joined #maemo-ssu17:18
*** Free-MG has joined #maemo-ssu17:27
DocScrutinizer05SpacedOut: IIRC the wlan needs `modprobe -r wl12xx` to stop the chip from sucking battery17:30
DocScrutinizer05seems the wl12xx.ko driver doesn't support powering down the chip in any other way17:31
MrPinguDoes wifiswitcher unload the wl12xx module?17:33
kerioDocScrutinizer05: really? :o17:33
keriowhy should it use power if the interface is down?17:34
DocScrutinizer05hooray, my desktop PC mouse buttons are fscked again, on a system level17:36
DocScrutinizer05rather, X11 is fsckd17:36
DocScrutinizer05kinda17:36
DocScrutinizer05plasma and highlighting texts in any window borked17:36
DocScrutinizer05fixed it, ssh xterm hijacked the mouse :-S17:42
DocScrutinizer05anyway, this is what happens when device decides to scan for new available WLAN AP:17:43
DocScrutinizer05Aug 12 16:38:54 IroN900 kernel: [102724.898712] wl1251: 151 tx blocks at 0x3b788, 35 rx blocks at 0x3a78017:43
DocScrutinizer05Aug 12 16:38:54 IroN900 kernel: [102724.914428] wl1251: firmware booted (Rev 4.0.4.3.7)17:43
DocScrutinizer05Aug 12 16:38:54 IroN900 wlancond[1608]: Scan issued17:43
DocScrutinizer05and this when I switch from WLAN to GPRS:17:44
DocScrutinizer05Aug 12 16:33:52 IroN900 wlancond[1608]: Setting BSSID 00:00:00:00:00:0017:44
DocScrutinizer05Aug 12 16:33:52 IroN900 wlancond[1608]: Setting SSID:17:44
DocScrutinizer05Aug 12 16:33:53 IroN900 kernel: [102423.563049] wl1251: down17:44
DocScrutinizer05lemme try again and check if wl12xx.ko is loaded or not during WLAN disconnected17:45
DocScrutinizer05hmm, seems module isn't rmmod'ed17:49
DocScrutinizer05maybe my info is a tad obsolete and they fixed that with later PR1.n updates17:50
DocScrutinizer05andre__ might know, he can scan the NB bugtracker17:51
*** kerio has left #maemo-ssu17:56
Raimuhttp://www.youtube.com/watch?v=IEpQFk7_C8c18:07
Raimu...jeeze, wrong channel. /retract18:07
RaimuSorry. I don't suppose there're ardent Joy Division fans here.18:08
*** kerio has joined #maemo-ssu18:09
*** taziff1 has quit IRC18:19
*** zeq has joined #maemo-ssu18:24
*** luf has quit IRC18:32
DocScrutinizer05joy division, you bet I adore :-)18:48
SpacedOutDocScrutinizer: I'm watching /sys/class/power_supply/bq27200-0/current_now idle on an access point with the screen off is giving about the same numbers as not connected with wlan0 down 6426 to 18028, `ifconfig wlan0 up` gives 202954, then `ifconfig wlan0 down` returns back to the same low values.19:02
DocScrutinizer05/sys/class/power_supply/bq27200-0/current_now  quite probably is massive fake anyway19:03
DocScrutinizer05err nope, sorry19:03
SpacedOutMy observation is, it is sucking a lot of power when wlan0 is up and not doing power save mode, which is always when up and not associated, so far power draw is good when it is actually down as observed with ifconfig.19:03
DocScrutinizer05I missread19:03
DocScrutinizer05:nod:19:04
DocScrutinizer05that's expected19:05
DocScrutinizer05I guess in PR1.0 they had a bug in wl12xx.ko that didn't allow to switch down the chip's scanning with ifdown19:05
*** javispedro has joined #maemo-ssu19:08
SpacedOutAny suggestions on how to or where to push out an updated /etc/maemo-dhcp.d/50_ipv4_network_setup script, that package doesn't have source and it will `/sbin/ifconfig $interface 0.0.0.0` in trying to clear the ip address, but that will bring it up if it was down.  There is a race and it can run after what should bring it down and drain the battery.  I've been bitten by this many times when I leave an access point.19:08
SpacedOutMy solution is to add down to the command, so I'm good, but I would like to spread it around.19:09
*** test__ has joined #maemo-ssu19:31
*** Free-MG has quit IRC19:34
DocScrutinizer05should go to CSSU-T I guess, after proper testing19:39
DocScrutinizer05pkg name? nfc19:39
DocScrutinizer05invent sth if you can't find which is the pkg that ships this file19:40
DocScrutinizer05SpacedOut: first I suggest you open a ticket19:46
DocScrutinizer05nice point to collect all related stuff19:46
SpacedOutThe script is in libicd-network-ipv4 but the package source isn't available.19:47
DocScrutinizer05shit20:00
DocScrutinizer05libicd-network-ipv4__patch-<BMOnumber>20:02
DocScrutinizer05force the friggin script in via postinstall or whatever20:03
DocScrutinizer05BMOnumber = ticket number on bugtracker20:03
DocScrutinizer05but please check that suggestion with merlin199120:04
DocScrutinizer05or MohammadAG, or chem|st, or any of our packaging experts20:04
DocScrutinizer05first open a ticket ;-)20:05
SpacedOutMakes sense I'll create a package for that.  sed can edit scripts in place, that might be safest.  Would I create the bug report, post the package to the extras, update the bug report with the package?20:05
DocScrutinizer05:nod:20:06
DocScrutinizer05err20:06
*** javispedro has quit IRC20:06
DocScrutinizer05not to extras, it's not really fit for extras, since it messes with system stuff20:06
DocScrutinizer05well, you may do it like that, but it's a pretty unclean way, I'd prefer to keep it in CSSU, it's meant for that20:07
DocScrutinizer05if you publish via extras, we need to consider how we ever could include it in CSSU too, without creating weird conflicts20:08
SpacedOutHow about I create the package and add it as an attachment to the bug report and let someone else figure out where it should go?20:09
DocScrutinizer05but, as mentioned above, that's not exactly my domain. Please ask our packagers/maintainers how to handle that20:09
DocScrutinizer05yep20:09
DocScrutinizer05best practice, I guess20:10
kerioSpacedOut: does it work fine in all situations with your addition?20:14
*** M13 has quit IRC20:14
SpacedOutSo far.  Can you think of any case that dhcp would be calling /etc/maemo-dhcp.d/50_ipv4_network_setup deconfig, to remove an ip address and expect the interface to stay up?20:16
kerio\_o_/20:17
kerioweird shit with gprs0/phonet maybe?20:17
SpacedOutThe options to that script are static, bound, renew, zeroconf for setting an ip, deconfig, zeroconf.deconfig for removing it and zeroconf.dhcpup which does nothing.  The change is to down the interface for deconfig, zeroconf.deconfig.20:18
keriohm20:21
DocScrutinizer05SpacedOut: I gather the bug *I* found several times is unrelated? bug: networks stays associated to an AP 100km away20:21
SpacedOutphonet0 has never had an ip address that I've seen, so I wouldn't expect dhcp to be involved.  I've never seen it go down because of the change.  As far as gprs goes, I can't think of when it would be up with dhcp, and dhcp then removing the ip address and wanting to left up.20:22
keriomeh, good enough for me20:23
keriojust add " down" after "0.0.0.0"?20:23
DocScrutinizer05SpacedOut: GPRS needs a renewal of IP every 24h. Alas the renewal time the carrier delivers with DHCP isn't in sync with the forced "disconnect" after 24h (maybe a German iniosyncrasy)20:24
SpacedOutI would expect it to be unrelated.  Does iwconfig list an access point?  The 'internet connection' ui in this case acts as if you manually disconnected from the access point, ie it doesn't know that wlan0 is up, and just scanning once will bring it back down (and the battery drain).20:24
DocScrutinizer05actually after 24h my GPRS connection stalls and I need to tear it down and re-establish it20:25
SpacedOutkerio: yes20:25
SpacedOutI've not been on gprs for 24 hours at a time to see that problem.20:27
kerioand that's why the patch shouldn't be blindly added to cssu :)20:27
kerioSpacedOut: are you sure about "down" in zeroconf.deconfig?20:27
SpacedOutI put it in there, but I've never seen zeroconf used on my N900.  First question, does it work without down?  Now that I look at it I think the answer is no.20:31
kerioSpacedOut: ping20:31
SpacedOut/sbin/ifconfig $interface:1 $ip 0.0.0.020:31
DocScrutinizer05SpacedOut: (AP 100km away) the phone simply doesn't show any sign of realizing that the AP got out of range - except some "beacon missing" or "signal low" msg in syslog20:31
SpacedOutHow is that valid?  It is giving two ip addresses, on my desktop, `ifconfig eth1:3 0.0.0.0` gives SIOCSIFFLAGS: Cannot assign requested address, `ifconfig eth1:3 192.168.4.3  0.0.0.0` also SIOCSIFFLAGS: Cannot assign requested address20:32
kerioDocScrutinizer05: it's a really optimistic phone! :D20:33
kerioSpacedOut: meh, i'm just going to ignore the zeroconf stuff20:34
DocScrutinizer05indeed, for some reason it hopes for re-associate eventually succeeding20:34
SpacedOutInterestingly though either complains but the ip alias interface does go down anyway, so it could be fixed to just be `/sbin/ifconfig $interface:1 down` to avoid the error or left alone.20:34
kerioi added "down" on the deconfig on my phone, i'll report eventual problems20:35
DocScrutinizer05SpacedOut: consider logger lines in that script, to monitor what's actually going on, also for later QA/testing/debugging20:36
SpacedOutDocScrutinizer: As in it is listed in the 'internet connections' access point list?  Do local access points show up?  I can't see it being related to this.20:36
DocScrutinizer05SpacedOut: It simply shows the AP as current internet connection20:36
DocScrutinizer05and internet access is stalled20:37
DocScrutinizer05of course other AP show up20:37
DocScrutinizer05since I fix those issues by simply manually switching to my home AP after I left the pub to which the connection sticks20:38
SpacedOutkerio: I'm not that good about watching the IRC channel, David@Fries.net to contact me.  I have also seen the bluetooth eat up power when going out of access point range as they are tied with the coexist antenna logic, but that's unrelated to wlan0 being left up.20:38
SpacedOutI actually replaced ifconfig with a program of mine to log who was calling ifconfig and what the time was to prove that it was sometimes before zz_static_ip_if (which explicitly downs the network) and sometimes after.  What would a line to log it look like?  It would need to be added to both scripts.20:41
DocScrutinizer05man logger20:43
DocScrutinizer05sth like `logger -i -s -t ifconfig-patch "whatever message to tell" `20:45
DocScrutinizer05maybe -p kern.debug20:48
*** mase_76 has joined #maemo-ssu20:51
SpacedOutSince `patch` isn't installed on the N900 by default I would like to use sed, which means it needs to all be on one line.  adding logger would make it a long line.20:52
DocScrutinizer05hmm?20:54
*** mase76 has quit IRC20:54
DocScrutinizer05sed can do awesome things20:54
DocScrutinizer05like insert lines, replace one line by 3 lines (s/abc/abc\ndef\nghk/), delete lines, append lines, by line number, line range, relative to file start or end, whatnot else20:56
*** taziff has joined #maemo-ssu21:01
DocScrutinizer05diff -e21:01
DocScrutinizer05 -e  --ed              Output an ed script.21:01
DocScrutinizer05.21:02
DocScrutinizer05Upon startup, patch attempts to determine the type of the diff listing, unless overruled by a -c (--context), -e (--ed), -n (--normal), or -u  (--unified)       option.   Context diffs (old-style, new-style, and unified) and normal diffs are applied by the patch program itself, while ed diffs are simply fed to the       ed(1) editor via a pipe.21:02
SpacedOutkerio: Blast it, I normally use static ip addresses on my home system, the fix works fine there, but putting 'down' in there is failing to connect when using dhcp, now I don't know how to both fix my problem, that darn deconfig and support dhcp.21:05
DocScrutinizer05afaik the only difference between sed and ed is: sed takes data to edit from stdin, while ed opens a file to edit and takes commands from stdin21:05
SpacedOutThis situation needs an ifconfig that will clear the ip address without implicitly bringing it up, leave it up or down, whichever way it found it.21:09
*** test__ has quit IRC21:13
*** Free-MG has joined #maemo-ssu21:13
zeqSpacedOut: unfortunately iproute2 isn't installed by default21:19
SpacedOutI guess that means parse ifconfig output to see if it is down, and if it is then down it after clearing the ip address.21:28
SpacedOutBut it is a race condition, if this sees it up, the other script puts it down, this will still up it setting the ip address to 0.0.0.0 and since it was up when it checked it will leave it up.  loose loose21:33
*** mase_76 has quit IRC21:47
DocScrutinizer05well, then implement a 'mutex': killall -SIGSTOP 'concurrent-script'; test state; (killall -9 'concurrent-script'?); ifconfig-change-state; (killall -SIGCONT (-SIGUSR1) 'concurrent-script')22:04
*** nox- has joined #maemo-ssu22:05
DocScrutinizer05not that I suggest this is the best and only way to fix your problem, I don't even completely understand it22:13
SpacedOutAnd if the other script already execed `ifconfig wlan0 down` but hasn't put it down before the check?  I'm thinking I might write ifzeroipv4 to check the current interface state, clear the ip address if set, and leave the flags up/down alone.22:13
SpacedOutThe problem is when the access point goes out of range it scans for a suitable network, finds none, icd2 initiates both zz_static_ip_if_down (which uses ifconfig to down the interface) and 50_ipv4_network_setup which if run second will bring the interface back up, which is left up and drains the battery.22:16
DocScrutinizer05the design seems fundamentally flawed22:17
DocScrutinizer05those two scripts mustn't run concurrently22:18
DocScrutinizer05if anything they shall get executed one after the other22:19
SpacedOutYes, I can think of various hacks such as wlancond setting up a timer and making sure the interface is down after a bit.22:19
DocScrutinizer05or even merged into one22:19
SpacedOutAs both scripts are in packages without source I don't see that happening.22:21
DocScrutinizer05the obvious method is to check for a process named "script1" and wait for it quitting, as first action in "script2"22:21
DocScrutinizer05script2 == zz_static_ip_if_down, script1 == 50_ipv4_network_setup22:23
SpacedOutI'm really leaning to a custom ifconfig that only clears the ip address and leaves the interface up or down, however it found it.22:24
SpacedOutkerio: adding 'down' prevents connections when using dhcp, I was only using static ip addresses for testing so I didn't find that until I did further testing, sorry about that.22:30
*** taziff has quit IRC22:47
*** kgu has joined #maemo-ssu23:24
*** NIN101 has quit IRC23:42

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!