Some icons and text randomly become invisible after waking up from sleep (Ubuntu GNOME)

6,876

Solution 1

Restart the GNOME shell without interfering with any already opened windows using the following command and the missing Panel icons will reappear.

setsid gnome-shell --replace 

Press Enter again before closing the terminal.

In case you need to run setsid gnome-shell --replace every time you boot to the desktop, you can automate the command by creating an alias for it. An alias declaration starts with the alias keyword followed by the alias name, an equal sign and the command you want to run when you type the alias. For more information see How do I create a permanent Bash alias?.

Solution 2

Sounds a lot like this bug: Bug #1573959 "On-screen text disappears after suspend"

The suggested solution is to upgrade the kernel from 4.4 to 4.8:

sudo apt install linux-generic-hwe-16.04

I did that today, but since I only had the problem a few times in the last months, I can't testify to the effectiveness of this solution. However, others in the bug comments confirm that it solved the problem for them.

Solution 3

This seems to be a bug in the graphics driver, so it should be reported once we know what triggers it (hardware, driver).

That said, there have been lots of similar bugs and people came up with workarounds there which you can also try for this one.

In case you have an Intel graphics card, here are some workarounds to try:

  • Reserve memory for the graphics adapter. In the Intel graphics driver (i915), pixmap caching issues like yours are often connected to the fact that the graphic card's shared memory is dynamically allocated from system memory, so also takes part in swapping, read-back from disk etc. where things can go wrong. So one workaround is to use the mem boot parameter to leave enough RAM unallocated by Linux that is then used exclusively by the graphics card. See the detailed instructions. But note that on x86 systems (32 and 64 bit), the mem parameter is actually a maximum address [source], so has to be set higher (determined by experiment) than the amount of RAM to leave for Linux.

  • Disable swap. Again for Intel graphics, not including the shared graphics memory in swapping can be a workaround. Especially promising if the problem mostly does not appear after a fresh reboot, only after prolonged and memory-intensive work. So if you have enough RAM, you can just disable swapping completely by adding swapoff -a to /etc/rc.local [source].

  • Try UXA acceleration. It's an option for the X config file, details here.

  • Try framebuffer BLIT mode. Again for Intel graphics, you can try sudo echo COGL_ATLAS_DEFAULT_BLIT_MODE=framebuffer >> /etc/environment and then reboot. [source]

  • Try to reset Compiz to default settings. Reported here (but quite some time ago) to have helped with similar issues. Or while we're at it, try a non-compositing desktop manager instead of Compiz.

Share:
6,876

Related videos on Youtube

Frederik Baetens
Author by

Frederik Baetens

Updated on September 18, 2022

Comments

  • Frederik Baetens
    Frederik Baetens almost 2 years

    Icons and application indicators in the dropdown settings sometimes disappear.

    enter image description here

    This happens after waking up from sleep, and can be fixed until waking up from sleep again by pressing Alt+F2 and typing r.

    Does anyone know how to permanently fix this?

    Ubuntu 16.04 gnome 3.18.4

    • Anmol Singh Jaggi
      Anmol Singh Jaggi about 8 years
      I'm having the same problem.
    • tanius
      tanius almost 8 years
      What is your graphics hardware and driver? Same thing here on a Intel GMA 4500MHD (in GS45 chipset), for me a new problem since Ubuntu 16.04.
    • Frederik Baetens
      Frederik Baetens almost 8 years
      I havn't installed any drivers, but my processor is an intel i3 4005u.
    • Frederik Baetens
      Frederik Baetens over 5 years
      I will say that i've never had this problem since switching to fedora.
    • Gustave
      Gustave over 4 years
      Same problem. Ubuntu 18.04.3 LTS, Intel UHD Graphics 630 (Coffeelake 3x8 GT2).
  • BingsF
    BingsF almost 8 years
    The tip about COGL_ATLAS_DEFAULT_BLIT_MODE did it for me! It also resolved an issue I've been having where the screen would take about 5 seconds to turn on when waking up from sleep; now it activates instantaneously!
  • Jonatan Öström
    Jonatan Öström almost 6 years
    COGL_ATLAS_DEFAULT_BLIT_MODE seem to work also for me on xubuntu 16, after logging out and in again, without restart.
  • Mi Ro
    Mi Ro over 3 years
    is there a way how to fix this permanently? this is a problem also on ubuntu 18.04
  • karel
    karel over 3 years
    @MiRo Thanks for commenting. In fact I do have an improvement for this answer and your comment prompted me to edit my answer and add the improvement to it.
  • karel
    karel over 3 years
    @MiRo I replied to your comment by editing my answer.