Wrong resolution at first login

Hi, i have an issue with KDE 4.14 and its resolution: when i login into my FreeBSD 11 box for the first time in the current session, i have to press CTRL+ALT+F1 and re-login through tty for getting KDE working at the maximum resolution. KDM is disabled.
My desktop computer is an old Dell Optiplex 360 and here are some useful info:
Code:
Copyright (c) 1992-2016 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 01:43:23 UTC 2016
    root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0)
VT(vga): resolution 640x480
CPU: Intel(R) Pentium(R) Dual  CPU  E2200  @ 2.20GHz (2194.53-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x6fd  Family=0x6  Model=0xf  Stepping=13
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0xe39d<SSE3,DTES64,MON,DS_CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant, performance statistics
real memory  = 2147483648 (2048 MB)
avail memory = 2026491904 (1932 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <DELL   B9K    >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s)
random: unblocking device.
ioapic0: Changing APIC ID to 8
ioapic0 <Version 2.0> irqs 0-23 on motherboard
random: entropy device external interface
kbd1 at kbdmux0
netmap: loaded module
module_register_init: MOD_LOAD (vesa, 0xffffffff8101c950, 0) error 19
vtvga0: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <DELL B9K    > on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x7f irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x5f irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 450
Event timer "HPET1" frequency 14318180 Hz quality 440
Event timer "HPET2" frequency 14318180 Hz quality 440
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xecd8-0xecdf mem 0xdfe00000-0xdfe7ffff,0xc0000000-0xcfffffff,0xdff00000-0xdfffffff irq 16 at device 2.0 on pci0
agp0: <Intel G33 SVGA controller> on vgapci0
agp0: aperture size is 256M, detected 7164k stolen memory
vgapci0: Boot video device
vgapci1: <VGA-compatible display> mem 0xdfe80000-0xdfefffff at device 2.1 on pci0
hdac0: <Intel 82801G HDA Controller> mem 0xdfdfc000-0xdfdfffff irq 16 at device 27.0 on pci0
pcib2: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0
pcib2: [GIANT-LOCKED]
pci2: <ACPI PCI bus> on pcib2
bge0: <Broadcom NetLink Gigabit Ethernet Controller    , ASIC rev. 0x5784100> mem 0xdfbf0000-0xdfbfffff irq 16 at device 0.0 on pci2
bge0: CHIP ID 0x05784100; ASIC REV 0x5784; CHIP REV 0x57841; PCI-E
miibus0: <MII bus> on bge0
brgphy0: <BCM5784 10/100/1000baseT PHY> PHY 1 on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
bge0: Using defaults for TSO: 65518/35/2048
bge0: Ethernet address: 00:21:9b:6e:b6:e8
uhci0: <Intel 82801G (ICH7) USB controller USB-A> port 0xff80-0xff9f irq 21 at device 29.0 on pci0
usbus0 on uhci0
uhci1: <Intel 82801G (ICH7) USB controller USB-B> port 0xff60-0xff7f irq 22 at device 29.1 on pci0
usbus1 on uhci1
uhci2: <Intel 82801G (ICH7) USB controller USB-C> port 0xff40-0xff5f irq 18 at device 29.2 on pci0
usbus2 on uhci2
uhci3: <Intel 82801G (ICH7) USB controller USB-D> port 0xff20-0xff3f irq 23 at device 29.3 on pci0
usbus3 on uhci3
ehci0: <Intel 82801GB/R (ICH7) USB 2.0 controller> mem 0xff980800-0xff980bff irq 21 at device 29.7 on pci0
usbus4: EHCI version 1.0
usbus4 on ehci0
pcib3: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci3: <ACPI PCI bus> on pcib3
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH7 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf irq 16 at device 31.1 on pci0
ata0: <ATA channel> at channel 0 on atapci0
atapci1: <Intel ICH7 SATA300 controller> port 0xfe00-0xfe07,0xfe10-0xfe13,0xfe20-0xfe27,0xfe30-0xfe33,0xfec0-0xfecf irq 20 at device 31.2 on pci0
ata2: <ATA channel> at channel 0 on atapci1
ata3: <ATA channel> at channel 1 on atapci1
ppc0: <Parallel port> port 0x378-0x37f,0x778-0x77f irq 7 on acpi0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/8 bytes threshold
ppbus0: <Parallel port bus> on ppc0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
uart0: <Non-standard ns8250 class UART with FIFOs> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcb7ff,0xcb800-0xcd7ff,0xcd800-0xcffff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
est0: <Enhanced SpeedStep Frequency Control> on cpu0
est1: <Enhanced SpeedStep Frequency Control> on cpu1
Timecounters tick every 1.000 msec
usbus0: 12Mbps Full Speed USB v1.0
nvme cam probe device init
hdacc0: <Analog Devices AD1984A HDA CODEC> at cad 0 on hdac0
hdaa0: <Analog Devices AD1984A Audio Function Group> at nid 1 on hdacc0
pcm0: <Analog Devices AD1984A (Analog)> at nid 18 and 20 on hdaa0
pcm1: <Analog Devices AD1984A (Analog)> at nid 17 and 21 on hdaa0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 12Mbps Full Speed USB v1.0
ugen0.1: <Intel> at usbus0
ugen1.1: <Intel> at usbus1
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <Intel> at usbus2
uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
usbus3: 12Mbps Full Speed USB v1.0
usbus4: 480Mbps High Speed USB v2.0
ugen3.1: <Intel> at usbus3
ugen4.1: <Intel> at usbus4
uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
uhub4: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
ada0 at ata2 bus 0 scbus1 target 0 lun 0
ada0: <ST3160815AS 4.ADA> ATA-7 SATA 2.x device
ada0: Serial Number 6RX78YT4
ada0: 150.000MB/s transferscd0 at ata3 bus 0 scbus2 target 0 lun 0
cd0: <TSSTcorp DVD+-RW TS-H653F D200> Removable CD-ROM SCSI device
cd0: 150.000MB/s transfers (SATA, UDMA5, ATAPI 12bytes, PIO 8192bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present
 (SATA, UDMA5, PIO 8192bytes)
ada0: 152587MB (312500000 512 byte sectors)
SMP: AP CPU #1 Launched!
Timecounter "TSC-low" frequency 1097265851 Hz quality 1000
Trying to mount root from ufs:/dev/ada0s3a [rw]...
uhub3: 2 ports with 2 removable, self powered
uhub4: 8 ports with 8 removable, self powered
bge0: link state changed to DOWN
ugen4.2: <Sony> at usbus4
ugen0.2: <Logitech> at usbus0
ukbd0: <Logitech USB Receiver, class 0/0, rev 1.10/17.11, addr 2> on usbus0
kbd2 at ukbd0
ugen0.3: <Logitech> at usbus0
ums0: <Logitech USB Receiver, class 0/0, rev 1.10/17.11, addr 2> on usbus0
ums0: 16 buttons and [XYZ] coordinates ID=1
ums1: <Logitech Optical USB Mouse, class 0/0, rev 2.00/3.40, addr 3> on usbus0
ums1: 3 buttons and [XYZ] coordinates ID=0
ugen4.2: <Sony> at usbus4 (disconnected)
ugen4.2: <Sony> at usbus4
urndis0: <RNDIS Communications Control> on usbus4
ue0: <USB Ethernet> on urndis0
ue0: Ethernet address: 1a:c0:fe:5f:e7:c5
$

My /usr/local/etc/X11/xorg.conf.d/driver-vesa.conf contains the following text:
Code:
Section "Device"
         Identifier "Card0"
         Driver     "vesa"
EndSection

/usr/local/etc/X11/xorg.conf.d/screen-resolution.conf
Code:
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        SubSection "Display"
        Modes      "1280x1024"
        EndSubSection
EndSection

I have configured Xorg manually and installed KDE with doas pkg install x11/kde4
 
Hi.

I had issues in the past with vesa driver. Every time I changed from graphical to text tty, no more video. I had to blindly login and reboot. Until I found the (almost) right driver for me, directly from upstream since the ports were a little delayed... those were painful weeks.

I ask myself if you would have a better/proper driver to use. Try these and post the results:

pciconf -lv | grep -A4 vga
 
Here is the output you've asked for
Code:
$ pciconf -lv | grep -A4 vga
vgapci0@pci0:0:2:0:     class=0x030000 card=0x02941028 chip=0x29c28086 rev=0x0a hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82G33/G31 Express Integrated Graphics Controller'
    class      = display
    subclass   = VGA
vgapci1@pci0:0:2:1:     class=0x038000 card=0x02941028 chip=0x29c38086 rev=0x0a hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82G33/G31 Express Integrated Graphics Controller'
    class      = display
hdac0@pci0:0:27:0:      class=0x040300 card=0x02941028 chip=0x27d88086 rev=0x01 hdr=0x00

I have noticed that the issue i've exposed previously doesn't always happen. I couldn't track down a possible cause of this strange behaviour. Before switching to vesa driver i've tried the intel one, but i have not been able to get Xorg working with it.
 
:confused: I'm not sure if this device should be supported or not. intel(4) lists chipset G33 as supported hardware, but it seems that yours is G31 (?)
I read something/somewhere about scfb driver x11-drivers/xf86-video-scfb (UEFI related), did you tried? Well, I have no ideia if it should help and I will not waste your time telling you "try this, try that" .
 
Back
Top