Red Hat Bugzilla – Full Text Bug Listing
|Summary:||Screen brightness flickering on Samsung n210|
|Product:||[Fedora] Fedora||Reporter:||Yann Droneaud <yann>|
|Component:||kernel||Assignee:||Kernel Maintainer List <kernel-maint>|
|Status:||CLOSED ERRATA||QA Contact:||Fedora Extras Quality Assurance <extras-qa>|
|Version:||15||CC:||dennis, gansalmon, itamar, jasonbstubbs, jfeeney, jonathan, kernel-maint, madhu.chinakonda, mishu|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2011-11-28 09:23:33 EST||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
Description Yann Droneaud 2011-10-20 06:12:12 EDT
Since latest kernel updates, screen brightness control is working on my Samsung n210 laptop (see bug #703819 and #648872). But since, under X11, the screen brightness start flickering without reason at random moment. At some point, the "Brightness popup/OSD" appears on screen and the screen continue to flicker. Manually adjusting the brightness doesn't stop flickering. Switching to a virtual console and switch back to X11 halt the flickering.
Comment 1 Yann Droneaud 2011-10-24 13:15:35 EDT
It seems it only flicker on battery when idle. If the computer is doing something, brightness doesn't seems to start flickering. But, if it's doing nothing and I unplug the power cable, then it start to flicker. If I don't plug the power cable back or switch to a virtual console, the computer is likely to freeze and require a manual reset. Note: the problem also happen on Fedora 16 TC.
Comment 2 Yann Droneaud 2011-10-24 13:16:20 EDT
See also bug #737108. But I don't have any messages in kernel logs.
Comment 3 Chuck Ebbert 2011-10-24 21:32:41 EDT
Is this only happening when you are running on battery? If so, try changing the power management settings for the desktop by unchecking "reduce backlight brightness" and "dim display when idle". Some further things to try: - Add "acpi_backlight=vendor" to the kernel boot options. - If that doesn't work, also add "samsung_backlight.use_sabi=0 samsung_backlight.force=1" to the boot options.
Comment 4 Yann Droneaud 2011-10-27 06:28:34 EDT
Still not fixed in 22.214.171.124-3.fc15.x86_64. But behavor changed for the first unplug: the backlight is correctly reduced, but not restored when power plug is plugged back. If I increase the backlight level to a higher level (the level set before unplugging the power), then unplug again the power adapter, the screen start to flicker again.
Comment 5 Yann Droneaud 2011-10-27 06:31:01 EDT
(In reply to comment #3) > Is this only happening when you are running on battery? If so, try changing the > power management settings for the desktop by unchecking "reduce backlight > brightness" and "dim display when idle". > This is a workaround. I'm going to try the other workaround.
Comment 6 Yann Droneaud 2011-10-28 05:20:50 EDT
I have looked on the patches that were linked from https://bugzilla.redhat.com/show_bug.cgi?id=737108#c2 And I found this one, that might fix my problem https://lkml.org/lkml/2011/5/13/150
Comment 7 Jason Stubbs 2011-10-28 07:29:14 EDT
Yep, that sounds pretty much like the behaviour that I was getting that led me to write the patch. If you open a terminal while in your DE, adjusting the brightness via the sys interface (at /sys/class/backlight/samsung/brightness ? can't confirm right now) by steps of two or more should you will probably get the same behaviour. Adjusting in single steps should work properly though. The last I know of the patch's progress into mainline is Greg Kroah-Hartman forwarding it on to Mathew Garret: https://lkml.org/lkml/2011/9/20/332 I'm not sure if it's progressed from there or not.
Comment 8 Yann Droneaud 2011-10-28 10:28:16 EDT
(In reply to comment #7) > The last I know of the patch's progress into mainline is Greg Kroah-Hartman > forwarding it on to Mathew Garret: > https://lkml.org/lkml/2011/9/20/332 > > I'm not sure if it's progressed from there or not. Lets ask him about it.
Comment 9 Yann Droneaud 2011-10-28 10:37:27 EDT
(In reply to comment #7) > Yep, that sounds pretty much like the behaviour that I was getting that led me > to write the patch. If you open a terminal while in your DE, adjusting the > brightness via the sys interface (at /sys/class/backlight/samsung/brightness ? > can't confirm right now) by steps of two or more should you will probably get > the same behaviour. Adjusting in single steps should work properly though. > I'm able to trigger the flickering problem sometimes using such sequence: for i in 0 2 4 6 8 7 5 3 1; do echo -n "$i "; echo $i > /sys/class/backlight/samsung/brightness ; cat /sys/class/backlight/samsung/brightness ; done But some other times the screen doesn't flicker, but the brightness level is not correct: here the output: 0 0 2 2 4 4 6 4 8 5 7 6 5 5 3 3 1 1
Comment 10 Yann Droneaud 2011-10-28 10:42:27 EDT
Changing the sequence to this one (inverted echo position): for i in 0 2 4 6 8 7 5 3 1; do echo $i > /sys/class/backlight/samsung/brightness ; echo -n "$i " ; cat /sys/class/backlight/samsung/brightness ; done Give more chance of screen flickering. Results are funny too. 0 0 2 2 4 4 6 6 8 8 7 6 5 5 3 7 1 1 While the screen is flickering, the graphical environment (gnome-shell) is becoming unusable. I have to switch to a virtual console and get back to stop the screen to flicker. Could this be a problem the on-screen-display (gnome-shell/gnome-settings), that can't cope with the increase rate of brightness changes ?
Comment 11 Jason Stubbs 2011-10-28 19:40:04 EDT
When I was first tracking down the problem, I looked into how KDE's powerdevil works and initially thought it was a problem there too. Gnome shell probably works in a similar way. What is happening though is that, when the current brightness is 3 and something attempts to set it to 5 or higher, the actual brightness becomes 4 and a KEY_BRIGHTNESS_UP event is generated. Actually, the brightness key event is generated even on single increments. Powerdevil would then react to the key event, creating a sort of loop. Throw the fact that powerdevil does brightness animations, only deals in percentages and that there can be a delay in the processing of brightness key events, it becomes very easy for the system to get into a sort of brightness up/down loop. But the real problem is that a brightness key event at all and that is what my patch fixes.
Comment 12 Jason Stubbs 2011-10-28 19:53:05 EDT
By the way, there's also been a patch submitted to my patch. My patch fails to detect the problem and switch on the workaround if the initial brightness is 0. I didn't think that would be a problem in the real world, but apparently it is: https://lkml.org/lkml/2011/10/13/143
Comment 13 Yann Droneaud 2011-10-31 11:31:11 EDT
from bug 737108 comment 6 > Package kernel-126.96.36.199-2.fc15 > * should fix your issue, It doesn't fix flickering problem for this bug.
Comment 14 Jason Stubbs 2011-11-01 18:51:34 EDT
(In reply to comment #7) > I'm not sure if it's progressed from there or not. My apologies. I should have checked before writing this comment, but everything is in linux-next now: http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=history;f=drivers/platform/x86/samsung-laptop.c;h=09e26bfd464343766a3bfcff39d4b6e0a306f179;hb=HEAD
Comment 15 Josh Boyer 2011-11-02 12:14:51 EDT
(In reply to comment #14) > (In reply to comment #7) > > I'm not sure if it's progressed from there or not. > > My apologies. I should have checked before writing this comment, but everything > is in linux-next now: > > http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=history;f=drivers/platform/x86/samsung-laptop.c;h=09e26bfd464343766a3bfcff39d4b6e0a306f179;hb=HEAD Those commits are in the latest rawhide kernel now. Would someone be willing to install that kernel and test for this issue?
Comment 16 Yann Droneaud 2011-11-27 06:41:19 EST
This is fixed in Fedora 15, kernel-188.8.131.52-1.fc15.x86_64 https://admin.fedoraproject.org/updates/kernel-184.108.40.206-1.fc15 * Fri Nov 11 2011 Josh Boyer <email@example.com> 220.127.116.11-1 - Linux 3.1.1 * Fri Nov 11 2011 John W. Linville <firstname.lastname@example.org> - Remove overlap between bcma/b43 and brcmsmac and reenable bcm4331 * Thu Nov 10 2011 Chuck Ebbert <email@example.com> - Sync samsung-laptop driver with what's in 3.2 (rhbz 747560) See also bug 737108
Comment 17 Josh Boyer 2011-11-28 09:23:33 EST
Thank you for letting us know.