Discussion:
xrandr brightness settings permanent
Riccardo Berto
2018-11-14 09:52:59 UTC
Permalink
I have a low quality screen. It's very bright, even at minimum settings
in the monitor menu. I'm able to reduce the brightness with `xrandr
--output HDMI-0 --brightness 0.25` but sometimes the brightness goes
back to the default levels when downloading something from the browser
or doing peculiar interactions with the Xorg server, like opening the
file manager. I guess this is caused by a re-read of the xorg.conf file
under certain circumstances that I'm not aware of.
The question is: is it possible to make the previously mentioned xrandr
command permanent via some /etc/X11/xorg.conf.d/ conf file?
_______________________________________________
***@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your
Michal Srb
2018-11-14 14:10:49 UTC
Permalink
Post by Riccardo Berto
I have a low quality screen. It's very bright, even at minimum settings
in the monitor menu. I'm able to reduce the brightness with `xrandr
--output HDMI-0 --brightness 0.25` but sometimes the brightness goes
back to the default levels when downloading something from the browser
or doing peculiar interactions with the Xorg server, like opening the
file manager. I guess this is caused by a re-read of the xorg.conf file
under certain circumstances that I'm not aware of.
The question is: is it possible to make the previously mentioned xrandr
command permanent via some /etc/X11/xorg.conf.d/ conf file?
The xrandr's brightness parameter is just a multiplier for gamma, so you
should be able to achieve the same thing with configuration like this:

Section "Monitor"
...

Gamma 0.25
EndSection

This is alternative way of setting the initial value instead of using xrandr,
but it probably won't fix the random changing back at runtime. X server does
not normally reload xorg.conf while it is running. It seems that some
application is intentionally changing the gamma at runtime, you should try to
find out which one it is. Maybe some color management app? Don't you have
redshift installed?

Michal


_______________________________________________
***@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your
Michal Srb
2018-11-15 07:25:25 UTC
Permalink
Thanks for the answer.
No, I don't use redshift. As far as I know, it can only happen twice
during each Xorg start up. After these 2 times and me readjusting the
backlight manually with the xrandr command previously posted, it stays
that way even for a week of continued usage. It has done that for years.
In the meantime I changed browsers, usage habits, Xorgs versions, PCs,
GPUs, drivers, ...
I have a keyboard shortcut with that xrandr command saved for this exact
reason as I have to execute it up to 3 times during each session. I
finally decided to go public with this issue as I can hardly bare the
default minimum brightness of my "new" subpar screen.
What desktop environment are you using? I know that at least KDE/Plasma has
its own configuration for gamma and will apply it itself on start.

Michal


_______________________________________________
***@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Riccardo Berto
2018-11-16 16:25:00 UTC
Permalink
Post by Michal Srb
Thanks for the answer.
No, I don't use redshift. As far as I know, it can only happen twice
during each Xorg start up. After these 2 times and me readjusting the
backlight manually with the xrandr command previously posted, it stays
that way even for a week of continued usage. It has done that for years.
In the meantime I changed browsers, usage habits, Xorgs versions, PCs,
GPUs, drivers, ...
I have a keyboard shortcut with that xrandr command saved for this exact
reason as I have to execute it up to 3 times during each session. I
finally decided to go public with this issue as I can hardly bare the
default minimum brightness of my "new" subpar screen.
What desktop environment are you using? I know that at least KDE/Plasma has
its own configuration for gamma and will apply it itself on start.
Michal
I'm using Gnome 3.30.

I provide you with an example so it's more clear (I hope):
I just booted and logged in. I execute the xrandr command once to lower
the insane brightness level. I open nautilus (file manager), try to
trash some file by selecting it and pressing the DELETE button --> Xorg
resets the gamma settings to the default value. The only thing that
appeared on the screen that may have caused this is the "_filename_ was
moved to trash" greyish notification on the top side of the window, near
the title bar of nautilus. Nothing changed in the system except for that
notification and the file that is now in the trash. This behavior is
reproducible 100% of the times, after a boot.
I then execute the xrandr command to lower the brightness level as it
was reseted. If I trash something else, even with that notification
popping up, it won't reset again unless I reboot. I'm now in the middle
state of this weird behavior. I'm sure that it will resets again somehow
and if I lower the gamma with that xrandr command for the third time, it
won't reset by itself ever again until the next boot.
_______________________________________________
***@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your su
Michal Srb
2018-11-19 11:22:57 UTC
Permalink
Post by Riccardo Berto
Post by Michal Srb
Thanks for the answer.
No, I don't use redshift. As far as I know, it can only happen twice
during each Xorg start up. After these 2 times and me readjusting the
backlight manually with the xrandr command previously posted, it stays
that way even for a week of continued usage. It has done that for years.
In the meantime I changed browsers, usage habits, Xorgs versions, PCs,
GPUs, drivers, ...
I have a keyboard shortcut with that xrandr command saved for this exact
reason as I have to execute it up to 3 times during each session. I
finally decided to go public with this issue as I can hardly bare the
default minimum brightness of my "new" subpar screen.
What desktop environment are you using? I know that at least KDE/Plasma has
its own configuration for gamma and will apply it itself on start.
Michal
I'm using Gnome 3.30.
I just booted and logged in. I execute the xrandr command once to lower
the insane brightness level. I open nautilus (file manager), try to
trash some file by selecting it and pressing the DELETE button --> Xorg
resets the gamma settings to the default value. The only thing that
appeared on the screen that may have caused this is the "_filename_ was
moved to trash" greyish notification on the top side of the window, near
the title bar of nautilus. Nothing changed in the system except for that
notification and the file that is now in the trash. This behavior is
reproducible 100% of the times, after a boot.
I then execute the xrandr command to lower the brightness level as it
was reseted. If I trash something else, even with that notification
popping up, it won't reset again unless I reboot. I'm now in the middle
state of this weird behavior. I'm sure that it will resets again somehow
and if I lower the gamma with that xrandr command for the third time, it
won't reset by itself ever again until the next boot.
I observe the same thing. Gnome-shell calls XRRSetCrtcGamma the first time the "Undo" window is shown after deleting file.

From the backtrace it is not clear to me why:

#0 0x00007f5b6ea5e2e0 in XRRSetCrtcGamma (dpy=0x55a7ebccc630, crtc=63, crtc_gamma=0x55a7ec8aedd0) at XrrCrtc.c:262
#1 0x00007f5b74c3c6c8 in meta_monitor_manager_xrandr_set_crtc_gamma (manager=<optimized out>, crtc=0x55a7ec078150, size=<optimized out>, red=0x55a7ef6191b0, green=0x7f5b540123e0, blue=0x55a7ebd15860) at backends/x11/meta-monitor-manager-xrandr.c:668
#2 0x00007f5b74c2e68e in meta_monitor_manager_handle_set_crtc_gamma (skeleton=0x55a7ebd040b0, invocation=0x7f5b60044d50, serial=<optimized out>, crtc_id=<optimized out>, red_v=<optimized out>, green_v=<optimized out>, blue_v=0x7f5b60035500) at backends/meta-monitor-manager.c:2240
#3 0x00007f5b729946c5 in () at /usr/lib64/libffi.so.7
#4 0x00007f5b72993bd7 in () at /usr/lib64/libffi.so.7
#5 0x00007f5b758ed5e5 in g_cclosure_marshal_generic () at /usr/lib64/libgobject-2.0.so.0
#6 0x00007f5b758ecb6d in g_closure_invoke () at /usr/lib64/libgobject-2.0.so.0
#7 0x00007f5b758ff4e4 in () at /usr/lib64/libgobject-2.0.so.0
#8 0x00007f5b75907e8f in g_signal_emitv () at /usr/lib64/libgobject-2.0.so.0
#9 0x00007f5b74cd78ba in _meta_dbus_display_config_skeleton_handle_method_call (connection=<optimized out>, sender=<optimized out>, object_path=<optimized out>, interface_name=0x7f5b6003da00 "org.gnome.Mutter.DisplayConfig", method_name=0x7f5b6004d710 "SetCrtcGamma", parameters=<optimized out>, invocation=0x7f5b60044d50, user_data=0x55a7ebd040b0) at meta-dbus-display-config.c:2552
#10 0x00007f5b75c9d316 in () at /usr/lib64/libgio-2.0.so.0
#11 0x00007f5b75c8515c in () at /usr/lib64/libgio-2.0.so.0
#12 0x00007f5b75808627 in g_idle_dispatch (source=0x7f5b6001d6c0, callback=0x7f5b75c85070, user_data=0x7f5b60044d50) at gmain.c:5620
#13 0x00007f5b7580bc15 in g_main_dispatch (context=0x55a7ebcbc3f0) at gmain.c:3182
#14 0x00007f5b7580bc15 in g_main_context_dispatch (context=***@entry=0x55a7ebcbc3f0) at gmain.c:3847
#15 0x00007f5b7580bfd8 in g_main_context_iterate (context=0x55a7ebcbc3f0, block=***@entry=1, dispatch=***@entry=1, self=<optimized out>) at gmain.c:3920
#16 0x00007f5b7580c2d2 in g_main_loop_run (loop=0x55a7ec08eee0) at gmain.c:4116
#17 0x00007f5b74c66b2c in meta_run () at core/main.c:689

You should ask Gnome people.

Michal


_______________________________________________
***@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_ad
Riccardo Berto
2018-11-19 15:09:21 UTC
Permalink
Post by Michal Srb
Post by Riccardo Berto
Post by Michal Srb
Thanks for the answer.
No, I don't use redshift. As far as I know, it can only happen twice
during each Xorg start up. After these 2 times and me readjusting the
backlight manually with the xrandr command previously posted, it stays
that way even for a week of continued usage. It has done that for years.
In the meantime I changed browsers, usage habits, Xorgs versions, PCs,
GPUs, drivers, ...
I have a keyboard shortcut with that xrandr command saved for this exact
reason as I have to execute it up to 3 times during each session. I
finally decided to go public with this issue as I can hardly bare the
default minimum brightness of my "new" subpar screen.
What desktop environment are you using? I know that at least KDE/Plasma has
its own configuration for gamma and will apply it itself on start.
Michal
I'm using Gnome 3.30.
I just booted and logged in. I execute the xrandr command once to lower
the insane brightness level. I open nautilus (file manager), try to
trash some file by selecting it and pressing the DELETE button --> Xorg
resets the gamma settings to the default value. The only thing that
appeared on the screen that may have caused this is the "_filename_ was
moved to trash" greyish notification on the top side of the window, near
the title bar of nautilus. Nothing changed in the system except for that
notification and the file that is now in the trash. This behavior is
reproducible 100% of the times, after a boot.
I then execute the xrandr command to lower the brightness level as it
was reseted. If I trash something else, even with that notification
popping up, it won't reset again unless I reboot. I'm now in the middle
state of this weird behavior. I'm sure that it will resets again somehow
and if I lower the gamma with that xrandr command for the third time, it
won't reset by itself ever again until the next boot.
I observe the same thing. Gnome-shell calls XRRSetCrtcGamma the first
time the "Undo" window is shown after deleting file.
#0 0x00007f5b6ea5e2e0 in XRRSetCrtcGamma (dpy=0x55a7ebccc630,
crtc=63, crtc_gamma=0x55a7ec8aedd0) at XrrCrtc.c:262
#1 0x00007f5b74c3c6c8 in meta_monitor_manager_xrandr_set_crtc_gamma
(manager=<optimized out>, crtc=0x55a7ec078150, size=<optimized out>,
red=0x55a7ef6191b0, green=0x7f5b540123e0, blue=0x55a7ebd15860) at
backends/x11/meta-monitor-manager-xrandr.c:668
#2 0x00007f5b74c2e68e in meta_monitor_manager_handle_set_crtc_gamma
(skeleton=0x55a7ebd040b0, invocation=0x7f5b60044d50, serial=<optimized
out>, crtc_id=<optimized out>, red_v=<optimized out>,
green_v=<optimized out>, blue_v=0x7f5b60035500) at
backends/meta-monitor-manager.c:2240
#3 0x00007f5b729946c5 in () at /usr/lib64/libffi.so.7
#4 0x00007f5b72993bd7 in () at /usr/lib64/libffi.so.7
#5 0x00007f5b758ed5e5 in g_cclosure_marshal_generic () at
/usr/lib64/libgobject-2.0.so.0
#6 0x00007f5b758ecb6d in g_closure_invoke () at
/usr/lib64/libgobject-2.0.so.0
#7 0x00007f5b758ff4e4 in () at /usr/lib64/libgobject-2.0.so.0
#8 0x00007f5b75907e8f in g_signal_emitv () at
/usr/lib64/libgobject-2.0.so.0
#9 0x00007f5b74cd78ba in
_meta_dbus_display_config_skeleton_handle_method_call
(connection=<optimized out>, sender=<optimized out>,
object_path=<optimized out>, interface_name=0x7f5b6003da00
"org.gnome.Mutter.DisplayConfig", method_name=0x7f5b6004d710
"SetCrtcGamma", parameters=<optimized out>, invocation=0x7f5b60044d50,
user_data=0x55a7ebd040b0) at meta-dbus-display-config.c:2552
#10 0x00007f5b75c9d316 in () at /usr/lib64/libgio-2.0.so.0
#11 0x00007f5b75c8515c in () at /usr/lib64/libgio-2.0.so.0
#12 0x00007f5b75808627 in g_idle_dispatch (source=0x7f5b6001d6c0,
callback=0x7f5b75c85070, user_data=0x7f5b60044d50) at gmain.c:5620
#13 0x00007f5b7580bc15 in g_main_dispatch (context=0x55a7ebcbc3f0) at gmain.c:3182
#14 0x00007f5b7580bc15 in g_main_context_dispatch
#15 0x00007f5b7580bfd8 in g_main_context_iterate
#16 0x00007f5b7580c2d2 in g_main_loop_run (loop=0x55a7ec08eee0) at gmain.c:4116
#17 0x00007f5b74c66b2c in meta_run () at core/main.c:689
Thanks for testing my "bug" and helping me.
Post by Michal Srb
You should ask Gnome people.
Will do!

Thank you again.
_______________________________________________
***@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/lis

Loading...