|
Post by vovchik on Oct 7, 2017 9:54:44 GMT 1
Dear all, Here is a BaCon port I just did of a useful c program by Fabian Foerg (c source is included and BaCon source has link to original GitHub page) that sets the screen temperature for X displays. It is easier to use than redshift and f.lux. Have fun. I hope it works for you. With kind regards, vovchik @ Alex: I just tried it on my RPI and it seems to have no effect (it compiles normally). Do you have any idea or fix? Attachments:coltemp-src.tar.gz (3.09 KB)
|
|
|
Post by Pjot on Oct 7, 2017 18:23:40 GMT 1
Thanks vovchik! All works for me. The code looks very good btw, it is a very nice example of mixing BaCon syntax with C. Best regards Peter
|
|
|
Post by alexfish on Oct 8, 2017 16:18:00 GMT 1
Hi Vovchik
Looking at it now . did some work back on pi 2 . not sure if will get it working, but will try
as to get the Arm cpu bits , 'temperature' there is Raspberry call for this one
vcgencmd measure_temp
in a generallised way could have these in the start up
check if arm and which os
uname -a and check if have display and what number is it
getenv("DISPLAY");
BR Alex
nothing so far
only thing I can recall
in the glx demo's .. noticed that gamma was not available on rpi . not sure if this is connected with the above
a direct poke reveals
xrandr -d :0 --output default xrandr: Failed to get size of gamma for output default
|
|
|
Post by alexfish on Oct 8, 2017 18:12:00 GMT 1
Hi Vovchik
now looking in the tvservice
IE
$ tvservice -h Usage: tvservice [OPTION]... -p, --preferred Power on HDMI with preferred settings -e, --explicit="GROUP MODE DRIVE" Power on HDMI with explicit GROUP (CEA, DMT, CEA_3D_SBS, CEA_3D_TB, CEA_3D_FP, CEA_3D_FS) MODE (see --modes) and DRIVE (HDMI, DVI) -t, --ntsc Use NTSC frequency for HDMI mode (e.g. 59.94Hz rather than 60Hz) -c, --sdtvon="MODE ASPECT" Power on SDTV with MODE (PAL or NTSC) and ASPECT (4:3 14:9 or 16:9) -o, --off Power off the display -m, --modes=GROUP Get supported modes for GROUP (CEA, DMT) -M, --monitor Monitor HDMI events -s, --status Get HDMI status -a, --audio Get supported audio information -d, --dumpedid <filename> Dump EDID information to file -j, --json Use JSON format for --modes output -n, --name Print the device ID from EDID -h, --help Print this information pi@raspberrypi:~ $ tvservice -s state 0x120006 [DVI CEA (31) RGB lim 16:9], 1920x1080 @ 50.00Hz, progressive pi@raspberrypi:~ $
Alex
|
|
|
Post by vovchik on Oct 8, 2017 18:51:46 GMT 1
Dear Alex,
I think you are on the right track with RPI. I also get:
xrandr -d :0 --output default xrandr: Failed to get size of gamma for output default
So we have to see how display gamma is controlled/managed. Have to do some reading...
With thanks and kind regards, vovchik
|
|
|
Post by alexfish on Oct 8, 2017 19:00:53 GMT 1
Hi Vovchik
the GAMMA Ramp is not in the list of groups
an the the returned value of pixels = 1 the
PRINT res->ncrtc . so nothing can be done there
ADDED
whilst on with using dispman as posted on the RPI 3 "Hardware windows EGL " thread now taking a closer look at it's API note how bright and crisp these bits are
May Expose something , May be not , If can find it Then will post further
BR Alex
|
|
|
Post by alexfish on Oct 8, 2017 19:25:20 GMT 1
Hi Vovchik
As mention in PM most of the finer details are in the VC including the headers for raspi commands as posted above
I put a copy in the home folder//
the bits are hard to find .. through the we need to look at are in the
/home/pi/vc/include/interface/vmcs_host
and first bit I am looking at is the 'vc_dispmanx.h' BR Alex
|
|
|
Post by vovchik on Oct 8, 2017 19:56:46 GMT 1
Dear Alex,
From what I just read, I gather that RPI's X server is pretty much a simple wrapper around a "dumb" frame buffer not really communicating much with the GPU. There might be a way to fix up X11 and will look into that now...
With kind regards, vovchik
|
|
|
Post by alexfish on Oct 8, 2017 20:27:50 GMT 1
Hi Vovchik
I tried latest messa glx testing a while ago . got a no show there , not sure what the latest messa will do or have they put that bit in
for poking around in the x as in the root
I go in using 0 .. 0x0
Display *display = XOpenDisplay(0x0); Screen * screen ; int default_screen = DefaultScreen(display);
Then XQuery****
BR Alex
|
|
|
Post by alexfish on Oct 8, 2017 21:46:08 GMT 1
Hi Vovchik
thought would put cairo dock in , to see if gamma works there
No Gamma there..
BR Alex
|
|
|
Post by vovchik on Oct 8, 2017 22:22:37 GMT 1
Dear Alex,
That means that it is somewhat difficult to get at the backlighting and individual pixel brightness at the level of hardware - I am certain it can be done, but we are missing some tiny bit of info somewhere, and X11 is crippled (or limping) in that respect. More reading...
With kind regards, vovchik
|
|
|
Post by alexfish on Oct 9, 2017 1:49:27 GMT 1
Hi Vovchik
have done some reading.
esp a display for the RPI there is an official one ,
in short , it looks like some of the hdmi bits are used by the gpio pins , I think says he. in one some up not sure
but will have to look at the RPI blogs ref display for RPI, on it is an api for the back light etc and can be called from the cmd line ,, think have found some bits in the vc api that related to this ,, if can find them . then will post via PM
so I be getting off this one for now.
good news on the dismanx side on the RPI thread , re the two windows and getting them to raise and lower
it be just a call to update the dismanx , and the window U be on raises to the top.. what a find
BR Alex
|
|
|
Post by vovchik on Oct 9, 2017 11:06:13 GMT 1
Dear Alex,
Funny how weird xrandr behaviour in RPI - and subsequent reading - may have given you insights into dismanx. I often get sidetracked and find out useful things I would not have discovered otherwise:)
With kind regards, vovchik
|
|
|
Post by alexfish on Oct 9, 2017 15:01:50 GMT 1
Hi Vovchik in at least found the bit to control the two bits i be working on , if it had not been for this thread . could have taken longer for me now ,they look like very "Nice" bits Thanks + BR Alex
|
|
|
Post by alexfish on Oct 9, 2017 16:28:39 GMT 1
Hi Vovchik possible not the place to post yet Esp For U & what vector graphics can do without svg or cairo on The RPI follow this link github.com/ajstarks/openvgBR Alex
|
|