| mal | hmm, but usb detection only works in peripheral mode somehow? | 00:00 |
|---|---|---|
| Mister_Magister | no it doesn't, we established that already | 00:00 |
| mal | but you said that a few lines earlier that you got it to configured state | 00:01 |
| Mister_Magister | it's jsut that, if it's none, i connect usb, write pripheral, it will change to configured and usb will work | 00:01 |
| Mister_Magister | if you disconnect and reconnect it won't update state and usb will be broken | 00:01 |
| Mister_Magister | if you set it to none it will become disconnected | 00:01 |
| Mister_Magister | technically we could do super super super super dumb move and write peripheral/none depending on charging state xd but that'd be really really really really really stupid | 00:02 |
| mal | yeah, that would be next level hacky | 00:02 |
| Mister_Magister | I'll ask guy who has this phone on android how it behaves | 00:03 |
| Mister_Magister | maybe android does set it to none/peripheral | 00:03 |
| mal | does this return anything: grep -r peripheral /*/etc/init | 00:03 |
| Mister_Magister | `/vendor/etc/init/hw/init.qti.kernel.rc: write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}` but I don't think that's what you want | 00:04 |
| mal | yeah | 00:05 |
| Mister_Magister | i think init script in ramdisk writes peripheral to the /mode no? | 00:08 |
| Mister_Magister | https://github.com/mer-hybris/hybris-boot/blob/master/init-script#L246 yeah | 00:08 |
| Mister_Magister | that's why it works if i boot with usb connected | 00:09 |
| Mister_Magister | and that's why it won't ever suspend because it's peripheral by default | 00:09 |
| mal | yeah | 00:09 |
| mal | but peripheral should be fine usually | 00:09 |
| Mister_Magister | well good night to you man and thanks a ton for help | 00:22 |
| mal | do you have any android usb services running? | 00:22 |
| Mister_Magister | /vendor/bin/hw/android.hardware.usb-service.qti /vendor/bin/hw/android.hardware.usb.gadget-service.qti | 00:23 |
| mal | see what happens if you disable that | 00:24 |
| Mister_Magister | the generic disabled_services has service vendor.usb-hal-1-3 disabled | 00:26 |
| Mister_Magister | rebooting | 00:27 |
| Mister_Magister | there's also /system/bin/usbd should i disable that as well? | 00:30 |
| mal | probably good idea | 00:30 |
| Mister_Magister | dmesg is spammed crying for the gadget service | 00:30 |
| mal | by what service? | 00:30 |
| mal | that usbd? | 00:31 |
| Mister_Magister | yeah :) | 00:31 |
| mal | we don't really want any android usb service to conflict with usb-moded | 00:31 |
| Mister_Magister | ye ye i getcha | 00:32 |
| Mister_Magister | hmm usbd is still running | 00:34 |
| Mister_Magister | ah typo | 00:34 |
| Mister_Magister | okay dmesg is quiet agaihn | 00:35 |
| Mister_Magister | state still doesn't change | 00:36 |
| Mister_Magister | suspend doesn't work either | 00:37 |
| Mister_Magister | it was good try though | 00:38 |
| mal | needs more investigation later | 00:39 |
| Mister_Magister | yeah | 00:39 |
| Mister_Magister | maybe android guy will come up with something | 00:39 |
| Mister_Magister | but at least device is usable now | 00:39 |
| Mister_Magister | if we get the usb state and usb suspend to work then only hanful of issues will remain that are, in comparison, easy to debug | 00:41 |
| Mister_Magister | like ngfd bing at 100% volume, bootup led not working (probalby mce enables led before module loads), easy stuff | 00:42 |
| Mister_Magister | Oh i know, i'll make app for users to manually change usb state :D | 00:43 |
| *** ggabriel is now known as Guest9005 | 02:02 | |
| rinigus | b100dian: our nagara kernel - I will look into copyleft updates and will try to bump to latest version from LOS. I am sure there have been plenty of point releases since it was done last time | 10:32 |
| T42 | <b100dian> rinigus: what are copyleft updates? | 16:09 |
| T42 | <b100dian> (sorry missed the ping, you need to @me) | 16:10 |
| rinigus | b100dian: turned out to be not important - the last ones that landed. these are distributed via https://opendevices.sony.net/aosp-on-xperia-open-devices/downloads/open-source-archives | 16:11 |
| rinigus | we track them at https://github.com/sony-nagara/copyleft-sources | 16:12 |
| rinigus | and I keep a list of imported status at https://github.com/sailfishos-sony-nagara/main/wiki/Kernel-updates | 16:12 |
| T42 | <b100dian> I had no idea :) | 16:12 |
| rinigus | now adding LOS kernel changes and will test if that will work | 16:12 |
| rinigus | kernel + modules | 16:13 |
| T42 | <b100dian> Just a bit back to sony's copyleft OSS archive: how do you choose a version? It seems that the latest is not the biggest (e.g. 69.x is latest in April3 , 72.x exists before) | 16:14 |
| T42 | <b100dian> For kernel modules what I usually do is I copy them on the device in the right place before flashing hybris boot + vendor boot ;D | 16:15 |
| T42 | <b100dian> Actually, I use hybris recovery in that case | 16:15 |
| rinigus | b100dian: we have to track 64.2.A.* - that's for nagara | 16:17 |
| rinigus | and they closed a shop already, no more updates. so, we can expect that there will be no more copyleft updates either | 16:17 |
| rinigus | 72.x is for other device :) | 16:18 |
| rinigus | as for flashing / installing - will have to think how to do. rather rusty these days | 16:18 |
| T42 | <b100dian> ah. from personal experience, step zero is to copy your encryption key from home.img (dont ask why I know) | 16:20 |
| rinigus | yes, that's a very good step. added that there for exactly that purpose | 16:25 |
| rinigus | was copied already | 16:26 |
| T42 | <b100dian> I mean if you end up reflashing lineage, you're probably losing the hwcrypt entries (that's what I think is going on at least). | 16:31 |
| T42 | <b100dian> If you don't maybe it'll just work with copying the modules before then blue-light fastboot flashing boot and vendor-boot | 16:31 |
| T42 | <b100dian> The reason I really had to unexpectedly flash lineage was that lpac did not work with the main provider I switched over to euicc registration | 16:32 |
| T42 | <b100dian> mal: btw, the no-media-buffers is messed up for many videos in fact. Do you have the same on the device you tested? https://forum.sailfishos.org/t/sony-nagara-xperia-1iv-and-5iv-port/25136/500 | 16:34 |
| mal | hmm | 16:37 |
| mal | @b100dian have you tries dont-use-droid-convert quirk? | 16:38 |
| T42 | <b100dian> yes but let me check again | 16:39 |
| T42 | <b100dian> not changing anything after adding that.. | 16:42 |
| mal | two of those mentioned work fine on fp5, one fails | 16:47 |
| mal | the one from the proton drive fails to play | 16:47 |
| T42 | <b100dian> so "The DTs" from proton plays but jagged green lines, and so do the 9gag ones for me.. i thikn theyre all yuv420p according to ffmpeg | 17:04 |
| T42 | <b100dian> *think | 17:04 |
| mal | strange that twe 9gag ones play without issues here | 17:08 |
| mal | same color format | 17:08 |
| *** Mister_Magister_ is now known as Mister_Magister | 17:20 | |
| mal | @b100dian just mentioning that on some other devices those videos play without issues | 17:50 |
| T42 | <b100dian> mal: any other device? But that is with media-buffers normally. Unless you talk about fp5 where you are using no-media-buffers and they work (2 out of 3) | 17:53 |
| mal | I can test the media-buffer change on that device | 17:54 |
| mal | @b100dian no issues with no-media-buffer quirk on that device | 17:58 |
| T42 | <b100dian> mal: That's a mtek device, right ;)? So maybe something is broken on nagara. In that thread somebody says that even app support hangs when playing videos. | 18:01 |
| mal | yeah, mtk | 18:03 |
| mal | I can test on x10iii also, or any other official device | 18:04 |
| mal | but found an interesting thing with that problematic video, "DeclarativeImageMetadata::readDimensions:253 - Failed to read image data: "/home/defaultuser/Videos/The DT's.mp4"" | 18:05 |
| mal | that is when opening the video info in gallery app | 18:05 |
| mal | all 3 videos work fine on x10iii | 18:07 |
| mal | so it's some device specific issue | 18:08 |
| T42 | <Mister_Magister> mal: android guy says to write peripheral/none based on charging status which is the whacky hack i suggested but apparently thats correct way to do it because there's nothing in kernel to tell dwc3 connection state anymore | 18:55 |
| Mister_Magister | mal: https://paste.opensuse.org/pastes/6e0951784d42 | 18:57 |
| T42 | <adampigg> @Mister_Magister what is this for? | 18:58 |
| Mister_Magister | usb on miami | 18:58 |
| Mister_Magister | and suspend on miami | 18:58 |
| Mister_Magister | @adampigg if you want context read backlog from like yesterday 22-2am | 18:59 |
| T42 | <adampigg> ok ... interested as i have some dwc3 based device, but im sure i have suspend everythere | 18:59 |
| Mister_Magister | my brother in christ every qcom phone is dwc3 based nowadays :) | 18:59 |
| T42 | <adampigg> i dont have a qcom phone currently ;) | 18:59 |
| Mister_Magister | :) | 18:59 |
| T42 | <adampigg> mtk all the way | 18:59 |
| Mister_Magister | i'm still qcom guy | 19:00 |
| Mister_Magister | miami is shaping to be awesome device | 19:00 |
| mal | quite stupid design to require userspace for that when kernel drivers could has inform the other what happened | 19:34 |
| mal | *could just | 19:34 |
| Mister_Magister | yeah thats what they used to | 19:34 |
| mal | Mister_Magister: have you tried how otg works+ | 19:43 |
| Mister_Magister | mal: also also I asked android guy about stopping charging so that we have sysfs for the charging limiting and the guy slapped me with a commit in 5 seconds :D | 19:43 |
| Mister_Magister | mal: nah i'm too sleepy today | 19:43 |
| mal | ok | 19:43 |
| mal | test that when you have time, so plug some usb storage to usb and echo peripheral and see if it works | 19:44 |
| mal | or should it be host mode, not sure, something for you to test | 19:45 |
| Mister_Magister | mal: i tried host i tried peripheral, nothign seems to show up | 19:46 |
| mal | hmm | 19:46 |
| Mister_Magister | i tried it with usb network card though | 19:46 |
| Mister_Magister | let me try someting more sane | 19:46 |
| mal | not sure if that works | 19:46 |
| Mister_Magister | works on my op6 | 19:47 |
| mal | hmm, ok | 19:47 |
| Mister_Magister | yeah nothing with pendrive | 19:48 |
| mal | what happens if you echo empty string after connecting | 19:48 |
| mal | just thinking if it needs to write something, even if same thing | 19:48 |
| Mister_Magister | not much | 19:48 |
| mal | does it show usb connected? in android_usb | 19:49 |
| Mister_Magister | nope it just says disconnected | 19:49 |
| mal | doesn't matter if you echo different things? | 19:50 |
| Mister_Magister | i tried none, peripheral, none, host, none | 19:50 |
| mal | ok | 19:51 |
| mal | maybe ask that android guy how otg is supposed to work, I didn't quite get it from the paste | 19:52 |
| Mister_Magister | I just did | 19:54 |
| Mister_Magister | mal: we… we need to tell the charger to power the usb device | 19:59 |
| mal | wow | 20:00 |
| mal | how is that done? | 20:00 |
| Mister_Magister | that was my next question lol | 20:01 |
| mal | there is probably some sysfs path for that, check the charger stuff in sysfs | 20:01 |
| Mister_Magister | yeah thats what he told me | 20:01 |
| Mister_Magister | >mal let's control the usb based on the charger! >pfft that's so dumb >yeah right! | 20:02 |
| Mister_Magister | look at us now :D | 20:02 |
| Mister_Magister | mal: he doesn't know but he pointed me to a code that handles it, something something iio channel | 20:04 |
| mal | they mess with iio for that, who thought the complexity was a good idea | 20:05 |
| * Mister_Magister gulp | 20:05 | |
| mal | but integrating that to usb-moded might not be simple, needs a lot of thinking | 20:06 |
| Mister_Magister | i was thinking of just doing simple service that just handles that | 20:07 |
| Mister_Magister | usb-moded will just read state off of android0 | 20:07 |
| mal | yeah, might make more sense that way | 20:07 |
| Mister_Magister | it doesn't need to know anything about that | 20:07 |
| Mister_Magister | for now i'll just do the none/peripheral writing, simplest thing first | 20:08 |
| Mister_Magister | also weird that host no longer causes kernel panic but surely paints happy face | 20:08 |
| Mister_Magister | i still have to dig into volte plugin to fix hanging up the call xd | 20:10 |
| Mister_Magister | currently building kernel that will add sysfs to stop charging and forces display to 120Hz | 20:10 |
| Mister_Magister | mal: would you be so kind as to point me to where i need to specify the sysfs path for the charging control? | 20:10 |
| mal | as usual fp5 to the rescue https://github.com/mlehtima/droid-config-fp5/blob/master/sparse/etc/mce/70-battery-fp5.ini | 20:12 |
| Mister_Magister | "just steal from fp dumbass" | 20:12 |
| mal | in some cases the values are different that the default i.e. the path is for disabling or enabling | 20:13 |
| Mister_Magister | ill see | 20:13 |
| mal | like here https://github.com/mer-hybris/s19mps-droid-configs/blob/master/sparse/etc/mce/70-battery-s19mps.ini | 20:13 |
| Mister_Magister | https://github.com/LineageOS/android_kernel_motorola_sm6375/commit/e1038acd9c2162d31b512eb927242bcc34a0af40 | 20:13 |
| Mister_Magister | here's commit | 20:13 |
| mal | is the path /sys/class/power_supply/battery/charging_enabled ? | 20:14 |
| Mister_Magister | idk i haven't built kernel yet | 20:14 |
| Mister_Magister | from the code it seems that 1 is charging enabled 0 is disabled | 20:15 |
| Mister_Magister | if my eyes do not deceive me | 20:15 |
| mal | if it is then it doesn't need configs | 20:15 |
| Mister_Magister | no it' snot | 20:15 |
| Mister_Magister | it's /sys/module/qpnp_adaptive_charge/parameters/charging_enabled | 20:15 |
| mal | ok, so not in battery sysfs | 20:16 |
| mal | https://github.com/sailfishos/mce/blob/master/modules/charging.c#L694 we have couple of standard paths defined | 20:16 |
| Mister_Magister | mal: could we schedule some work for spiiroin? I wish we could make mce listen to sysfs path in order to wake up in event of dt2w | 20:18 |
| mal | spiiroin doesn't work at jolla anymore | 20:19 |
| Mister_Magister | HE DOESN'T?! | 20:19 |
| Mister_Magister | that's so sad | 20:19 |
| Mister_Magister | why? | 20:19 |
| Mister_Magister | he was a goat | 20:19 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!