Need help finding the correct startup code for gamma

hey there,

my notebook uses an onboard intel graphicscard and a mobile nvidia card. The screen of my notebook is way too bright so i wanted to use the terminal to reduce gamma.

When i use the intel graphics i can reduce gamma with the code sudo xgamma -gamma 0.65 . In order to have the system do that on startup without me doing anything i found out the code for that is /usr/bin/xgamma -gamma 0.65.

However using the nvidia card the code sudo xgamma -gamma 0.65 won't work. i googled a bit and found out in order to change gamma while using my nvdia card i have to use xrandr --output LVDS-1-1 --gamma 0.65:0.65:0.65 . But now i am kinda clueless what code i have to type in order to make that a startup code.

Can someone help me using the information provided here? i am honestly just copying and pasting stuff i find online without any idea what it means.

For the record: in my nvidia settings i can't change gamma cause my display is shown as "prime display" which has no settings at all.

xrandr should show the output devices it can see ... LVDS-1-1 is a laptop display. In my laptop (Lenovo), I see LVDS-1 as my display. Adjust the command to match the exact device xrandr gives you. What the command does, tells the output device to set parameter gamma these values, for Red Green Blue.

xrandr --output LVDS-1-1 --gamma 0.65:0.65:0.65

another example using DisplayPort (DP-1-1) as output device

xrandr --output DP-1-1 --gamma 1:1:1 

Hope this helps.


I was about to tell you about how i know this already. But i am an idiot and didn't even try to use this exact code as a startup code before making this post.
It worked just fine.

Because i needed to add /usr/bin/xgamma to the intel-card code i just assumed i also have to add something to the nvidia-card code without even trying what i already found out.

Normally i would put a solution mark onto your post cause it helped me, but for the sake of better understanding of fellow people coming in here with the same problem i will make a short summary on the problem and it's solution so it can be found faster. i hope that's okay for you. You've got my thanks though.

So for anyone having problems changing the gamma values when having an intel onboard and an nvidia card:

When using intel
The code for changing the gamma value is sudo xgamma - gamma 1.00
1.00 is the default value. Reducing it makes the screen darker, raising it makes it brighter.
In order to save the value for each bootup (on your intel card) search for startup-applications, click "add" and enter /usr/bin/xgamma -gamma 1.00 . As name i suggest "gamma intel" but it can be anything you want.

When using nvidia
When using nvidia you need to find out which output device you're running using xrandr | grep " connected " | awk '{ print$1 }' in my case the output device was "LVDS-1-1", it might be different for you. When you found out the device name you can change the gamma value using xrandr --output LVDS-1-1 --gamma 1.00:1.00:1.00 .
Replace the output device with the one you got and adjust the numbers like you need them. This also is the code you need in order to save it for each bootup (with nvidia card). just open startup applications, click "add" and enter the code. As name i suggest gamma nvidia but you still can use whatever you want.

When both startup application codes are saved your gamma will be saved on each bootup, no matter which graphics card you use.