Bug 94677 - xorg-server 1.18.2: missing mouse pointer when coming back from screen lock
Summary: xorg-server 1.18.2: missing mouse pointer when coming back from screen lock
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
: 95132 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-03-23 20:50 UTC by Denis Dupeyron
Modified: 2016-08-12 00:11 UTC (History)
18 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg and Xorg.0.log (17.31 KB, application/x-xz)
2016-03-23 20:50 UTC, Denis Dupeyron
no flags Details
/sys/kernel/debug/dri/0/i915_display_info (1.93 KB, text/plain)
2016-03-26 17:19 UTC, Denis Dupeyron
no flags Details
xf86-video-intel/tools/cursor output (649 bytes, text/plain)
2016-04-19 20:10 UTC, Andrey Vihrov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Dupeyron 2016-03-23 20:50:26 UTC
Created attachment 122506 [details]
dmesg and Xorg.0.log

I am a Gentoo user and have the exact same problem as a Debian user which he describes at [1]. His words:

"The mouse pointer simply disappears when I want to log into the system after
locking the screen. After restarting the Xserver, everything backs to normal,
but when I lock the screen again, I won't see the pointer after login. I'm
using lightdm as DM.

I can get the mouse pointer back also when I switch to TTY using ctl-alt-f1 and
then to xsession via ctrl-alt-f7."

The issue appeared between 1.18.1 and 1.18.2, so I bisected. Reverting commit b04767c84deafc44993723add4b1c5163fc11711 by Michel Dänzer solves this particular issue.

Thanks.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818325
Comment 1 Michel Dänzer 2016-03-24 08:41:31 UTC
Does this also happen using the modesetting driver instead of the intel driver?
Comment 2 Denis Dupeyron 2016-03-24 17:04:05 UTC
(In reply to Michel Dänzer from comment #1)
> Does this also happen using the modesetting driver instead of the intel
> driver?

Good catch. I tried and it does not happen with the modesetting driver.
Comment 3 Chris Wilson 2016-03-25 21:02:58 UTC
First machine I looked at worked fine. Could you please run xf86-video-intel/tools/cursor and cat /sys/kernel/debug/dri/0/i915_display_info when the cursor is invisible coming back from screenlock?
Comment 4 Denis Dupeyron 2016-03-26 17:19:19 UTC
Created attachment 122577 [details]
/sys/kernel/debug/dri/0/i915_display_info

This is a cat of /sys/kernel/debug/dri/0/i915_display_info when the cursor is invisible. The before and after screenlock diff is this:

--- before	2016-03-26 11:12:18.744047285 -0600
+++ after	2016-03-26 11:13:28.722867306 -0600
@@ -6,11 +6,11 @@
 	fb: 50, pos: 0x0, size: 1280x800
 	encoder 26: type: LVDS-26, connectors:
 		connector 25: type: LVDS-1, status: connected, mode:
-		id 0:"1280x800" freq 60 clock 82060 hdisp 1280 hss 1332 hse 1396 htot 1672 vdisp 800 vss 803 vse 806 vtot 818 type 0x48 flags 0xa
-	cursor visible? yes, position (365, 188), size 64x64, addr 0x00816000, active? yes
+		id 0:"1280x800" freq 60 clock 82060 hdisp 1280 hss 1332 hse 1396 htot 1672 vdisp 800 vss 803 vse 806 vtot 818 type 0x0 flags 0xa
+	cursor visible? no, position (0, 0), size 0x0, addr 0x00000000, active? no
 	No scalers available on this platform
 	--Plane id 22: type=PRI, crtc_pos=   0x   0, crtc_size=1280x 800, src_pos=0.0000x0.0000, src_size=1280.0000x800.0000, format=XR24 little-endian (0x34325258), rotation=0 (0x00000001)
-	--Plane id 23: type=CUR, crtc_pos= 365x 188, crtc_size=  64x  64, src_pos=0.0000x0.0000, src_size=64.0000x64.0000, format=AR24 little-endian (0x34325241), rotation=0 (0x00000001)
+	--Plane id 23: type=CUR, crtc_pos=   0x   0, crtc_size=   0x   0, src_pos=0.0000x0.0000, src_size=0.0000x0.0000, format=N/A, rotation=0 (0x00000001)
 	underrun reporting: cpu=yes pch=no 
 
 Connector info
Comment 5 Andrey Vihrov 2016-04-19 20:10:21 UTC
Created attachment 123068 [details]
xf86-video-intel/tools/cursor output

To add to the previous comment, running xf86-video-intel/tools/cursor when the pointer is invisible prints a correct pointer image and dimensions.
Comment 6 nicolasmaia 2016-04-27 10:44:49 UTC
For reference: duplicate bug #95132
Comment 7 Michel Dänzer 2016-04-27 14:03:47 UTC
*** Bug 95132 has been marked as a duplicate of this bug. ***
Comment 8 Sitsofe Wheeler 2016-05-02 05:55:50 UTC
I'm seeing this too with XUbuntu 16.04. Here's a potential downstream bug https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1568604 .
Comment 9 Tim Starling 2016-08-09 05:09:55 UTC
I'm affected by this bug and I'm trying to figure out if there's anything I can do to help get it fixed. For example, I see the cursor-related functions in sna_display.c already have a fair amount of debug logging. Would it help if I compiled the Intel driver with --enable-debug=full and then captured the log while the bug was occurring?
Comment 10 Thomas Lange 2016-08-10 19:28:42 UTC
(In reply to Tim Starling from comment #9)
> I'm affected by this bug and I'm trying to figure out if there's anything I
> can do to help get it fixed.

This bug is already fixed (at least for me). It went away simply by upgrading my Arch Linux installation. But I cannot say for sure which package was the culprit.

Package versions:
xorg-server: 1.18.4
xf86-video-intel: 2.99.917+691+ga77397a
lightdm: 1.18.2
Comment 11 Tim Starling 2016-08-11 05:58:13 UTC
I looked into this with gdb, with the stock packages from Ubuntu 16.04 since I have a reliable reproduction with that version. Specifically, xserver-xorg-core	2:1.18.3-1ubuntu2.3 and xserver-xorg-video-intel 2:2.99.917+git20160325-1ubuntu1.

The cursor is actually restored successfully after unlock, but then it disappears again when sna_mode_disable_secondary_planes() is called, specifically during the LOCAL_IOCTL_MODE_SETPLANE ioctl. 

After this, there is no chance of the cursor being restored, since sna_crtc->cursor remains non-null, so further attempts to restore it hit the "skipping cursor already show on CRTC" case.

So, there's a good chance this bug was fixed by f1c757e4518f6835bbff6c940269a5c6be75f202, since the commit message claims to modify sna_mode_disable_secondary_planes() to "ignore the secondary cursor planes".
Comment 12 Tim Starling 2016-08-11 23:55:28 UTC
Confirmed by patching the xserver-xorg-video-intel package source with that commit and also its dependency 00a3adaf43640b9aaa84b8cb98c1f2f227686689 "sna: Record all sprite planes reported by the kernel".


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.