Page 1 of 1

Color profile set to default after suspend/sleep

Posted: Sat Jan 19, 2013 2:47 pm
by q____q
Not sure where to post this, please move topic if neccesary.

I'm running Linux Mate 14 (64bit, Cinnamon) on a MacbookPro 7,1 and it's really awesome so far ('cept for minor things like having to disable keyboard backlight at every login).

One thing that annoys me is that the color profile is set to default every time I wake the laptop from sleep/suspend (reopening the lid). Deleting the default profile in the Color preferences did not help. It might be the Nvidia Settings (Geforce 320M, using the proprietary driver) interfering here but I don't know how to solve this

Any ideas?

Re: Color profile set to default after suspend/sleep

Posted: Sun Jan 20, 2013 10:01 am
by q____q
Yay, I just found a way to disable the keyboard backlight that actually works on my MacbookPro7,1:

Add

Code: Select all

echo 1 >> /sys/class/leds/smc::kbd_backlight/brightness
to rc.local via

Code: Select all

sudo gedit /etc/rc.local
No progress on the profile-problem though …

EDIT: The above obviously only sets the backlight to one (and doesn't really turn it fully off). But since 0 and -1 do not work I think this is good enough. To set the screen brightness to something else then full power at login add the line:

Code: Select all

echo 3 >> /sys/class/backlight/apple_backlight/brightness

Re: Color profile set to default after suspend/sleep

Posted: Sun Jan 20, 2013 10:20 am
by q____q
This seems to be a bug known since 2011 not only affacting NVIDIA.

Re: Color profile set to default after suspend/sleep

Posted: Wed Jan 23, 2013 11:55 am
by q____q
Found a way to solve this:

Install xcalib.

Place a script with the following in /etc/pm/sleep.d/

Code: Select all

#!/bin/bash
case "$1" in
    thaw|resume)
        export DISPLAY=:0
        su -c - <USERNAME>
        /usr/bin/xcalib "<PATH TO COLOR PROFILE>"
        ;;
    *)
        ;;
esac
exit $?
Thanks/credit to this and this thread.