Bug 51281 - [NVCE] X server restarts on brightness change
Summary: [NVCE] X server restarts on brightness change
Status: RESOLVED WORKSFORME
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: 7.6 (2010.12)
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-21 00:17 UTC by Michal Papis
Modified: 2013-08-25 14:37 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.0.log.old after the restart (38.87 KB, text/plain)
2012-06-21 00:17 UTC, Michal Papis
no flags Details
output from dmesg (88.59 KB, text/plain)
2012-06-21 00:19 UTC, Michal Papis
no flags Details
xrandr --verbose (4.89 KB, text/plain)
2012-06-21 12:49 UTC, Michal Papis
no flags Details

Description Michal Papis 2012-06-21 00:17:42 UTC
Created attachment 63284 [details]
Xorg.0.log.old after the restart

It does not happen just after server is started, need some time for it, few hours maybe few times sleep to ram.

This situation repeats multiple times already, I can not normally work as every evening / morning when I want to adjust brightness X restarts and all my applications are closed.

From the Xorg.0.log the part "evdev: Power Button: Close" is repeating.
Comment 1 Michal Papis 2012-06-21 00:19:01 UTC
Created attachment 63285 [details]
output from dmesg
Comment 2 Marcin Slusarz 2012-06-21 09:30:21 UTC
There's nothing about Nouveau crashing in these logs.
Maybe something reprograms brightness button to do something which triggers xserver shutdown?
Comment 3 Michal Papis 2012-06-21 09:52:28 UTC
The restart is rather instant, and it happens the same if I use keyboard to change brightness or the Xfce panel plugin for brightness.
Comment 4 Maarten Maathuis 2012-06-21 11:33:37 UTC
Does "xrandr --verbose" show some kind of brightness property attached to LVDS-1?

If so, does modifying this cause the same problems? Please double check that the property actually changes.
Comment 5 Michal Papis 2012-06-21 12:06:50 UTC
$ xrandr --verbose | grep rightness
	Brightness: 1.0
$ xrandr --output LVDS-1 --brightness 0.8
$ xrandr --verbose | grep rightness
	Brightness: 0.80

And I see the difference ... I will try to repeat it later as it does not happen always.
Comment 6 Maarten Maathuis 2012-06-21 12:33:15 UTC
Oh, that brightness just adjust the gamma settings, but doesn't affect the backlight. Isn't there another setting somewhere? Maybe paste the output of "xrandr --verbose"?
Comment 7 Michal Papis 2012-06-21 12:49:32 UTC
Created attachment 63323 [details]
xrandr --verbose
Comment 8 Maarten Maathuis 2012-06-21 13:48:36 UTC
It seems there is (another) way to control the backlight.

/sys/class/backlight/nv_backlight/brightness

You can write to that, but check the value of /sys/class/backlight/nv_backlight/max_brightness first.

I'm not a 100% sure the name is nv_backlight, but that should be easy to check.

Please try that and see if this causes problems.
Comment 9 Maarten Maathuis 2012-06-21 13:53:02 UTC
Also check if there is more than one backlight device and try those too.
Comment 10 Michal Papis 2012-06-21 14:01:36 UTC
there was only one device and it also worked to use it:

$ echo 8 | sudo tee /sys/class/backlight/acpi_video0/brightness
root's password:
8
$ echo 6 | sudo tee /sys/class/backlight/acpi_video0/brightness
6
Comment 11 Peter Hutterer 2012-06-21 16:17:16 UTC
I don't think that's a keyboard issue, otherwise it wouldn't crash on manual panel trigger. quick skim of the xfce power manager plugin code shows you can run that manually with "set-brightness", can you check if this works?

the other possibility: if xfce4 crashes it may shut down your X server, similar to how GNOME does it. Do see the same effect if you run xinit and then start xfce from the terminal?
Comment 12 Michal Papis 2012-06-21 16:31:15 UTC
ok I need some help here, how do I manually "set-brightness"?

as for the second possibility, is there no other way, maybe some config file to enable additional logging?

I'm using this setup for work so any interruptions and inconveniences are not welcome - and as the issue happens after few hours you understand it might be hard to run it using single commands.
Comment 13 Peter Hutterer 2012-06-21 16:56:50 UTC
again, just looking at the source here but there should be a xfce4-power-manager binary that takes a set-brightness argument or so. I suspect that's the one called from the panel and may be the one that crashes xfce.
Comment 14 Michal Papis 2012-06-21 17:26:21 UTC
just checked, there is no option to steer it from command line, it's all automated stuff, I can not trigger the change manually unless using keybord / panel icon.

btw. I just tried both 

echo 6 | sudo tee /sys/class/backlight/acpi_video0/brightness
xrandr --output LVDS-1 --brightness 0.8

with different values, they all worked fine
Comment 15 Michal Papis 2012-06-21 17:30:02 UTC
and then I tried to do darker with keyboard and it crashed right away, so any switches, options configurations to produce more output/log I can attach, just please make them not to annoying.
Comment 16 Ilia Mirkin 2013-08-25 03:55:30 UTC
Please check whether this still happens with the latest xf86-video-nouveau and kernel.
Comment 17 Michal Papis 2013-08-25 14:37:57 UTC
I forgot about this bug - it's working for me now ...


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.