Bug 97242

Summary: [SKL] Bad mouse cursor flickering since 4.8-rc1 with dual-screen [regression]
Product: DRI Reporter: Direx <direx>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: direx, intel-gfx-bugs, kaon
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: SKL i915 features:
Attachments:
Description Flags
dmesg from 4.8-rc1 with drm.debug=0xe
none
dmesg from drm-intel-next-queued (34730fed) none

Description Direx 2016-08-08 11:09:58 UTC
Created attachment 125590 [details]
dmesg from 4.8-rc1 with drm.debug=0xe

On Kernel 4.8-rc1 the mouse cursor flickers horribly when moved around and some parts of the display (around the cursor) fail to update properly and flicker randomly. Sometimes I have multiple mouse cursors on my display and sometimes covered windows come through in areas around the cursor.

This does not happen on earlier kernels (4.6 and 4.7 work fine, for example), so it must me a regression.

Hardware: Lenovo Thinkpad L460 in Ultra Dock with DVI+HDMI monitor
CPU: Core i5-6200U
Software: Arch Linux with KDE Plasma Desktop
Kernel: 4.8-rc1

Both dmesg and Xorg.log look normal.

Might possibly be related to bug 96983.
Comment 1 Direx 2016-08-08 14:10:32 UTC
I just noticed these lines in dmesg:

[drm] Refusing to load DMC firmware v1.26, please use v1.23 [https://01.org/linuxgraphics/intel-linux-graphics-firmwares].
i915 0000:00:02.0: Failed to load DMC firmware [https://01.org/linuxgraphics/intel-linux-graphics-firmwares], disabling runtime power management.
[drm] GuC firmware load skipped

I don't know if they are related to the issue. But something is definitely wrong here. Firmware v1.26 is loading correctly on 4.7 and earlier kernels, why would I need to *downgrade* the firmware for *newer* kernels? Does not make sense to me...
Comment 2 Direx 2016-08-08 14:35:31 UTC
About the firmware thing:

4aa7fb9c introduced a dependency to 1.26, but somehow this was not merged correctly. In intel_csr.c the following is defined (as per a4a027a8):

MODULE_FIRMWARE(I915_CSR_SKL);
#define SKL_CSR_VERSION_REQUIRED	CSR_VERSION(1, 23)


Still dunno if this causes the flashing, but this must be looked into. Maybe more stuff got mixed up by faulty merges... Do you need a separate bug report for this?
Comment 3 Direx 2016-08-15 09:24:50 UTC
The flickering is still there on 4.8-rc2. It has nothing to do with the firmware version, I managed to load the requested FW and the issue is still there.

Observations:

- 4.8-rc2 with internal (eDP1) screen only: no flickering
- 4.8-rc2 with two external screens (DVI+HDMI, which is my everyday config): heavy flickering and screen update issues around mouse cursor, totally unusable
Comment 4 Robert O'Callahan 2016-08-19 10:30:32 UTC
I'm also seeing this on my Skylake Dell XPS15.

As well as the update bugs, there's a non-moving mouse cursor in the middle of my laptop screen while the regular cursor moves freely between both screens.
Comment 5 Maarten Lankhorst 2016-08-22 11:30:38 UTC
I've pushed a fix for the broken merge. Version for CSR should be correct again. Some watermark fixes have also been applied to drm-intel-next-queued, so can you retest on that branch?
Comment 6 Direx 2016-08-22 14:01:12 UTC
Created attachment 125942 [details]
dmesg from drm-intel-next-queued (34730fed)

(In reply to Maarten Lankhorst from comment #5)
> Some watermark fixes have also been applied to drm-intel-next-queued,
> so can you retest on that branch?

The heavy cursor flickering is gone in drm-intel-next-queued, but the cursor now behaves funny when moving between screens:

1. It usually moves directly to the opposite edge of the screen. It seems like the acceleration cannot be calculated correctly. This might also be an X issue.

2. Whenever the mouse cursor changes screens, I get a short screen distortion/flickering in the upper left-hand corner of the display which the cursor has left.

But at least the machine is usable again. I hope these fixes will make it into 4.8, as otherwise this Kernel release will be a no-go for dual-screen users.

And finally, I am encountering a completely new issue (I'll open a separate bug report for this):

The screens now flicker randomly (like once or twice every other minute). This is unrelated to cursor movements, so it probably does not have anything to do with this bug report.

I have attached a system log with drm.debug=0xe.
Comment 7 Direx 2016-08-29 09:38:36 UTC
This issue is fixed in 4.8-rc4.
Comment 8 yann 2016-08-29 11:26:45 UTC
Commit id: 177d91aaea4bcafb29232336bafaa521b85286aa 

drm/i915: Fix botched merge that downgrades CSR versions.

Merge commit 5e580523d9128a4d8 reverts the version bumping parts of
commit 4aa7fb9c3c4fa0. Bump the versions again and request the specific
firmware version.

The currently recommended versions are: SKL 1.26, KBL 1.01 and BXT 1.07.

Cc: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97242
Cc: drm-intel-fixes@lists.freedesktop.org
Fixes: 5e580523d912 ("Backmerge tag 'v4.7' into drm-next")
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1471266567-22443-1-git-send-email-maarten.lankhorst@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com>
(cherry picked from commit 536ab3ca19ef856e84389a155c5832c68559a28a)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Comment 9 rockorequin 2016-09-01 03:11:51 UTC
> 2. Whenever the mouse cursor changes screens, I get a short screen
> distortion/flickering in the upper left-hand corner of the display 
> which the cursor has left.

I'm still seeing this in 4.8-rc4, and IMHO it makes the desktop unusable due to how annoying it is. The distortion/flickering also happens quite often when I type into gnome-terminal. Does anyone know if there is another bug open for this?

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.