Page 1 of 1

Dimming and switching of LCD backlight

Posted: Mon Dec 05, 2016 4:24 pm
by tkaiser
Hi,

I'm playing around with M3 + HD101 LCD:

Code: Select all

root@NanoPi3:/var/lib/systemd/backlight# grep lcd /proc/cmdline 
console=ttySAC0,115200n8 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait init=/sbin/init systemd.show_status=false g_ether.host_addr=82:cf:ce:fa:68:18 initrd=0x49000000,0x400000 console=tty1 lcd=HD101


Is there a way to adjust the LCD's backlight? I tried the various sysfs nodes already but to no avail. Also it would be great to be able to completely switch on and off the LCD (backlight). How to do so? I'm using the Debian OS image:

Code: Select all

root@NanoPi3:/var/lib/systemd/backlight# uname -a
Linux NanoPi3 3.4.39-s5p6818 #3 SMP PREEMPT Wed Nov 16 16:32:42 HKT 2016 armv7l GNU/Linux
root@NanoPi3:/var/lib/systemd/backlight# lsb_release -c
Codename:   jessie

Re: Dimming and switching of LCD backlight

Posted: Tue Dec 06, 2016 6:51 am
by tkaiser
I also tried out LCD-HD700 and LCD-S700. Same problem: I neither know how to adjust backlight but more importantly I've no idea to completely turn the LCD's backlight off.

Even when I issue a 'poweroff' on NanoPi M3 and the board shuts down the connected LED remains active and wastes unnecessarily 3-4W.

How can we turn off the LCD entirely?

Re: Dimming and switching of LCD backlight

Posted: Tue Dec 06, 2016 8:00 am
by davef
When I was using the Pengutronix BSP for the mini2440 there was a /sys/class/leds/backlight and you could do:

echo timer > /sys/class/leds/backlight/trigger
echo 5 > /sys/class/leds/backlight/delay_off
echo 5 > /sys/class/leds/backlight/delay_on

for 50% of full brightness. Maybe, you can change the numbers you echo in or perhaps there are other commands you can use to turn it off.

Good luck!

Re: Dimming and switching of LCD backlight

Posted: Tue Dec 06, 2016 8:09 am
by davef
Found some more notes. Seems to you have to have software PWM enabled. If you can re-compile the kernel I can give you the boxes you have to tick.

Best to check you have a /sys/class/leds/backlight first

Re: Dimming and switching off LCD backlight

Posted: Tue Dec 06, 2016 9:11 am
by tkaiser
davef wrote:
Found some more notes. Seems to you have to have software PWM enabled. If you can re-compile the kernel I can give you the boxes you have to tick.

Best to check you have a /sys/class/leds/backlight first


Thank you. But there's nothing there, only led1 and led2 (led1 is the blue led on NanoPi M3, led2 does not exist and seems also not be related to the backlight -- at least changing trigger and delay_on/delay_off did nothing).

Since the way LCDs are handled on the various NanoPi (detection in u-boot and then supplying the type as part of /proc/cmdline) I'm expecting an authoritative answer from FA support here. It's their properietary One-Wire technology so they should know. Unfortunately the stuff in the wiki only praises One-Wire but does not deal with configuring it.

My main concern is consumption when not needed. Even doing a poweroff doesn't help since M3 with connected LCD still draws 3-4W from wall. Unacceptable. I need some advice on turning the LCD off -- otherwise they're useless :(

Re: Dimming and switching of LCD backlight

Posted: Fri Dec 09, 2016 10:32 am
by tkaiser
Ok, vendor has no clue how to turn off backlight or adjust brightness. LCD use cases therefore not possible. :(

Re: Dimming and switching of LCD backlight

Posted: Tue Jan 17, 2017 8:48 am
by JonathanCCC
Hi,

You can change the lcd backlight one-wire with the following command :
echo 0-255 > /dev/backlight-1wire