LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-05-2014, 10:54 AM   #1
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272
Blog Entries: 2

Rep: Reputation: 85
Problems with display and brightness


Hello, running Debian Wheezy (Xfce).

I have a problem with brightness being set to min at boot.
Here are some outputs-
Code:
uname -r
3.2.0-4-amd64
On using the following command, the screen flickers.
Code:
xrandr -q
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 353mm x 198mm
   1366x768       60.0*+
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
TV1 disconnected (normal left inverted right x axis y axis)
On using xbacklight -inc 10 or xbacklight -dec 10, again the screen flickers, but brightness doesnt change.
Code:
xbacklight -get
0.000000
I am using an Acer laptop, with onboard intel graphics, using the laptop display.
My graphics card/driver info-
Code:
 lspci -v
00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
	Subsystem: Acer Incorporated [ALI] Device 015e
	Flags: bus master, fast devsel, latency 0
	Capabilities: <access denied>
	Kernel driver in use: agpgart-intel

00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) (prog-if 00 [VGA controller])
	Subsystem: Acer Incorporated [ALI] Device 015e
	Flags: bus master, fast devsel, latency 0, IRQ 46
	Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
	Memory at d0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at 1800 [size=8]
	Expansion ROM at <unassigned> [disabled]
	Capabilities: <access denied>
	Kernel driver in use: i915

00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
	Subsystem: Acer Incorporated [ALI] Device 015e
	Flags: bus master, fast devsel, latency 0
	Memory at f0400000 (64-bit, non-prefetchable) [size=1M]
	Capabilities: <access denied>
Folders in /sys/class/backlight
Code:
ls /sys/class/backlight
acpi_video0  intel_backlight
Of these if I do :
Code:
echo 3 | sudo tee /sys/class/backlight/acpi_video0/brightness
3
The brightness is changed.
I even put something like this in /etc/rc.local, but it dosent seem to work all the time, and moreover I have problems like screen flickering that I would like to get to the bottom of.

I can adjust the brigtness with the function keys in 3 steps, ie
(default) 0 -> 3 -> 6 -> 9 (max)

I tried using the acpi_backlight=vendor kernel parameter, but it doesnt affect the brightness, what changed is that I no longer have the acpi_video0 folder, but instead there is a acer_wmi folder, but on using the function keys the brightness changes in smaller steps, and the value of /sys/class/backlight/intel_backlight/brightness changes from 0 (default) -> 1 (max), same is the manner of the display notification, in which brightness goes from 0 -> max on first pressing the Brightness-up func-key, but pressing it more increases the brightness, upto a max of 9 (I think this is the value of /sys/class/backlight/acer_wmi/max_brightness)

So I dont know what the problem is, and how to diagnose it, more-over on first logging in via lightdm the screen flickers a few times, and as I have said before, it flickers on using xrandr -q and xbacklight -get also.

Searched a lot on this from multiple sources but didnt find a solution.
Thanks.

Edit-
More logs..
Xorg.0.log
dmesg

Last edited by aaditya; 01-06-2014 at 07:34 AM.
 
Old 01-07-2014, 06:10 PM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Hi

So, as you wrote...
Quote:
Of these if I do :
Code:

echo 3 | sudo tee /sys/class/backlight/acpi_video0/brightness
3

The brightness is changed.
....you're able to change your screen's brightness => I didn't fully understand what's not ok?

Cheers!
 
Old 01-08-2014, 01:08 AM   #3
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272

Original Poster
Blog Entries: 2

Rep: Reputation: 85
Quote:
Originally Posted by Pearlseattle View Post
Hi

So, as you wrote...

....you're able to change your screen's brightness => I didn't fully understand what's not ok?

Cheers!
Hi, the problem(s) are as follows:

1.) Brightness resets to minimum at every boot.

2.) Even if I put in /etc/rc.local the lines echo 3 > /sys/class/backlight/acpi_video0/brightness, the brigtness is changed most times but not all, ie, I cant completely rely on this method.

3.) On the occasion that brightness doesnt change with hack #2 above, the screen flickers when I login from lightdm, or if I use the xrandr -q or xbacklight commands, sometimes also flickers when I start some applications.

So basically 2 problems, ie, brightness resets to min, and sometimes screen flickering when using certain applications/commands.

What I have done since I posted this problem is:

1.) Upgraded xorg-server via backports.

2.) Removed extra xorg-video-drivers like ati, nvidia etc which come installed by default and dont pertain to my system.

3.) Upgraded to kernel 3.11.10-1 from backports.

I didnt get a chance to monitor what the above steps I took changed, because the laptop is a family PC that is mostly used in the Windows environment.I will test when I get access/time.
 
Old 01-08-2014, 07:59 AM   #4
dolphin_oracle
MX Linux
 
Registered: Dec 2013
Posts: 402

Rep: Reputation: Disabled
Try setting this line as a kernel boot option

Code:
video.use_bios_initial_backlight=0
Hopefully this will make your machine boot a max brightness. you can try playing with the "0" in the above command and see if any different numbers help you out.
 
Old 01-08-2014, 08:48 AM   #5
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272

Original Poster
Blog Entries: 2

Rep: Reputation: 85
Quote:
Originally Posted by dolphin_oracle View Post
Try setting this line as a kernel boot option

Code:
video.use_bios_initial_backlight=0
Hopefully this will make your machine boot a max brightness. you can try playing with the "0" in the above command and see if any different numbers help you out.
Thanks, I didnt know about this kernel boot option.
Using it makes it boot at the maximum brightness.

But again I am stuck where I started, ie, brightness is not persistant across reboots; by default it resets to minimum, and on using the above boot parameter, at maximum.
And it seems its a bianry switch only, ie either 0 or 1, with 0 I got maximum brightness, with 1 I get minimum.

So currently I am just using the rc.local hack to set the bightness at my desired level..
 
Old 01-08-2014, 09:13 AM   #6
dolphin_oracle
MX Linux
 
Registered: Dec 2013
Posts: 402

Rep: Reputation: Disabled
You could try using xbacklight to directly set a brightness level rather than raising an increment.

try "xbacklight -set 50" and see if you get a 50% brightness.
 
Old 01-08-2014, 03:20 PM   #7
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
I had to fight as well quite a lot to have some acceptable backlight settings.
In my case the hotkeys on my HP notebook didn't react at all, so after thinking mentally complaining why the notebook manufacturers always have to change their hotkey controllers... I improvised the following - hope it's useful:

1)
As you already know by doing...
Code:
echo 1 > /sys/class/backlight/intel_backlight/brightness
...you set the brightness to the max, and using "0" it shuts down the display.
But: it's not a boolean that has only an on/off status value because if you run e.g. ...
Code:
echo 800 > /sys/class/backlight/intel_backlight/brightness
...you get something more acceptable that is not at max brightness. If you want a lower brightness then use e.g. "300" or something inbetween.

Maybe the kernel parameter "video.use_bios_initial_backlight" behaves the same way? Didn't know about that so I did not try it out => would be good if you could give feedback on this.
In my case I wrote an init script which runs "echo 800 > /sys/class/backlight/intel_backlight/brightness" at boot.
Perhaps in your case it doesn't run at the very end? Or maybe a kernel module conflicts and not only resets the brightness to some other level but generates as well the flickering? For this last case have a look with "lsmod" at the ones that might cause this (e.g. try to unload any module called "...wmi..." and see if the flickering vanishes).

2)
As my hotkeys are not working I wrote 2 scripts to increase and descrease the brightness and mapped them to 2 key combinations using "xbindkeys".
As an example the one that increases the brightness looks like this:
Code:
#!/bin/bash

#CHANGEME - Settings
BRIGHTNESSDEVICE="/sys/class/backlight/intel_backlight/brightness"
INCREASEBY=200

CURBRIGHTNESS=$(cat $BRIGHTNESSDEVICE)

NEXTBRIGHTNESS=$(expr $CURBRIGHTNESS + $INCREASEBY)

#echo CURBRIGHTNESS $CURBRIGHTNESS
#echo NEXTBRIGHTNESS $NEXTBRIGHTNESS

$(echo $NEXTBRIGHTNESS > $BRIGHTNESSDEVICE)
Cheers!
 
Old 01-08-2014, 11:16 PM   #8
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272

Original Poster
Blog Entries: 2

Rep: Reputation: 85
Perhaps my original post is not clear, I think I will repeat myself

1.) I can adjust my brightness using function keys.
Quote:
Originally Posted by aaditya View Post
I can adjust the brigtness with the function keys in 3 steps, ie
(default) 0 -> 3 -> 6 -> 9 (max)
2.) My problem is that they dont persist across reboots, ie, it always resets to the minimum value at boot.

To get around it, I use echo 3 > /sys/class/backlight/acpi_video0/brightness in /etc/rc.local.

--------------------------------------------------------------------------------
Quote:
Originally Posted by dolphin_oracle View Post
try "xbacklight -set 50" and see if you get a 50% brightness.
In the cases where the echo "3">/sys/class/backlight....hack fails, I cant use xbacklight, using xbacklight only causes a flicker and no change.
--------------------------------------------------------------------------------
Quote:
Originally Posted by Pearlseattle View Post
Maybe the kernel parameter "video.use_bios_initial_backlight" behaves the same way? Didn't know about that so I did not try it out => would be good if you could give feedback on this.
Yes I did try it as posted by dolphin_oracle and the results were:
Quote:
Originally Posted by aaditya View Post
And it seems its a bianry switch only, ie either 0 or 1, with 0 I got maximum brightness, with 1 I get minimum.
--------------------------------------------------------------------------------
Quote:
Originally Posted by Pearlseattle View Post
In my case the hotkeys on my HP notebook didn't react at all
On my newer HP laptop, only the brightness keys didnt work, and I tried the acpi_backlight=vendor boot parameter which worked
Quote:
Originally Posted by Pearlseattle View Post
Perhaps in your case it doesn't run at the very end?
I think it does run because I have put 2 things in rc.local, one is for the backlight and the other is for switching off bluetooth, and I *think* that bluetooth is switched off, but brightness is not set, so I will need to confirm this one.
Quote:
Originally Posted by Pearlseattle View Post
Or maybe a kernel module conflicts and not only resets the brightness to some other level but generates as well the flickering? For this last case have a look with "lsmod" at the ones that might cause this (e.g. try to unload any module called "...wmi..." and see if the flickering vanishes).
Will try that when I get access and time
 
Old 01-09-2014, 02:42 PM   #9
Pearlseattle
Member
 
Registered: Aug 2007
Location: Zurich, Switzerland
Distribution: Gentoo
Posts: 999

Rep: Reputation: 142Reputation: 142
Quote:
On my newer HP laptop, only the brightness keys didnt work, and I tried the acpi_backlight=vendor boot parameter which worked
Thank you!
 
Old 05-08-2014, 02:16 AM   #10
aaditya
Member
 
Registered: Oct 2013
Location: India
Distribution: Slackware
Posts: 272

Original Poster
Blog Entries: 2

Rep: Reputation: 85
Solved by updating the xorg-stack and mesa, as described by my old post at http://forums.debian.net/viewtopic.p...art=30#p511548
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Webcam Display Issues - Brightness and Color opticks Ubuntu 12 02-15-2014 03:55 PM
Mint 15 = black screen (brightness = 0) on start up - have to manually set brightness Netnovice Linux Mint 4 01-16-2014 08:46 PM
Brightness problems on an Intel 845 brandnew427 Linux - Hardware 2 12-20-2009 11:14 PM
Dim display brightness on dual head setup TheOracle Linux - Hardware 2 11-16-2006 10:01 AM
brightness problems in slack 9 CrazyPilot Slackware 2 07-01-2004 01:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration