Bug 93070 - Monitor turns off on exit, never to return
Summary: Monitor turns off on exit, never to return
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium major
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-22 17:00 UTC by Olivier Brunel (jjacky)
Modified: 2018-12-13 22:34 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg log (60.68 KB, text/plain)
2015-11-25 15:17 UTC, Olivier Brunel (jjacky)
no flags Details
gdb backtrace (2.53 KB, text/plain)
2015-11-25 15:26 UTC, Olivier Brunel (jjacky)
no flags Details

Description Olivier Brunel (jjacky) 2015-11-22 17:00:01 UTC
Arch x86_64 system (though w/out systemd), starting Xorg via startx on tty.


When exiting Xorg, instead of returning to tty the monitor powers off, pressing keys or trying to switch to another tty does nothing and I can't get it back on (so a reboot is due).

This started happening w/ 1.17.3 and still does w/ 1.18.0; I finally found some time to bisect, and the offending commit is "privates: Clear screen-specific keys during CloseScreen"[1]

Indeed after reverting it, I'm now running 1.18.0 w/out problems, getting back to tty on exit. Not sure what causes the issue or how to actually fix it though, nor did I get anything in Xorg/system logs (so no segfault) when it happened.


[1] http://cgit.freedesktop.org/xorg/xserver/commit/?id=82eb490b0a341729f25d0c42a937fe29d99da521
Comment 1 Michel Dänzer 2015-11-24 06:26:42 UTC
Did you check the Xorg stderr output? There might be an assertion failure or an unresolved symbol or something like that.
Comment 2 Olivier Brunel (jjacky) 2015-11-24 10:12:34 UTC
Oh, good call, totally forgot to check that it seems. Indeed there is the following on stderr:

Xorg: ../include/privates.h:122: dixGetPrivateAddr: Assertion `key->initialized' failed.
Comment 3 Michel Dänzer 2015-11-25 03:36:12 UTC
Please attach the Xorg.0.log file.

Can you attach gdb to the Xorg process, reproduce the assertion failure and attach the backtrace from gdb?
Comment 4 Olivier Brunel (jjacky) 2015-11-25 15:17:50 UTC
Created attachment 120113 [details]
Xorg log
Comment 5 Olivier Brunel (jjacky) 2015-11-25 15:26:10 UTC
Created attachment 120115 [details]
gdb backtrace

Getting a backtrace is proven difficult actually, because I tried running startx on tty2, switching to tty3 to attach gdb, but then when I try to switch back to tty2, it doesn't work.
As in, the focus is gone (blinking cursor vanished) but the display remains that of tty3, and from then on trying to switch to wherever yields no result. (Note that this is somehow linked to attaching gdb, as switching back & forth between X and a tty otherwise works fine.)

All I was able to do was startx on tty2, attach gdb on tty3 and then kill my .xinitrc script (or the one it execs into, really) to stop Xorg. Attached is the resulting backtrace, but I'm not sure if it's as good...

If there's a better way to get a backtrace let me know and I'll try.
Comment 6 Michel Dänzer 2015-11-26 08:03:00 UTC
Normally, it's best to run/attach gdb from a remote (e.g. ssh) login. But the backtrace you got looks good enough, thanks.

It points to exaScreenPrivateKeyRec, which interestingly is registered using dixRegisterPrivateKey, not dixRegisterScreenSpecificPrivateKey. Maybe the change you bisected to doesn't handle the former correctly, or maybe EXA isn't handling this private correctly. Aaron, what do you think?
Comment 7 Aaron Plattner 2016-01-20 22:29:56 UTC
That change shouldn't touch normal private keys, only screen-specific ones.  It's not clear at all from the screen-specific privates API whether they're valid during CloseScreen, so trying to use one there could certainly blow up.
Comment 8 Olivier Brunel (jjacky) 2016-02-20 19:34:34 UTC
Okay, so I don't know what changed/did it, but I'm happy to report that after upgrading to 1.18.1 the issue seems to be gone; I'm getting back to tty on exit as expected without problems.
Comment 9 GitLab Migration User 2018-12-13 22:34:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/490.


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.