42

I keep on experiencing weird bugs. These usually start after a few hours of use. Sometimes the dash starts opening under every open window (becomes only visible on desktop, but I still can search and open anything with the enter key while it's not visible). Also, there are other minor annoyances, such as random places (especially maximized Chrome, tabs area) after navigating between programs with alt+tab can't be clicked with the mouse. Switching back and forth fixes this.

I cannot use

compiz --replace

since after that, all of the app indicator icons are gone (only teamviewer stays). Skype, network, languages, sound (also keyboard sound up/down stops working) and date are gone. Restarting unity-panel-service does not help.

Any thoughts on how to resolve these?

daliusk
  • 535
  • 1
  • 5
  • 5
  • I had a serious problem with that too, Yakuake terminal would stop responding, I solved it using this script secFixWindow.sh --fixcompiz that basically replaces with metacity, wait a bit and replaces again with compiz and all works fine :) – Aquarius Power Aug 22 '15 at 22:31
  • just to make it sure, I tried this xterm -e unity&disown 3 times subsequently, and it worked correctly but on the 4th time, yakuake was inaccessible and cairo-dock messed up its positioning; so that script with the timing still worked better. – Aquarius Power Aug 23 '15 at 02:53

2 Answers2

46

You can press Alt+F2, then type unity, then press Enter to restart Unity.

  • Or you could use:

    sudo service gdm restart
    
  • On 14.04 and 14.10 use:

    sudo service lightdm restart
    
  • On 15.04 and 15.10 use:

    sudo systemctl restart lightdm.service
    
David Foerster
  • 36,264
  • 56
  • 94
  • 147
Pabi
  • 7,401
  • 3
  • 40
  • 49
  • 1
    "unity" seems to work. I guess I'll have to wait for problems to appear and then try it. – daliusk Jul 10 '14 at 12:15
  • Should work just fine :) – Pabi Jul 10 '14 at 12:21
  • 3
    I think the command is sudo service lightdm restart on Ubuntu 14.04 – user100464 Feb 02 '15 at 20:36
  • 1
    And you should be able to use service on 15.04. It will use the appropriate systemctl command. – muru May 04 '15 at 17:00
  • 3
    In gnome 3, you can press Alt-F2 and enter r, and it restarts the shell without logging you out. It seems that unfortunately there's no way to do that with unity – nafg May 11 '15 at 07:39
  • after compiz crashed and Xorg had no window manager active, I pressed alt+f2 and nothing happened, any idea? – Aquarius Power Aug 23 '15 at 02:54
  • Well the ALT-F2 option got me in a worse state than I was before. Not recommended. – Jeffrey Blattman Mar 30 '17 at 18:06
  • In 14.04: sudo service lightdm restart, for me, yields a black screen (I think it killed the process but didn't restart it). I had to fall back to a TTY terminal and run sudo service lightdm start to get back to a working desktop session. – Jez W May 22 '17 at 08:57
  • On 16.04.3 LTS, my Macbook Pro with a second monitor showed funky patterns (primary monitor was fine). sudo systemctl restart lightdm.service caused me to lose my session anyway. At this point sudo reboot now is all that actually worked. – pzrq Feb 13 '18 at 22:10
  • Pictures here: https://pzrq.squarespace.com/blog/2018/2/14/ubuntu-second-monitor-after-sleep-bug-pictures.html – pzrq Feb 13 '18 at 22:38
  • 1
    On 20.04 LTS: "Failed to restart lightdm.service: Unit lightdm.service not found." – Mir-Ismaili May 01 '20 at 14:55
1

Try secFixWindow.sh:

secFixWindow.sh --fixcompiz

It basically

  1. replaces with Metacity,
  2. waits a bit and
  3. replaces again with Compiz.

Waiting is important to not mess with some applications like Yakuake or Cairo Dock.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • 4
    Please don't run large shell scripts you download off the internet, unless you are going to take the time to read and understand all of it. – Jeffrey Blattman Mar 30 '17 at 18:06
  • @JeffreyBlattman it is open source (not obfuscated, of course), unlike many applications out there that are machine dependent compiled and closed source, I mean, as I understand, any propietary application/driver have more chance to be a trustless source of problems than an open source anything that is around for some time already so other ppl could have poked on it, or am I missing something? – Aquarius Power Mar 30 '17 at 20:09
  • Yes, definitely you are missing something. Sourceforge is infested with malware and known to co-opt and modify abandoned projects. If are willing to inspect and understand the script, then fine go for it. – Jeffrey Blattman Mar 31 '17 at 23:45
  • @JeffreyBlattman oh... thx on the info..., btw they seem to be scanning for malware (2016 on) but may be trust is lost already 2015, so alternatives – Aquarius Power Apr 01 '17 at 01:49
  • @JeffreyBlattman also, it seems they were/are targeting abandoned projects, and this one was not. The threat also seems not so high as virus or outlawed things, but instead, sneaky unwanted sofware that may break our privacy I guess..., so basically, not all sofware would be compromised but... as I said... trust is lost :( – Aquarius Power Apr 01 '17 at 01:53
  • @JeffreyBlattman anyway, I described the basic functionality of the script, so it can be reimplemented in 3 line codes and that functionality is still a valid workaround – Aquarius Power Apr 01 '17 at 02:32