Bug 234093

Summary: /sbin/kldload not possible to 'silence' with 1> /dev/null or 2> /dev/null redirection
Product: Base System Reporter: Slawomir Wojciech Wojtczak <vermaden>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not A Bug    
Severity: Affects Many People Keywords: needs-qa
Priority: --- Flags: koobs: mfc-stable12?
koobs: mfc-stable11?
Version: 11.2-RELEASE   
Hardware: Any   
OS: Any   

Description Slawomir Wojciech Wojtczak 2018-12-17 10:54:35 UTC
# echo $SHELL
/usr/local/bin/zsh
# kldload /boot/modules/i915kms.ko 1> /dev/null 2> /dev/null
Dec 16 11:08:03 t420s kernel: Failed to add WC MTRR for [0xe0000000-0xefffffff]: -28; performance may suffer

Why it is not possible to 'silence' this command with 1> or 2> redirections?

This message is not from the kernel (white color font) because I have it disabled with boot_mute=YES in /boot/loader.conf file.

The /boot/modules/i915kms.ko is from drm-next package on FreeBSD 11.2-RELEASE.

Regards.
Comment 1 Andriy Gapon freebsd_committer freebsd_triage 2018-12-17 15:20:10 UTC
This message *is* from kernel as witnessed by "kernel:".
I guess that it is syslogd that outputs the message to the console.

Hint: don't use the console terminal (ttyv0) as your shell terminal if you do not want kernel and syslog message to interfere with terminal output.
Comment 2 Slawomir Wojciech Wojtczak 2018-12-18 08:41:23 UTC
(In reply to Andriy Gapon from comment #1)

Its from the kernel but not directly (not white font).

The kldload does not display such messages for other modules.

How to disable that?

Its against UNIX philosophy, to not be able to redirect these.
Comment 3 Andriy Gapon freebsd_committer freebsd_triage 2018-12-18 09:25:07 UTC
(In reply to vermaden from comment #2)
Please re-read comment #1.
This has nothing to do with redirection.

Also, another hint: I see that you have a habit of opening a bug report every time you are confused or have a problem that you cannot solve.  That's not the intended use of bug reports.  Please start with mailing lists, freebsd-questions@ or more specialized.
Comment 4 Slawomir Wojciech Wojtczak 2018-12-18 10:43:36 UTC
Closing a bug as not a bug does not make it disappear ...
Comment 5 Slawomir Wojciech Wojtczak 2018-12-18 11:58:54 UTC
(In reply to Andriy Gapon from comment #1)

Your suggestions about syslog was helpful.

Fro the record this helped:


% diff -u /root/syslog.conf /etc/syslog.conf
--- /root/syslog.conf   2018-12-18 11:49:48.204878000 +0100
+++ /etc/syslog.conf    2018-12-18 11:49:55.681504000 +0100
@@ -5,7 +5,7 @@
 #      separators. If you are sharing this file between systems, you
 #      may want to use only tabs as field separators here.
 #      Consult the syslog.conf(5) manpage.
-  *.err;kern.warning;auth.notice;mail.crit             /dev/console
+# *.err;kern.warning;auth.notice;mail.crit             /dev/console
 *.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err  /var/log/messages
 security.*                                     /var/log/security
 auth.info;authpriv.info                                /var/log/auth.log


Regards.
Comment 6 Andriy Gapon freebsd_committer freebsd_triage 2018-12-18 14:54:34 UTC
(In reply to vermaden from comment #4)
Correct.  It just reflects the fact that there is no bug :)
Comment 7 Slawomir Wojciech Wojtczak 2018-12-18 16:07:18 UTC
(In reply to Andriy Gapon from comment #6)

Yes and no :)

It was not obvious that syslogd does that (at least to me) :>