MISC-33: Viewing Images on New Twitter and other places Leads to Monitor Going Blank



Issue Information

Issue Type: Bug
 
Priority: Major
Status: Open

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: Miscellaneous (MISC)
Resolution: Unresolved

Created: 2019-07-16 15:15:35
Time Spent Working


Description
Twitter have launched a new design (see links).

For some reason, opening an image within Twitter on my second display really pisses my graphics driver off, and that screen might flash a couple of times, but ultimately goes black and idle.

When that happens, to recover it I need to hit Ctrl-W to close whatever tab I'd just opened.

Repro steps are

- Open Twitter in Chrome/Chromium
- Ensure Twitter's new interface is active
- Load a tweet containing and image (e.g. https://twitter.com/GeorgianLords/status/1151065251896528896 or https://twitter.com/kandylul/status/1151130951654637568)
- Click on the image to open Twitter's modal
- Issue triggers
- Ctrl+W to close the tab
- Screen should recover
- Go back to the tweet
- Right click image - Open in New Tab
- Issue does not occur

Have been entirely unable to repro in Firefox, or with Twitter's old interface.

Can see the display twitching in syslog
Jul 16 15:05:03 milleniumfalcon org.kde.KScreen[1810]: kscreen: Primary output changed from KScreen::Output(Id: 606 , Name: "DP-3" ) ( "DP-3" ) to KScreen::Output(Id: 606 , Name: "DP-3" ) ( "DP-3" )
Jul 16 15:05:03 milleniumfalcon org.kde.KScreen[1810]: message repeated 7 times: [ kscreen: Primary output changed from KScreen::Output(Id: 606 , Name: "DP-3" ) ( "DP-3" ) to KScreen::Output(Id: 606 , Name: "DP-3" ) ( "DP-3" )]


Don't see anything in dmesg or anywhere else either.

Chromium's version string is:
Version 71.0.3578.98 (Official Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit)


Other relevant info:
root@milleniumfalcon:~# lspci | grep VGA
0f:00.0 VGA compatible controller: NVIDIA Corporation GT218 [NVS 300] (rev a2)


Tailing ~/.xsession-errors whilst repro-ing yields no output, nothing going into Xorg.0.log or similar locations either

--------

Update:

I'm going to rephrase the problem so that I've half a chance of finding it again when searching later:

When viewing specific content in a browser (Firefox/Chromium/Chrome) in Kubuntu 16.04 (i.e. running KDE), if that content is on the secondary display that display will go blank/black until the tab containing that content is closed.

The monitor is still active (it's not gone into sleep mode, or complaining of no input - it's just not receiving/displaying any graphics).

The screen may flash between active and black a couple of times, but ultimately will fall inactive. It's necessary to either press Ctrl-W to close the relevant tab, or to blindly click off the tab. Switching between KDE workspaces will recover the screen until you switch back to whichever one contains the tab with the content.

It's not (yet) clear what the requirements are for the content to trigger this.

It's been observed when clicking in to view images on Twitter (using their modal to display), if instead the image is right clicked and View Image in New Tab the issue does not occur. It's also been observed on MoneySupermarket.co.uk - when scrolling down they push a banner into view to entice you to join the mailing list (see attachments for screenshot), this banner (or something about it) seems to repro the issue.

Nothing appears to be being logged to any system logs, the browser console or any other location.


Attachments

Issue Links

Twitter Announcement
Toggle State Changes

Activity


root@milleniumfalcon:~# nvidia-smi 
Tue Jul 16 15:16:12 2019       
+------------------------------------------------------+                       
| NVIDIA-SMI 340.104    Driver Version: 340.104        |                       
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  NVS 300             Off  | 0000:0F:00.0     N/A |                  N/A |
| N/A   68C    P8    N/A /  N/A |    470MiB /   511MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Compute processes:                                               GPU Memory |
|  GPU       PID  Process name                                     Usage      |
|=============================================================================|
|    0            Not Supported                                               |
+-----------------------------------------------------------------------------+
btasker changed status from 'Open' to 'In Progress'
btasker changed status from 'In Progress' to 'Open'
Given I can't repro this in Firefox, I wonder if it's going to turn out to be that old favourite - Chrome and hardware acceleration.

This Nvidia driver isn't exactly flawless anyway, it seems to leak memory over time.

I would be curious to know though, just what Twitter have their workers doing to trigger the issue. It's not the image itself as viewing directly doesn't repro the issue, and it won't repro using their old interface.
s-tui shows a tiny spike in CPU usage followed by a regression to the mean whilst reproducing, so it doesn't ostensibly appear to be CPU related (watching the cores with htop doesn't show any core being anywhere close to pegged either).

btasker added 'Screenshot_20190716_152226.png' to Attachments
Looks like it's unlikely to be hardware acceleration, I've already turned the majority of it off.
btasker added 'Screenshot_20190716_152540.png' to Attachments
Hmmm, curious...

I wanted to launch a completely new chromium instance so I could push logging to stderr and see if there was anything useful pushed out
ben@milleniumfalcon:~$ chromium-browser --log-level=0 --enable-logging=stderr --user-data-dir=/tmp/chrome-disposable/


Can't repro in that new instance. So is it that something else needs to be open, only happens after a while (I do tend to leave my browser open) or is it perhaps an interaction with an extension? Simply opening lots of tabs wasn't enough to repro.

Will have to look at this more later
Killed all instances of Chromium and started it again, can't currently repro. Guess something needs to have been running for a while or similar.

In the meantime, I've updated to the latest version in the repos
root@milleniumfalcon:~# dpkg-query --list | grep chromium
ii  chromium-browser                                74.0.3729.169-0ubuntu0.16.04.1                           amd64        Chromium web browser, open-source version of Chrome
ii  chromium-browser-l10n                           74.0.3729.169-0ubuntu0.16.04.1                           all          chromium-browser language packages
ii  chromium-codecs-ffmpeg-extra                    74.0.3729.169-0ubuntu0.16.04.1                           amd64        Extra ffmpeg codecs for the Chromium Browser


Will have to wait and see whether this starts occurring again at some point.
Just had it happen again, whilst trying to find a link I used previously in this page - https://www.moneysavingexpert.com/savings/cheap-online-sharedealing/

Big difference here, though, it happened in Firefox.

It's fine when you first hit the page, but, as you scroll down they push up a banner at the bottom to get you to sign up to their mailing list.

So we've learned 3 things so far:

- As much as I'd love to blame Twitter's crap new interface, it's a trigger rather than a cause
- It can happen in Firefox
- It doesn't happen if you reduce the browser window from full screen
btasker added 'Screenshot_20190717_141916.png' to Attachments
There's a familiar sounding bug here - https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1560804 - unfortunately it was logged against Wily and never really resolved, just closed as Won't Fix

There's a bug logged against KScreen too - https://kde-bugs-dist.kde.narkive.com/0U11bn71/kscreen-bug-355928-new-kscreen-reports-change-of-primary-screen-without-apparent-reason - no real resolution there (other than uninstall kscreen). There seem to be people not using Nvidia and still reporting it too, so maybe it isn't Nvidia.

That said, they're all complaining of excessive log noise rather than issues with the display itself, so maybe the line's appearance is coincidental. Will verify that it actually gets logged when the screen flaps


Whatever the issue is, it's seems to have decided it's now fine with both the Georgian Lords and the Kandylul pictures in the description.
Ok, so tailing syslog whilst repro'ing the issue with the Money Supermarket link (works in Chrome, Chromium and Firefox at the moment). Also works in Chrome and Chromium Incognito (i.e. no addons/extensions). Haven't any other browsers installed to test with.

Nothing hitting syslog so those kscreen lines are unrelated and likely just noise.

In some ways that's worse though, my monitor is going blank and nothing's getting logged anywhere...

Sat and watched the GPU's status in the Nvidia app while repro-ing. I don't see any spike in GPU memory usage, or GPU utilisation when it happens.

Tried turning the compositor off in KDE in case it's an issue with Compiz (or whatever they're using nowadays), but it still repros. The desktop repainted when I turned it off, so I don't think I need a reboot to make it take effect.

I mean, to some extent, this is probably what I deserve for having put KDE on this machine. I use XFCE everywhere else...

The issue has now worsened (or a coincidentally related one has sprung up...)

I now have a Firefox window that won't repaint while it's in focus. So, if I click a tab, the contents of the window will not change until I click off onto some other application (or roll over to another KDE workspace). The title of the window will change though and if I start typing in the address bar, the auto-suggestions will drop down, but the contents of the address bar don't visibly change. So under the hood the application is responding to clicks etc, it's just that the graphical output is... stuck

Similarly, staying on the same tab, if I use the scroll wheel (or try to drag a scroll bar), nothing will change until I change focus.

The KDE panel in that workspace is also flickering slightly, with a bright blue box around some of the windows in the taskbar.

The description here probably probably doesn't quite make clear what I'm seeing, so will try and capture a video.

As before, when reproing, nothing is hitting the logs

Edit: video is here - https://videos.bentasker.co.uk/Player.html?url=2019/07/MISC_33_KDE_window_repaint_issue/MISC_33_KDE_window_repaint_issue_master.m3u8

That was taken after closing a bunch of tabs (so I'm not risking sticking a video of sensitive stuff on the net). So closing a few tabs doesn't resolve the issue (the tab also doesn't visibly close until you change focus)
There definitely doesn't seem to be anything being logged.

Going into KDE's settings and turning the compositor off restored Firefox's behaviour. What isn't clear, of course, is whether that's just because it causes a graphics reset (flushing out whatever the real cause was) or if the issue is with the compositor.
Still occasionally getting screen flashes, though I haven't had anything that's able to reliably repro it in the way the stuff above did before.