kern.vty=vt gegen nvidia-driver

Fusselbär

Makefile Voyeur
Hallo,

zur Zeit haben wir ja zwei Hinweise in UPDATING:
20141003:
AFFECTS: xorg users
AUTHOR: bapt@FreeBSD.org

The WITH_NEW_XORG setting has been activated by default on all versions
of FreeBSD, which allows us to have packages for xorg 1.12 and kde4.

Please be aware that on systems that only support syscons
switching virtual terminals or exiting X
results in a black screen or the last image of their desktop
(like a screenshot) being presented. Commands can still be typed blindly.

Most, if not all, systems should be using vt(4) and this can be enabled
by setting kern.vty=vt in /boot/loader.conf and reboot to activate.

20141001:
AFFECTS: xorg users
AUTHOR: bapt@FreeBSD.org

The WITH_NEW_XORG setting has been activated by default on FreeBSD 10.0
and above, which allows us to have packages for xorg 1.12 and kde4.

Please be aware that on systems that only support syscons
switching virtual terminals or exiting X
results in a black screen or the last image of their desktop
(like a screenshot) being presented. Commands can still be typed blindly.

Most, if not all, systems should be using vt(4) and this can be enabled
by setting kern.vty=vt in /boot/loader.conf and reboot to activate.
Ich habe das dann mal mit newcons hier probiert, aber ich benutze den nvidia-driver. Mit nvidia-driver ging das leider schief. Es gab nichts zu sehen beim booten, aber dann Crash mit darauf folgenden reboot.
Schätze mal, dass nvidia-driver mit newcons noch nicht nutzbar ist.

Mein KERNCONF Eintrag für vt:
Code:
grep -A3 "virtual terminal console driver" /usr/src/sys/`uname -m`/conf/`uname -i`

# vt -- virtual terminal console driver
device          vt
options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)
options TERMINAL_KERN_ATTR=(FG_RED|BG_BLACK)
Zum Glück hatte ich noch den USB-Stick für die PC-BSD Installation auf dem Tisch liegen, mit dem ich vom Live System auf dem USB-Stick zugreifend dann den kern.vty=vt Eintrag in der /boot/loader.conf unschädlich machen konnte. Denn FreeBSD Single User Mode benutzen war dann mit newcons leider ebenfalls unmöglich. :ugly:
 
Oh, falscher Alarm! nvidia-driver mit newcons geht doch. Bär blöd. :ugly:
Da fehlte noch in der KERNCONF:
Code:
device          vt_vga
Auch die grüne Schrift für normale Textausgabe und rote Schrift für Kernelmeldungen funktioniert. Juchu! :)
 
Moin !

Zitat: Auch die grüne Schrift für normale Textausgabe und rote Schrift für Kernelmeldungen funktioniert. Juchu! :)

Wie aktivierst du das ? Bei mir ist die Schrift komplett weiss !

:eek:
 
Kommt wahrscheinlich auf die FreeBSD-Version an. Das Schrift-Rendering ist erst recht spät vollständig eingebaut worden.
 
Wie aktivierst du das ? Bei mir ist die Schrift komplett weiss !

Das sind die newcons Farboptionen in meiner KERNCONF:
Code:
options TERMINAL_NORM_ATTR=(FG_GREEN|BG_BLACK)
options TERMINAL_KERN_ATTR=(FG_RED|BG_BLACK)
In den Beispielen vom vt Manual steht auch was dazu:
https://www.freebsd.org/cgi/man.cgi...=FreeBSD+10.0-stable&arch=default&format=html

Zuvor hatte ich bereits Farboptionen für syscons in meiner KERNCONF:
Code:
options  SC_NORM_ATTR=(FG_GREEN|BG_BLACK)
options  SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)
options  SC_KERNEL_CONS_ATTR=(FG_RED|BG_BLACK)
options  SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)
 
Fusselbär: thx für diesen Thread.
Jetzt weiß ich, wie ich den Kernel bauen muß, damit ich die Packete, die ich gerade aus dem 2014Q4-Branch baue auch nutzen kann. ;)

BTW ich will leicht andere Optionen nutzen, sowas wie:
Code:
options  TERMINAL_NORM_ATTR=(FG_BLACK|BG_LIGHTGREY)
options  TERMINAL_KERN_ATTR=(FG_RED|BG_LIGHTGREY)
 
Wieso brauchtest Du USB-Stick? Ich habe noch keinen Fall gehabt, wo ich mit FreeBSD nicht booten konnte (sofern der Bootloader noch intakt ist). Im schlimmsten Fall muss ich folgendes machen:
Code:
unload # alles an Modulen raus
load /boot/kernel/kernel # Kernel wählen
load ... # mehrmals; nötigste Module, ZFS, RAID-Controller etc
boot -s # Single-User damit rc nicht anspringt

Nach dem Booten in Single-User dann Dateisysteme r/w mounten, Änderungen machen und neu starten.
 
Wieso brauchtest Du USB-Stick? Ich habe noch keinen Fall gehabt, wo ich mit FreeBSD nicht booten konnte (sofern der Bootloader noch intakt ist). Im schlimmsten Fall muss ich folgendes machen:
Zudem sollte nach einem make installkernel in /boot/kernel.old einen Kernel haben. Da hat man dann nur Probleme, wenn man zweimal hintereinander einen nichtfunktionierenden Kernel bäckt.
 
Mahlzeit!

Ich wollte diesen Threat mal wiederbeleden, da sich mein aktuelles Problem hier sehr gut einordnen lässt:

Und zwar habe einen Kernel gebaut, der komplett auf vt aufbaut und "device vga" zusammen mit "device sc" inkl. Optionen komplett auskommentiert. Läuft auch alles ganz cremig:

VT(efifb): resolution 1280x1024

Sogar X11 läuft bisher ganz akzeptabel.

Nun wollte ich ein bisschen experimentieren und habe mir x11/nvidia-driver aus den Ports installiert. Beim laden des Moduls mittels "kldload nvidia" erhalte ich aber folgene Rückmeldungen:

"kldload: an error occured while loading the module. Please check dmesg(8) for more details."

dmesg:
...
link_elf_obj: symbol sc_get_softc undefined
linker_elf_load_file: Unsupported file type

Durch das "sc" schlussfolgere ich, dass sc(4) anscheinend doch im Kernel zur Verfügung stehen muss. Aber warum?

Im Wiki steht doch, dass nvidia auf i386/amd64 durch vt unterstützt wird ..

https://wiki.freebsd.org/Newcons

Gruß
 
Weil der Nvidia-Blob versucht Syscons abzufragen. Das kannst du aus den Nvidia-Sourcen rauspatchen:
Code:
--- ./src/nvidia/nvidia_os.c.orig 2017-03-13 07:53:40.018536000 +0100
+++ ./src/nvidia/nvidia_os.c 2017-03-13 07:54:10.443019000 +0100
@@ -740,6 +740,7 @@
NvU16 *pFbPitch
)
{
+#if 0
const sc_softc_t *sc = sc_get_softc(0, SC_KERNEL_CONSOLE);
if (sc)
@@ -761,6 +762,7 @@
}
}
}
+#endif
*pPhysicalAddress = 0;
*pFbWidth = *pFbHeight = *pFbDepth = *pFbPitch = 0;
 
Zurück
Oben