Sunday, 2022-11-20

*** amccarthy is now known as Guest197600:00
*** amccarthy_ is now known as amccarthy00:00
T42<edp_17> @elros34 : I've added this change into charger driver: https://github.com/edp17/android_kernel_samsung_exynos5433/commit/fbb597365816b34160eb40fd04e8a77642d21e8c00:10
T42<elros34> not sure this is correct, you will get signal on every property read00:11
T42<edp_17> Oh, I guess should have added that here: https://github.com/edp17/android_kernel_samsung_exynos5433/blob/fbb597365816b34160eb40fd04e8a77642d21e8c/drivers/battery/max77843_charger.c#L98900:13
T42<elros34> not sure if anything but userspace call this but worth to add some pr_info there00:15
T42<edp_17> pr_info?00:16
T42<elros34> or printk, whether you like. BTW don't you have some messages in dmesg when you connect usb? THat way it might be easier00:17
T42<elros34> btw &charger->val->intval is for sure wrong argument00:19
T42<elros34> it must be struct power_supply00:20
malif the uevent value changes then why is there no udev message about that00:29
malI mean for the usb path00:29
malthat POWER_SUPPLY_ONLINE=100:30
T42<elros34> because there is no power_supply_changed() in in driver for usb or charger but only for battery00:31
T42<elros34> I suggest adding power_supply_changed(&battery->psy_usb); here: https://github.com/edp17/android_kernel_samsung_exynos5433/blob/fbb597365816b34160eb40fd04e8a77642d21e8c/drivers/battery/sec_battery.c#L262100:32
T42<edp_17> Okay, Thanks!00:33
T42<elros34> it might be called too often but you will see00:36
T42<edp_17> With the other change I added, the kernel didn't compile anyway. :D00:37
T42<elros34> alternative this line but only if sec_bat_monitor_work works: https://github.com/edp17/android_kernel_samsung_exynos5433/blob/fbb597365816b34160eb40fd04e8a77642d21e8c/drivers/battery/sec_battery.c#L280700:38
malis battery driver really the correct place?00:47
T42<elros34> I guess, there is no reference to psy_usb in max77843_charger.c00:51
T42<edp_17> Yes, correct. There is nothing related to psy_usb in there.01:03
T42<elros34> I think you will still need some modification for type property if that patch works01:04
T42<elros34> otherwise there will be no difference between usb and charger01:05
T42<elros34> pc usb connection/charger01:06
T42<edp_17> Okay, here is the result.01:07
T42<edp_17> I've installed the new kernel and removed those two udev rules.01:07
T42<edp_17> I sshd in via wifi.01:07
T42<edp_17> I connected the device to the PC.01:08
T42<edp_17> The usb selection menu popped up and I was able to connect with a) Developer mode, b) MTP mode and c) Charging only.01:09
T42<edp_17> However, with any of those connection the active ssh session (via wifi) became unresponsive  until I disconnected the cable.01:10
T42<elros34> first check udev events01:10
T42<elros34> maybe the place is wrong and you should add line to sec_bat_cable_work instead01:13
T42<edp_17> udevadm monitor -p -s power_supply: https://paste.ubuntu.com/p/9qDR7yrcmJ/01:14
T42<elros34> looks good, anything in dmesg?01:16
T42<edp_17> dmesg (cable connected with Developer mode) : https://paste.ubuntu.com/p/WM5NNsmwZJ/01:18
T42<edp_17> The wifi connection also get lost even if the cable is not connected.01:19
T42<edp_17> Where should I add that line in sec_bat_cable_work()?01:20
T42<elros34> in line I have linked. Are you sure you do not have any leftovers in udev rules?01:21
T42<edp_17> I am sure. I've deleted those two rules and restarted it with : udevadm control --reload01:21
T42<edp_17> Also, restarted usb-moded service.01:22
T42<edp_17> Only then, I tried to connect/disconnect the cable.01:22
T42<edp_17> The line you linked (L2621) is in sec_bat_monitor_work() not in sec_bat_cable_work().01:24
T42<elros34> second link 280701:25
T42<edp_17> Ah, I see now. Should I keep the other one in sec_bat_monitor_work()?01:27
T42<elros34> definitely no01:27
T42<edp_17> Okay, let me try that.01:28
T42<elros34> what's that: https://github.com/edp17/android_kernel_samsung_exynos5433/commit/eb491f9fd8adcd8fe1ddfbfd6c27f9fe6d692880#diff-26f032b5a0a7b160e6da485c77b8314cea6bef59d53fdefb603748b7a856e6e5, power_supply_sysfs.c change can hide some bugs and cause hard to debug issues01:30
T42<edp_17> It was coming from my los14.1 base: https://github.com/edp17/android_kernel_samsung_exynos5433/commit/4f642b64ba9a506a2a42dd04905844d3526e63b001:33
T42<edp_17> In "dmesg -w" there were loads of "[   49.002695] [c4] power_supply max77843-fuelgauge: driver failed to report `status' property: -22" messages and I got suggestion to stop it with that change.01:34
T42<elros34> I do not like this patch, it can hide reason for your unresponsive issue or just hide cpu high usage. There is bettere way to fix this01:35
T42<edp_17> According to Telegram log, Bird Zhang suggested that on 11 May 2020.01:36
T42<elros34> remove this line instead: https://github.com/edp17/android_kernel_samsung_exynos5433/blob/a06e248eafb831411afbf3bc57f4a47d50a89fc3/drivers/battery/max77843_fuelgauge.c#L2201:41
T42<elros34> there is no status property in this fuelgauge01:42
T42<edp_17> Okay, thanks. I'll revoke what Bird Zhang suggested and remove this line instead.01:45
T42<elros34> there can be more similar bugs in other drivers01:46
T42<edp_17> Status report: Moving that line into sec_bat_cable_work() works flawlessly. (The ssh connection stays alive with all three other usb connection and they all do work fine.)02:01
T42<edp_17> However, reverting that powersupply spam fix and removing that recommended fuelgauge line caused the device stuck on the Sailfishos logo (not the device boot logo).02:03
T42<edp_17> Many thanks for the help, tomorrow I'll try to apply the same change on my other device hoping it will fix the usb-mode issue there as well. :D Have a good night and thanks again!02:04
T42<elros34> I guess you will still have little issue with charger02:06
T42<elros34> like I said there can be more such a spam bugs, if you can manage to get dmesg/journal from that stuck on sfos log this can reveal another broken driver.  Good job and good night anyway02:06
T42<edp_17> Thanks! 👍02:07
T42<Mat60000> IS someine use Xperia 5 with sailfish as daily driver ?07:01
T42<Ayman_rgab> i fix the same issue by adding get_property() of some property see https://pastebin.com/8s36LcuB (re @edp_17: In "dmesg -w" there ...)07:47
T42<Ayman_rgab> this one worked for me (re @edp_17: Ah, I see now. Shoul...)07:51
T42<Ayman_rgab> but mtp can not mounted on pc side07:51
T42<edp_17> Might be that mtp has a bug in your kernel. I remember had to change some things on another device with older kernel.09:54
T42<Ayman_rgab> Like what10:17
T42<edp_17> I'll dig out that for you once am back at my PC.10:20
T42<Ayman_rgab> Thanks bro10:20
T42<edp_17> @Ayman_rgab : This is the MTP fix I was talking about. (Elros has given me for my i9100 port): https://github.com/edp17/android_kernel_samsung_smdk4412/commit/519e589f454fc8237d822e96bb5479d28bf8e9a312:18
T42<elros34> this is only for old kernels, author probably Benoit Goby12:23
T42<Ayman_rgab> yes 3.18.140 already support function fs12:30
T42<edp_17> Have you tried mtp function on the android base? I guess that works fine in there but worth to double check to ensure.12:32
T42<elros34> I guess we do not use mtp same way as android otherwise we wouldn't need that functionfs patch unless something changed overtime12:33
T42<Ayman_rgab> i'm using this config for mtp https://hastebin.com/suwiroyoca.ini12:33
T42<Ayman_rgab> it works (re @edp_17: Have you tried mtp f...)12:34
T42<elros34> what is the file you showed? Did you created it or what?12:35
T42<Ayman_rgab> it's from usb-moded-mtp-mode-android package12:36
T42<elros34> I do not have such a package installed12:37
T42<edp_17> Oh, what mal has suggested to install. I don't have that installed.12:37
T42<Ayman_rgab> https://github.com/sailfishos/usb-moded/blob/master/config/dyn-modes/mtp_mode-android.ini12:37
T42<edp_17> When you had that discussion, I also checked my packages and had installed that you had.12:37
T42<Ayman_rgab> so might be wrong one (re @elros34: I do not have such a...)12:37
T42<edp_17> I think you should put them back and mtp will work.12:37
T42<elros34> here is default file which you should already have: https://github.com/mer-hybris/droid-hal-configs/blob/master/sparse/etc/usb-moded/dyn-modes/mtp_mode-droid.ini12:38
T42<Ayman_rgab> it exist also (re @elros34: here is default file...)12:40
T42<edp_17> @elros34 : I've applied that usb-moded fix on my S4 (i9505) and it has improved.12:41
T42<Ayman_rgab> i'll remove them (re @edp_17: I think you should p...)12:41
T42<Ayman_rgab> me too thanks to @elros34 (re @edp_17: @elros34 : I've appl...)12:42
T42<edp_17> @elros34 : The usb selection window pops up and MTP mode works as expected. However, when the Developer mode is selected, I cannot connect the device with ssh, and when Charging only is selected, it mounts all partitions. :D12:42
T42<elros34> hm, what about when you connect charger?12:44
T42<Ayman_rgab> all modes work with me also tether mode (re @edp_17: @elros34 : The usb s...)12:45
T42<Ayman_rgab> just charging device only (re @elros34: hm, what about when ...)12:47
T42<elros34> no popup?12:48
T42<Ayman_rgab> on charger ? no12:48
T42<Ayman_rgab> on pc menu poup12:48
T42<Ayman_rgab> on pc menu popup (edited)12:49
T42<elros34> so you have POWER_SUPPLY_TYPE property?12:49
T42<Ayman_rgab> yes (re @elros34: so you have POWER_SU...)12:49
T42<elros34> ah so only @edp_17's driver is missing it12:49
T42<Ayman_rgab> yes and it causes "driver failed to report `status' property: -22" i guess12:51
T42<elros34> no that would be POWER_SUPPLY_STATUS property12:52
T42<Ayman_rgab> i remove usb-moded-mtp-mode-android package now device didn't appear in pc13:11
T42<Ayman_rgab> i removed usb-moded-mtp-mode-android package now device didn't appear in pc (edited)13:11
T42<Ayman_rgab> i removed usb-moded-mtp-mode-android package now device didn't appears on pc (edited)13:11
T42<elros34> what other usb-moded packages do you have installed?13:12
T42<Ayman_rgab> also developer mode didn't work13:14
T42<Ayman_rgab> https://pastebin.com/cLxVaDZb (re @elros34: what other usb-moded...)13:16
T42<Ayman_rgab> tether mode works13:16
T42<elros34> you were supposed to remove usb-moded-mtp-mode*. remove also  usb-moded-developer-mode usb-moded-defaults and keep only usb-moded-defaults-android (not sure if that is even neede)13:18
T42<edp_17> No usb selection window pops up. 'Only' the device starts charging. (re @elros34: hm, what about when ...)13:21
T42<elros34> ok13:22
T42<Ayman_rgab> @elros34 couldn't remove this package https://pastebin.com/WTdyFfY613:32
T42<elros34> install usb-moded-defaults-android13:33
T42<Ayman_rgab> https://pastebin.com/0WYLaesB13:34
T42<Ayman_rgab> reboot ?13:34
T42<Ayman_rgab> ls /etc/usb-moded/dyn-modes/13:35
T42<Ayman_rgab> connection_sharing.ini  mtp_mode-droid.ini13:35
T42<Ayman_rgab> is this ok13:35
T42<elros34> I also have developr_mode-android from jolla-delevloper-mode package, why you do not have this?13:38
T42<elros34> maybe something change in patterns13:39
T42<Ayman_rgab> reinstall jolla-developer-mode add this config13:44
T42<Ayman_rgab> now developer mode work mtp didn't13:46
T42<elros34> maybe you need something like that for mtp: https://github.com/mer-hybris/droid-config-sony-lena/blob/master/sparse/etc/usb-moded/usb-moded-configfs-lena.ini13:48
T42<edp_17> What is this doing?13:50
T42<edp_17> Can it help if developer mode doesn't work?13:50
T42<elros34> I think depends on what you have in /config13:52
T42<A_T_R> From where I can get Advanced-cam (camera application) for sailfish13:52
T42<elros34> chum?13:53
T42<A_T_R> Oh ok13:53
T42<A_T_R> I was searching in Jolla store :(13:53
T42<elros34> lol13:53
T42<Ayman_rgab> didn't work (re @elros34: maybe you need somet...)13:55
T42<elros34> so debugging time:)13:56
T42<A_T_R> Download chum-gui.rpm file and tap on it to install chum ?13:56
T42<Ayman_rgab> with this config https://github.com/sailfishos/usb-moded/blob/master/config/dyn-modes/mtp_mode-android.ini device shows on pc but can't be mounted (re @elros34: so debugging time:))13:57
T42<A_T_R> https://irc.thaodan.de/.imgstore/a123774a/file_4214.jpg13:59
T42<Ayman_rgab> @elros34 this log when connected to mtp https://pastebin.com/9YSHhGXN14:02
T42<A_T_R> In Advanced camera everything is black (not working ?)14:09
T42<Ayman_rgab> usb_moded[2748]: unexpected change '/sys/class/android_usb/android0/functions' : 'mtp' -> 'mtp,acm' what could make this change ?14:14
T42<edp_17> Yeah, on the device where Developer mode doesn't work, there is no /config/usb_gadget (re @elros34: I think depends on w...)14:20
T42<Ayman_rgab> this config fix developer mode https://github.com/sailfishos/usb-moded/blob/master/config/dyn-modes/developer_mode-android.ini14:21
mal@Ayman_rgab are you sure there is no android side usb process still running?14:21
mal@Ayman_rgab didn't that config come from one of the packages I mentioned yesterday?14:22
T42<Ayman_rgab> yes i disable all of them also init.${vendor}.usb.rc (re @SailfishFreenodeIRCBridgeBot: <mal>@Ayman_rgab are...)14:23
malcheck "ps aux | grep usb"14:23
maljust to be sure14:23
T42<Ayman_rgab> mtp yes (re @SailfishFreenodeIRCBridgeBot: <mal>@Ayman_rgab did...)14:23
T42<Ayman_rgab> okay (re @SailfishFreenodeIRCBridgeBot: <mal>check "ps aux |...)14:24
T42<edp_17> What about jolla-camera? (re @A_T_R: In Advanced camera e...)14:24
T42<A_T_R> Camera work,video recording not (re @edp_17: What about jolla-cam...)14:26
T42<edp_17> I have more lines at [options] in there. (re @Ayman_rgab: this config fix deve...)14:27
T42<edp_17> I have black screen in both camera apps (jolla-camera and advanced). At least one of them works for you. (re @A_T_R: Camera work,video re...)14:28
mal@A_T_R which android base?14:29
T42<A_T_R> 17.114:30
T42<A_T_R> hybris-17.114:30
malwhen did you last time update the patches of android side build?14:30
T42<elros34> @Ayman_rgab is that mtp log again with not default usb-moded package?14:31
mal@A_T_R there was a fix for video recording last month in hybris-patches repo, do you have it?14:31
T42<Ayman_rgab> mal: ps aux | grep usb https://pastebin.com/QdsT2jQP14:31
T42<A_T_R> Yeah applied that14:31
T42<elros34> @Ayman_rgab  did you disable importing of any ini*usb*rc?14:32
maland still doesn't work? odd14:32
mal@A_T_R then you probably need to provide some logs14:32
T42<A_T_R> yeah ,not working14:32
T42<Ayman_rgab> yes (re @elros34: @Ayman_rgab is that ...)14:32
T42<A_T_R> which logs ,dmesg only?14:32
mallogcat14:32
T42<A_T_R> ok14:32
T42<elros34> @Ayman_rgab why? So many request to remove it and still14:33
T42<Ayman_rgab> this on  /vendor/etc/init/init.${vendor}.usb.rc (re @elros34: @Ayman_rgab  did you...)14:33
malthat seems ok14:33
T42<Ayman_rgab> you can start from line 909 (re @elros34: @Ayman_rgab why? So ...)14:33
T42<elros34> start what, I asked you to use specific package/config file but in vain14:36
T42<Ayman_rgab> i did a fresh install now i have theses packages by default14:37
T42<Ayman_rgab> usb-moded14:37
T42<Ayman_rgab> usb-moded-defaults14:37
T42<Ayman_rgab> usb-moded-developer-mode14:37
T42<elros34> For me it's sane approach to debug known working config instead debuggin something which might not even supposed to work14:37
T42<Ayman_rgab> about log file (re @elros34: start what, I asked ...)14:37
T42<elros34> so again not these packages we were talking about14:38
T42<Ayman_rgab> i'll install usb-moded-defaults-android i just made a fresh install (re @elros34: so again not these p...)14:39
T42<elros34> if you think these are the correct then at least make sure other devices use them14:40
T42<Ayman_rgab> i'm using kernel patch also14:42
T42<elros34> does your device even use gadget or configfs14:46
T42<elros34> android0*14:46
T42<Ayman_rgab> android014:46
T42<A_T_R> @mal logcat - camera https://pastebin.ubuntu.com/p/wtrMYBgryx/14:53
T42<Ayman_rgab> nothing usefull (re @A_T_R: @mal logcat - camera...)15:12
T42<elros34> yes you should reboot, and then start advanced camera so all usefull logs since boot and app start are included without useless info. It's already hard to read this flood of logs so make sure they are minimal to show the issue15:23
T42<A_T_R> LOGCAT useful ? https://pastebin.ubuntu.com/p/D2GfKctVTs/16:46
T42<Ayman_rgab> @elros34 Bluetooth also didn't work unless i restart bluetooth service do you think it's the same issue as usb udev16:57
T42<Ayman_rgab> turning bluetooth on and off didn't trigger udev only if i restart the service manually https://pastebin.com/MZqccjED16:59
T42<Ayman_rgab> where's command you run ? (re @A_T_R: LOGCAT useful ? http...)17:00
T42<Ayman_rgab> where's the command you run ? (edited) (re @A_T_R: LOGCAT useful ? http...)17:00
T42<A_T_R> simply run `logcat`17:01
piggz_christ the PP can be infuriaiting .... with the dsme power buggon plugin disabled so i can debug the slow startups, it now just reboots every time it sleeps!17:07
T42<Ayman_rgab> `logcat -b main,system,events,crash | grep -v libprocessgroup` (re @A_T_R: simply run logcat)17:08
xmntell me about it. It's both great and challenging at the same time piggz_17:08
T42<elros34> @A_T_R always provide command prompt with command you execute, it really helps and it doesn't requireany efort from you17:16
T42<A_T_R> Oh sorry I will provide that too from next logs17:17
T42<Ayman_rgab> @elros34 this's what happens when i'm trying to turn bt on https://pastebin.com/3JMq8yyE18:23
T42<Ayman_rgab> Can we use mainline with sailfish ?19:35
T42<elros34> sure why not19:36
T42<Ayman_rgab> No hybris 🤔19:38
T42<Ayman_rgab> I managed to boot with mainline on pmos19:40
T42<elros34> no hybris -> more all kind of issues, see just recent message from piggz19:40
piggz_however, it does somewhat work :) ... just be prepared for pain!19:58
piggz_xiamoi mipad 2 was also somehwat native ... used an android kernel source + mesa, and that worked well19:59
T42<Ayman_rgab> lol20:01
T42<Ayman_rgab> on mainline mali Midgard/Bifrost GPUs supported by Panfrost driver i guess20:04

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