Skip to main content
Topic: 'leaking messages' while booting (Read 104 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

'leaking messages' while booting

Hello,

I just wanted to ask if there is some progress with the 'leaking messages' problem, we had here.

I still have the messages written on the screen, coming from different programs. (php,mysql,network manager..) on PC and laptop, for example when writing my keychain keyphrase.. (before the startx command  (no login manager in use))

Don't know why this happens, or what I could try to solve the problem.




Re: 'leaking messages' while booting

Reply #2
Add "console=/dev/tty2" (or 3 - 6) to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub then run
# /bin/sh /usr/bin/updategrub
Goodbye all console messages! (ctrl-alt-F2 to see where they went, ctrl-alt-F7 to get back to the desktop)
A few processes might still write to /dev/tty1 instead of /dev/console but hopefully it won't be a problem.
Boot messages are written to /dev/console, this is mapped to /dev/tty1 by the kernel as default - the screen you see at boot. But if you send /dev/console messages to another tty they appear there instead. True for Runit and OpenRc too.

Re: 'leaking messages' while booting

Reply #3
yes, I am on runit and have a syslog daemon running and another one..

Code: [Select]
run: /run/runit/service/socklog: (pid 1417) 24576s; run: log: (pid 1409) 24576s
run: /run/runit/service/syslog-ng: (pid 1398) 24576s

i guess one would be enough.. :-/

Re: 'leaking messages' while booting

Reply #4
Code: [Select]
$ tty
/dev/pts/4
(In another terminal tab or window)
# echo "hi there" >/dev/pts/4
> result in the original terminal:
$ hi there

# echo "hi there" >/dev/console
# echo "hi there" >/dev/tty1
(etc)
If messages are sent to /dev/console which is usually /dev/tty1 then they go there. So either you send them somewhere else, either globally or for a particular process, another tty, /dev/null, /dev/log perhaps, or you  could (as a user) change the login to another tty, usually if you use startx with autologin then you set it up to login on tty7 automatically and then it switches to tty7 for the graphical session. This can be done on Runit and OpenRC. Probably you could arrange to have the login switch to another tty without logging in. But I guess it would be helpful to silence the noisy process so you could login in tty1 without users having to deal with it individually.  :D

Re: 'leaking messages' while booting

Reply #5
okay, thanks for the explanation - I didn't know that.

But... isn't it removal of symptoms, instead of fixing the root cause?

just thought something was 'leaking' or so..
..anyway..  thanks for the tipp -- I'll try that.

Re: 'leaking messages' while booting

Reply #6
Yes, the real fix is to get mysql (and the others) to write somewhere else - the system log ideally. Most setups give some boot messages then you can use the login prompt on tty1. It might be possible to run some with a "--quiet" arg or similar too. It would require modifying the runit service, perhaps adding a log script, as Konimex originally suggested. You might be able to do that yourself and then in /etc/pacman.conf add:
NoUpgrade   = etc/...filename(s)   (notice the subtle but important lack of the leading "/" !!!)  ;D
so pacman won't overwrite your changed file. Possibly if anyone came up with a good solution and posted it here it would be used. I'm not using runit so can't give exact details on that though. Another possible workaround for now is to press ALT Fx where x is 2-7 when you get to the login prompt and login on another tty instead. It must be very annoying when trying to log in like that, and not all users would see the problem if they had a graphical dm installed.

Re: 'leaking messages' while booting

Reply #7
ok..

I don't know much about this topic.. so..
Just one more thing to show  why it felt wrong: I believe even in visudo editor, during installation, some messages were written over the screen.. that was quite disturbing..
 
i have attached a photo from my pc when it is ready with booting and waits for login (username).

thanks again