|Summary:||[KMS] Black screen when xserver is reset (KDE logout)|
|Product:||xorg||Reporter:||Albert Damen <albrt>|
|Component:||Driver/intel||Assignee:||Jesse Barnes <jbarnes>|
|Status:||RESOLVED FIXED||QA Contact:||Xorg Project Team <xorg-team>|
|i915 platform:||i915 features:|
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 220.127.116.11) -- 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.