Closed shirishag75 closed 10 years ago
This is rather similar to issue #9.
I have not noticed difference between randr and vidmode, except, vidmode can only modify the ramps on the primary monitor (for each screen I think, but usually all monitors are in the same screen) whereas randr can control all monitors, individually. (Also I do not think vidmode can be used with xcb which is faster and (if I recall correctly) uses less memory (although produces more cluttered code) than xlib.)
Vidmode only has the concept of screens while RandR knows about both screens and outputs. Currently Redshift can only adjust individual RandR screens but an extension to control individual outputs separately has been proposed (#26) and there does not seem to be any technical obstacles to implementing this. From your xrandr
output it seems you have one screen (Screen 0
) and setting screen=0
in the configuration file would then only affect that screen. If you don't specify anything in the config file (let's say you remove the [randr]
section entirely) then Redshift will affect all screens.
Regarding the brightness setting, I am somewhat unsure if it will be kept long term, though I have conceded that there may be valid reasons to use it in some cases. You should really stick with the normal backlight settings on your display if possible. The brightness adjustment imposed by Redshift is a kind of fake brightness using the gamma ramps.
Lastly, as @maandree mentioned there have been other proposals for custom time periods but it is hard to reach a consensus on what features should be supported in such a system. The solution may be that Redshift in the future supports a D-Bus interface that can be used by external programs to implement customized models. There is a sketch of this already implemented in the dbus-service branch.
@jonls
Perhaps you could add support for dynamically change the backlight. In linux this can be done by using the *brightness
files in /sys/class/backlight/*
, of course this must be optional as it may be unavailable or interfere with manual adjustment of backlighting.
@maandree I have considered that but I never got around to it. I originally ported xbacklight
to xcb so that I could use the same code for Redshift but I never got further than that. (It got merged into upstream so if anyone wants to work on this the xbacklight code can be used as inspiration.) Also, as you mention, there is the problem that it interferes with the manual adjustment, which I don't see any easy solution to.
xbacklight method might be easier to use (I do know, I have never used xbacklight), but it does not work on all devices. The only solution a can see to the interference is to check for changes before adjusting. Another problem with backlight, at least if you use /sys/class/backlight is that you might few levels (it is device dependent, on my laptop I have 100 if a use the video driver, but 5 if a use acpi). Using /sys/class/backlight have two interesting properties: it does not require X so you could use redshift without X with the restriction that it only changes the backlight; and you need root (using setuid mode flag will remove this restriction [requires a compiled command, which redshift is]) or the permissions in /sys/class/backlight needs to be adjusted.
Also if you are interested in identifying monitors uniquely, I have implemented EDID detection written with XCB in C: https://github.com/maandree/blueshift/blob/master/src/blueshift_idcrtc.c
Thanks, I assumed the xbacklight method would be more portable since it seems to be one layer above. Not having to deal with permissions would be an advantage. Both methods should be possible though.
Here is my perspective. I’ve had many problems with xbacklight and currently I can only use sysfs based solution [2].
IIRC from discussion with xf86-video-ati developers
I’m able to change brightness with sysfs: echo 1 >! /sys/class/backlight/asus_laptop/device/backlight/asus_laptop/brightness
Currently I’m using @maandree adjbacklight for convenience.
My point is: backlight support is a total mess, which you can see by reading [1]
[1] https://wiki.archlinux.org/index.php/backlight is an excellent summary of backlight problems and possible solutions. [2] https://www.kernel.org/doc/Documentation/ABI/stable/sysfs-class-backlight [3] https://bugs.archlinux.org/task/27677 [4] https://wiki.archlinux.org/index.php/acpid#Enabling_backlight_control [5] https://wiki.archlinux.org/index.php/xorg [6] https://code.google.com/p/bltool/ [7] http://haikarainen.dotgeek.org/lightscript/ [8] https://github.com/maandree/adjbacklight [9] https://wiki.archlinux.org/index.php/ATI
Graphics: Card: Advanced Micro Devices [AMD/ATI] RV530/M56-P [Mobility Radeon X1600] Display Server: X.Org 1.15.0 drivers: ati,radeon Resolution: 1280x800@60.00hz GLX Renderer: Gallium 0.4 on ATI RV530 GLX Version: 2.1 Mesa 10.1.0 System: Host: potop Kernel: 3.14.0-3-ARCH x86_64 (64 bit) Desktop: N/A Distro: Arch Linux
Because of the mess backlighting is I suggest not implementing it. When D-Bus service is implemented, a client could easily get the brightness settings and set them to 1:1 and take care of backlighting with would make it easier to select what technique to use without redshift having to support all of them.
Hi all, I am using redshift 1.7.2 which has only two values for brightness which co-incide with day and night. It would be nice if we had an evening value-pair as well.
This is how it looks at my end :-
The above configuration file was stolen from the interweb somewhere. The only changes are/were the latitude and longitude readings and the screen 0 thing.
I did read that there is a difference between randr and vidmode but the configuration file shared didn't document what to do if randr is used. Should it be just :-
These are my values via xrandr :-
Looking forward to know more.