Adventures with backlight control on Dell Inspiron N5110

For interesting topics. But remember this is a Linux Forum. Do not post offensive topics that are meant to cause trouble with other members or are derogatory towards people of different genders, race, color, minors (this includes nudity and sex), politics or religion. Let's try to keep peace among the community and for visitors.

No spam on this or any other forums please! If you post advertisements on these forums, your account may be deleted.

Do not copy and paste entire or even up to half of someone else's words or articles into posts. Post only a few sentences or a paragraph and make sure to include a link back to original words or article. Otherwise it's copyright infringement.

You can talk about other distros here, but no MX bashing. You can email the developers of MX if you just want to say you dislike or hate MX.
Post Reply
Message
Author
User avatar
rich
Posts: 180
Joined: Sat Mar 31, 2018 6:39 pm

Adventures with backlight control on Dell Inspiron N5110

#1 Post by rich »

I recently dropped my Lenovo G50-45 and bad things happened so I've set up on a discarded old Inspiron. It has 4 gigs of ram, predates UEFI hardware, runs well enough, and fought me every step of the way in my attempts to set up the screen backlight keyboard keys.

Out of the box, pressing the backlight keys didn't do much. The screen would flicker and the brightness indicator OSD would popup, but the brightness didn't really change. If I held down the bright down button for a few seconds the screen would actually dim down to off, and a single push of the bright up button would bring it back to full blinding bast. This would not do.

My first step was to try xfce-power-manager 1.6 instead of 1.4 and thankfully it was an improvement. Between releases, the internal mechanics of the application were adjusted in such way that despite my having two entries in /sys/class/backlight, brightness scrolling mostly worked. I noticed that between acpivideo0 and intel_backlight, xfce was changing the acpivideo0 value and the intel_backlight value seemed to tag along. However, some events were targeting intel_backlight and acpivideo0 was not responsive in turn, which caused small problems.

For example, the screen would sort of flash when increasing and decreasing backlight brightness. Also, unplugging the charger would cause brightness to dim to a pretty low level, but plugging it back in would not restore the previous state. I noticed in this event intel_backlight value would plummet but acpivideo0 would remain untouched. It was these facts, and the fact that the lowest acpivideo0 value yielded a pleasantly dim screen compared to the completely blank screen intel_backlight provided at the same state, which led me to believe my best option would be to disable intel_backlight completely and go directly with acpivideo0.

There are plenty of references online to creating an xorg.conf or equivelant specifying to use intel_backlight for screen brightness. Most of my search results had to do with having acpivideo0 and intel_backlight, or some other combination, but always the user was trying to single out intel_backlight for use. It seems usually acpivideo0 causes problems (or is the symptom of them more likely.) So I had instructions, but for someone else's problem.

I was able to smooth out the backlight adjustment a little further by replacing the value of intel_backlight for acpivideo0 in the xorg.conf file. Things were still not perfect but it seemed like a step in the right direction.

There's also a ton of information about kernel parameters to try and practically none that explain what they do. The procedure seemed to be just "try this, or this, or this, and definitely maybe one of those things might just work for some reason." The most relevant options I could find were the acpi_backlight= options, so I tried them out one by one. I noticed acpi_backlight=video made no change, =vendor broke backlight adjustment completely, similar to the initial situation, but acpi_backlight=native was a surprise. I found that this parameter removed the acpivideo0 entry in /sys/class without breaking functionality.

Seeing that maybe disabling intel_backlight might not be the best option after all, I decided to switch the xorg.conf back to intel values (although I probably don't need the file at all at this point.) I now had one /sys/class/backlight entry, and it worked without flashing during adjustment, and the issue with changes when plugging or unplugging the charger was gone. This indeed seemed the way to go.

However, there was still one remaining complaint - I only had 5 increments to choose from. Generally if things are smooth and set up correctly, I feel there should be maybe 10 or so, 5 felt a little restrictive. Thankfully I was referred to an as of yet unaccepted patch to xfce4-power-manager which supposedly allowed for brightness level increment specification! In my inexperience I was unable to apply the patch to a deb package but I was able to compile the old fashioned way and can confirm it does indeed work well - it adds a setting in xfce4-power-manager-settings to specify the amount of brightness increments, up to 100, with an optional exponential setting that results in the increments becoming smaller and smaller as the screen becomes dimmer.

I decided to write this up primarily because I thought it was cool but more importantly, I did not find a record of my questions having been answered before. I hope if anyone finds themselves in a similar position this post may be of use.

User avatar
Stevo
Developer
Posts: 12774
Joined: Fri Dec 15, 2006 8:07 pm

Re: Adventures with backlight control on Dell Inspiron N5110

#2 Post by Stevo »

If you have a link to the patch and let me know what version of the power manager it applies to, I can try to build debs with it.

User avatar
rich
Posts: 180
Joined: Sat Mar 31, 2018 6:39 pm

Re: Adventures with backlight control on Dell Inspiron N5110

#3 Post by rich »

Patch
Relevant bug report
I applied to current git, so 1.6.1 (conveniently already in test repo)
It sort of went through when I tried, complained about offset, etc, but I think it's definitely possible, I'm just not super experienced with modifying/creating packages.

Post Reply

Return to “General”