Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

How to adjust screen contrast and gamma, persistent settings?

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

How to adjust screen contrast and gamma, persistent settings?

#1 Post by kau-92 »

Hey,

I'm currently using xgamma :

Code: Select all

xgamma -gamma 0.8 

xgamma -quiet -rgamma 0.50 -ggamma 0.50 -bgamma 0.50
- to change the gamma of my screen. But these settings are not persistent over shut-downs. how to have the settings stored in a file and applied at startup?

And I want to change the screen contrast, to be less contrasting. But I found no clear way to do it. One thread says use 'xcalib' to change the settings, but when I install and try to run xcalib, it gave an error similar to "no protocol specified". I had to uninstall xcalib again.

I need to be able to change screen contrast, brightness and gamma. and store them in a persistent settings file applied at startup.

thanks.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: How to adjust screen contrast and gamma, persistent settings?

#2 Post by Head_on_a_Stick »

xgamma is obsolete and you shouldn't have to bother with gamma anyway.

What is the actual problem here?

The screen backlight level should be adjustable via /sys/class/backlight/*/brightness and it should be saved and restored for the next boot by systemd. If that isn't happening for you then your graphics hardware probably isn't supported.

Please post the output of

Code: Select all

lspci -knn | grep -iA3 'vga\|3d\|display'
deadbang

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: How to adjust screen contrast and gamma, persistent settings?

#3 Post by kau-92 »

what you asked for :

Code: Select all

oldred:~$ lspci -knn | grep -iA3 'vga\|3d\|display'
00:02.0 VGA compatible controller [0300]: Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 02)
	Subsystem: Hewlett-Packard Company Core Processor Integrated Graphics Controller [103c:144a]
	Kernel driver in use: i915
	Kernel modules: i915
--
01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Park [Mobility Radeon HD 5430/5450/5470] [1002:68e0]
	DeviceName: ATI Mobility Radeon HD 5470
	Subsystem: Hewlett-Packard Company Park [Mobility Radeon HD 5430/5450/5470] [103c:144a]
	Kernel modules: radeon
Your back-light setting in /sys dir worked. it does help make the screen easier to the eyes.

basically I just want to make it much easier for my eyes to look at the screen for long times. I've known from before that changing gamma to make it darker, and adjusting the contrast as I like, I can get good results. also a slight change in the hues might help.

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: How to adjust screen contrast and gamma, persistent settings?

#4 Post by kau-92 »

The change of setting didn't persist over shut-down though. I changed /sys/class/backlight/intel_backlight/brightness to be less than 1608, now after restart its back to that amount. there are also folders called : acpi_video1 and acpi_video0 in the /backlight folder.

well I guess I can put all of of the relevant commands up into a bash-file and run it from some quick-access place at start up. not a huge problem I guess.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: How to adjust screen contrast and gamma, persistent settings?

#5 Post by Head_on_a_Stick »

Try adding acpi_backlight=none as a kernel command line parameter.

I think the acpi_video? directories are being saved and restored by systemd and that parameter should remove them so the Intel directory is used instead.

If that doesn't work share the output of

Code: Select all

systemctl --all | grep backlight
deadbang

User avatar
kau-92
Posts: 46
Joined: 2020-12-16 12:49

Re: How to adjust screen contrast and gamma, persistent settings?

#6 Post by kau-92 »

well...it didn't persist over the shut down. but I've made two bash files for day and night settings, and the brightness amount file is copied ( cp command ) from my user directory to the backlight directory. It doesn't take that long to set the screen (have to give sudo privilege and run the bash file on the terminal) and so it's not too bad.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: How to adjust screen contrast and gamma, persistent settings?

#7 Post by Head_on_a_Stick »

If you share the requested output we can probably get it all working without having to faff about with silly scripts.

Also check if the kernel parameter was actually applied:

Code: Select all

cat /proc/cmdline
deadbang

Post Reply