ubports / indicator-power Goto Github PK
View Code? Open in Web Editor NEWThe "Battery" indicator for Ubuntu Touch. No longer maintained. See https://github.com/AyatanaIndicators/ayatana-indicator-power
License: GNU General Public License v3.0
The "Battery" indicator for Ubuntu Touch. No longer maintained. See https://github.com/AyatanaIndicators/ayatana-indicator-power
License: GNU General Public License v3.0
currently the flashlight toggle is not available on all devices
there is, however an app that can serve the same function on many devices in the store "utorch"
can the implementation from utorch be used to make the toggle available on more devices?
Device: BQ E4.5
Channel: rc
Build: 2020-w49
Description:
The brightness slider on the indicator screen can be moved when auto adjustment is on. Under System Settings -> Brightness the brightness slider cannot be moved when auto adjustment is set.
Expected behavior:
The brightness slider on the indicator screen also cannot be moved when auto adjustment is on.
Thanks
Originally posted by @josevidalrt in ubports/system-settings#204 (comment)
BQ E5, after “update 634" (dev ch) -- today.
Originally posted by @FlavioMala in ubports/system-settings#204 (comment)
flashligh on redmi dont have flashlight_torch has option we have flashlight _strobe
indicator-power currently handles turning device flashlights on and off in https://github.com/ubports/indicator-power/blob/xenial/src/flashlight.c. To do this, it finds a valid sysfs path from its list of paths and writes a brightness value into it.
This does not seem like an appropriate place to handle finding and setting these values. It would be preferable to have a service which uses IPC to ask to enable and disable the flashlight. This service could better handle per-device quirks than this indicator.
I recently installed this app on my Redmi Note 7 but the indicator in the top menu didn't work (just showed a blank page). So I turned off the permission to show notifications and removed the app but the indicator stays and i've tried multiple times reinstalling the app and uninstalling again, without any luck...
The torch toggle doesn't work on my Redmi Note 9 Pro as it doesn't manage to change the value of /sys/class/leds/led:torch_0/brightness
. Manually setting the value of the node and toggling the torch from the Power menu works just fine, but without doing this manually it fails with flashv2: qpnp_flash_led_brightness_set: Failed to get flash driver data
.
Due to this working manually it makes me thing the problem it's from the indicator itself rather than my kernel.
Thanks.
) = 1 ([{fd=3, revents=POLLIN}])
read(3, "\1\0\0\0\0\0\0\0", 16) = 8
faccessat(AT_FDCWD, "/sys/class/leds/torch-light/brightness", F_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/sys/class/leds/led:flash_torch/brightness", F_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/sys/class/leds/flashlight/brightness", F_OK) = 0
faccessat(AT_FDCWD, "/sys/class/leds/led:switch/brightness", F_OK) = -1 ENOENT (No such file or directory)
faccessat(AT_FDCWD, "/sys/class/leds/led:switch_0/brightness", F_OK) = 0
openat(AT_FDCWD, "/sys/class/leds/flashlight/brightness", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 9
faccessat(AT_FDCWD, "/sys/class/leds/led:switch_0/brightness", F_OK) = 0
openat(AT_FDCWD, "/sys/class/leds/led:switch_0/brightness", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 10
fstat(9, {st_mode=S_IFREG|0664, st_size=4096, ...}) = 0
fstat(10, {st_mode=S_IFREG|0664, st_size=4096, ...}) = 0
write(9, "255", 3) = 3
close(9) = 0
write(10, "1", 1) = 1
close(10) = 0
ppoll([{fd=3, events=POLLIN}], 1, {0, 0}, NULL, 0) = 0 (Timeout)
read(3, 0x7fe8eb18d8, 16) = -1 EAGAIN (Resource temporarily unavailable)
write(7, "\1\0\0\0\0\0\0\0", 8) = 8
futex(0x7f9c00d8a0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7f90004d50, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x2ebc21c8, FUTEX_WAKE_PRIVATE, 1) = 1
ppoll([{fd=3, events=POLLIN}], 1, NULL, NULL, 0) = 1 ([{fd=3, revents=POLLIN}])
ppoll([{fd=3, events=POLLIN}], 1, {0, 0}, NULL, 0) = 1 ([{fd=3, revents=POLLIN}], left {0, 0})
read(3, "\1\0\0\0\0\0\0\0", 16) = 8
futex(0x2ebca190, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x2ebca190, FUTEX_WAKE_PRIVATE, 1) = 0
write(7, "\1\0\0\0\0\0\0\0", 8) = 8
futex(0x7f9c00d8a0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7f90004d50, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x2ebc21c8, FUTEX_WAKE_PRIVATE, 1) = 1
ppoll([{fd=3, events=POLLIN}], 1, {0, 0}, NULL, 0) = 1 ([{fd=3, revents=POLLIN}], left {0, 0})
read(3, "\1\0\0\0\0\0\0\0", 16) = 8
clock_gettime(CLOCK_MONOTONIC, {3473, 16240249}) = 0
gettimeofday({1636225547, 891175}, NULL) = 0
clock_gettime(CLOCK_MONOTONIC, {3473, 16521915}) = 0
ppoll([{fd=3, events=POLLIN}], 1, {0, 500000000}, NULL, 0) = 1 ([{fd=3, revents=POLLIN}], left {0, 491037084})
read(3, "\1\0\0\0\0\0\0\0", 16) = 8
clock_gettime(CLOCK_MONOTONIC, {3473, 28884468}) = 0
clock_gettime(CLOCK_MONOTONIC, {3473, 29287176}) = 0
ppoll([{fd=3, events=POLLIN}], 1, {0, 487000000}, NULL, 0) = 0 (Timeout)
read(3, 0x7fe8eb18d8, 16) = -1 EAGAIN (Resource temporarily unavailable)
clock_gettime(CLOCK_MONOTONIC, {3473, 518737905}) = 0
The title is clear (I think). When the battery is fully charged, the indicator displays only 50%. 80% => 40%, etc...
This project is missing the usual po/gettext setup - a subdirectory named po with .pot and .po files inside. As long as this issue is not fixed we cannot integrate it into Weblate.
The way the flashlight sysfs node is detected at the moment breaks on the miatoll devices because they use the same kernel but the sysfs nodes are different.
In my case the devices seem to have a different flashlight drivers but all the drivers nodes to be present on the device, making indicator-power
to stop at the first node that it finds in the device based on the qcom_sysfs
array even if that respective sysfs node isn't the correct one to be used on the respective driver present on the device.
One workaround I did to fix it was to try to echo to the specific node, and check dmesg after if the following error and do mount -o bind
on the correct node: flashv2: qpnp_flash_led_brightness_set: Failed to get flash driver data
.
This trick worked fine as the flashlight didn't turned on because it was not switched but I suppose indicator-power
can make use of the newer deviceconfig to override the checks with predefined paths.
related to #191
This is where you should be able to turn it off and on from.
Either above/below Torch/Flashlight
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.