Solved Salutations, and Can't get to text console using Alt+Ctrl+F1-F8

First of all, hello to all members and the FreeBSD staff. First time here, I'm bruno from italy, a FreeBSD addicted (but also to other BSDs and micro-kernel architectures like Minix, and hybrid microkernel-BSD likes such as MacOsX), and a software programmer unemployed at the moment. Thank you for all your work and efforts to maintain this remarkable, solid and stable FreeBSD OS.

That said,
I run FreeBSD 11.2-RELEASE #0 r335510
If I don-t use X, e.g. in text mode, I can switch between ttyvs as expected (using ALT+CTRL+F<1-8>).
But if I start X server (manually using startx or through xdm configured for login session) on any virtual terminal, then when I try to switch back to any other virtual terminal (using ALT+CTRL]+F<1-8>), I get a blank screen (tested also with an external VGA monitor, it reports no video signal).
Anyway, when I try to switch back to the virtual terminal where X is running (set to ttyv8, so ALT+CTRL+F9), I get back normally to my working X session. In addition, my gmplayer (run under root at the moment just for solving issues), but also tested vlc player, don't manage to output video streams, but manage audio stream, but before opening a related issue, I will test if this post may eventually be related also to problems in playing streams.

I use Xorg auto-configuration, without any Xorg.conf file. The only workaround that I tried was to put in /usr/local/etc/X11/xorg.conf.d/ a file 'driver-intel.conf' as I've read on the handbook (https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-config.html), with the following contents:

Section "Device"
Identifier "Card0"
Driver "intel"
#BusID "pci0:0:2:0" (I tried with various parameters here, and either commented out or not)
#BusID "PCI:1:0:0"
EndSection

without success.

This is more than just an annoyance I'd like to correct, because I have the habit to switch to a root text console to do administration/maintenance/installation tasks, and being FreeBSD quite conservative about security, it doesn't allow to su to root from a user that is not included in the wheel (root) group (and with me being paranoid about security, I don't add any 'normal' user to the root's group :)

*********************************************** USEFUL INFO INCLUDED ***********************************************************

FreeBSD 11.2-RELEASE #0 r335510: Fri Jun 22 04:32:14 UTC 2018
root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64

Laptop ACER Aspire 5720 (this model came out in 2007)
System BIOS Version: V1.19
VGA BIOS Version: Intel V518

VT(vga): resolution 640x480
Video Memory: 8 Mb

CPU: Intel(R) Core(TM)2 Duo CPU T5250 @ 1.50GHz (1496.28-MHz K8-class CPU)
Origin="GenuineIntel" Id=0x6fd Family=0x6 Model=0xf Stepping=13
real memory = 2147483648 (2048 MB)
avail memory = 2025234432 (1931 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s)
module_register_init: MOD_LOAD (vesa, 0xffffffff80ff4550, 0) error 19
nexus0
vtvga0: <VT VGA driver> on motherboard
pcib0: _OSC failed: AE_BUFFER_OVERFLOW
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x5110-0x5117 mem 0x94000000-0x940fffff,0x80000000-0x8fffffff irq 16 at device 2.0 on pci0
agp0: <Intel GM965 SVGA controller> on vgapci0
agp0: aperture size is 256M, detected 7676k stolen memory
vgapci0: Boot video device
vgapci1: <VGA-compatible display> at device 2.1 on pci0

Configuring vt: keymap blanktime.

WARNING:
New keymap: In /etc/rc.conf replace 'keymap=it.iso.kbd' by 'keymap=it'.

ugen4.2: <Logitech USB Optical Mouse> at usbus4
ums0 on uhub4
ums0: <Logitech USB Optical Mouse, class 0/0, rev 2.00/53.00, addr 2> on usbus4
ums0: 3 buttons and [XYZ] coordinates ID=0
---------------------------------------------------------------------------------

Here is included output from pciconf command, related to the display class

vgapci0@pci0:0:2:0: class=0x030000 card=0x011e1025 chip=0x2a028086 rev=0x03 hdr=0x00
vendor = 'Intel Corporation'
device = 'Mobile GM965/GL960 Integrated Graphics Controller (primary)'
class = display
subclass = VGA
vgapci1@pci0:0:2:1: class=0x038000 card=0x011e1025 chip=0x2a038086 rev=0x03 hdr=0x00
vendor = 'Intel Corporation'
device = 'Mobile GM965/GL960 Integrated Graphics Controller (secondary)'
class = display
---------------------------------------------------------------------------------

I include /var/log/Xorg.0.log that you can view here:
https://pastebin.com/EBebXx3r
---------------------------------------------------------------------------------

I generated an xorg.conf.new with 'Xorg -configure', but leave it to be xorg.conf.new
(that's equivalent to Xorg not using that file, right?), you can view it here:
https://pastebin.com/Fg13YPU9
---------------------------------------------------------------------------------

and this is a keyboard mapping of ALT-CTRL-F1/ALT-CTRL-F9 press from 'xev':

/root/~$ xev -event keyboard
Outer window is 0x1c00001, inner window is 0x1c00002

KeymapNotify event, serial 24, synthetic NO, window 0x0,
keys: 0 0 0 0 16 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

KeyRelease event, serial 25, synthetic NO, window 0x1c00001,
root 0x34d, subw 0x0, time 3533855, (233,586), root:(303,634),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x1c00001,
root 0x34d, subw 0x0, time 3541791, (233,586), root:(303,634),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x1c00001,
root 0x34d, subw 0x0, time 3542671, (233,586), root:(303,634),
state 0x4, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x1c00001,
root 0x34d, subw 0x0, time 3544010, (233,586), root:(303,634),
state 0xc, keycode 67 (keysym 0x1008fe01, XF86Switch_VT_1), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x1c00001,
root 0x34d, subw 0x0, time 3544010, (233,586), root:(303,634),
state 0xc, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x1c00001,
root 0x34d, subw 0x0, time 3544010, (233,586), root:(303,634),
state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

MappingNotify event, serial 28, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 28, synthetic NO, window 0x1c00001,
root 0x34d, subw 0x0, time 3551830, (233,586), root:(303,634),
state 0x0, keycode 75 (keysym 0xffc6, F9), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 29, synthetic NO, window 0x1c00001,
root 0x34d, subw 0x0, time 3551912, (233,586), root:(303,634),
state 0x0, keycode 75 (keysym 0xffc6, F9), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

ClientMessage event, serial 29, synthetic YES, window 0x1c00001,
message_type 0xf5 (WM_PROTOCOLS), format 32, message 0xf8 (WM_DELETE_WINDOW)
---------------------------------------------------------------------------------

Every suggestion is highly appreciated, thank you.

P.S.: excuse me if I take a little advantage of this thread, just a question: Is it planned Wayland display protocol support in the next FreeBSD releases?
 
load the driver for your video card. x11-drivers/xf86-video-intel

kldload i915kms

or

/boot/locader.conf
i915kms_load=YES

https://wiki.freebsd.org/Graphics

VladiBG it worked, now I can switch between my virtual consoles and X Terminal (on ttyv8), although while it works as per your indications, since I faced some other troubles on displaying windows, after some attempts and looking at the articles you provided, I followed these indications, substituting "radeonkms" with "i915kms":
From https://wiki.freebsd.org/Graphics:
Video driver loaded at boot time

If you want to automatically load a video driver at boot time, we recommend to do it from /etc/rc.conf:
kld_list="radeonkms"

Loading the driver from /boot/loader.conf is not recommended and may not even work. Loading i915kms like this is known to cause a hang early in boot with a black screen.
So, problem solved.

Then, I'm in the process of solving some other issues, so then I disabled an option mentioned in The Handbook:
5.4.3. Kernel Mode Setting (KMS)
When the computer switches from displaying the console to a higher screen resolution for X, it must set the video output mode. Recent versions of Xorg use a system inside the kernel to do these mode changes more efficiently. Older versions of FreeBSD use sc(4), which is not aware of the KMS system. The end result is that after closing X, the system console is blank, even though it is still working. The newer vt(4) console avoids this problem.

Add this line to /boot/loader.conf to enable vt(4):

kern.vty=vt
I disabled that option, and now I'm only left with an issue, just to mention it now:
I'm using OpenBox window manager (along with Tint2 plug.in) now, and while I'm root all application windows work fine, but if I'm a normal user, of the apps I installed till now, all but gmplayer don't display windows (but they are runnning), like PcManFM, Geany, Firefox and xterm. I disabled an authorization flag variable in /usr/local/bin/startx, without success.
This is out of the question of this thread, so, I'm doing some research here and on google for troubleshooting, and eventually I will submit it on another thread.
 
Back
Top