PDA

View Full Version : [ubuntu] 17.10 Xorg desktop GUI freezes, how to unfreeze?



The Bright Side
November 22nd, 2017, 06:07 PM
Hey guys! Anybody else get their desktop frozen recently? When I open certain websites in Opera, mostly those that play video, the whole UI freezes. YouTube never caused the issue, but I had it on some sites that I use to watch TV shows. I'm wondering if perhaps Flash has something to do with it. I've started using Chrome as a workaround, but today, the freeze happened when I opened a web calendar (that may or may not use Flash) in Opera, too.

The quickest way to tell that this has happened is that the seconds on the clock in the top panel no longer advance. Well, that, and the fact that everything is frozen.

I can still move the mouse cursor, and the computer continues working (music continues to play, running processes continue), but Gnome Shell is frozen for good. Only hard-resetting the PC fixes the issue.

My question is... Anybody experience the same thing? Any way to un-freeze Gnome Shell? I tried Alt+F2 and r, but that doesn't do anything. Pressing Ctrl-Alt-F7 brings me to a terminal, but I'm not sure how to proceed from there.

The Bright Side
November 22nd, 2017, 06:34 PM
This is what I get when pressing Ctrl-Alt-F7. Not sure what to do with this, but I seem to remember that somehow there might be a way to restore a GUI from there. Thing is, it just stays like that. No command prompt appears.

http://www.meetmatteastwood.com/ctrl-alt-f7.jpg

Holger_Gehrke
November 22nd, 2017, 07:06 PM
While I'm not on Ubuntu 17.10, I do get similar lock ups whenever I play quake with the quakespasm engine in fullscreen, forget to disable xscreensaver and leave the keyboard for a moment to long. What I do is drop to a text mode console (ctrl-alt-F1 to F6 (6 separate consoles), has this changed on 17.10 ?*), enter user name and password (it doesn't echo anything during password entry, but it does read the keyboard ...). then I do a 'ps ax' to get the PID of the hanging process and do a 'sudo kill -9 PID' with PID being the process identification number I got in the previous step.Wait a moment after that, switch back to the GUI (ctrl-alt-F7, that's is why I was surprised at your getting the console this way), wait for the GUI to catch up to the fact that the program running fullscreen in the foreground isn't there anymore and everything is good again.
In your place I'd try killing the browser; if that doesn't unfreeze the GUI, you can at least restart or shut down the system cleanly by doing 'sudo reboot now' or 'sudo shutdown now'. Or you can try killing the display server, it should get restarted by the session manager than.

Holger

* yes, it has. see this question on askubuntu (https://askubuntu.com/questions/979027/how-do-i-switch-between-console-mode-and-gui-in-17-10)

The Bright Side
November 22nd, 2017, 09:00 PM
Hey Holger, thanks so much. I had a freeze again just now. Every time it happens, it's when Opera is in focus. Guess it's time I go back to Firefox :-(

I'm not using Wayland because some of the apps I need every day aren't compatible with it (mostly, Darktable). Perhaps that's why I get the console on Ctrl-Alt-F7? My main session is on console 1 (Ctrl-Alt-F1).

During the last freeze, I hit Ctrl-Alt-F2, got a proper terminal, logged in and tried both gnome-shell and gnome-shell --replace. Both times, it told me:

Unsupported session type

Next time I get a freeze, I will try your suggestions - thanks for those!

JamButty
December 15th, 2017, 02:59 PM
I am having the same problems in Wayland and Xorg, plus all video other than HTML5 is now unplayable in Opera, though that may be an Xorg issue. I will retry in Wayland.

The Bright Side
December 17th, 2017, 06:26 PM
Hey JamButty! While I still don't have a solution (my workaround is to use my laptop, which still has 17.04, and wipe my desktop PC when I get some free time) - I posted about the same issue over in the Opera forums. Perhaps consider hopping over there and describing how the issue manifests for you.

https://forums.opera.com/topic/23498/opera-crashes-gnome-shell

Also, just noticed somebody posted a fix 2 days ago that doesn't involve a hard reset. Baby steps! :-)

The Bright Side
December 26th, 2017, 04:27 PM
Hey everybody, I might have a solution.

In Opera, go to opera://gpu (or chrome://gpu). You will likely see that video encode and decode are done by software, not hardware accelerated. Probably some other things as well.

Go to opera://flags (or chrome://flags), and enable the option, "Override software rendering list". Close and re-open Opera. You will see that videos are now hardware-accelerated.

More info: http://www.webupd8.org/2014/01/enable-hardware-acceleration-in-chrome.html

While you're at it, you could also go ahead and enable hardware acceleration in Firefox. Google "Ubuntu Firefox enable hardware acceleration", it's one of the first results.

I don't know for sure whether this really fixes our problem. It did solve stuttering issues for me, which I continued to experience on my desktop PC on 17.10 after uninstalling Opera, and then again after switching to Mint 18.3. After my switch to Mint, I also had stuttering in ZSNES, which went away after I did the following:

- Open NVidia settings
- In "OpenGL Settings", disable "Allow Flipping" and move "Image Settings" slider to the right until it says "Performance".
- You could also try disabling VSync (also in OpenGL Settings). If you get no screen tearing afterwards, leave it off.
- In "PowerMizer", set "Preferred Mode" to "Prefer Maximum Performance".

The "PowerMizer" setting is automatically reset after reboot. To make it permanent, open the "Startup Applications" app and add the following as a new startup application:

nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1'

Name and describe as you see fit. More info: https://devtalk.nvidia.com/default/topic/832288/how-to-automatically-set-powermizer-to-prefer-maximum-performace-with-340-and-346-drivers/?offset=3

Since I'm no longer on 17.10 on my desktop and I still use my laptop for daily work, I can't tell for sure whether any of the above fixes our problem. It would be awesome if one of you guys could report back.

I also posted this in the Opera forums: https://forums.opera.com/topic/23498/opera-crashes-gnome-shell