Bug 24383 - [KMS] Black screen when xserver is reset (KDE logout)
[KMS] Black screen when xserver is reset (KDE logout)
Status: RESOLVED FIXED
Product: xorg
Classification: Unclassified
Component: Driver/intel
unspecified
x86-64 (AMD64) Linux (All)
: high normal
Assigned To: Jesse Barnes
Xorg Project Team
https://bugs.launchpad.net/ubuntu/+so...
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-07 14:59 UTC by Albert Damen
Modified: 2009-10-13 10:52 UTC (History)
1 user (show)

See Also:


Attachments
X log after logging out (39.36 KB, text/plain)
2009-10-07 15:01 UTC, Albert Damen
no flags Details
Possible fix (2.12 KB, patch)
2009-10-07 15:03 UTC, Albert Damen
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Damen 2009-10-07 14:59:50 UTC
Bug description:
When logging out from KDE (Kubuntu Karmic), the login screen does not appear. Instead the screen stays black, only showing the mouse cursor.

System environment:
-- chipset: GM965
-- system architecture: 64-bit
-- xf86-video-intel: 2.9.0
-- xserver: 1.6.3
-- mesa: 7.6.0~git20090817 (up to git commit 7c4223876b4f)
-- libdrm: 2.4.13
-- kernel: 2.6.31-12-generic (based on 2.6.31.2)
-- Linux distribution: Kubuntu Karmic (development release)
-- Machine or mobo model: Compal laptop IFL91
-- Display connector: LVDS

Reproducing steps:
Make sure TerminateServer is false (or not set) in /etc/kde4/kdm/kdmrc, so the xserver is reset instead of restarted at logout (default in Kubuntu).
Logout from the session and wait for the login screen. Notice the screen stays black, only the mouse cursor is visible and changes shape if it is moved over the (invisible) password entry box.

Additional info:
With UMS the problem does not exist. The login screen is shown properly after logging out with UMS.

Debugging with gdb shows:
- pI830->front-buffer has got a new value after the logout
- drmmode_set_mode_major is called but drmModeAddFB is not called because drmmode->fb_id is not 0.

Attached patch solves the problem for me, by setting drmmode->fb_id=0 in I830CloseScreen, so drmModeAddFB is called with the new frontbuffer. It also seemed cleaner to call drmModeRmFB at the same time to drop the old frontbuffer from the crtc.
Comment 1 Albert Damen 2009-10-07 15:01:12 UTC
Created attachment 30146 [details]
X log after logging out
Comment 2 Albert Damen 2009-10-07 15:03:24 UTC
Created attachment 30147 [details] [review]
Possible fix

I had to add a new public function in drmmode_display.c to set drmmode->fb_id=0 and call drmModeRmFB. I am not sure if that was really needed; there may be a better place to do this.
Comment 3 Jesse Barnes 2009-10-13 10:52:54 UTC
Pushed this to xf86-video-intel:

commit fcc2ee48b866b81c79315ff10189b56fc201539d
Author: Albert Damen <albrt@gmx.net>
Date:   Wed Oct 7 21:55:42 2009 +0200

    Drop frontbuffer from crtc in I830CloseScreen

Thanks.