3

I'm using Ubuntu 16.04 without a desktop manager. 

When my system is started, it goes to tty0, and the screen appears like this:

<my-pc-name> login: |

where | represents the cursor.  After a few seconds my cursor shifts to the beginning of line like this:

|<my-pc-name> login:

I can login "normally", but when I type my username, the new text overwrites all text to the right of the cursor (i.e., the login prompt).

When I use Ctrl+Alt+F2 to switch to tty1, this problem has not happened.

How can I debug this?

  • 2
    host-login: is your prompt when logging in. It cannot shift to before itself. Are you mistakenly using the word "prompt" for your cursor? Or are you mistakenly referring to login when in fact the behaviour observed is after login, in your shell? – JdeBP Feb 1 '17 at 8:05
  • If you login and logout, do you still have the same problem the second time?  Please do not respond in comments; edit your question to make it clearer and more complete. – G-Man Feb 3 '17 at 6:22
  • P.S. When you edit your question, please use edit summaries that describe what you changed.  Don't say "edited format" when you really updated the information. And don't add annotations like "Update"; just fix the post so it looks like what it should have been from the beginning. – G-Man Feb 3 '17 at 6:29
  • 2
    Ubuntu Server 16.04 does that. It does it only once after boot, and only in the first virtual console. It is a simple cosmetic defect. Let it be; wait a little until it does it, press Enter to get a new prompt, and forget about it. – AlexP Feb 3 '17 at 8:41
  • Thank you @AlexP ! I though it was a hardware error or an unproper config of mine. – H.Harry Feb 4 '17 at 5:26
1

To answer your question on how to debug this, here is what I have tried:

I wrote a low tech script:

#!/bin/bash

while true
do
        DATE=`date +%H%M%S`
        ps -e f > pss.out/$DATE
        echo -ne '\n'$DATE
        sleep 1
done

When the system boots up, I quickly log in and run the script. I watched until I saw a line of output disappear, and then diffed the ps output from before and after the event.

user@ubuntu-back:~/pss.out$ diff 080234 080236
108d107
<   776 ?        Ss     0:00 /lib/systemd/systemd-fsckd
138c137
<  1630 tty1     R+     0:00          \_ ps -e f
---
>  1634 tty1     R+     0:00          \_ ps -e f
user@ubuntu-back:~/pss.out$ 

so I could see that the systemd-fsckd was somehow responsible.

To prove it, I turned off file system checking in my fstab, and the problem went away.

Obviously that isn't the actual fix, but it is all I have so far.

In my case I need to figure this out because I have been tasked with having a system that automatically starts a text based app (that I didn't write) on startup, and this problem creates screen artifacts.

  • Thank you for this - I thought I was going mad. Did you ever resolve? – Steve Dee Sep 12 '18 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.