xmn | Anyone get stuck after updating to the latest 4.4.0.72. Can't open any apps and the background are all gone. Can't even get to the terminal to clean up after with post_sfos_update | 06:04 |
---|---|---|
T42 | <elros34> testing or devel sailfish image/repos? | 08:41 |
*** Ischwitch is now known as Ingvix | 09:01 | |
T42 | <Ayman_rgab> @edp_17 samsung also ? (re @edp_17: I have the same issu...) | 16:27 |
T42 | <Ayman_rgab> hello | 17:51 |
T42 | <Ayman_rgab> on my device changing usb mode didn't work unless i restart usb-moded manually | 17:53 |
T42 | <Ayman_rgab> this log from usb-moded https://hastebin.com/eyazorivak.yaml | 17:53 |
mal | which device is that? | 18:25 |
T42 | <Ayman_rgab> mal: https://github.com/Exynos7880-Linux/droid-config-a5y17lte | 18:29 |
T42 | <edp_17> Yep. :] (re @Ayman_rgab: @edp_17 samsung also...) | 18:44 |
T42 | <Ayman_rgab> is anyway to restart usb-moded when usb connected or disconnected 0_0 | 18:46 |
mal | probably we should find a proper fix instead of such a hack | 19:04 |
T42 | <Ayman_rgab> any suggestion | 19:07 |
mal | @Ayman_rgab could you try to check what kind of power supply type it reports in /sys/class/power_supply/*/type for all of the devices there | 19:08 |
T42 | <Ayman_rgab> okay | 19:08 |
T42 | <Ayman_rgab> Mains | 19:09 |
T42 | <Ayman_rgab> Battery | 19:09 |
T42 | <Ayman_rgab> OTG | 19:09 |
T42 | <Ayman_rgab> POWER_SHARING | 19:09 |
T42 | <Ayman_rgab> Unknown | 19:09 |
T42 | <Ayman_rgab> Unknown | 19:09 |
T42 | <Ayman_rgab> USB | 19:09 |
T42 | <Ayman_rgab> Wireless | 19:09 |
mal | does any of those change when you disconnect the cable | 19:10 |
T42 | <Ayman_rgab> no they are the same | 19:12 |
mal | well probably the present value in the USB one changes | 19:19 |
T42 | <Ayman_rgab> root@SamsungA52017 ~# cat /sys/class/power_supply/*/online | 19:25 |
T42 | <Ayman_rgab> 0 | 19:25 |
T42 | <Ayman_rgab> 4 | 19:25 |
T42 | <Ayman_rgab> 0 | 19:25 |
T42 | <Ayman_rgab> 0 | 19:25 |
T42 | <Ayman_rgab> 1 | 19:25 |
T42 | <Ayman_rgab> 0 | 19:25 |
T42 | <Ayman_rgab> usb connected | 19:25 |
T42 | <Ayman_rgab> root@SamsungA52017 ~# cat /sys/class/power_supply/*/online | 19:25 |
T42 | <Ayman_rgab> 0 | 19:25 |
T42 | <Ayman_rgab> 1 | 19:25 |
T42 | <Ayman_rgab> 0 | 19:25 |
T42 | <Ayman_rgab> 0 | 19:25 |
T42 | <Ayman_rgab> 0 | 19:25 |
T42 | <Ayman_rgab> 0 | 19:25 |
T42 | <Ayman_rgab> usb disconnected | 19:25 |
mal | so it's the one that says USB as type if I read those correctly, also please don't paste that many lines here, use pastebin or similar service | 19:26 |
T42 | <Ayman_rgab> type USB changed to 0 from 1 when cable disconnected and type BATTERY changed to 1 from 4 (re @SailfishFreenodeIRCBridgeBot: <mal>so it's the one...) | 19:33 |
T42 | <Ayman_rgab> this's all types with full path https://hastebin.com/xacenubumi.kotlin | 19:34 |
mal | what could be causing it to not start charging | 19:35 |
mal | can you check for any usb_moded related messages in journal log after reboot and also show those when you restart usb_moded | 19:37 |
piggz_ | mal: spiiroin: another fun weeirdness in the PP port ... sometimes pressing the power button shuts the system down.... | 19:38 |
piggz_ | [32731.785667] DSME[2167]: pwrkeymonitor: Timer triggered, initiating shutdown | 19:39 |
piggz_ | [32731.620753] sun4i-drm display-engine: [drm:drm_atomic_check_only] checking 00000000fd30c252 | 19:39 |
piggz_ | [32731.887976] DSME[2167]: state: shutdown request received from dsme | 19:39 |
piggz_ | [32731.908613] D[32731.645005] sun4i-drm display-engine: [drm:drm_atomic_nonblocking_commit] committing 00000000fd30c252 nonblocking | 19:39 |
piggz_ | SME[2167]: state: Normal shutdown | 19:39 |
piggz_ | [32731.935577] DSME[2167]: state: new state: SHUTDOWN | 19:39 |
piggz_ | [32731.952958] DSME[2167]: state: Shutdown or reboot in 2 seconds | 19:39 |
piggz_ | wonder why dsme is doing that | 19:39 |
T42 | <Ayman_rgab> maybe because of this /sys/class/power_supply/s2mu004-charger/ it's of type Unknown and it's online value always 0 (re @SailfishFreenodeIRCBridgeBot: <mal>what could be c...) | 19:39 |
T42 | <Ayman_rgab> okay (re @SailfishFreenodeIRCBridgeBot: <mal>can you check f...) | 19:39 |
piggz_ | @Ayman_rgab you can specify the exact device to monitor in the usb_moded config, i did this recently | 19:40 |
T42 | <Ayman_rgab> how ? (re @SailfishFreenodeIRCBridgeBot: <piggz_>@Ayman_rgab ...) | 19:40 |
piggz_ | grep the logs for udevadmin commands which monitor power_supply devices | 19:41 |
mal | piggz_: but that seems to detect usb just fine, if I understood correct, just won't start charging | 19:41 |
T42 | <Ayman_rgab> charging work when i connect usb cable | 19:42 |
mal | so what doesn't work? | 19:42 |
mal | I'm a bit confused how that behaves | 19:42 |
T42 | <Ayman_rgab> when i change usb mode i had to restart usb-moded to take effects | 19:43 |
piggz_ | i would add -d to usb-moded command line to see what its doing | 19:44 |
mal | wait so changing usb mode manually is not working but otherwise it works? | 19:44 |
T42 | <Ayman_rgab> i did that (re @SailfishFreenodeIRCBridgeBot: <piggz_>i would add ...) | 19:45 |
piggz_ | it might be my problem, beause charging is done from other events | 19:45 |
piggz_ | on the pinephonepro, plugging in usb would not trigger the dialog, but would detect charging, so, had to manually specify the udev device to monitor | 19:46 |
T42 | <Ayman_rgab> for example i change mode from developer mode to mtp mode and disconnect the usb cable then connect it again it still on developer mode only if i restart usb-moded.service mtp works (re @SailfishFreenodeIRCBridgeBot: <mal>wait so changin...) | 19:48 |
T42 | <Ayman_rgab> exactly the same issue with my device (re @SailfishFreenodeIRCBridgeBot: <piggz_>on the pinep...) | 19:50 |
piggz_ | see https://piggz.co.uk/sailfishos-porters-archive/index.php?log=2022-11-11.txt#line6 | 19:51 |
spiiroin | piggz_: mce & display on/off - in theory it can be mce, compositor, or both. if mce does it, then it is in mce via fbdev ioctl, or in mce-plugin-libhybris using android hal | 19:55 |
spiiroin | it really should be only in compositor, but both doing fbdev ioctl:s does not hurt. if it goes to that hybris plugin... usually it should not | 19:56 |
piggz_ | spiiroin: its a native port, so not hybris | 19:56 |
piggz_ | ive been trying to collect logs for the kernel dev, however, last few times ive tried, dsme has decided to shut the phone down! | 19:56 |
spiiroin | piggz_: dsme & power key shutdown -> the idea is that if ui goes bonkers you can still do an orderly shutdown by pressing power key for five seconds | 19:57 |
piggz_ | spiiroin: this isnt 5 seconds though | 19:57 |
piggz_ | just a quick press | 19:57 |
piggz_ | maybe ill disable dsme until i get the other logs | 19:58 |
spiiroin | 1st thought: missing key up event? or dsme being seriously late with processing it? | 19:58 |
spiiroin | piggz_: you can also just move/rename the dsme power key plugin | 19:58 |
spiiroin | hmm... "sun4i-*drm* display-engine" -> drm/kms? -> display power control should be in compositor | 20:00 |
* spiiroin is afk for a while, but... you might need to explicitly disable/hack mce side if it finds fbdev nodes | 20:01 | |
piggz_ | spiiroin: i enabled drm logs to see if display is being commanded to power up... | 20:02 |
piggz_ | spiiroin: ill paste some logs showing mce getting power button then dsme shutting down... | 20:02 |
piggz_ | spiiroin: https://paste.mozilla.org/j7gAKJYq#L52,143 those lines are mce and dsme | 20:03 |
T42 | <Ayman_rgab> mal: all related usb-moded messages after reboot, when changing mode and after restart usb-moded https://hastebin.com/fejabitagu.apache | 20:15 |
T42 | <Ayman_rgab> udevadm monitor -p -s power_supply https://hastebin.com/veguyipuga.properties | 20:21 |
piggz_ | is that while plug /unplug cable? | 20:22 |
piggz_ | doesnt look like it | 20:22 |
T42 | <Ayman_rgab> yes (re @SailfishFreenodeIRCBridgeBot: <piggz_>is that whil...) | 20:22 |
T42 | <Ayman_rgab> POWER_SUPPLY_STATUS=Charging and POWER_SUPPLY_STATUS=Discharging | 20:23 |
T42 | <adampigg> but, that only lists the battery device, no others .. no wonder usb-moded doesnt react | 20:24 |
T42 | <Ayman_rgab> what could cause this | 20:25 |
piggz_ | try without the -s power_supply and see what event happen when you plug in a cable | 20:26 |
T42 | <Ayman_rgab> okay | 20:30 |
T42 | <Ayman_rgab> udevadm monitor -p https://hastebin.com/anabalusuh.properties | 20:32 |
piggz_ | interesting, there is typec add/remove events only | 20:36 |
piggz_ | best ask an expert now :) | 20:37 |
T42 | <Ayman_rgab> waiting for mal | 20:38 |
mal | @Ayman_rgab I see something like "droid-hal-init: starting service 'usbd'.." try disabling that usbd if it's running | 20:53 |
mal | if android side usb process is running it can confuse usb when usb_moded is also controlling it | 20:54 |
spiiroin | piggz_: there is ~4.5 seconds from mce logging power key down and dsme deciding to shut down because it is still down... is there key up event? does mce/dsme see it? is it coming from a input device that could be grabbed by mce? which should no longer be necessary, but I can't recall if it is still default behavior | 21:09 |
mal | so evdev_trace -i and check also -t | 21:09 |
spiiroin | (if kernel sends it, it could be/seem lost by a process X due to buffer overrun, input device grabbing, scheduling delay, whatnot) | 21:11 |
spiiroin | but testing will be simpler if you disable/mask whole dsme, or just the power key handler i.e. "mv /usr/lib/dsme/pwrkeymonitor.so /usr/lib/dsme/pwrkeymonitor.so.disabled" | 21:12 |
spiiroin | there have been some devices where weird things can happen to input devices around suspend, so kernel bugs are possible too | 21:14 |
T42 | <Ayman_rgab> mal usbd disabled https://hastebin.com/niyogunelo.apache | 21:14 |
mal | any difference? | 21:20 |
mal | in how it works now | 21:21 |
T42 | <Ayman_rgab> no difference | 21:21 |
mal | how did you test it | 21:22 |
T42 | <Ayman_rgab> . (re @Ayman_rgab: for example i change...) | 21:22 |
mal | try some other mode than mtp just in case mtp has some issue | 21:24 |
mal | like charging only mode or something | 21:24 |
T42 | <Ayman_rgab> same also every mode change requires restarting usb-moded | 21:27 |
mal | it's quite difficult to check those logs when I have no idea at what timestamp you did what | 21:28 |
T42 | <Ayman_rgab> and with always ask mode when plugging cable it just charging not show a menu of modes | 21:29 |
mal | show log from such attempt | 21:30 |
T42 | <Ayman_rgab> https://hastebin.com/iyivaqaquv.yaml | 21:36 |
T42 | <Ayman_rgab> setting mode to ask then detached usb and attach again didn't trigger usb moded | 21:37 |
mal | can you check what usb-moded packages you have installed? | 21:41 |
T42 | <Ayman_rgab> https://hastebin.com/ibasidoxig.properties | 21:46 |
mal | I think you should have usb-moded-defaults-android and usb-moded-developer-mode-android instead the non -android ones | 21:46 |
T42 | <Ayman_rgab> # USB mode controller | 21:51 |
T42 | <Ayman_rgab> Requires: usb-moded | 21:51 |
T42 | <Ayman_rgab> Requires: usb-moded-developer-mode-android | 21:51 |
T42 | <Ayman_rgab> Requires: usb-moded-defaults-android | 21:51 |
T42 | <Ayman_rgab> Requires: usb-moded-mtp-mode-android | 21:51 |
mal | you have those? | 22:03 |
T42 | <Ayman_rgab> now yes | 22:10 |
T42 | <Ayman_rgab> https://hastebin.com/gadizozuba.apache | 22:10 |
T42 | <Ayman_rgab> but no difference | 22:11 |
mal | no difference in dmesg either? | 22:13 |
mal | journal I mean | 22:13 |
T42 | <Ayman_rgab> yes same | 22:13 |
mal | the udevadmin output you showed is odd since it only showed battery messages | 22:19 |
mal | you mentioned you tried hardcoding path in usb moded config, have you done anything else there? and what was the change you did | 22:20 |
T42 | <Ayman_rgab> this one shows android_usb and typec also https://hastebin.com/anabalusuh.properties | 22:20 |
mal | you didn't answer if you had changed something in usb moded configs | 22:30 |
T42 | <Ayman_rgab> ah didn't see that, no i did not change anythings | 22:31 |
T42 | <Ayman_rgab> "you mentioned you tried hardcoding path in usb moded config" didn't help at all | 22:33 |
mal | which path did you use? | 22:34 |
T42 | <Ayman_rgab> this one /sys/class/power_supply/battery/ | 22:35 |
T42 | <Ayman_rgab> is this ok | 22:36 |
T42 | <Ayman_rgab> rpm -qe -s usb-moded-defaults-android | 22:36 |
T42 | <Ayman_rgab> (contains no files) | 22:36 |
mal | yes | 22:37 |
T42 | <Ayman_rgab> what all this https://hastebin.com/ogasoxehus.yaml | 22:38 |
T42 | <Ayman_rgab> is it normal ? | 22:39 |
T42 | <Ayman_rgab> what if i run udevadmin while changing mode and restarting usb-moded | 22:41 |
T42 | <Ayman_rgab> https://hastebin.com/menavilaqi.properties (re @Ayman_rgab: what if i run udevad...) | 22:44 |
T42 | <edp_17> I've tried exactly that and it worked well before 4.4.0.72. Then this update broke something, so I had to remove that hack. (re @Ayman_rgab: https://hastebin.com...) | 22:45 |
T42 | <Ayman_rgab> which hack ? (re @edp_17: I've tried exactly t...) | 22:47 |
T42 | <edp_17> This hack: https://paste.ubuntu.com/p/BW9Hg3Jdf3/ | 22:49 |
T42 | <edp_17> Basically, with these two used rule I force-restarted usb-moded when I plugged the cable in. | 22:50 |
T42 | <elros34> mask usb-moded, restart device and then get logs from udevadm. I think usb-moded can mess with gadget so your kernel stops sending power_supply present/online events. IIRC there wer some options to handle it but it could be removed | 22:51 |
mal | one option is -a parameter for usb-moded | 22:52 |
mal | which is "keep gadget active on broken android kernels" | 22:52 |
T42 | <elros34> but is it even handled or it is just dummy option. I think long time ago when I have tried it didn't help but I could be wrong | 22:53 |
mal | seems that is not used anymore | 22:54 |
T42 | <Ayman_rgab> why you remove it (re @edp_17: Basically, with thes...) | 22:55 |
T42 | <edp_17> Because the usb menu popped up when the cable wasn't attached. | 22:56 |
T42 | <Ayman_rgab> when i set -a or -i it said that these are deprecated (re @SailfishFreenodeIRCBridgeBot: <mal>one option is -...) | 22:56 |
T42 | <Ayman_rgab> i'll try this (re @elros34: mask usb-moded, rest...) | 22:57 |
T42 | <Ayman_rgab> that's Mess (re @edp_17: Because the usb menu...) | 22:59 |
T42 | <Ayman_rgab> https://hastebin.com/tumufasuso.properties (re @elros34: mask usb-moded, rest...) | 23:07 |
T42 | <elros34> can't check it, this paste service blocked me now | 23:08 |
T42 | <edp_17> I've added -a to usb-moded.service (into usb-moded-args.conf) and applied the hack I described above. Are the "Fallback since cable detection might not be accurate." and "unexpected change" messages expected? https://paste.ubuntu.com/p/nwZpqSvzbg/ | 23:09 |
T42 | <elros34> but support for -a was removed 4 years ago | 23:10 |
T42 | <edp_17> mal has mentioned it a few minutes ago. ;) | 23:11 |
T42 | <Ayman_rgab> yes same here (re @edp_17: I've added -a to usb...) | 23:11 |
T42 | <Ayman_rgab> if you add -d you will see a message telling that -a are deprecated (re @edp_17: mal has mentioned it...) | 23:12 |
T42 | <edp_17> Ah, okay. Thanks. I've removed it as didn't help anyway. | 23:13 |
T42 | <elros34> just a hint, you should be adding -D for debugging purposes | 23:13 |
T42 | <edp_17> Thanks! | 23:14 |
T42 | <Ayman_rgab> https://pastebin.com/rvgEB2zK (re @elros34: can't check it, this...) | 23:14 |
T42 | <Ayman_rgab> i have a wired behavior if usb-moded running when i remove usb cable battery icon take 5 seconds to changed but if usb-moded stop it changed immediately | 23:17 |
T42 | <edp_17> Interesting, when I plug the cable in the device plays a sound so it recognises that a cable is attached. But the usb mode selection window isn't popping up. | 23:17 |
T42 | <Ayman_rgab> same sound, vibration and showing charging message (re @edp_17: Interesting, when I ...) | 23:18 |
T42 | <Ayman_rgab> * only if mode set to ask | 23:19 |
T42 | <edp_17> or it set to Charging only | 23:20 |
T42 | <Ayman_rgab> yeah | 23:21 |
T42 | <elros34> so you never get any udev event from power_suppply device other then battery when connecting/disconnecting cable? | 23:22 |
T42 | <Ayman_rgab> only battery | 23:22 |
T42 | <elros34> but parameters change if you do cat /sys/class/power_supply/<something different than battery>/* right? If yes then I think it would be the best to fix it in kernel and call power_supply_changed() method | 23:24 |
T42 | <edp_17> @elros34 : I have these. udevadm monitor -p -s power_supply: https://paste.ubuntu.com/p/SMsc2Xqr9D/ | 23:25 |
T42 | <edp_17> grep . /sys/class/power_supply/*/uevent: https://paste.ubuntu.com/p/698wvGvMG3/ | 23:25 |
T42 | <elros34> looks sane, just no power_supply_cahnged in kernel | 23:26 |
T42 | <Ayman_rgab> yes it's changed (re @elros34: but parameters chang...) | 23:26 |
T42 | <elros34> I wonder if usb-moded how some poll method | 23:27 |
T42 | <edp_17> Yes. I've checked /sys/class/power_supply/max77843-charger/*: https://paste.ubuntu.com/p/jkp93VdjvR/ (re @elros34: but parameters chang...) | 23:28 |
T42 | <edp_17> Do you know what to fix in kernel? | 23:29 |
T42 | <elros34> I was messing with this but it was long time ago | 23:33 |
T42 | <Ayman_rgab> @elros34 https://github.com/Exynos7880-Linux/android_kernel_samsung_universal7880/blob/d23407efef675eb885d9a7f1d261b670fd0b003b/drivers/battery_v2/s2mu004_charger.c#L114 | 23:33 |
T42 | <Ayman_rgab> or https://github.com/Exynos7880-Linux/android_kernel_samsung_universal7880/blob/d23407efef675eb885d9a7f1d261b670fd0b003b/drivers/battery_v2/s2mu004_charger.c#L1142 | 23:33 |
T42 | <elros34> yeah that function must be called whenever usb connection change but not with otg but some different device | 23:34 |
T42 | <edp_17> Thanks, I'll try this. | 23:35 |
T42 | <elros34> but maybe there is easier way, because IIRC mainline drivers also do not use this | 23:37 |
T42 | <edp_17> How should I know what charger the device has? I only have drivers/battery in kernel source. Do not have battery_v2. And within I have these: https://paste.ubuntu.com/p/9C5KKSrhVB/ | 23:41 |
T42 | <Ayman_rgab> this one max77843-charger | 23:42 |
T42 | <Ayman_rgab> not v2 | 23:42 |
T42 | <elros34> I think I linked you obj2pro whhich should help you figure out which drivers your device use | 23:42 |
T42 | <edp_17> Oh, yes. I remember that. | 23:44 |
T42 | <elros34> this is the ugly patch I have created once for usb issues: https://github.com/elros34/freetab_8014/blob/master/droid/kernel/0007-Some-battery-usb-changes.patch. vbus_id_hw_scan changed on every connection so I call power_supply_changed(&axp_charger->usb); based on some params | 23:48 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!