Saturday, 2026-05-09

malhmm, but usb detection only works in peripheral mode somehow?00:00
Mister_Magisterno it doesn't, we established that already00:00
malbut you said that a few lines earlier that you got it to configured state00:01
Mister_Magisterit's jsut that, if it's none, i connect usb, write pripheral, it will change to configured and usb will work00:01
Mister_Magisterif you disconnect and reconnect it won't update state and usb will be broken00:01
Mister_Magisterif you set it to none it will become disconnected00:01
Mister_Magistertechnically 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 stupid00:02
malyeah, that would be next level hacky00:02
Mister_MagisterI'll ask guy who has this phone on android how it behaves00:03
Mister_Magistermaybe android does set it to none/peripheral00:03
maldoes this return anything: grep -r peripheral /*/etc/init00: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 want00:04
malyeah00:05
Mister_Magisteri think init script in ramdisk writes peripheral to the /mode no?00:08
Mister_Magisterhttps://github.com/mer-hybris/hybris-boot/blob/master/init-script#L246 yeah00:08
Mister_Magisterthat's why it works if i boot with usb connected00:09
Mister_Magisterand that's why it won't ever suspend because it's peripheral by default00:09
malyeah00:09
malbut peripheral should be fine usually00:09
Mister_Magisterwell good night to you man and thanks a ton for help00:22
maldo 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.qti00:23
malsee what happens if you disable that00:24
Mister_Magisterthe generic disabled_services has service vendor.usb-hal-1-3 disabled00:26
Mister_Magisterrebooting00:27
Mister_Magisterthere's also /system/bin/usbd should i disable that as well?00:30
malprobably good idea00:30
Mister_Magisterdmesg is spammed crying for the gadget service00:30
malby what service?00:30
malthat usbd?00:31
Mister_Magisteryeah :)00:31
malwe don't really want any android usb service to conflict with usb-moded00:31
Mister_Magisterye ye i getcha00:32
Mister_Magisterhmm usbd is still running00:34
Mister_Magisterah typo00:34
Mister_Magisterokay dmesg is quiet agaihn00:35
Mister_Magisterstate still doesn't change00:36
Mister_Magistersuspend doesn't work either00:37
Mister_Magisterit was good try though00:38
malneeds more investigation later00:39
Mister_Magisteryeah00:39
Mister_Magistermaybe android guy will come up with something00:39
Mister_Magisterbut at least device is usable now00:39
Mister_Magisterif we get the usb state and usb suspend to work then only hanful of issues will remain that are, in comparison, easy to debug00:41
Mister_Magisterlike ngfd bing at 100% volume, bootup led not working (probalby mce enables led before module loads), easy stuff00:42
Mister_MagisterOh i know, i'll make app for users to manually change usb state :D00:43
*** ggabriel is now known as Guest900502:02
rinigusb100dian: 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 time10:32
T42<b100dian> rinigus: what are copyleft updates?16:09
T42<b100dian> (sorry missed the ping, you need to @me)16:10
rinigusb100dian: 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-archives16:11
riniguswe track them at https://github.com/sony-nagara/copyleft-sources16:12
rinigusand I keep a list of imported status at https://github.com/sailfishos-sony-nagara/main/wiki/Kernel-updates16:12
T42<b100dian> I had no idea :)16:12
rinigusnow adding LOS kernel changes and will test if that will work16:12
riniguskernel + modules16: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 ;D16:15
T42<b100dian> Actually, I use hybris recovery in that case16:15
rinigusb100dian: we have to track 64.2.A.* - that's for nagara16:17
rinigusand they closed a shop already, no more updates. so, we can expect that there will be no more copyleft updates either16:17
rinigus72.x is for other device :)16:18
rinigusas for flashing / installing - will have to think how to do. rather rusty these days16: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
rinigusyes, that's a very good step. added that there for exactly that purpose16:25
riniguswas copied already16: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-boot16: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 registration16: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/50016:34
malhmm16:37
mal@b100dian have you tries dont-use-droid-convert quirk?16:38
T42<b100dian> yes but let me check again16:39
T42<b100dian> not changing anything after adding that..16:42
maltwo of those mentioned work fine on fp5, one fails16:47
malthe one from the proton drive fails to play16: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 ffmpeg17:04
T42<b100dian> *think17:04
malstrange that twe 9gag ones play without issues here17:08
malsame color format17:08
*** Mister_Magister_ is now known as Mister_Magister17:20
mal@b100dian just mentioning that on some other devices those videos play without issues17: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
malI can test the media-buffer change on that device17:54
mal@b100dian no issues with no-media-buffer quirk on that device17: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
malyeah, mtk18:03
malI can test on x10iii also, or any other official device18:04
malbut 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
malthat is when opening the video info in gallery app18:05
malall 3 videos work fine on x10iii18:07
malso it's some device specific issue18: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 anymore18:55
Mister_Magistermal: https://paste.opensuse.org/pastes/6e0951784d4218:57
T42<adampigg> @Mister_Magister  what is this for?18:58
Mister_Magisterusb on miami18:58
Mister_Magisterand suspend on miami18:58
Mister_Magister@adampigg if you want context read backlog from like yesterday 22-2am18:59
T42<adampigg> ok ... interested as i have some dwc3 based device, but im sure i have suspend everythere18:59
Mister_Magistermy 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 way18:59
Mister_Magisteri'm still qcom guy19:00
Mister_Magistermiami is shaping to be awesome device19:00
malquite stupid design to require userspace for that when kernel drivers could has inform the other what happened19:34
mal*could just19:34
Mister_Magisteryeah thats what they used to19:34
malMister_Magister: have you tried how otg works+19:43
Mister_Magistermal: 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 :D19:43
Mister_Magistermal: nah i'm too sleepy today19:43
malok19:43
maltest that when you have time, so plug some usb storage to usb and echo peripheral and see if it works19:44
malor should it be host mode, not sure, something for you to test19:45
Mister_Magistermal: i tried host i tried peripheral, nothign seems to show up19:46
malhmm19:46
Mister_Magisteri tried it with usb network card though19:46
Mister_Magisterlet me try someting more sane19:46
malnot sure if that works19:46
Mister_Magisterworks on my op619:47
malhmm, ok19:47
Mister_Magisteryeah nothing with pendrive19:48
malwhat happens if you echo empty string after connecting19:48
maljust thinking if it needs to write something, even if same thing19:48
Mister_Magisternot much19:48
maldoes it show usb connected? in android_usb19:49
Mister_Magisternope it just says disconnected19:49
maldoesn't matter if you echo different things?19:50
Mister_Magisteri tried none, peripheral, none, host, none19:50
malok19:51
malmaybe ask that android guy how otg is supposed to work, I didn't quite get it from the paste19:52
Mister_MagisterI just did19:54
Mister_Magistermal: we… we need to tell the charger to power the usb device19:59
malwow20:00
malhow is that done?20:00
Mister_Magisterthat was my next question lol20:01
malthere is probably some sysfs path for that, check the charger stuff in sysfs20:01
Mister_Magisteryeah thats what he told me20:01
Mister_Magister>mal let's control the usb based on the charger! >pfft that's so dumb >yeah right!20:02
Mister_Magisterlook at us now :D20:02
Mister_Magistermal: he doesn't know but he pointed me to a code that handles it, something something iio channel20:04
malthey mess with iio for that, who thought the complexity was a good idea20:05
* Mister_Magister gulp20:05
malbut integrating that to usb-moded might not be simple, needs a lot of thinking20:06
Mister_Magisteri was thinking of just doing simple service that just handles that20:07
Mister_Magisterusb-moded will just read state off of android020:07
malyeah, might make more sense that way20:07
Mister_Magisterit doesn't need to know anything about that20:07
Mister_Magisterfor now i'll just do the none/peripheral writing, simplest thing first20:08
Mister_Magisteralso weird that host no longer causes kernel panic but surely paints happy face20:08
Mister_Magisteri still have to dig into volte plugin to fix hanging up the call xd20:10
Mister_Magistercurrently building kernel that will add sysfs to stop charging and forces display to 120Hz20:10
Mister_Magistermal: would you be so kind as to point me to where i need to specify the sysfs path for the charging control?20:10
malas usual fp5 to the rescue https://github.com/mlehtima/droid-config-fp5/blob/master/sparse/etc/mce/70-battery-fp5.ini20:12
Mister_Magister"just steal from fp dumbass"20:12
malin some cases the values are different that the default i.e. the path is for disabling or enabling20:13
Mister_Magisterill see20:13
mallike here https://github.com/mer-hybris/s19mps-droid-configs/blob/master/sparse/etc/mce/70-battery-s19mps.ini20:13
Mister_Magisterhttps://github.com/LineageOS/android_kernel_motorola_sm6375/commit/e1038acd9c2162d31b512eb927242bcc34a0af4020:13
Mister_Magisterhere's commit20:13
malis the path /sys/class/power_supply/battery/charging_enabled ?20:14
Mister_Magisteridk i haven't built kernel yet20:14
Mister_Magisterfrom the code it seems that 1 is charging enabled 0 is disabled20:15
Mister_Magisterif my eyes do not deceive me20:15
malif it is then it doesn't need configs20:15
Mister_Magisterno it' snot20:15
Mister_Magisterit's /sys/module/qpnp_adaptive_charge/parameters/charging_enabled20:15
malok, so not in battery sysfs20:16
malhttps://github.com/sailfishos/mce/blob/master/modules/charging.c#L694 we have couple of standard paths defined20:16
Mister_Magistermal: 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 dt2w20:18
malspiiroin doesn't work at jolla anymore20:19
Mister_MagisterHE DOESN'T?!20:19
Mister_Magisterthat's so sad20:19
Mister_Magisterwhy?20:19
Mister_Magisterhe was a goat20:19

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