You are not logged in.

#1 2013-01-10 22:20:21

shinyquagsire23
Member
Registered: 2012-08-17
Posts: 8

TTY outputs ontop of X server

I recently built a new version of LightDM while doing some upgrading, and for the weirdest reason the TTY's are outputting on top of X server, rendering weird blinking cursors in the upper area of the screen. I'm completely stumped as to what is causing this, but I have tried:

  • Doing a complete system update

  • Rebuilding LightDM

  • Trying LightDM's autologin

This bug has also has make my suspend function unfunctional by just giving me a blank screen on startup, which I have to hard reset, and it made my hibernation bugged as well. I'm open to other desktop managers, but I'd prefer to keep with LightDM if possible. I'll post any logs needed if at all necessary. Thanks!

Last edited by shinyquagsire23 (2013-01-10 22:21:43)

Offline

#2 2013-01-10 23:24:13

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,838
Website

Re: TTY outputs ontop of X server

Can you possibly link to a screenshot?  I'm trying to imagine what you describe - but as I'm understanding your description, that should not even be possible.  Is the cursor blinking in X, or just in the display manager?  If just the latter, I can at least imagine some ways this *might* be possible.

If it is just in the DM, how are you launching the DM?  Is it with a service file?  If so, does it have "type=idle" or some other type?

Last edited by Trilby (2013-01-10 23:25:29)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#3 2013-01-11 05:27:02

shinyquagsire23
Member
Registered: 2012-08-17
Posts: 8

Re: TTY outputs ontop of X server

Ok, here's some screens:

Some of the default blinking. Sometimes it goes away.
http://i569.photobucket.com/albums/ss13 … 40114d.png

Occasionally it'll do this.
http://i569.photobucket.com/albums/ss13 … 984705.png


I'm currently launching LightDM via systemd using a .service file. Here's thecontents of it:

[Unit]
Description=LightDM Display Manager
Documentation=man:lightdm(1)
After=systemd-user-sessions.service

[Service]
ExecStart=/usr/sbin/lightdm
StandardOutput=syslog
Restart=always
IgnoreSIGPIPE=no
BusName=org.freedesktop.DisplayManager

[Install]
Alias=display-manager.service

Last edited by shinyquagsire23 (2013-01-11 22:03:10)

Offline

#4 2013-01-11 12:21:46

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,838
Website

Re: TTY outputs ontop of X server

Thanks.  You may want to put those offsite and just link to them though - they look bigger than the forum limitation for images.

It really is a problem in X, but is there a reason to conclude that this is tty ouput rather than another video/display problem?  This only happens with LightDM?


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#5 2013-01-11 21:57:29

shinyquagsire23
Member
Registered: 2012-08-17
Posts: 8

Re: TTY outputs ontop of X server

The reason I know it's tty output is because it blinks just like the TTY. Also, when I try to switch to a TTY console, the position of the blinking changes (due to the startup log and other stuff), so I can't go into a TTY console. I haven't tested if it didn't do it with any other DM's, but it happened when I upgraded LightDM to a newer AUR build. I'll test it with some other DM's to see if it's LightDM.

EDIT: TTY outputs ontop of GDM at login prompt. With LightDM the glitching doesn't occur until after login. From the console (xinit) it doesn't occur at all.

Last edited by shinyquagsire23 (2013-01-11 22:02:45)

Offline

#6 2013-01-12 00:14:49

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,838
Website

Re: TTY outputs ontop of X server

I have a hairbrained idea ... and want to emphasize that it is hairbrained, but it is easy enough to test.

I've found that many display managers break standard streams (stdin, stdout).  This has lead to some problems I had to tinker with in my window managers.  Xinit maintains the standard streams, so any output generated by programs in an xinitrc will go somewhere sensible.  It's possible that something is generating output and it (for who knows what reason) is going to the wrong places as the stdout stream is broken.

To test, you can use the following wrapper program that will do nothing but close the three streams and replace itself with whatever program followed it on the command line:

#include <stdio.h>
#include <stdlib.h>

int main(int argc, const char **argv) {
	const char **args = (const char **) calloc(argc,sizeof(char));
	int i;
	for (i=1; i < argc; i++)
		args[i-1] = argv[i];
	fclose(stdin);
	fclose(stdout);
	fclose(stderr);
	execvp(args[0],(char * const *)args);
	return 0;
}

If you save this as wrapper.c you can compile with `gcc -o wrapper wrapper.c`.  Then use it infront of whatever command you would use to launch a display manager so `LightDM --my-parameters` becomes `wrapper LightDM --my-parameters`.

If you no longer get the problematic output, this will have pinpointed the problem.  If you do, you can rule out the possibility of a stray standard stream.

EDIT:  Oops!  That code will not *prevent* the problem described, it will *cause* it.  But it can actually still be used as a test.  But instead of using it to launch a display manager, use it to run xinit: `wrapper xinit`.  If you do then get the same problematic output we'll know the broken streams are the problem.  If the longshot pays off, and this wrapper replicats the problem when using xinit, then the next step would be to look at your xinitrc.

Last edited by Trilby (2013-01-12 00:38:26)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#7 2013-01-12 03:01:53

shinyquagsire23
Member
Registered: 2012-08-17
Posts: 8

Re: TTY outputs ontop of X server

OK, I compiled and moved the executable to /usr/bin (for ease of testing), and when running 'wrapper lightdm', it has the same output. However when using it with xinit (wrapper xinit), it fixed the problem. How odd. I should note that I had to rename my .xinitrc to actually get xinit to work though, which is weird. Here's my old xinitrc:

#!/bin/sh

if [ -d /etc/x11/xinit/xinitrc.d ]; then
	for f in /etc/x11/xinit/xinitrc.d/*; do
		[ -x "$f" ] && . "$f"
	done
	unset f
fi

setxkbmap -option terminate:ctrl_alt_bksp

However, I did not test to see if xinit by itself would work, so I'll do that now.

EDIT: Ah, just using xinit by itself works the same as wrapper xinit. It has no funky output like when I use LightDM, so something must be happening between lightdm and the end of my custom DE bash script, which I'll post here:

startx &
gnome-session --session cairo-dock "$@" &
fusion-icon &
nautilus -n &
sound-icon &
mate-panel

I'm going to experiment to see if I can fix it. Perhaps it's been fixed in a commit made to lightdm.

Last edited by shinyquagsire23 (2013-01-12 03:07:13)

Offline

#8 2013-01-12 03:49:17

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,838
Website

Re: TTY outputs ontop of X server

I'm not sure I'm following.  Launching X with a display manager you have the problem, and I thought above you said launching x with xinit you do not have the problem, right?  That was what lead to the hairbrained wrapper idea.  Then with the wrapper and xinit you still dont have the problem, is this right?

I don't know what that "DE bash script" is.  How is that launched?  Is that what your display manager runs?  Why isn't that all just in your xinitrc?  Starting X by backgrounding startx does not seem like a good idea.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#9 2013-01-12 19:27:43

shinyquagsire23
Member
Registered: 2012-08-17
Posts: 8

Re: TTY outputs ontop of X server

It's a script tied to a .desktop in my /usr/share/xsessions folder, so it shows up along with the other desktop environments in the menu. In case you're confused, I use the gtk greeter for lightdm, so it looks similar to this:
http://iloveubuntu.net/pictures_me/ligh … neiric.png

I guess I could try launching my commands from xinit, so I'll put that stuff into my xinitrc and set the script just to launch xinit and see if that makes a difference.

Last edited by shinyquagsire23 (2013-01-12 19:37:31)

Offline

Board footer

Powered by FluxBB