# amd64 10.1 RELEASE ---> 11.0 CURRENT custom kernel build. White screen in standard VGA mode fail.



## igumnov (Dec 6, 2014)

Hello, everyone!

I get a white screen in standard VGA console mode in 2-3 seconds, after selecting user mode in bootloader.
make.conf:

```
MALLOC_PRODUCTION=YES
CPUTYPE?=native
CFLAGS=-O2 -pipe -fno-strict-aliasing -ferror-limit=100
COPTFLAGS=-O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing
KERNCONF=GENERIC
OPTIMIZED_CFLAGS=YES
BUILD_OPTIMIZED=YES
WITH_CPUFLAGS=YES
WITH_OPTIMIZED_CFLAGS=YES
WITHOUT_DEBUG=YES
BUILD_STATIC=YES
NO_PROFILE=YES
MAKE_JOBS_NUMBER?=8
```

See `$dmesg -a` for 11.0 custom and 10.1 release kernel in attachments.

Some additional system info:
GPU: GeForce GT 730
CPU:  Intel Core i7 4790K
Monitor: 29 inches BENQ LED 1920-1080px connected via HDMI cable.
Motherboard: Gigabyte GA-Z97X-Gaming 3

It's alive after boot. I can get in via SSH from my laptop. But a constant white screen in VGA mode is very strange behavior. I tried:

Booting with/without NVIDIA driver kernel module. White screen.
Start X and gdm. No response.
Build a kernel with 10.1 /sys/amd64/conf/GENERIC. Same white screen.
Old kernel and 10.0 RELEASE works fine.

Second 10.1 `dmesg -a` is posted with loaded via
boot/loader.conf NVIDIA driver. But it works fine in VGA mode with standard driver.

I can see new kernel dmesg for 2-3 second before white screen appears. Bootloader VGA mode works fine. BIOS works fine in VGA mode too.

Any ideas how to fix this white screen trouble?

Thanks in advance.


----------



## wblock@ (Dec 7, 2014)

Setting CFLAGS and COPTFLAGS is a frequent cause of problems.  Does the ordinary GENERIC kernel built without all those fragile settings work?  Then add one setting at a time.  But it is still not recommended to use non-default CFLAGS.


----------



## igumnov (Dec 7, 2014)

So I tried to turn off: -fno-strict-aliasing -funroll-loops -ffast-math  and BUILD_STATIC: 
	
	



```
MALLOC_PRODUCTION=YES
CPUTYPE?=native
CFLAGS=-O2 -pipe -ferror-limit=100
COPTFLAGS=-O2 -pipe
KERNCONF=GENERIC
OPTIMIZED_CFLAGS=YES
BUILD_OPTIMIZED=YES
WITH_CPUFLAGS=YES
WITH_OPTIMIZED_CFLAGS=YES
WITHOUT_DEBUG=YES
NO_PROFILE=YES
MAKE_JOBS_NUMBER?=8
```
 And short version with everything turned off. 
	
	



```
CPUTYPE?=native
KERNCONF=GENERIC
```
 I also built with 
	
	



```
CPUTYPE?=nocona
```
 Everything fails due to white screen. Now I'll try directly: 
	
	



```
CPUTYPE=core2
```
 And if it fails. I do not know what to do next.


----------



## igumnov (Dec 7, 2014)

Doh, white screen again. Will use a 10.1 RELEASE kernel until somebody somehow finds the cause of this.


----------



## wblock@ (Dec 7, 2014)

Please comment or remove all those options and try again.  It might also be necessary to rebuild the KMS-related ports.


----------



## igumnov (Dec 7, 2014)

Finally I did it after two days of annoying kernel rebuilding. To resolve it
one must go to kernel build configuration file and turn off the vt(4) Newcons console driver:
/sys/amd64/conf/GENERIC

```
190 # vt is the new video console driver
191 device vt
192 device vt_vga
193 device vt_efifb
```
 by removing or commenting lines 191,192,193.


----------



## pkubaj (Dec 8, 2014)

Modifying GENERIC is not recommended. Make your own kernel configuration by copying and then modifying it or including GENERIC in your new configuration.


----------



## igumnov (Dec 10, 2014)

Yes it's a rude solution, but I have here only a small home network with five hosts and don't even use FreeBSD as a router, just as an office desktop. Probably there is a better way to turn kernel mode switching off, but I do not know about that. Thank you for your warning. I'm out of this thread.


----------



## pkubaj (Dec 10, 2014)

If you just want to turn it off, you should read UPDATING, specifically entry 20141104.


----------



## igumnov (Dec 10, 2014)

Here it goes. 
`$grep -A 20 20141104 /usr/src/UPDATING`


```
20141104:
  vt(4), the new console driver, is enabled by default. It brings
  support for Unicode and double-width characters, as well as
  support for UEFI and integration with the KMS kernel video
  drivers.

  You may need to update your console settings in /etc/rc.conf,
  most probably the keymap. During boot, /etc/rc.d/syscons will
  indicate what you need to do.

  vt(4) still has issues and lacks some features compared to
  syscons(4). See the wiki for up-to-date information:
  https://wiki.freebsd.org/Newcons

  If you want to keep using syscons(4), you can do so by adding
  the following line to /boot/loader.conf:
  kern.vty=sc
```


----------

