*** amccarthy is now known as Guest1976 | 00:00 | |
*** amccarthy_ is now known as amccarthy | 00:00 | |
T42 | <edp_17> @elros34 : I've added this change into charger driver: https://github.com/edp17/android_kernel_samsung_exynos5433/commit/fbb597365816b34160eb40fd04e8a77642d21e8c | 00:10 |
---|---|---|
T42 | <elros34> not sure this is correct, you will get signal on every property read | 00: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#L989 | 00:13 |
T42 | <elros34> not sure if anything but userspace call this but worth to add some pr_info there | 00: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 easier | 00:17 |
T42 | <elros34> btw &charger->val->intval is for sure wrong argument | 00:19 |
T42 | <elros34> it must be struct power_supply | 00:20 |
mal | if the uevent value changes then why is there no udev message about that | 00:29 |
mal | I mean for the usb path | 00:29 |
mal | that POWER_SUPPLY_ONLINE=1 | 00:30 |
T42 | <elros34> because there is no power_supply_changed() in in driver for usb or charger but only for battery | 00: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#L2621 | 00:32 |
T42 | <edp_17> Okay, Thanks! | 00:33 |
T42 | <elros34> it might be called too often but you will see | 00:36 |
T42 | <edp_17> With the other change I added, the kernel didn't compile anyway. :D | 00: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#L2807 | 00:38 |
mal | is battery driver really the correct place? | 00:47 |
T42 | <elros34> I guess, there is no reference to psy_usb in max77843_charger.c | 00: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 works | 01:04 |
T42 | <elros34> otherwise there will be no difference between usb and charger | 01:05 |
T42 | <elros34> pc usb connection/charger | 01: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 events | 01:10 |
T42 | <elros34> maybe the place is wrong and you should add line to sec_bat_cable_work instead | 01: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 --reload | 01: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 2807 | 01:25 |
T42 | <edp_17> Ah, I see now. Should I keep the other one in sec_bat_monitor_work()? | 01:27 |
T42 | <elros34> definitely no | 01: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 issues | 01:30 |
T42 | <edp_17> It was coming from my los14.1 base: https://github.com/edp17/android_kernel_samsung_exynos5433/commit/4f642b64ba9a506a2a42dd04905844d3526e63b0 | 01: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 this | 01: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#L22 | 01:41 |
T42 | <elros34> there is no status property in this fuelgauge | 01: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 drivers | 01: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 charger | 02: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 anyway | 02: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 side | 07: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 what | 10:17 |
T42 | <edp_17> I'll dig out that for you once am back at my PC. | 10:20 |
T42 | <Ayman_rgab> Thanks bro | 10: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/519e589f454fc8237d822e96bb5479d28bf8e9a3 | 12:18 |
T42 | <elros34> this is only for old kernels, author probably Benoit Goby | 12:23 |
T42 | <Ayman_rgab> yes 3.18.140 already support function fs | 12: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 overtime | 12:33 |
T42 | <Ayman_rgab> i'm using this config for mtp https://hastebin.com/suwiroyoca.ini | 12: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 package | 12:36 |
T42 | <elros34> I do not have such a package installed | 12: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.ini | 12: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.ini | 12: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. :D | 12: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 ? no | 12:48 |
T42 | <Ayman_rgab> on pc menu poup | 12: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 it | 12:49 |
T42 | <Ayman_rgab> yes and it causes "driver failed to report `status' property: -22" i guess | 12:51 |
T42 | <elros34> no that would be POWER_SUPPLY_STATUS property | 12:52 |
T42 | <Ayman_rgab> i remove usb-moded-mtp-mode-android package now device didn't appear in pc | 13: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 work | 13:14 |
T42 | <Ayman_rgab> https://pastebin.com/cLxVaDZb (re @elros34: what other usb-moded...) | 13:16 |
T42 | <Ayman_rgab> tether mode works | 13: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> ok | 13:22 |
T42 | <Ayman_rgab> @elros34 couldn't remove this package https://pastebin.com/WTdyFfY6 | 13:32 |
T42 | <elros34> install usb-moded-defaults-android | 13:33 |
T42 | <Ayman_rgab> https://pastebin.com/0WYLaesB | 13: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.ini | 13:35 |
T42 | <Ayman_rgab> is this ok | 13: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 patterns | 13:39 |
T42 | <Ayman_rgab> reinstall jolla-developer-mode add this config | 13:44 |
T42 | <Ayman_rgab> now developer mode work mtp didn't | 13: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.ini | 13: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 /config | 13:52 |
T42 | <A_T_R> From where I can get Advanced-cam (camera application) for sailfish | 13:52 |
T42 | <elros34> chum? | 13:53 |
T42 | <A_T_R> Oh ok | 13:53 |
T42 | <A_T_R> I was searching in Jolla store :( | 13:53 |
T42 | <elros34> lol | 13: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.jpg | 13:59 |
T42 | <Ayman_rgab> @elros34 this log when connected to mtp https://pastebin.com/9YSHhGXN | 14: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.ini | 14: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 |
mal | check "ps aux | grep usb" | 14:23 |
mal | just to be sure | 14: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.1 | 14:30 |
T42 | <A_T_R> hybris-17.1 | 14:30 |
mal | when 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/QdsT2jQP | 14:31 |
T42 | <A_T_R> Yeah applied that | 14:31 |
T42 | <elros34> @Ayman_rgab did you disable importing of any ini*usb*rc? | 14:32 |
mal | and still doesn't work? odd | 14:32 |
mal | @A_T_R then you probably need to provide some logs | 14:32 |
T42 | <A_T_R> yeah ,not working | 14:32 |
T42 | <Ayman_rgab> yes (re @elros34: @Ayman_rgab is that ...) | 14:32 |
T42 | <A_T_R> which logs ,dmesg only? | 14:32 |
mal | logcat | 14:32 |
T42 | <A_T_R> ok | 14:32 |
T42 | <elros34> @Ayman_rgab why? So many request to remove it and still | 14:33 |
T42 | <Ayman_rgab> this on /vendor/etc/init/init.${vendor}.usb.rc (re @elros34: @Ayman_rgab did you...) | 14:33 |
mal | that seems ok | 14: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 vain | 14:36 |
T42 | <Ayman_rgab> i did a fresh install now i have theses packages by default | 14:37 |
T42 | <Ayman_rgab> usb-moded | 14:37 |
T42 | <Ayman_rgab> usb-moded-defaults | 14:37 |
T42 | <Ayman_rgab> usb-moded-developer-mode | 14:37 |
T42 | <elros34> For me it's sane approach to debug known working config instead debuggin something which might not even supposed to work | 14: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 about | 14: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 them | 14:40 |
T42 | <Ayman_rgab> i'm using kernel patch also | 14:42 |
T42 | <elros34> does your device even use gadget or configfs | 14:46 |
T42 | <elros34> android0* | 14:46 |
T42 | <Ayman_rgab> android0 | 14: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 issue | 15: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 udev | 16:57 |
T42 | <Ayman_rgab> turning bluetooth on and off didn't trigger udev only if i restart the service manually https://pastebin.com/MZqccjED | 16: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 |
xmn | tell 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 you | 17:16 |
T42 | <A_T_R> Oh sorry I will provide that too from next logs | 17:17 |
T42 | <Ayman_rgab> @elros34 this's what happens when i'm trying to turn bt on https://pastebin.com/3JMq8yyE | 18:23 |
T42 | <Ayman_rgab> Can we use mainline with sailfish ? | 19:35 |
T42 | <elros34> sure why not | 19:36 |
T42 | <Ayman_rgab> No hybris 🤔 | 19:38 |
T42 | <Ayman_rgab> I managed to boot with mainline on pmos | 19:40 |
T42 | <elros34> no hybris -> more all kind of issues, see just recent message from piggz | 19: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 well | 19:59 |
T42 | <Ayman_rgab> lol | 20:01 |
T42 | <Ayman_rgab> on mainline mali Midgard/Bifrost GPUs supported by Panfrost driver i guess | 20:04 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!