Quote:
Originally Posted by sergeyvl12
Is it possible to get the current frontlight level?
|
The easiest way, (but rather cpu heavy) is to scan dmesg as every change is printed to the log.
But there are other options:
The kernel source for the backlight driver is at arch/arm/mach-mx5/mx50_ntx_io.c, but there is no ioctl to get the current level. It shouldn't be too hard to implement a new one, but how many users will want to change their kernel for that
A more hacky way: Since we are root, we can simply fetch the content of the last_FL_duty variable from kernel memory:
Code:
hexdump -s 0x803ba614 -n1 -v -e '"%d"' /dev/kmem
Of course, the address will be off as soon as a new kernel build is released. Does anyone know how often they do this? I know they did when they changed the toolchain, but other than that?