/srv/irclogs.ubuntu.com/2008/06/07/#ubuntu-mobile.txt

=== asac_ is now known as asac
=== Moot2 is now known as MootBot
=== emgent_ is now known as emgent
kidfoofoo has an Asus EeePC, can foo use ubuntu mobile on it ?08:50
kidfoosorry08:51
ograpersia, i think i got the PATH issue12:22
persialool: What was it?12:22
ograits tricky to solve though12:23
persiaogra^^ 12:23
persia(oops)12:23
persiaWhat's the cause?12:23
ograthere is no session dbus running in your env 12:23
ograwe need something like the script in this patch http://launchpadlibrarian.net/7170382/dbus_1.0.2-1ubuntu34.patch12:23
ogra++# GNOME gets it right: the session bus has to be started by the session12:23
ogra++# manager. Otherwise programs started by dbus do not get environment variables12:23
persiaErm.  That's kinda tricky.12:24
loologra: dbus-launch should be included by Xsession.d again12:24
ograi need to verify that first though, but i noticed you have no DBUS_SESSION_BUS_ADDRESS at all12:24
ogralool, right, but that needs some wrapping, remember se use ck-launch-session 12:25
loologra: It's egg and chicken unfortunately12:25
ograyeah12:25
loologra: ck-launch-session probably needs session bus as well12:25
ograyeah, dbus-launch should execute it12:26
loolThe underlying root cause is programs relying on env vars which are not guaranteed to be present12:26
loolInstead, they should use some API e.g. dbus to retrieve the info they want12:26
loolWhat GNOME does for e.g. keyring is that the keyring env vars are seeded into gnome-session via the g-k API12:26
persiaYes, but that's hard! :)12:26
ograwell, many of them do, thats why installing ntp fails12:26
loolThat's awful IMO, but it's needed if you want compatibility with programs which want keyring env vars or e.g. SSH_AGENT12:27
ograthe installer seems to rely on getting PATH from dbus12:27
loolWhat is the failing use case again?12:27
ograntp12:27
loolYou install ntp, that calls synaptic?12:27
loolWhich programs needs which env var?12:27
ograset time-admin to automatic and it cant frind the deb installer12:28
loolWe could make sure it's started as part of the STARTUP12:28
ogranot sure, is it synaptic ? 12:28
persialool: Start time-admin.  Authenticate.  Try to switch to NTP.  NTP isn't there, so it wants to install.  gst-package can't find synaptic because polkit-grant-helper doesn't reset the path.12:28
loolWho triggers the installatoin?12:28
ograyes, STARTUP would be the quick hack12:28
persiatime-admin calls gst-package for the installation.12:28
eichihello12:29
loolIs time-admin running as root?12:29
persiaNo, time-admin can't run as root.12:29
persiatime-admin gets root powers through policykit12:29
eichiwhen the n800 will be supportet by u-mobile?12:29
ogralool, the prob with STARTUP will be that we dont have a system bus yet12:29
loolso time-admin talks to PK, does time-admin see the dbus session bus?12:29
ograthe upstart script executes everything before rc2.d has run12:30
loologra: Uh *system*?12:30
persiaeichi: There are two issues.  One is that some of the HW is ill understood.  No idea for that.  The other is that it is ARM architecture.  This has been discussed, but no timeline established.12:30
loolI thought that was long solved12:30
ogralool, the session bus needs to connect to it12:30
eichiokay, thanks12:30
loologra: So at some point, Tollef added a delay to ensure startx is only called when sys bus is ready IIRC12:30
ogranot sure what exactly happens if there is no systembus it can use12:31
persialool: It's not solved.  We'd have to change /etc/event.d/session to start on started rc2 to make sure the system dbus was there.12:31
persialool: The delay is gone.12:31
loolOkayyy12:31
ograthat will massively cost bootime12:31
loolSo we need a dependency, shuffling init scripts around, or a delay again12:31
ogra:(12:31
persiaIt used to be that ume-config-common started from rc2.d, and that worked, because it has a high value.12:31
persiaNow, we use /etc/event.d/session, and we don't wait for rc2 to complete.12:31
ograidealy we'd run dbus from upstart 12:32
ograi wonder if scott added the code to intrepid already so we could steal from there12:32
loolume-config-$platform ships this file12:32
persiaogra: There's a bunch else we'd want to move to upstart if we're going to rely on upstart events.  I'd be a lot more comfortable with start on started rc2 for now.12:32
loolHow does one express a dependency in upstart?12:33
ograpersia, any measures how much that time eats ? 12:33
loolUpstart 0.5: Relationships uhoh12:33
persialool: You depend on an event.  "start on started rc2" expresses that the event should be processed once the "rc2" event has started completely.12:34
persiaogra: I haven't run bootchart on it, but I'd say 15 seconds or so.12:34
ograit seems a) that scott is actively working on upstart dbis integration but far from being done and b) that the old Xsession script is still in the dbus source12:34
ographew12:34
ogra15secs12:34
loolpersia: I have start on runlevel 212:35
persialool: Some relationships work in upstart 0.3.912:35
ogralool, right you need "start on started"12:35
persialool: Right.  So, upstart is the system init daemon: there is no "runlevel 2".12:35
ograthat will delay it12:35
loolWe could have start on started dbus12:35
ograthen upstart would need to handle dbus first12:36
persiaWe pretend there is a runlevel 2 by having an rc2 event that maps to sysV style runlevel 2, called "rc2".12:36
persiaWe can choose to either start on the trigger that starts this event, or start when this event is completed.  I favour the latter, but it costs us time.12:36
persiaFor comparison, my Zaurus takes about 5 minutes to boot, but I almost never actually shut down.12:37
loolIf session dbus needs system dbus, then I think starting after system dbus is not later than the earliest we can start12:38
persialool: Right, but we can't determine when that happens with that level of granularity with the current model.12:38
ograother way round :)12:38
ograerr12:38
ograsorry12:38
ogramisread12:38
persiaWe can either migrate /etc/event.d/session back into /etc/rc2.d/ or we can start on started rc212:38
ograand we need the Xsession script back12:39
persiaIf we migrate it back in, we're depending on the other calls in rc2.d to get the timing right.  If we use upstart, we wait for all the calls in rc2.12:39
loolpersia: So you're saying we can't say "started dbus" with upstart 0.3?12:39
persialool: We could say it, except that there's no dbus event defined by default, so it would never start.12:40
ograi dont think upstart knows about dbus without handlig it itself12:40
loolOh ok; I thought it had emulation12:40
ograthats the work scott is just doing in intrepid12:40
persiaWe'd have to migrate dbus to upstart.  As I understand it, not enough of the precursors are done for this to be the case even in intrepid.12:40
loologra: right, that's what I was fearing initially12:40
loologra: Well we could invoke-rc.d dbus start before startx12:40
ograyeah12:40
lool-ogra12:40
persiaThe emulation is one-way.  upstart emulates sysV init, but our sysV init scripts aren't emulating upstart12:40
ograthats what i thought as well this moment :)12:41
persiaWhy do we want to invoke-rc.d dbus in /etc/event.d/session?12:41
ograno12:41
ograin the ume-config-common script12:41
persiaWon't that cause resource contention with the /etc/rc.2/S??dbus ?12:42
persiaogra: Right.  Same result though.12:42
loolIt looks like it would be a bit racy, but would probably work12:42
ograright, we need to mv it from S to K12:42
* persia advocates start on started rc2 more forcefully12:42
ogra15 secs ? 12:42
loolpersia: If there's enough delay, it would simply notice that it's already started12:42
persiaSure.  How often do these things get shut down anyway?12:43
persiaWe don't provide any interface to shut down: it has to be done manually from the command line.12:43
loolI'm not at shutdown yet12:43
persiaOK, boot time only matters if one shuts down, otherwise it's a one-time event.12:44
loolBut we're going to be benched on boot time, not on shutdown time12:44
loolAnd the measure is "UI fully functional"12:44
persiaPaying 15 seconds for a one-time event to do it in a way that is correct, and allows us to just s/rc2/dbus/ to keep it correct for hardy isn't so bad.12:45
persialool: My argument is that boot time is meaningless.  Users will only boot when they get the device, when we give them a new kernel, when they upgrade to a new release, or when they install a new battery.  Everything else is hibernate.12:45
ograargh, meh12:49
ograwe cant do it from ume-gui-start12:49
ograthat would be executed by dbus-launch from the Xsession script 12:49
persiaNo, it has to be from the init daemon.12:49
ograi dont think dbuslaunch can run the system bus12:49
ograright12:50
loolWhat were the arguments against the invoke-rc.d dbus start in the event session start script?12:50
ograi dont think upstart can interpret that12:51
persiaRace condition with /etc/rc2.d/S??dbus12:51
persiaogra: in the event script, not as an upstart directive.12:51
ograwell, thats eaily solved by mv /etc/rc2.d/S??dbus /etc/rc2.d/K??dbus12:51
loolOr by adding a lock file12:51
loolAnyway, I'm fine to move this to "rc2" started if it doesn't degrade boot time12:52
loolWe're at 32 seconds ATM, quite close to the limit12:53
ograanother option would be to move half the world to rcS.d12:53
persiaogra: That's a really ugly hack though12:54
loolOr move dbus to upstart :)12:54
ogralool, which isnt ready yet :)12:54
persiaDoesn't dbus have dependencies that need to also move to upstart?  That's a lot of work for a short timeframe.12:54
persiaDefinitely an intrepid target12:54
loolWe could also busywait in the session event start script until runlevel is high enough12:54
ograask Keybuk, i may be wrong, but the changelogs in intrepid look like he's in the middle of it12:54
ograbut not done ...12:55
* persia wants lool's hardware. Boot time is 1min by default with the SR812:55
* ogra wants HW at all :P12:57
ograbut i'll get my atom cmpc next week ...12:57
loolpersia: You don't really want a menlow/crownbeach12:58
persialool: Right, I just want the chipsets, but in a sexy form-factor :)  One more week, if I can get in line early enough.12:58
persiaRight.  It's impossible to install bootchart.  Time for a new image...13:03
ograhmm13:06
loolpersia: if you have the occasion, test an USB install image created with a recent MIC13:08
loolI'd like to confirm /boot is properly mounted and usable13:08
ograjust adding the Xsession script seems to suffice13:08
persiaogra: I just tested with start on started rc2 anyway, rather than building new images, and policykit still doesn't change the path.13:08
loolpersia: Also, that's probably what blocks you from installing bootchart I'd guess13:08
ograi got a session bus variable now13:08
persiaIt's not just about dbus not being available.  I think we need to also start a session dbus somewhere.13:08
loolpersia: dbus-launch should be appended in Xsession.d; it might not be if Ubuntu drops that13:09
loolAlso, dbus session busses are autospawned13:09
persialool: The issue with installing bootchart is that initrd.img isn't in /boot, but in /13:10
ograi just copied the Xsession script from the dbus source to 75dbus_dbus-launch13:10
persialool: What autospawns it?13:10
ograseems to be enough to get a proper session bus13:10
ograpersia, the upstart script if it is in Xsession.d13:10
persiaogra: Then the lack of a session bus, while possibly an issue, isn't the reason policykit doesn't work.13:10
ograupstart respawns startx13:10
ograstartx executed Xsession.d every time13:11
ograpersia, yes, i just noticed, the PATH is still wrong :/13:11
persia90-console-kit?13:11
ograas i said in the beginning i didnt verify yet13:11
persiaheh :)13:11
ograso my next hunt goes one level deeper .... 13:12
ogralets look what pam and su do 13:12
ograespecially pam_env.so13:12
ograif nothing helps we can just source /etc/environment at the top of the ume gui script but thats extremely ugly and does hide the actual cause13:13
persiaogra: Let's reserve that as a hammer if other things don't work.13:13
ograyeah, its ok as emergency fallback13:14
ograand works fine, just tested that13:14
ograthe pam setup looks identical to my laptop ...13:14
ogra:(13:15
persiaI suspect it's something gdm-ish, but investigation of gdm didn't get me anywhere.13:15
ograit should be set by su13:16
ograor rather by pam if su is executed13:16
persiaExcept we're not using su, so it should be set by one of the polkit-grant helpers13:16
ograsure we use su13:16
persia(which annoyingly hardcode it, rather than using ENV_SUPATH like they ought)13:16
ograin the event.d/session script13:17
ograexec su -l ume -c "/usr/bin/startx -- -dpi 96 -br"13:17
ograthats what mine has13:17
persiaogra: Right, but we su to a uid != 0, so pam gives us ENV_PATH rather than ENV_SUPATH13:17
ograand /etc/pam.d/su has "session       required   pam_env.so readenv=1"13:18
ograwhich tells pam_env to read the default file ... which is /etc/environment13:18
ograafterwards it does "session       required   pam_env.so readenv=1 envfile=/etc/default/locale"13:18
ograwhich works properly here in my german setup13:19
persiaHrm.  That ought work :/13:19
ograhmm, no, wait13:19
ogra/etc/default/locale is used in several initscripts as well13:20
* ogra inspects13:20
persia/etc/default/locale ought be used all over the place.13:20
ograAHA !!!13:21
ogragdm sources /etc/environment in its initscrip213:21
ogra*script13:21
persiaOho!  In that case hacking it into /etc/event.d/session isn't such a big club after all...13:22
* persia tests13:22
ograyeah13:22
ograwell, put it in the ume script13:22
ograi just did that before, works perfect13:22
persiaYou mean /etc/X11/Xsession.d/25-ubuntu-config-common_startup?13:23
persiaOr ume-gui-start?13:23
ograume-gui-start13:23
ograright at the top13:23
ograhmm, k, next prob, after instlling ntp time-admin switches back to manual in the gui13:24
persiaRight.  Testing again, and will commit.13:24
ograbah, it doesnt set a default server either13:25
persiadefault server?13:25
ograon next start time-admin *has* auto selected but has no default server13:25
ograwell, ntp needs to pull from anywhere13:25
persiaRight.  That's a long outstanding bug in g-s-t13:25
ograwell, i'D blame ntp rather13:26
persiaNo, it's g-s-t.13:26
ograsudo ntpdate doesnt work either13:26
ograit should use a default13:26
persiaNTP has servers by default, unless you run time-admin, and don't set servers.  time-admin clears the server list.13:26
ograthen the time-admin case ismoot13:27
ogragah13:27
ograevil13:27
ograwe also really should set polkit to accept time-admin chages by default without authentication13:28
ograseems silly that you have to give your pw every time13:28
persiaMakes the standard MIC password handy.13:28
ogra(especially if you have to type on the onscreen kbd)13:28
ograwell, polkit has a setting to just allow it per app13:29
persiaBah.  I can't find the time-admin/ntp bug right now.  I was looking at it a couple days ago.13:29
ograits not that we have massively many users on such systems :)13:29
persiaNo, but the use case is such that it's easy for someone else to hold it for a few minutes.13:30
persiaI regularly pass my Zaurus to someone to show them something, or let them type something.13:30
ograand ? 13:30
ograhe can set your time 13:30
persiaMight be different if everyone had one, but...13:30
persiaAh, yes.  Per-app.13:30
ograright13:30
ograand synaptic will still ask13:30
persia(and on the Zaurus, it never asks for those things, just runs them as root if required, anyway)13:30
ograits just that you dont have to be asked every time if you want to adjust to a new TZ or so13:31
persiasynaptic doesn't ask.  gst-package asks.13:31
ograg-s-t is a pile of crap anyway, i know seb makes some attempt to get rid of them in intrepid13:31
ogra(adding a default group to users-admin to be shown in the gui makes your eyes bleed ... its really evil, hardcoding all options teh user sees there)13:32
persiaogra: gst-package caches the password.  You have to enter it every time to set the time, but only once in a while to install/update/change packages.13:39
persiaMaybe this isn't the ideal model?13:39
ograthats polkit13:40
ogragksu is what caches it, polkit doesnt deliberately13:40
ograor rather sudo caches it, gksu just inherits13:41
persiaAh, so gst-package is calling gksu, which does the caching.13:41
persiaRight.  That makes sense.13:41
persiaStill non-ideal, but...13:41
ograpolkit is crap isf you ask me13:41
ograbut i'm not upstream13:42
persiaWhy do we use *kit again?13:42
ograand they decided to go with it13:42
ograthe apps start to require it13:42
persiaI'm really not sure GNOME is very UNIXy, but that's a different issue.13:42
ogramore and more upstream gnome apps switch to that model13:42
persiaAnyway, E isn't much these days, so...13:42
ograyeah13:42
ograits surely still not properly multiuser13:42
persiaNot multiuser.13:43
ograyou would runs away screaming if you would see all the hacks we did for early ltsp5 implementations to even make i work :)13:43
ograits gotten better over time13:43
ograbut is still not there13:43
persiaEach app has lots of features, instead of there being lots of features that can be exposed in apps (this is slowly improving, but in an odd way)13:43
ograyeah13:44
persiaI did look at early ltsp stuff.  I haven't looked at it since, perhaps because of that :)13:44
ograltsp5 != ltsp :)13:44
persiaThere are lots of different communication buses, rather than following the "everything is a file" rule.13:44
persiaAnyway, enough GNOME bashing: I've been a GNOME user for years, and I'll likely stay that way for a while more...13:45
ograwell, i for one would be happy if it could work on a per session base and if every app had a proper distinction between front and backend13:45
persiaogra: Where's your initrd.img?13:45
ogra?13:45
ograwhich one now ? 13:45
persiaIn your ume install?13:45
persiaMine is in /, which means NTP can't install.  I wonder if I'm special.13:46
ograin /boot13:46
ograthe one in /should only be a link13:46
ograupdate-initramfs expects it in boot13:46
ograand i guess u-a is run from ntp postinst13:47
persiaYeah.  I'll check a different image: this one mignt not be right.13:47
ograerr13:47
ograu-i13:47
ogra:)13:47
persiaYep :)13:47
ograah, wonderful, alarmclock has a quit button now13:54
ograbut lost the settings entry so i cant switch back to analog :/13:54
ograhmm, and the notification window doesnt go away13:55
ograjust sits in the middle13:55
persiaYeah, well.  The notification goes away if you start the app.13:57
persias/app/settings window/13:57
ograwell, there is no settings wi anymore14:00
ograit only goes away if i start aother app14:00
ogra*another14:00
ogra-umethe same happens if i start pidgin while already having it open14:01
ogra-umei guess sapwood doesnt get the right info here14:02
ogra-umewhere the heck is that thing documented ... hrm14:04
ogra-umehmm, no ..14:05
ogra-umei thought sapwood was responsible for apps to only be launched once 14:06
ogrageez14:09
ograclosing pidgin crashed my desktop14:09
persiaHow?14:09
ogragah, its reproducable14:10
ograonly happens if i'm looged in to any IRC channel though, not if you just open/close the app14:10
persiaCan you get a backtrace?14:12
ograstrace first ... http://people.ubuntu.com/~ogra/pidgin.log14:17
ograwrite(2, "pidgin: Fatal IO error 104 (Conn"..., 72) = -1 EIO (Input/output error) looks suspicious14:17
persiaThat doesn't look so bad for closing an app.  There's an error, but it's relatively minor, as the app is shutting down anyway.14:18
ograeek14:19
ograthere is no bonobo server running at all ? 14:19
ograthat wont work14:19
persiaIt's a low-resource machine.  See my previous comments about GNOME :)14:20
ograyeah, but pidgin uses boobo for internal communication iirc14:20
persiaRight.  That might explain the previous existence of moblin chat.14:21
persiaOn the other hand, I suspect a backtrace will show you that the Hildon libraries aren't very robust.14:21
ograhmm, even with bonobo in place it crashes14:22
persiaThe whole desktop, or just pidgin14:22
persia?14:22
ograthe whole desktop14:24
ograX restarts14:24
persiaRight.  Blame the hildon libraries.  They ought trap the segfault, and not die.14:24
ograbut we shouldnt have a segfault first place14:25
persiaThe issue is that when hildon-desktop crashes, it takes down X, because of startx and the session scripts.14:25
ograi surely dont get one with pidgin in a normal desktop14:25
persiaNo, but lots of apps segfault.  Dropping back to the regular desktop is the least painful way to handle it.  A segfault oughtn't kill X.14:26
ograno, works just fine on my laptop14:26
ograbonobo is installed but not runing14:27
ogra(in ume)14:28
ograhmm, getting a backtrace is pretty hard without being able to get pidgin-dbg 15:03
ogra(it uninstalls half the desktop)15:03
ograand indeed it tears down gdb with it if i start it from xterm15:03
ograintrestingly it doesnt respawn with gdb running15:04
ograuuuh, i'm blind15:12
ogra /usr/share/autostart/xhost.desktop ??15:12
ograhmm. seems thats needed but appaears quite odd not to properly use xauth for that15:15
loolSo hmm15:16
loolI have a small issue15:16
loologra: Can I discuss keyring stuff with you?15:16
ograsure, if i can help15:18
loolBasically, ubuntu-keyring ships a keyring file at a special place and then calls apt-key update in postinst15:18
loolapt-key only checks this special place15:18
loolI am creating a keyring for UME15:18
loolThe package is named differently and names the keyring differently15:19
loolBut the keyring file isn't picked up15:19
loolOption 1), apt-key add the new keyring manually15:19
loolopens: do we want to apt-key remove <key id> on removal? not sure15:19
loolIt's also weird because you don't get a real "main archive keyring"15:20
looloption 2), use the same package name and the same file name, call apt-key update15:20
ograjust call apt-key add in the postinst ? 15:20
loolcons: prevents installing the main keyring, generally mixes package names for the different things15:20
loolpluses: works fast and easily15:20
loologra: So option 1?15:20
loolThat's also my preferred for now15:21
loolBut I wonder whether that's sensible15:21
ograyeah, thats what i'd go with15:21
loolI also tried looking into other options, such as adding the keyring to the list of places apt looks at, but I couldn't find any config item for it15:21
ograwell, i'D do it for now and ask mvo then, nobody knows more about apt and keys i guess15:22
loolOk, that was my plan, will have to wait until monday then15:23
ograbut the apt-key add method seems cean if we cant get it into the main keyring15:24
loologra: Also, do you have any idea why I'd get W: Failed to fetch http://archive.mobile.ubuntu.com/dists/um-ppa-hardy/Release  Unable to find expected entry  main/binary-lpia/Packages in Meta-index file (malformed Release file?)15:25
loolHmm perhaps it strictly needs Packages15:26
loolOh, I copied the list of files from the ppa example, but there's no Package there15:26
loologra: nm, fixed15:27
loolCool, everything works15:27
loolNow copying packages15:27
ograthe keynames are hardcode in the /usr/bin/apt-key script btw15:29
* ogra beats pidgin over the head15:30
loologra: Yeah, hardcoding is *baaad*15:30
ograwell, in case of gpg i can understad that :)15:31
ograwhat i dont understand is why pidgin crashes my ume desktop :/15:31
ograi guess i need to build a dbg packae myself, sigh15:31
loologra: apport should work BTW15:31
ograoh, right15:32
loologra: I see a pidgin-dbg15:32
ograyes, with wrong deps 15:32
loolNow I only need to find the latest version of the report script15:32
ograi would need a pidgin-maemo-dbg i guess15:33
ograhmm, apport doesnt start15:41
ograhmm, cant work, the kernel doesnt know about crashdump-size it seems15:43
* ogra goes to do some lawn mowing ... to probably have an idea15:51
loologra: /etc/init.d/apport start should DTRT16:02
loolunless our kernel dropped this support16:02
ogralooks like it did16:22
ograno crash reports in /var/crash16:22
loologra: Try with -1816:24
loologra: The only one which doesn't have this support can only be -17 from the ppa16:24
lool-19 might miss it as well though16:24
loolOk, so I think I finished the archive16:24
loolWow MIC still defaults to ... gutsy17:52
emgentheya21:24
=== matt_c_ is now known as matt_c

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