Peterborough Linux User Group (Canada) Forum

Linux & Android => Support => Topic started by: fox on May 24, 2016, 01:10:22 PM

Title: Freezing with dual-monitor setup
Post by: fox on May 24, 2016, 01:10:22 PM
This is a new version of an old problem, one I now have with Ubuntu 16.04. The dual-monitor setup is on an iMac, so the internal monitor is one and a Dell 2005FPW is the other. I'm running the Nouveau driver, having switched from a Nvidia driver after having more freezing problems. The freezes are rare now. The latest occurred when watching a youtube video on full screen mode in Firefox, with it running on my internal monitor. Suddenly the picture went black, yet the sound from the youtube monitor was still running. I don't know if the problem is specifically related to a youtube video or not, but I reran it in fullscreen and got the freeze again. When I rebooted and reran the video in regular mode, I had no problem, nor did I have the problem in theatre mode. Ironically, when I googled the problem, it was noted to occur in Chrome on an older version of Ubuntu. However, when I tried it in Chromium, I didn't get the freeze so it must be related to some combination of the dual-monitor setup, Ubuntu 16.04, the Nouveau driver and Firefox. Suggestions?
Title: Re: Freezing with dual-monitor setup
Post by: Jason on May 24, 2016, 02:45:34 PM
Does it only occur when you do fullscreen of Youtube videos or will it happen if you fullscreen other videos, in the default media player, for example? It could be related to Flash. You could try forcing html 5 mode by going to https://www.youtube.com/html5 . This will use html 5 whenever possible.
Title: Re: Freezing with dual-monitor setup
Post by: fox on May 24, 2016, 04:23:13 PM
I made some more tests. First of all, with only the internal monitor enabled, I got the same freeze, so it isn't the second monitor by itself. Next I installed VLC player and played a video fullscreen. This worked OK with or without the second monitor enabled - no freezes. Next thing I did was to install an HTML5 add-on to Firefox and ran the same youtube video fullscreen. It seemed to work this time. However, when I then rebooted and added the second monitor, it froze again. Go figure. So again, some combination of Nouveau driver, dual-monitor, Firefox and Ubuntu 16.04..
Title: Re: Freezing with dual-monitor setup
Post by: fox on May 26, 2016, 02:12:02 PM
I still haven't been able to resolve the problem for that video with dual monitor enabled, but as a result of the regular freezes, I decided to install Ubuntu 16.04 from scratch on my office iMac. I reinstalled everything; didn't even keep my home folder just to make sure there wasn't a config problem there. So far it seems to be better, and the dual monitor starts up properly and it wakes up OK as well. But that video still freezes my system.

The freezes I experienced since upgrading to 16.04 are completely new; I never had such a thing happen on any other Linux installation or on any other computer. No way to recover either, except for a hard restart. I did some Google searching and found a few posts with the same problem using Ubuntu 16.04 or 15.10. (I never had this happen with 15.10.) The solution for several was to go back to an older kernel, and I am prepared to do that if necessary. I also saw mention of a new Nvidia driver released a few days ago (361.45) that supposedly solves screen tear problems with the older driver. It doesn't yet show up in my Additional Drivers app. I downloaded it but haven't tried it yet. If the nouveau driver works without any further problems, I'm not going to mess with it.
Title: Re: Freezing with dual-monitor setup
Post by: fox on May 27, 2016, 02:30:51 PM
After a harrowing hour in which I tried various forms of the nvidia driver with and without the second monitor, I appear to have solved the problem of the youtube video, and hopefully, the problem with freezing. The newest nvidia driver (361.45.11) caused me not to be able to boot at all, but I was able to recover with the help of an older kernel. (Don't understand that, but go figure.) The oldest nvidia driver available (304) also caused problems; couldn't see the second monitor at all. Eventually, what seems to have worked was purging and reinstalling the current kernel (4.4.0-22) and installing the nvidia 340 driver, configured without creating an xorg.conf files. Crossing my fingers for no more freezes.
Title: Re: Freezing with dual-monitor setup
Post by: fox on June 04, 2016, 02:18:24 PM
With the current setup, I haven't had any freezes in the last two days, but prior to that I froze on the same youtube video run full screen in Firefox. I can live with that; if I want to run a full screen youtube video either do it in Chromium or do it with only one monitor going.
Title: Re: Freezing with dual-monitor setup
Post by: fox on July 13, 2016, 03:36:34 PM
I'm back to getting regular freezes; I had two today. In one or both cases, LibreOffice Write was running. (Definitely running in the first case.) This time I pulled syslog and kernlog files from the times around the two crashes and have posted them here. The 14:47 crash has fewer entries, and I noted that it refers to nouveau and and "engine fault on channel 2 ....". The earlier logs also refer to nouveau and a bind error, a libreoffice-writer message repeated 7 times, and a gnome-session out of memory (see entries at 13:54:09 , 13:54:39 and 13:53:58, all together in log). The nouveau message is strange because I'm using a Nvidia, not Nouveau driver. And I have plenty of RAM on this iMac (8 gb) and can't image how I could be running out of memory. Does this mean anything to any of you?
Title: Re: Freezing with dual-monitor setup
Post by: Jason on July 13, 2016, 05:32:36 PM
Just a thought - have you run memtest on your RAM?
Title: Re: Freezing with dual-monitor setup
Post by: buster on July 13, 2016, 06:30:02 PM
#1. I agree with Jason. Memory check can't do any harm.
#2. I assume you installed the 64 bit and not the 32 bit Ubuntu (or what ever)
#3. Had a maybe related problem with a dual monitor setup with an Ubuntu derivative system. When I detached the extra monitor, the laptop computer switched to the screen resolution of the disconnected monitor, rather than stay where it was! Rude behavior! Which would indicate a problem with the OS, not my computer. Easy to correct, but annoying. Maybe it's an Ubuntu problem. (Or a ...?.... problem.)
#4. Is each resolution the natural resolution for each screen? Not sure this should make a difference either way. But easy to check.
#5. Does the same setup work well when stressed (Several windows open etc) with a Mac OS or a Microsoft OS?

Best if luck Doctor Mike.
Title: Re: Freezing with dual-monitor setup
Post by: fox on July 13, 2016, 07:45:10 PM
Quote from: buster on July 13, 2016, 06:30:02 PM
#1. I agree with Jason. Memory check can't do any harm.
#2. I assume you installed the 64 bit and not the 32 bit Ubuntu (or what ever)
#3. Had a maybe related problem with a dual monitor setup with an Ubuntu derivative system. When I detached the extra monitor, the laptop computer switched to the screen resolution of the disconnected monitor, rather than stay where it was! Rude behavior! Which would indicate a problem with the OS, not my computer. Easy to correct, but annoying. Maybe it's an Ubuntu problem. (Or a ...?.... problem.)
#4. Is each resolution the natural resolution for each screen? Not sure this should make a difference either way. But easy to check.
#5. Does the same setup work well when stressed (Several windows open etc) with a Mac OS or a Microsoft OS?
...
#1. I will do memcheck at work tomorrow; I hadn't done that.
#2. 64 bit
#3.
#4. Nvidia driver sets the correct resolution for both after initially flipping around at startup. Internal monitor is 1920 x 1080; external is 1680 x 1050.
#5. I haven't noticed any difference in the frequency of freezing when more or less apps are running. But generally I only run 2 or 3 apps at a time.

I'm getting pretty fed up with this. I've never had such a problem before and although I don't lose work, it's very annoying. Next move if I can't resolve this will be to install Ubuntu 14.04 on a new partition and see if I still get it in that.
Title: Re: Freezing with dual-monitor setup
Post by: buster on July 13, 2016, 09:49:21 PM
"#5. I haven't noticed any difference in the frequency of freezing when more or less apps are running. But generally I only run 2 or 3 apps at a time."

But does it happen with Apple or Microsoft ever? That's a way to distinguish between a hardware and a specific Linux problem.
Title: Re: Freezing with dual-monitor setup
Post by: fox on July 13, 2016, 11:02:28 PM
Not with MacOSX and I don't run Windows on this computer except in a virtual machine.
Title: Re: Freezing with dual-monitor setup
Post by: fox on July 15, 2016, 05:30:06 PM
I am now fairly certain that libreOffice is part of the problem. I had several freezes while running LibreOffice Write today. Syslogs are showing messages with:

(soffice:5337): Gdk-WARNING **: gdk_window_set_icon_list: icons too large
(soffice:5337): WARNING **: Unknown event notification 36

Googling these error messages takes me to several threads and bug reports on LibreOffice 5 with such messages. Running LibreOffice from a terminal gives me the "icons too large" message. But again, I only get these freezes on my iMac, making me further suspect that the second monitor has something to do with this. But I did try removing the Nvidia driver and reinstalling the Nouveau driver. I still got the freezes. I'll continue to research this on Monday.
Title: Re: Freezing with dual-monitor setup
Post by: Jason on July 15, 2016, 08:54:17 PM
Be careful with this line of thought, though. I know from my limited programming and previous years of compiling C programs that warnings aren't error messages. They warn something *might* be wrong or the programmer *might* be doing something they shouldn't but of themselves, they don't necessarily indicate faults. I know these are terminal warnings but I believe the principle still applies.

But if you still think LibreOffice is the problem, can you remove it for a few days or a week to see if you still have crashes?
Title: Re: Freezing with dual-monitor setup
Post by: fox on July 16, 2016, 07:18:18 AM
You make a good point, Jason, and if I start LibreOffice from a terminal on a home computer, I also get the icon warning. However, the error messages I posted were part of the last syslog entries before the iMac froze.

Presumably,  I don't have to remove LibreOffice to test the problem, I just don't have to use it. That I can do. I was testing Kingsoft's WPS and Softmaker Office a few days ago to compare their MS format translations and usability. WPS actually is the best of the three for rendering presentations correctly as well as track changes, but it doesn't use open document formats. I was sticking with LibreOffice because it's the only one of the three that's open source, but I will be using WPS next week to see if that prevents the crashes. Also, I haven't forgotten the suggestion to test my memory. Unfortunately, the memtest option doesn't appear on the refind menu I need to run multiple OSes on my macs. So I'll have to run it by booting from a usb stick, which I will try next week.
Title: Re: Freezing with dual-monitor setup
Post by: fox on July 19, 2016, 04:52:12 PM
Following up on Jason's suggestion, I did a memory check, albeit a short one, and came up with no memory problems. Then I decided to do something that wasn't on my list - I reinstalled Ubuntu 16.04 from scratch, not copying any old config files to the new partition. The old 16.04 is still there, but I have been working with the new one yesterday and today, and slowly introducing non-vital applications. No freezing yet, so I'm cautiously optimistic. Here is what's different between the old and new:
(1) On a different part of the SSD, since I shrunk the old partition to make room for the new.
(2) I am running only Unity; I have not installed Gnome yet.
(3) I did a few system updates (on both partitions).
(4) I am still running the default video configuration: nouveau driver and "reversed position of monitors" (I have to move cursor to the right of my screen to get to the monitor to the left of the internal one.

Here is the sequence of actions I propose to try to see what causes the freezing, if in fact the new installation itself didn't solve the problem:
(1) change the monitor configuration to make the relative position correct;
(2) install the nvidia driver;
(3) install the Gnome desktop;
(4) remove the old partition entirely
Feel free to comment or suggest another plan of action - I want this problem solved!!!!  >:(
Title: Re: Freezing with dual-monitor setup
Post by: buster on July 19, 2016, 05:56:11 PM
(4) I am still running the default video configuration: nouveau driver and "reversed position of monitors" (I have to move cursor to the right of my screen to get to the monitor to the left of the internal one.

Not sure what this means. If you rearranged your desk and physically reversed the position of the monitors, would that solve the problem?
Title: Re: Freezing with dual-monitor setup
Post by: fox on July 19, 2016, 06:48:37 PM
Quote from: buster on July 19, 2016, 05:56:11 PM
Not sure what this means. If you rearranged your desk and physically reversed the position of the monitors, would that solve the problem?
It would and it wouldn't. Because of the location of the window, it wouldn't work well to take the extra monitor and move it to the right of the iMac. I suppose I could take the iMac with its internal monitor, move it to my left and put the extra monitor in front of me, but the iMac monitor is better resolution (1920x1080 vs 1680x1050) so I prefer it to be in front of me and used as the main monitor. Bottom line: if this is the only reason for my freezes, I can live with the non-intuitive moving of the mouse in the opposite direction to get it on the other monitor.
Title: Re: Freezing with dual-monitor setup
Post by: fox on July 21, 2016, 04:09:17 PM
Update: No freezes in two days with Unity and no Gnome3, display configuration left backwards and the default nouveau driver. Yesterday I briefly tried changing to driver to the Nvidia default (361.42 in Ubuntu 16.04) and no changes to the display configuration. The system booted into a desktop, but missing the Unity bar and I only had limited functionality. I could probably have gotten this to work had I reconfigured the monitors before changing drivers, but I didn't want to do two things at a time so I just removed the driver. Everything continued to work without freezes.

This afternoon I changed the display configuration so that dragging the cursor off the default monitor to the left gets it onto the auxiliary monitor to the left of the iMac. No freezes so far. Assuming it stays that way tomorrow morning, the next move will be to reinstall the Gnome3 desktop.
Title: Re: Freezing with dual-monitor setup
Post by: fox on July 22, 2016, 05:23:39 PM
Unfortunately, I got a freeze today with the display configuration matching my monitor setting. It happened in LibreOffice Writer like a lot of the previous ones. So I went back to the reversed display configuration, and got no more freezes. I also added back the Gnome desktop and worked on that for awhile, using the same programs. No freezes. So at this point, my most likely culprit is the display configuration. It takes some getting used to to move your cursor to the right to get it to show up on the monitor to the left, but it's better than having regular freezes, and better than disconnecting the auxiliary monitor. I'll have to spend some time googling to see if this problem has ever been reported.
Title: Re: Freezing with dual-monitor setup
Post by: fox on July 25, 2016, 05:16:02 PM
Adding Gnome I got more freezes, even when I used the reverse display setting. I tried a kernel update and the latest nvidia driver, but still had problems. So the only settings that kept the freezes away were Unity with no gnome, noveau driver and reverse display setting. I could live with this, but I'm not happy about it; not enough to stop searching for a better solution. Not doing anything until I return from holidays but the next move is to wipe the new partition and install Ubuntu 14.04. If that doesn't work, next would be openSuse Leap.
Title: Re: Freezing with dual-monitor setup
Post by: fox on September 08, 2016, 07:00:03 AM
Update. I installed 14.04 alongside 16.04 and had no freezing with it with nouveau driver and Unity. I didn't take it any further because there were certain apps I had to give up when going back to 14.04 (most notably Gnome calendars). Meanwhile, 16.04 seems to be fine with nouveau driver and Unity. I'm OK with both, so that's what I'm using. I consider the problem solved.
Title: Re: Freezing with dual-monitor setup
Post by: bobf on September 15, 2016, 11:07:30 PM
Jeez... I dunno, Mike... I think you should poke it with a sharpened stick some more. You know the motto: "If it works, you're just not trying hard enough!" <^8#

You'll get complacent this way... Ugh! <^8#
Title: Re: Freezing with dual-monitor setup
Post by: fox on September 16, 2016, 12:41:54 PM
Didn't have to "poke it" long; I did get a freeze two days ago, so the problem isn't entirely solved. But I can live with a freeze once in awhile, and that won't push me to change distros. Still I would like to know the cause. I'm just not seeing many reports of it by folks using a dual monitor setup and even those, not with a Nvidia card.