libera/#maemo-leste/ Tuesday, 2022-11-15

freemangordonuvos__: I think the same charge-mode bug appeared. LED is green, but battery on the screen has just one thin red line and nothing happens16:48
freemangordonit seems this happens only after batter was so empty that mce shut it down16:50
freemangordonany hint how to debug?16:50
freemangordonif I disconnect the charger, it shuts down16:52
freemangordonis it possible that it tries to open the battery sys node only once?16:53
freemangordonafter reboot it displayed half battery16:53
freemangordonhmm, could be related to charger driver17:10
freemangordonno, this is different issue (ke-recv unbinding musb-hdrc causing it to send 0mA allowed current)17:27
freemangordonWizzup: any idea what's going on here https://pastebin.com/982WS9T9 ?17:36
freemangordonthis happens on boot with USB cable connected to PC17:36
Wizzupfreemangordon: what about it?17:56
freemangordonit remains disconnected17:57
freemangordonso if you boot with cable attached neither charging nor usb0 work17:58
freemangordonuntil you detach/attach the cable17:58
freemangordonwill provide le-recv log in a minute17:58
freemangordon*ke-recv17:59
freemangordonWizzup: https://pastebin.com/S7Tuxwy518:01
Wizzupis kernel in the right state?18:02
freemangordonwhat do you mean?18:02
freemangordonwhat to check?18:02
Wizzupwell, ke-recv just follows kernel/udev state18:02
freemangordonsure, but how is that state set?18:02
Wizzupby kernel/drivers I think?18:03
freemangordonwhere?18:03
WizzupI don't know18:03
freemangordonwhat to verify18:03
WizzupI would check some /sys18:03
freemangordonah18:03
Wizzupor maybe udevadm can tell you18:03
freemangordonyeah, /sys it is, but which one?18:03
Wizzupor whatever the things is to query uevent files of specific /sys18:03
Wizzuphmm, probably the usb and battery, let me check18:03
freemangordonok, but which one?18:03
freemangordonusb power supply: POWER_SUPPLY_STATUS=Not charging18:04
Wizzuphttps://github.com/maemo-leste/ke-recv/blob/master/src/udev-helper.c#L11818:04
freemangordonwhat does it expect from battery?18:04
freemangordonand actually we *can* read the mode from extcon ;)18:05
Wizzuphttps://github.com/maemo-leste/ke-recv/blob/master/src/udev-helper.c#L17018:05
Wizzupwell at the time of writing I don't think the extcon was working18:05
Wizzupthis is mostly used for triggers18:05
Wizzuphttps://github.com/maemo-leste/ke-recv/blob/master/src/udev-helper.c#L20018:05
freemangordonhmm, where is that 'type' located, lemme try to find it18:06
freemangordonah18:06
freemangordonin usb: POWER_SUPPLY_TYPE=USB18:06
freemangordonWizzup: also, what about "USB_SDP"?18:07
Wizzupmaybe we need to add it?18:07
freemangordonshall I start ke-recv from console to see what will it say?18:08
Wizzuphttps://github.com/maemo-leste/ke-recv/blob/master/src/udev-helper.h#L2618:08
Wizzupsure18:08
freemangordonProbing for drivers for Nokia N90018:09
freemangordonCannot find supply for Nokia N90018:09
freemangordonProbing for drivers for LIME218:09
freemangordonFound supply18:09
freemangordonFound otg18:09
freemangordonthat's all18:09
freemangordonWizzup: but, even with wall charger connected (DCP) it is the same18:09
freemangordonotg mode is b_idle18:11
freemangordonin /sys/module/musb_hdrc/drivers/platform:musb-hdrc/musb-hdrc.2.auto18:11
freemangordonWizzup: umm...18:14
freemangordonhttps://github.com/maemo-leste/ke-recv/blob/master/src/udev-helper.c#L13118:14
freemangordonwhy is that battery?18:14
freemangordonshouldn't that be "usb"?18:14
freemangordonalso, on init update_info() is not called18:16
freemangordonis that by design?18:16
Wizzupdinner at, back in a bit18:17
freemangordonok18:18
Wizzupfreemangordon: I think it's probably good to call it on init18:55
Wizzupfreemangordon: maybe because of your new kernel patch it mistakes it for a lime18:55
Wizzupthat's what it looks like to me18:55
freemangordonbecause of extcon?19:11
freemangordonok, there is /sys/class/extcon/extcon019:15
freemangordonBTW, why do we care which device is that?19:16
freemangordonI think if we have extcon, we should not care about otg at all19:16
freemangordonbut just enumerate extconN and try to find USB_XXX cables19:17
freemangordonunless I am missing something19:17
freemangordonwhat I didn't get though, is shall I set USB cable state to on if it is DCP port19:19
WizzupYou can try to make it generic if you want, I found that a big challenge19:19
Wizzupon some devices, certain things didn't trigger in udev19:19
freemangordonsure, just tell me what we need to detect19:20
freemangordonI have allwinner here as well19:20
freemangordonso I can test there too19:20
freemangordonit is also good testbed because it can charge from either USB or dedicated port19:21
freemangordonjust tell me what needs to be detected19:21
Wizzupthe tablet should be similar to lime2 I think19:21
freemangordonmhm19:21
Wizzupalthough I suppose the lime has no battery typiclaly19:21
Wizzupwhile you may have one19:22
freemangordonyes19:22
Wizzupanyway I think my idea was to just add some things to this list until we found a more generic way19:22
Wizzupgiven that it now finds your d4 to be a lime2, I think it's related to the kernel changes19:22
freemangordonok, but what do you need detected? USB cable?19:22
freemangordonand not host?19:22
WizzupI think so, yes19:22
WizzupI don't know what DCP is to be honest19:22
freemangordonDedicated Charger Port19:23
freemangordonwall charger19:23
freemangordonSDP is Standard Downstream Port or USB 2.0 port, IIUC19:24
freemangordonCharging Downstream Port or CDP is some USB2.0 that is able to provide up to 900mA19:24
freemangordonbut I don;t know how is that detected19:24
freemangordonseems some game with D+/D- voltages is required19:26
WizzupI think that for those we don't want to show the dialog19:26
Wizzupor load a gadget, really, unless we need to have one loaded19:27
Wizzupof course we could have it show some icon for dedicated wall charger19:27
freemangordonwe need to have gadget loaded for USB/SDP only19:27
tmlindfreemangordon: fyi, because of commit 1ec92e974277 ("tty: n_gsm: fix decoupled mux resource"), there's a double free now in maemo-5.18.y kernel tree.. kfree in gsm_serdev_unregister_device() should be removed19:27
tmlindlast kref release already takes care of it19:28
tmlindotherwise unloading serdev-ngsm will cause random oopses19:28
freemangordonumm, why do you tell that to me?19:28
freemangordonyou want me to make a patch?19:28
freemangordonI mean - I don;t object19:29
tmlindrebasing stuff on v6.1-rc tree19:29
freemangordonjust don;t understand what am I required to do :)19:29
tmlindand noticed this and you have patches applied on top in maemo-5.18.y :)19:29
freemangordonok19:29
freemangordontmlind: any idea why is sre so quiet?19:30
tmlindyeah a patch to drop that kfree would be good to apply19:30
tmlindi think sre is overly busy with work19:30
freemangordonah19:30
freemangordonalso, did you understand what greg wanted me to do i his comment re [PATCH] usb: phy: add dedicated notifier for charger events?19:31
freemangordonsometimes reviews are so fuzzy...19:31
freemangordonwhat is "notifier type"?19:32
freemangordonsorry for pestering you, but I don't know whom else to ask19:32
freemangordonthis https://www.spinics.net/lists/linux-usb/msg233507.html19:33
freemangordonWizzup: so, the plan is: if there is extcon, use it, otherwise fallback to device-specific matching, ok?19:35
freemangordonI think we will only need 'hack' for n90019:36
freemangordonWizzup: also, what that note is supposed to mean? https://github.com/maemo-leste/ke-recv/blob/master/src/udev-helper.c#L9119:36
Wizzupsounds like the mode doesn't trigger udev19:39
Wizzupkernel needs to do things to trigger19:39
Wizzupnot all drivers do this19:39
tmlindfreemangordon: maybe he just wants the event type there for the notifier? see include/linux/device/bus.h for BUS_NOTIFY_ADD_DEVICE and other events for example19:40
tmlindso a single notifier but with multiple event types19:40
freemangordonand data parameter type to depend on event type? yeah, that would work19:41
freemangordonbut it would have been good if he stated that in a clear form :(19:41
tmlindyeah i think that's what he means :)19:42
freemangordontoldya it's fuzzy :)19:42
freemangordonI'll wait some time for a follow-up and will send v2 if there is none19:43
tmlindyeah ok19:43
tmlindfreemangordon: rebased your n_gsm patches to v6.1-rc5 fyi, i'll fold in your audio timeout change, ok?20:00
tmlindlooks like at least one fix is needed to more patches from daniel now merged, need to test a bit more20:00
tmlindhmm still seeing audio timeout errors for 4806a000.serial:modem:audio-codec@2..20:02
freemangordontimeout patch is needed for sure20:03
tmlindmaybe i just need to reboot as i did not scp over the updated audio module :)20:03
freemangordon:)20:04
freemangordonWizzup: https://pastebin.com/fG4L4u1R20:05
freemangordonunplug/plug wall charger20:05
freemangordonlooks ok to me20:05
tmlindfreemangordon: i think the real fix for the n_gsm initial timeouts would be to add deferred probe support to ohci-platform so phy-mapphone-mdm6600 won't init the phy until it's functional.. and then serdev-ngsm could wait for the phy too.. no luck trying to use serdev_device_wait_for_cts() to check when it might work20:06
freemangordonhmm, yeah20:08
Wizzupuvos__: I have bt working on my hyundai i3021:37
Wizzupaudio sink and events work21:37
Wizzupi got PLAY_CD21:37
Wizzupmpv plays21:37
buZzw00t21:51
buZz:) finally some internet again, my landlord cancelled the isp and 'forgot' to tell me21:51
Wizzupcalls also worked21:52
WizzupI mean21:52
Wizzupno audio21:52
Wizzupbut ofono+bluez did the right thing21:52
Wizzupthe car went into calling mode21:52
Wizzupfreemangordon: ^^21:52
buZzhahah cool21:52
buZzusing blueman? or straight up bluetoothctl21:52
Wizzupcombination21:53
Wizzupblueman has weird settings21:53
Wizzupand also I had to set the class of the device to "phone"21:53
Wizzupotherwise the car would not see it21:54
Wizzupso I dumped bluetooth info of my gf's android phone21:54
buZzah, are those binary blobs?21:54
Wizzupno, just reading it from my d421:54
Wizzupsudo hciconfig hci0 class 005a020c21:55
Wizzupblueman resets it by making it non discoverable and some other stuff21:55
Wizzupanyway I think this can be configured..21:55
Wizzupmost of the time went into figuring out that the car won't play music over bt when a usb stick is plugged in21:55
Wizzupstill crackles though.21:56
buZzeven if you disable wifi?21:56
freemangordonnice21:56
Wizzupwith ifconfig? didn't try21:56
Wizzupbut I was not connected to any wifi21:56
Wizzupfreemangordon: my h-d is now messed up (smaller), anything I can do to debug/dump info?22:13
WizzupI think I have debug on in x, but I think it's a h-d thing22:13
Wizzupanother interesting side effect is that it only redraws the screen on some action, like, when I touch it again22:15
Wizzupagain, this is an old bug even fremantle has22:15
WizzupI can try to rotate my phone22:16
Wizzuprotating rotates hildon-home but not hildon-desktop or xrandr it seems22:16
buZzWizzup: or with that wifidisable statusmenu plugin22:19
buZzbut ifconfig down should be fine yeah22:19
buZzi think the crackles are just the wifi trying to scan for stuff, maybe i could scan the wifi externally a bit22:20
buZzs/scan/sniff/22:20
freemangordonWizzup: yes, I know that bug, but it is so rare that I don;t think we'll be able to fix it22:23
WizzupI have it no22:23
Wizzupnow22:23
freemangordonyes, but I have no diea where to look in22:25
freemangordon*idea22:25
freemangordonmaybe try to enable h-d debug22:26
freemangordonSIGUSR1 or SIGUSR222:26
* freemangordon checks22:26
freemangordonWizzup: send SIGUSR1 to hildon-dekstop22:27
freemangordonhttps://github.com/maemo-leste/hildon-desktop/blob/master/src/main.c#L38022:28
Wizzupok, and how do I capture stederr?22:28
Wizzupstderr*22:28
Wizzupfreemangordon: so the not-launcher pid, yeah?22:29
Wizzupto the*22:29
Wizzupuser      3736  0.0  0.0   1636   844 ?        Ss   20:29   0:00 /usr/bin/hildon-desktop22:29
freemangordonyeah22:29
Wizzupuser      3739  0.7  3.9  98472 40008 ?        Ssl  20:29   0:55 /usr/bin/hildon-desktop22:29
freemangordonwhy stderr?22:29
freemangordon373922:29
Wizzuphow do I watch debug?22:29
freemangordonshould be in syslog22:29
Wizzupwhich file?22:29
freemangordon/var/log/syslog22:30
WizzupI just see cron there22:30
freemangordonwell, no idea what happens if G_MESSAGES_DEBUG is not set22:30
Wizzupprobably nothing :(22:30
freemangordonglib that is22:30
freemangordonattach gdb22:31
freemangordonnot that I know what to do there :)22:31
buZzWizzup: capture stderr is 2> bla.log22:32
freemangordonbuZz: already running process22:33
Wizzup[  6231.717] (II) OMAP(0): drmmode_reallocate_scanout:1193 restoring CRTCs22:33
Wizzup[  6231.717] (II) OMAP(0): drmmode_reallocate_scanout:1197 restore CRTC 122:33
Wizzup[  6231.717] (II) OMAP(0): drmmode_restore_crtc:273 create framebuffer: 960x54022:33
Wizzup[  6231.717] (EE) OMAP(0): ERROR: failed to set mode: Invalid argument22:33
Wizzup[  6231.717] (EE) OMAP(0): ERROR: failed to reconfig crtc 122:33
Wizzup[  6231.978] (II) OMAP(0): drmmode_set_mode_major:406: Exiting22:33
Wizzupmaybe this is it22:33
freemangordonthat's ok22:33
buZzoh, eh, dont know :P22:33
Wizzupok, maybe not22:34
freemangordonWizzup: looks like some GL transformation matrix is wrong22:34
WizzupI think it happened when I rotated the device during unlock22:34
freemangordonif you find a way to repro that'd be cool22:34
freemangordonbut, as you said, even fremantle suffers from that bug22:34
freemangordonI was never able to find any sane way to track or repro22:35
WizzupG_MESSAGES_DEBUG=all ?22:35
freemangordonmhm22:35
freemangordonbut, how would you set that to a running process?22:35
WizzupI didn't, I killed it22:36
Wizzuphoping it would re-appear22:36
Wizzupbut nope22:36
WizzupI suppose I could have made a core dump...22:36
freemangordonlooks like a bug in some tidy class22:37
freemangordonor in clutter itself22:38
freemangordonanyway, zzz time, night!22:38
buZznn22:38
sicelo< freemangordon> I think we will only need 'hack' for n900  -- what is it missing? extcon?22:47
uvosit appears i was unbanned23:34
uvosgreat23:34
Wizzuphi23:43

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!