0

I have installed elementary OS on my HP 2000-2128 notebook. But screen is faint and bright. To change contrast i have added xgamma -gamma 0.7 to startup command. But on reboot it automatically changes to 1, so that at every reboot I have reset screen contrast to xgamma -gamma 0.7 through terminal.

  • Where exactly did you put the command xgamma? – lemonslice Jun 5 '17 at 22:11
  • 1
    Settings-applications- startup command – Manoj11 Jun 6 '17 at 2:10
  • Problem is that, adding gamma to startup works fine. But it automaticaly changes to 1.0 whenever i delete or copy paste some files. – Manoj11 Nov 12 '17 at 6:21
  • You could install Redshift and adjust the configuration file to set the gamma. – Pretzel Jones Jan 11 '18 at 16:52
0

I've read some articles where this command isn't working, which really depends on different types of hardware. You could try installing xbacklight: sudo apt-get install xbacklight

And then setting a startup command xbacklight -set 70 the same way you did for the xgamma command, via the Startup Applications window.

Let met know if this works out for you, I'm still learning Linux myself, but this neat workaround is something that worked for me though.

  • Thank you for reply. But above solution didnt work. I searched lot but couldnt resolve problem. Finaly I am switching to linux mint mate. – Manoj11 Jun 8 '17 at 8:25
  • 1
    OR you could use Redshift and add Gamma change to its config file. Add Redshift to startup items and Gamma is adjusted when Redshift is started. eg. add this to the redshift.conf (in ~/.config): gamma=0.8:0.7:0.8 – wefunkster Aug 7 '17 at 8:33
  • Tried both above solution. – Manoj11 Nov 10 '17 at 17:15
  • Problem is that, adding gamma to startup works fine. But it automaticaly changes to 1.0 whenever i delete or copy paste some files. – Manoj11 Nov 12 '17 at 6:20
0

What I recommend is creating a shell script and a .desktop file linking to the script. Then add the "application" to your startup via the System Settings. This way every time you log in the script is run and the gamma is set. It works perfectly for me. Here is an example of what I've done...

create a new text file and add the following:

#!/bin/bash/

xrandr --output eDP-1 --gamma 0.70:0.70:0.70

Play with the values to get the gamma to your liking. You can do this on the fly via the terminal. Save as gamma.sh or something like that.

Note: eDP-1 refers to the monitor on my setup. To identify yours run:

xrandr -q

Then in the terminal navigate to the folder where your gamma.sh is saved and run the below command in the terminal:

chmod +x gamma.sh

This will set the script as executable.

Now you need to create a desktop file so we can add the script to your startup. Open a new text file and name it something like gamma.desktop.

add the following to the file:

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Gamma Setter Application
Comment=A script to set gamma on monitor
Exec=/path/to/gamma.sh //obviously here you want to add the true path to your file
Icon=/path/to/icon.png //obviously here you want to add the true path to your icon file if you want one different from the base gear
Terminal=false

Once that is done open System Settings > Applications > Startup (I think that's what it's called) and add your gamma setter application.

Good luck!

  • Thanks for reply. But this solution is not working. As soon as i delete or copy paste something, gamma value changes to 1.0. – Manoj11 Nov 10 '17 at 17:16
  • Odd, I've never experience that issue. But I likely have a different machine than you. It was recommended above to try using Redshift, which is the method I am currently using to set my gamma, because within the config file you can set gamma differently for day and night. With Redshift I do, occasionally, experience the gamma resetting to 1.0 but only for a second or two and then it reverts back. This happens usually when opening applications or working with files. Anyway, maybe give Redshift a try. – Pretzel Jones Nov 10 '17 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.