Thursday, 2020-03-26

T42<edp_17> I have '/sys/class/misc/notification/led' and '/sys/class/misc/notification/notification_enabled'.00:00
T42<edp_17> If I put 1 into '/sys/class/misc/notification/led' and into '/sys/class/misc/notification/notification_enabled', the softkeys are lighting up.00:00
T42<edp_17> If I put 0, they are off.00:00
T42<edp_17> 0 and 1 are the only values I can use in there (/sys/class/misc/notification/led) to light up or off the softkeys but I don't know how to configure the 60-white.ini to make them work for notifications.00:03
T42<edp_17> I have looked for this in the porters log and on the internet, but didn't find any info.00:04
T42<RealDanct12> @birdzhang btw if you're going to come back with hybris-16.0 port which has a crash bug then can you try this? https://github.com/libhybris/libhybris/pull/44100:07
T42<birdzhang> there are some devices with hardware keyboard, you should better take a look @edp_1700:08
T42<edp_17> No, these are not hw keys, softkeys only.00:08
T42<birdzhang> @RealDanct12 yeah, i will try this weekend on my another computer00:09
T42<RealDanct12> @birdzhang [@RealDanct12 yeah, i will try this weekend on ā€¦], šŸ‘Œ00:09
T42<birdzhang> @RealDanct12 iā€™m porting davinci now, and broken vince build environments00:10
T42<edp_17> There is a home button in the middle under the screen and its left and right side there are two soft keys ('Recent apps' and 'Back' buttons in Android).00:10
T42<elros34> if you have led configuration and mce-plugin-libhybris installed then run mce in debug mode to figure out why it doesn't work like expected00:12
T42<birdzhang> i know, whatever they called, i remember onyx has the keys00:13
T42<edp_17> Thanks both.00:13
T42<edp_17> I have changed the LedType to Binary in hw-settings.ini and the BackEnd to binary in /etc/mce/60-binary.ini, then tested it with csd. The logs show it tried to blink the leds, but nothing happened. (mce was started with -v): https://pastebin.com/8udk2kBc00:21
T42<elros34> try something like: systemctl stop mce; mce -Tq -l plugin*:* -l sysfs*:* -l hybris*:* -l modules/led.c:*" (taken from this channel logs)00:23
T42<edp_17> Here it is: https://pastebin.com/4J13uheL00:26
T42<edp_17> I am not sure whether I need to use the softkeys as binary or as white.00:26
T42<edp_17> Sorry, this is the right log: https://pastebin.com/nGXA1TcX00:28
T42<elros34> looks like backend is not loaded00:32
T42<edp_17> Backend? Is it a service?00:33
T42<elros34> https://github.com/mer-hybris/mce-plugin-libhybris/blob/master/sysfs-led-main.c#L502 so led_control_binary_probe fail00:34
T42<edp_17> Thanks. How can I know whether I need to use binary or white backend?00:37
T42<elros34> or even earlier: //sys/class/misc/notification/led: open: No such file or directory00:37
T42<edp_17> I think the '/sys/class/misc/notification/led' should be set as 'LedDirectory' rather than 'LedBrightnessFile'00:40
T42<edp_17> And I retry with backend=white now.00:40
T42<elros34> so /sys/class/misc/notification/led is directory or file? can you cat it?00:41
T42<edp_17> It is a file.00:41
T42<elros34> how about reading it?00:42
T42<edp_17> Default value is 0. If I put 1 into it (echo 1 > .../led) the softkeys are lit up if there is a 1 in '/sys/class/misc/notification/notification_enabled' file00:42
T42<edp_17> Yes, I can display it with vi. The content is 0.00:43
T42<elros34> vi? just use cat. I am wondering why /sys/class/misc/notification/led can't be read according to mce log00:44
T42<edp_17> vi or cat, it is readable: https://pastebin.com/GeWexDk000:46
T42<edp_17> I have changed a few things (backend=white and the /sys/class/misc/notification/led is LedDirectory) and I got this: https://pastebin.com/Fmg1Gj4100:49
T42<edp_17> I think I need to define a brightness file too.00:49
T42<edp_17> I have defined a brightness file in /home/nemo/brightness with a value 1 and retried: https://pastebin.com/Vd27R0u900:52
T42<elros34> as you can see this will clearly not work like that: sysfsval_open_ex(): /sys/class/misc/notification/led//home/nemo/brightness: open: Not a directory00:53
T42<edp_17> Yeah, I just spotted.00:53
T42<elros34> show ls -al /sys/class/misc/notification/00:54
T42<edp_17> But if I do not define the brightness file, it is looking in /sys/class/misc/notification/led/brightness where there is nothing.00:54
T42<elros34> I thought you understand that you need to define file not directory00:55
T42<edp_17> https://pastebin.com/USD9FyaN00:55
T42<elros34> what if you define directory to / and try gain binary backend00:56
T42<edp_17> Yes but I can define two files: brightness and max_brightness. I have tried to set the brightness file to /sys/class/misc/notification/led but didn't work. Then I changed to how it is currently.00:57
T42<edp_17> Keep the brightness and max_brightness definitions as they are now?00:58
T42<elros34> use what you had in binary at the beggining (https://pastebin.com/nGXA1TcX) and put LedDirectory=/00:59
T42<edp_17> It is better now as the key are lit up, but didn't blink and they remained on once I terminated the command with ctrl+c. https://pastebin.com/bSA1DExq01:02
T42<edp_17> Oh, and currently the /sys/class/misc/notification/notification_enabled has 1 in it. (I manually moved into it recently.)01:03
T42<elros34> last write is ///sys/class/misc/notification/led: write: 1 -> 0 so it should disable led01:06
T42<edp_17> I have repeated the test but now I put 0 into /sys/class/misc/notification/notification_enabled01:07
T42<edp_17> The keys remained off.01:07
T42<edp_17> So 1 is required in /sys/class/misc/notification/notification_enabled to make it work otherwise the keys are always off.01:08
T42<edp_17> I have seen the last write 1 -> 0 but the keys remained on. the cat /sys/class/misc/notification/led showed 0 but the keys were on. When I manually put a 0 into it, the keys went off.01:09
T42<edp_17> Are you sure this should be binary? Not white?01:10
T42<elros34> I am not but binary looks sane for me. If writing 0 doesn't work always then it must be faulty kernel driver01:11
T42<elros34> maybe you could play with notification_timeout breathing files01:12
T42<edp_17> It is possible that something is missing from kernel because I needed to apply about 15 commits so there was plenty occasions where I could made mistake.01:13
T42<elros34> that a lot for simple led on/off01:13
T42<edp_17> I know, but as I said these are not leds.01:14
T42<edp_17> And by default the softkeys on this device were not work as "leds". The developer had to add stuff to the kernel to make them work.01:15
T42<edp_17> I have kept the track of those patches as I committed them one by one into my kernel.01:15
T42<edp_17> (Sometimes I needed to combine two at the same time but ultimately I kept the track and description of the patches that I applied.)01:16
T42<edp_17> It works!! šŸ˜„01:21
T42<edp_17> I went back to backend=white and set 'LedBrightnessFile=/sys/class/misc/notification/led' and 'LedDirectory=/' in /etc/mce/60-white.ini.01:22
T42<edp_17> Then with csd, it lit up and blinked!01:22
T42<elros34> could you show mce log from working backend?01:23
T42<edp_17> Yes, I will but now it stopped working again.01:25
T42<edp_17> What I done. I put 0 into /sys/class/misc/notification/notificatin_enabled and retested. The keys remained off.01:25
T42<edp_17> Then I moved 1 into it and tested again but the leds remained off again.01:26
T42<edp_17> I try again.01:26
T42<edp_17> Here is the log but it doesn't work again however it should. https://pastebin.com/gWNnsLx501:31
T42<elros34> Did you read that log? It doesn't even try to enable led01:33
T42<elros34> anyway this looks like best place to start debugging why writting 0 doesn't work sometimes: https://github.com/edp17/android_kernel_samsung_smdk4412/blob/cm-12.1-mtpfix/drivers/input/keyboard/cypress/cypress-touchkey.c#L210101:34
T42<edp_17> Yeah, it looks like. But it worked once when I replace the 60-binary.ini with 60-white.ini01:35
T42<elros34> white backed use pwm so binary is more sane for your driver01:36
T42<edp_17> Okay, I go back to that. But with white it even blinked. šŸ˜”01:37
T42<edp_17> Now the settings doesn't start either. I am rebooting...01:38
T42<edp_17> After reboot and when I put 1 into notification_enabled, it works! Log is here: https://pastebin.com/8JC4HpHp01:41
T42<edp_17> I think when I changed 1 -> 0 in notification_enabled, that has caused the trouble.01:41
T42<edp_17> The other question is how can I set 1 permanently into notification_enabled as it gets reset to 0 with every boot (or I am not sure when exactly).01:42
T42<elros34> create systemd service01:43
T42<edp_17> Thanks. I started mce and retested. Didn't work. šŸ˜³01:46
T42<edp_17> So, it works if I put 1 into notification_enabled every time before I run mce and I need to run mce with that command you gave me.01:52
T42<edp_17> If mce runs as normal, it doesn't work despite I put 1 into the notification_enabled file. Even if I restart mce after I put 1 into that file.01:54
T42<edp_17> Is there recommendation for the Before and WantedBy values of a service that sets 1 into that file?02:05
T42<elros34> why you create service file if it doesn't work in any sane way. Writing 1 to notification_enabled only set bln_enabled  variable: https://github.com/edp17/android_kernel_samsung_smdk4412/blob/cm-12.1-mtpfix/drivers/input/keyboard/cypress/cypress-touchkey.c#L2084. Start debugging kernel driver, it has few printk so even without recompi02:09
T42ling you can get some useful information.02:09
T42<edp_17> Honestly I don't know how to debug kernel driver but I will google it.02:11
T42<edp_17> It will work with backend binary. I have rebooted a few times and csd test works, the keys are blinking with the mce.service on.02:19
T42<edp_17> I'll give another go without putting 1 into the notification_enabled after the reboot.02:20
T42<elros34> good look :)02:20
T42<edp_17> Nope, the 1 is required in there. Once that is sorted the softkeys will work as notification leds.02:21
T42<edp_17> One more question: Is there recommendation for the Before and WantedBy values of a service that sets 1 into that file?02:22
T42<edp_17> Or maybe a tweak in the kernel can do this trick?02:23
T42<elros34> sure 1 is required, and you can init it with 1 instead 0 kernel but udev rules or systemd service way is also not that hard02:24
T42<elros34> in*02:24
T42<edp_17> I'll create a service for this. Thanks for your support again. šŸ˜„02:26
T42<edp_17> I have created a service and it works ok.02:58
T42<edp_17> One minor thing, when the screen is off, both keys are on. šŸ˜ I should set 0 into the /sys/class/misc/notifications/led to switch them off.03:00
T42<RealDanct12> ,,l07:01
T42<RealDanct12> @birdzhang a quick sneak peek video of note 7 sailfish :)07:02
T42<RealDanct12> (Video, 47s) https://irc.thaodan.de/.imgstore/yAgTnDpsST.mp407:02
T42<RealDanct12> I've seen the pop out camera, it's super cool07:03
T42<birdzhang> @RealDanct12 with NotKit's libhybris patch?07:04
T42<RealDanct12> @birdzhang [@RealDanct12 with NotKit's libhybris patch?], Yeah, this device has lipstick crashing everytime07:05
T42<birdzhang> Good news07:05
spiiroin@edp_17 can you show the config file? For a control path like "/sys/class/misc/notification/led/brightness", changing binary/white defaults so that it has "LedDirectory=/sys/class/misc/notification/led" ought to have been enough07:08
spiiroinwhether binary or white should be used depends on how writing to that brightness behaves. if the actual brightness is the same regardless of non-zero brightness value -> binary; if the brightness actually changes when value written changes -> white07:09
T42<birdzhang> @RealDanct12 https://www.youtube.com/watch?v=259CCU6b_EM07:13
T42<RealDanct12> i saw that video, it's pretty nice :)07:14
T42<birdzhang> :)07:14
walidhi try out hybris-14.1, got gui, but very good, and crash . For hybris-15.1 /system partition not mounted08:14
walidhalso firmware and persist08:15
walidhi think fixup-mountpoint not work properly08:15
walidh* not very good gui08:16
T42<birdzhang> for  hybris-15.1  you need mount /system and /vendor use mount service08:17
walidhhow ?08:17
T42č””å”‡é…£ %lastname% was added by: č””å”‡é…£ %lastname%08:21
T42<birdzhang> if your device is not native treble device, check kernel dtsi08:22
T42<birdzhang> on davinci i use https://github.com/sailfish-on-davinci/droid-config-davinci/blob/master/sparse/lib/systemd/system/vendor.mount08:22
T42<birdzhang> or searh logs about system.mount08:22
T42<birdzhang> walidh: show your kernel repo link08:26
walidhnot yet commited, but this repo for halium-7.1 (ubuntu touch ) i use it : https://github.com/walidham/android_kernel_lge_msm8996/tree/halium-7.108:30
T42<birdzhang> so you use lineage-15.1 branch for sailfishos hybris-15.1?08:31
walidhyes08:33
T42<birdzhang> seems okay08:36
T42<RealDanct12> is there anyway to config camera?08:44
T42<RealDanct12> i remember someone here said not to use mk-cam-conf08:44
T42<RealDanct12> because its obsolete or something08:44
T42<edp_17> @spiiroin: 60-binary.ini: https://pastebin.com/7U8xdrXm08:51
T42<edp_17> @spiirioin: I do not have "/sys/class/misc/notification/led/brightness" only have "/sys/class/misc/notification/led" which is a file not a directory. (That's why the "LedDirectory=/sys/class/misc/notification/led" didn't work.)08:54
T42<edp_17> @spiiron: Thanks for the explanation. I needed to use binary as the brightness only had two states, on and off (1 and 0)09:00
T42<edp_17> @elros34 : Now the only hassle is that if I switch off the screen, the "leds" turn on. If there was a SMS I received, they do even blink when the screen is off.09:10
T42<edp_17> Somehow both the /sys/class/misc/notification/led" and /sys/class/misc/notification/notification_enabled" should be controlled together at the same time. If there is no notification, 0 should be set into notification_enabled.09:12
spiiroin@edp_17 normally the led is used only when display is off, blinking can be normal/expected depending on what pattern gets triggered09:13
spiiroini.e. what we want to have is: led activity when display is off and there is unread sms/email/etc09:14
spiiroinalso with default config having charger connected triggers either charging/battery full led pattern09:14
spiiroindefault pattern config might not be suitable for "binary" led types - as it is really hard to tell what it might be about09:16
spiiroinl500d / jolla c has binary led and some modifications were made - IIRC some patterns disabled, some with slightly modified blink period or stte09:18
T42<edp_17> @spiiroin : Thanks. I probably need to take a look into the l500d / jolla c configs to adopt the solution from there. Do you have those devices/configs to share?09:25
T42<elros34> @edp_17 so it enable itself just when you poweroff display? Do you have double tab to wake up enabled?09:27
spiiroinl500d: charging pattern disabled; battery full = blink 1500 ms on, 500 ms off; all notifications = solid on; all panic patterns = 250 ms on, 250 ms off09:28
spiiroinnot in open git & I do not have l500d with me right now, but if someone has one -> it is /etc/mce/*l500d.* files09:29
T42<edp_17> @elros34 : Yes, it enable itself when the screen is off because at boot with a service I set 1 into the notification_enabled.09:29
T42<edp_17> Last night the screen was on when I tested the leds, and it worked as expected. Then before I went to bed I switched off the screen. šŸ˜„09:30
DylanVanAsschespiiroin: I'm also interested in this since it seems that the fading options of the PinePhone notification LED are rather limited to binary blinking, need to confirm this with other pine64  though09:30
T42<edp_17> @spiiroin: Thanks!09:30
T42<elros34> @edp_17 you should have some information in dmesg. If not try echo 8 > /proc/sys/kernel/printk09:31
T42<elros34> what about double tap feature?09:32
T42<edp_17> Thanks @elros3409:32
T42<edp_17> The double tap is not enabled: https://pastebin.com/76y1YQ8c09:34
T42<elros34> I never used it but: "Use fake doubletap:   enabled"09:37
T42<edp_17> Wait for a second! The led may work correctly and the issue with identitying the on charger/off charger states.09:37
T42<edp_17> I just have unplugged the device of charger and the icon shows charging and there was a text at the top 'Charging...' The leds were on.09:38
T42<edp_17> Then I waited a bit and the led went off (the screen is off too).09:38
T42<edp_17> Yeah, the charging icon issue is the next on the list. šŸ˜‰09:39
T42<edp_17> Sometimes, randomly, the devise shows messages like 'Not enough power to charge' or 'Charging...' when it's not on charger at all.09:40
T42<edp_17> Now (I didn't touch the device and haven't got SMS) the leds started to blink for a few times and they went off again.09:41
T42<edp_17> Definitely something is wrong with identifying the on charger/off charger state.09:43
walidhbirdzhang so i must add system.mount , firmware.mount to make them mounted ?09:46
walidhwhat about ld.config.txt ?09:46
T42Xfszvzuhiinp was added by: Xfszvzuhiinp09:47
T42<edp_17> @elros34 : I also never set this "Use fake doubletap:   enabled", it was like this when I installed the build.09:50
T42<elros34> ok, I have same10:08
T42<edp_17> @spiiroin: in which file I should check these: "charging pattern disabled; battery full = blink 1500 ms on, 500 ms off; all notifications = solid on; all panic patterns = 250 ms on, 250 ms off"?10:19
vknechtwalidh, check what fstab files you have in out/ with eg. "find out/ -type f -name *fstab*", then check in "make modules" output if there's one target containing "fstab", then also check relevant fstab files you could have in $ANDROID_ROOT/device10:56
vknechtif some needed fstab is missing in out/ before you build droid-hal package, that could explain the problem10:56
vknechtyou could have to "make <whatever>fstab<whatever>" and/or copy manually the device/.../<whatever>fstab<whatever> in relevant out/ directory10:57
vknechtthen rebuild droid-hal10:58
vknechtmight also need a line like that in droid-hal-$DEVICE.spec, depending on partition layout: https://github.com/mer-hybris/droid-hal-sony-nile/blob/master/droid-hal-common.inc#L3810:58
T42<elros34> vknecht: makefstab_skip_entries / /vendor is needed on devices which package system libs like sony devices11:03
vknechtah, ok11:05
T42ēæŸēæ°č½ø %lastname% was added by: ēæŸēæ°č½ø %lastname%11:11
*** Nico[m] is now known as Nico|MentorforNh11:41
T42<edp_17> Do you know what is responsible for the correct charging on/off and charging full events?12:14
T42<elros34> power_supply events, to track them use udevadm monitor -p12:30
walidhfor hybris-15.1 which dhd version must use ? (sdk 3.2.1)14:00
T42<birdzhang> @RealDanct12 I'm testing @NotKit's libhybris patch on vince , so far so good ;)14:43
UmeaboyHi! Hope everyone's doing OK.15:17
UmeaboyI was wondering..... when you make the local manifest for the device you're porting to, can I exclude the proprietary vendor repo from it?15:19
UmeaboyI mean, older devices uses the proprietary vendor repo from TheMuppets.15:19
UmeaboyIf I build on top of AOSP I mean.15:19
UmeaboyI want it to be done right.15:20
*** OhYash1 is now known as ohyash15:40
UmeaboyOK. I'll be back later..... :)15:43
UmeaboyStay safe everyone.15:43
spiiroin@edp_17 l500d config for reference: https://pastebin.com/M3Rv2CEF15:50
spiiroinDylanVanAssche: ^ might be of interest for you too15:50
DylanVanAsschespiiroin (IRC): Thanks!15:52
T42<edp_17> @spiiroin: Thanks. I have found some topic about it on tjc and seen the reference for a xx.conf file and a xxx-l500d.ini file but I have none of them in /etc/mce. (I mean nothing with xx-i9100.ini or yy-i9100.conf are there.)16:28
T42<edp_17> I am checking what you sent! Thanks.16:28
T42<edp_17> @elros34 : I have checked the power supply with the command you gave me.16:36
T42<edp_17> When I plug the usb cable in: POWER_SUPPLY_NAME: usb and POWER_SUPPLY_ONLINE: 116:36
T42<edp_17> When I unplug it: POWER_SUPPLY_NAME: usb and POWER_SUPPLY_ONLINE: 016:36
T42<edp_17> The POWER_SUPPLY_ONLINE: is always 0 for POWER_SUPPLY_NAME: ac so, it seems correct.16:37
T42<elros34> There is also TYPE: https://git.sailfishos.org/core/usb-moded/blob/master/src/usb_moded-udev.c#L410. You said you have some random usb events. How poser_supply looks like when that happens? I guess mce handle charging: https://git.sailfishos.org/core/mce/blob/master/modules/battery-udev.c16:51
walidhi want change some lib in cm-14.1 rom, now i do it manually (by mount /system in twrp and push them)18:39
walidhcan i add thoses files in saprse/lib folder ?18:40
T42<Sid_48> hi im at the part of verifying kernel configs for the boot.img the command gave me a bunch of unset values for particular configs should i allow them all in the defconfig of kernel ?20:02
DylanVanAsschespiiroin (IRC): The l500d config for the LEDs, does that also work for a RGB led which is binary? I tried to apply the config but it doesn't make a difference20:44
spiiroinDylanVanAssche: pattern config (for mce) is always defined in terms of rgb led with brightness control; mce-plugin-libhybris & backend selection / configuration then maps that rgb pattern config into something relevant for actual led hw in the device22:24
spiiroinso, changing pattern config should always produce some effect. what and whether it makes sense depends on what kind of led you have in the device22:25
spiiroinfor ex the l500d config uses "ffffff" as "color" = "white" -> fine for binary led that is white/off, but probably not what you want for rgb led22:26
spiiroinusing default pattern config, rgb (aka "vanilla") backend - with maxval forced to 1 -> might be better for rgb led where each channel can be turned on/off but has no brightness control22:28
spiirointhat maxval thing should not be needed, but it avoids unnecessary control writes that will not have any visible effect22:29
spiiroinDylanVanAssche: maybe you could elaborate more on the problem you have - there are few rgb led variants that have different enough to have separate backends (e.g. bacon, f5121, hammerhead)22:35
spiiroinone of those just might be better match than the vanilla one22:36
T42brains %lastname% was added by: brains %lastname%23:51

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