Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix notification LED on jasmine #49

Closed
wants to merge 1 commit into from

Conversation

p4block
Copy link
Contributor

@p4block p4block commented Sep 29, 2018

The HAL behaves in mysterious ways and requires this blink file to be writable. Also sync permissions with stock ROM just in case.

The HAL behaves in mysterious ways and requires this blink file to be writable. Also sync permissions with stock ROM just in case.
@phhusson
Copy link
Owner

You tested that modified rw-system.sh right?

@p4block
Copy link
Contributor Author

p4block commented Sep 29, 2018

I patched my current rw-system instead of building a new system, but yes, the files get successfully modified.

There still seems to be an issue where the LED is randomly initialized to be "on" on android start.
It seems to be related to charging. If the LED has booted as off, charging will not turn it on. If the LED has booted as on, (and manually turned off), charging will turn it back on.

I will edit this once I find a final fix.

@suwakowww
Copy link
Contributor

Feedback for wayne:
I tried to modified like this on my phone. (append these commands on the same file but append it after line 137) But it still "always on" after several reboots, (and turn back normal after reboot twice.)

@tytydraco
Copy link
Contributor

The HAL behaves in mysterious ways and requires this blink file to be writable. Also sync permissions with stock ROM just in case.

I had my tester give this a shot on the AEX Pie GSI (arm64). It doesn't seem to work. His duty_pcts was root:root so I had him chown system:system like stock. No dice.

@tytydraco
Copy link
Contributor

Some more feedback: It breaks itself when plugged into power. However, If one reboots twice (with the cable unplugged), the issue is resolved. However, charging the device will no longer trigger the LED. So it seems that there's most likely an issue with the LED receiving events..?

Copy link
Contributor

@tytydraco tytydraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This device tree file includes all the proper commands necessary for this to work. Please update it based on this:

https://github.com/xiaomi-sdm660/android_device_xiaomi_jasmine/blob/41c4682966532c1195585ed4e40c52a3ed06fc1c/light/android.hardware.light%402.0-service.xiaomi_jasmine.rc

on boot
    # Notification LED
    chown system system /sys/class/leds/red/blink
    chown system system /sys/class/leds/red/brightness
    chown system system /sys/class/leds/red/duty_pcts
    chown system system /sys/class/leds/red/pause_hi
    chown system system /sys/class/leds/red/pause_lo
    chown system system /sys/class/leds/red/ramp_step_ms
    chown system system /sys/class/leds/red/start_idx

    chmod 660 /sys/class/leds/red/duty_pcts
    chmod 660 /sys/class/leds/red/pause_hi
    chmod 660 /sys/class/leds/red/pause_lo
    chmod 660 /sys/class/leds/red/ramp_step_ms
    chmod 660 /sys/class/leds/red/start_idx

@penn5
Copy link
Contributor

penn5 commented Jan 30, 2019

@p4block this fixes on Oreo vendor, Pie vendor or both?

@likeadragonmaid
Copy link

@tytydraco Yes. I was the tester. Btw are there any updates on this issue? @phhusson

@tytydraco
Copy link
Contributor

Please close this thread. A proper fix was merged into the main branch.

@phhusson phhusson closed this May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants