support for led notifications
-
@matteo in this link they mention a problem with the led driver your phone has (I don't have one so I could be totally wrong). And this link mentions how you could get it to show something (if it works).
So do you get any results with
find /sys/bus/i2c -name select_engine
or withfind /sys/bus/i2c -name lp5562
-
@matteo If the led went off with
sudo bash -c "echo 1 > /sys/...../brightness"
then you are on to something. Try other values (64, 255).
Also check whatcat /sys/.../onoff
says orcat /sys/.../enable
. -
@wdehoog Willem, I started looking around at the references you gave to me. According to an other post in this Forum, it seems the RGB leds are disabled on purpose; see here below the section of the kernel file
leds-lp5562.c
commented out for this reason:static struct lp55xx_led_config lp5562_led_config[] = { /*{ .name = "R", .chan_nr = 0, .led_current = 20, .max_current = 40, }, { .name = "G", .chan_nr = 1, .led_current = 20, .max_current = 40, }, { .name = "B", .chan_nr = 2, .led_current = 20, .max_current = 40, },*/ { .name = "m86_led", .chan_nr = 0, .led_current = 80, .max_current = 80, }, };
I think this is the major culprit for not having any other colors but the white for the RGB led installed on the Meizu Pro5. My question is: how can I flash only this part of the kernel, prior modifying that code to see if it helps to solving that issue?
-
@matteo I dindβt find Time to do it but I think the best way would be to download the kernel turbo from github, modify the driver, compil the kernel and simply copy paste the module on the device with a write fs activated. My plan was to do that like this.
-
@matteo if the led support is build as a module then this module can be copied to the rootfs. If not I guess you can test a new kernel with
fastboot boot
which boots the kernel without installing it first. -
You do miss a point here: Channel 0 in this definition would then be used by red and white. So to me that sounds as if there is no RGB led installed, but just a white one. You will probably gain nothing from this experiment, maybe even damage your hardware. I would be very careful, this code was commented for a reason (and reminds me of deleting unused code, never leave commented code like this in a production driver.)
-
@Flohack they are in fact 4 leds on the meizu pro 5 hardware, RGB and White. We can see the colors when the phone is running Flyme. I dont know the reason Why they only activate the white one but in hardware point of view, from the lp5562 datasheet we can see that it is able to drive 4 Leds, so I'm not sure that we can damage anythings on the phone by trying to activate other channels registers.
If you don't feel it, I can try it as I have 5 Pro5 and one of the isn't usable as phone because the IMEI are missing.
but you will have to wait as I don't have so many time to do that for now.
-
Ok in this case I still dont get the same channel number 0 for red and white?
-
@Flohack in my opionion, normally not, it must be a channel per color. a Year ago I modifyed the file already in order to use the 3 other channels but I don't remember where I put this file ...
-
@Flohack @matteo Ok I have to correct what I say, you can forget the RGB on Meizu Pro 5, I unmounted one, and there is only a single white LED, no RGB LED on the PCB. I then powered up my Pro5 running Flyme and try to send it different notification (low batt, charging, sms messaging, missed call), all the time the notification was white, the only difference between sms and call is the led pattern. When a sms arrive, the LED is breathing like actually on ubport, when a call is missed, the led blink once quickly, then once quickly with a breath effect.
They are no LED indications on low battery or charging on Flyme.There is no way of getting RGB colors on Meizu Pro 5.
We can only play with pattern.
That's why the driver was commented and the white LED was connected on the Red channel from the LD5562 chip. -
@AlainW94 I assumed this sorry to say
-
@Flohack Yes no problem... I'm too much utopian...
BUT I noticed a hudge difference between Pro 5 on flyme and Pro5 on Ubports regarding the flash LED back to the phone for the camera, on the Ubport, when you would like to use it as a torch, both LED are on (the white and amber) which give a kind of warm white not really nice for pictures at low light. On Flyme, only the white LED of the flash is on, which give a nice cold white.How can we handle this on ubports ?
-
@AlainW94 thank you Alain for your attempt anyways...now at least we know it isn't worth to bother anymore with such an issue.
-
@matteo Yes true, even if I was hoping that it was an issue !
-
Hi,
I have submited a bug report on that topics:
https://github.com/ubports/ubuntu-touch/issues/1377
the point is: user is mislead with LED messaging notification and LED plugged notification being the same. If can't find a way to make them different, it's clearer to disable the plugged LED notification so user dont think there is a message every time on the phone and switch on screen every times
-
The post at 13 Jan 2020, 23:29 suggests it is possibe to show different blink patterns (but ofcourse all white). It would be interesting to find out how to trigger these different modes.
As for disabling the charging- or message received indication what would be the best way? A menu in the system settings? A config file in phablets home dir?
The led notifications are guarded by a unity8. How can unity8 detect what phone/hardware it is running on?
-Edit-
I have been working on a way to disable showing charging state.
See https://github.com/ubports/unity8/pull/283