PocketCHIP Backlight in 4.4


#1

Howdy,

I reflashed my PocketCHIP with 4.4 (primarily so that I could replace the screen sometime soon), and am struggling to understand how to set up brightness control.

I ran the setup script in Wanted: Noob guide to enabling PWM0 (or anything else) to enable pwm0, etc., but when I try to write values to the brightness thingamajig I get strange results.

Using the value in the post linked above yields an invalid argument error:

λ ~/ sudo sh -c 'echo 20 > /sys/class/backlight/backlight/brightness'
sh: line 0: echo: write error: Invalid argument

Additionally, catting in 10 appears to turn the screen off, and any value between 1 and 9 turns it back on with a fixed (high) brightness level.

I’m kinda at a loss as to what’s going on here, so I thought I’d throw up a post here and see what sticks.

EDIT: Catting max_brightness returns 10, which makes sense given the information above, and catting type returns raw.

Thanks. :heart:


#2

Okay… I tried the command you listed above on my Pocket C.H.I.P. Which runs 4.3, not 4.4. (You might want to double check you flashed the right OS, just a thought!) and got the same result after it prompted me to enter my sudo password.
I’m still a Linux Noob… Have been for twenty years, and still find new mysteries in the command line, and this is one of them. There could be any number of reasons why this isn’t working. However I have an idea that will net you the same results:
If you re-flash to 4.3, and install Marshmallow’s modified version of Pocket Home (The Pocket C.H.I.P. GUI) it has brightness controls built into the settings menu. Tap the Gear icon at the bottom right then adjust the slider on the next screen. Check out this post for installation directions: [APT] Pocket Home (Marshmallow edition)
If this doesn’t do the trick for you, then someone whose more Command Line Smart than I am might have some more helpful suggestions!


#3

Thanks for giving it a try – no, I intentionally flashed 4.4 after hearing tales of compatibility issues between 4.3 and replacement LCDs.

I tried something similar to what you outline above this morning, except that I installed Pocket Home & Marshmallow’s modifications under 4.4 after adding the pocketchip repo to my sources.list. I don’t see any changes in 4.4 using the slider in Marshmallow Home until I slide all the way to max, at which point the screen turns off. I’m able to turn it back on via ssh, but still nothing more granular than one and zero. :thinking:

My partner has 4.3 installed on his PocketCHIP. Maybe I’ll pester him to let me take a look at his backlight values tonight. :3

(& no worries – I’m a decade-plus noob, too.)