Solved The vt(4) resolution is always 640x480

The laptop is ThinkPad X250 (Broadwell GPU) and the LCD resolution is 1366x768. I have set booting from UEFI only and disabled CSM. The whole disk is encrypted by GELI except /boot/.

On 10.2-STABLE, the LCD resolution can be recognized rightly without any configure in /boot/loader.conf. The information about this in dmesg is:
Code:
...
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
VT(efifb): resolution 1366x768
CPU: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (2194.96-MHz K8-class CPU)
...

But when the system is upgraded to 10.3-BETA2, the only resolution is 640x480 whether console or Xorg. The information about this in dmesg is:
Code:
...
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
VT(efifb): resolution 640x480
CPU: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (2194.96-MHz K8-class CPU)
...

I try to write the new EFI file using:
Code:
dd if=/boot/boot1.efifat of=/dev/ada0p1
or add something in /boot/loader.conf like:
Code:
kern.vt.fb.default_mode="1366x768"
No effect.

How to deal this? Thanks!
 
Thanks for reply, but the problem can't be solved.

Are you sure i915kms.ko can support Broadwell GPU? I think it only support to Ivy Bridge currently.
As I said, 1366x768 can be recognized on 10.2-STABLE.
 
Out of curiosity, how did you solved this problem? I searched the internet but didn't find a solution.
 
The loader prompt of 11-CURRENT offers a command named gop(Graphics Output Protocol) to operate the resolution, then I find the similar command named mode on 10.2-STABLE.
 
I'm in a similar situation with 640x480 resolution having just upgraded to 10.2.

I've tried to follow the advice here some of which seems a little contradictory and am not really clear what needs to be done. Nothing has worked so far.

I'm not aware of a mode command.

How do I tell what resolution my system supports?

vidcontrol -i mode outputs something I don't understand something like

Code:
mode#  flags  type  size  font  window  linear buffer
------------------------------------------------------------------------------
  0 (0x000) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
...
500 (0x1f4) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
501 (0x1f5) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
502 (0x1f6) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
503 (0x1f7) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
504 (0x1f8) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
505 (0x1f9) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
506 (0x1fa) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
507 (0x1fb) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
508 (0x1fc) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
509 (0x1fd) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
510 (0x1fe) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
511 (0x1ff) 0x00000000 T 0x0  0x0  0x00000 -5k 6276k 0x7fffffffe9a0 -5k
 
The output shows the console driver is vt(4) rather than sc(4), as vidcontrol can't apply to it.

So at first, you should press Esc to enter loader prompt and use mode to find the most suitable resolution:
bsdinstall-newboot-loader-menu.png


Then write the corresponding number to /boot/loader.rc.local:

Code:
# echo mode <number> > /boot/loader.rc.local
 
Last edited by a moderator:
I get the same message here. Then I searched in /usr/src in FreeBSD 10.3-PRERELEASE #6 r295075 without success. After updating /usr/src I found
Code:
/usr/src/sys/boot/i386 # find * -type f | xargs grep -i video
btx/btx/btx.S:     .set BDA_SCR,0x449     # Video mode
btx/btxldr/btxldr.S:     .set BDA_SCR,0x449     # Video mode
kgzldr/crt.s:     .set BDA_SCR,0x449     # Video mode
kgzldr/kgzldr.h:#define KGZ_CRT    0x1     /* Video console */
libi386/vidconsole.c:  "internal video/keyboard",
libi386/multiboot.h:/* Must pass video information to OS. */
libi386/multiboot.h:#define MULTIBOOT_VIDEO_MODE  0x00000004
libi386/multiboot.h:/* Is there video information? */
libi386/multiboot.h:#define MULTIBOOT_INFO_VIDEO_INFO  0x00000800
libi386/multiboot.h:/* These are only valid if MULTIBOOT_VIDEO_MODE is set. */
libi386/multiboot.h:/* Video */
which looks promising. I will try to update world and kernel.

EDIT: I just saw an announcement on the freebsd-stable mailing list. The subject is "FreeBSD 10.3-BETA3 Now Available".The part below is related to the current topic.
Code:
Two new commands have been added to the amd64 framebuffer driver 
  of the UEFI boot loader.  The first is `gop` (as in Graphics Output 
  Protocol), which allows to diagnose problems with efifb(4) but also 
  to set the current graphics mode on machines employing GOP.  With 
  `uga` (as in Universal Graphics Adapter), it is possible to do the 
  same on systems using the UGA protocol, which mainly translates to 
  Apple hardware.  The latter change also generally introduced UGA 
  support and currently hardcodes the necessary settings for mid-2007 
  iMacs (iMac7,1) and late-2007 MacBooks (MacBook3,1).  But it is 
  likewise possible to manually supply the necessary information for 
  additional systems.
I am not sure if it will work for me since i do not need UEFI, but I am already builing world.

EDIT2: Now the system is on 10.3-BETA3 FreeBSD 10.3-BETA3 #7 r296154 and the situation is similar. But I do not use the UEFI loader. I am not sure if this would be possible.
 
I have been inspired by this:
Don't need to load i915kms.ko or add anything in /boot/loader.conf.
With the following /boot/loader.conf I end up with 10280x1024 without the need to start X. This might indicate that the mode negotiation with the monitor works, too.
Code:
i915kms_load="YES"
kern.vty=vt
This applies for the new kernel but also for FreeBSD 10.3-PRERELEASE #6 r295075 which is on an additional drive.
 
The reason of "mode not found" is the system hasn't booted from UEFI. That is to say, the first output partition of gpart show isn't "efi (800K)". I have tested this on FreeBSD 10.2-RELEASE in Virtualbox.

Starting from r295872, the new command gop in boot prompt is recommended although the command mode is still usable.

If booting from UEFI, kern.vty=vt in /boot/loader.conf is unneeded because this is the default setting.

If the Intel GPU is newer than Ivy Bridge(mine is Broadwell), I think i915kms_load="YES" in /boot/loader.conf is useless since the GPU can't be recognized by i915kms.ko at all.
 
Back
Top