3

I'm running Ubuntu Gnome 14.10 64bit on my Lenovo Y500 laptop, and every time the system goes into suspend mode, the wallpaper turns into distorted colors like this or this and it's really annoying.

Do you have any idea what might be causing this?

Thanks.

15
  • Do you know what video driver you use? (Software Center > Edit (menu) > Software Sources > Extra Drivers (tab) Apr 6, 2015 at 7:18
  • yeah I use nvidia binary driver - version 331.113 from nvidia-331 (proprietary, tested)
    – Kmelkon
    Apr 6, 2015 at 7:29
  • Not a "quality answer", but it might help nevertheless:: often in these occasions, switching to another driver makes a difference. Apr 6, 2015 at 7:35
  • sorry, but this is what was written in the tab you mentioned, should I use some other command that will give all the info? if so please tell me what is it? if it's related to gpu, maybe I have to update the driver?
    – Kmelkon
    Apr 6, 2015 at 7:41
  • 1
    Thanks for your tips, the thing is on every bootup, the process gets delayed by a bug in the gpu for like 30 seconds, it writes something about broken pipe and sanity check, then it fixes itself and boot. If this didn't exist I'd probably never suspend, as you said bootup and shutdown times are really low now.
    – Kmelkon
    Apr 6, 2015 at 9:16

1 Answer 1

3

After long time I found a rather practical workaround: The trick is to automatically reset the background upon resume.

To achieve this create a file "reset-bg-color.sh", for example in /opt/reset-bg/:

#!/bin/bash
gsettings set org.gnome.desktop.background primary-color '#000000'
gsettings set org.gnome.desktop.background secondary-color '#000000'
gsettings set org.gnome.desktop.background color-shading-type 'solid'
gsettings set org.gnome.desktop.background picture-uri ''

The second part is to register this script, so it will be invoked automatically when the computer resumes. In /lib/systemd/system-sleep place the second script file, in my case named "reset-bg.sh", including the following content:

#!/bin/bash

PROGNAME=$(basename "$0")
state=$1
action=$2

function log {
    logger -i -t "$PROGNAME" "$*"
}

log "Running $action $state"

if [[ $state == post ]]; then
    log "WAKE UP"
    exec /opt/reset-bg/reset-bg-color.sh
fi

In case you prefer to have a wallpaper reloaded, instead of reset the background color, you can use the following file "reset-bg-wallpaper.sh":

#!/bin/bash
gsettings set org.gnome.desktop.background picture-uri "file:///home/alex/wallpaper/wallpaper-file.png"

and change the exec-statement in "reset-bg.sh" to the following:

exec /opt/reset-bg/reset-bg-wallpaper.sh
1
  • Didn't worked for me, on Gnome 3.30. I think you need to change some keys to it really take effect, like first setting primary-color '#000001' and then setting primary-color '#000000' afterwards. Feb 8, 2023 at 18:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .