Skip to content

Conversation

HubTou
Copy link

@HubTou HubTou commented Apr 9, 2023

Documents how to change the console resolution and, for international users, how to change keyboard settings.
A lot of people seem to be searching for this...

HubTou added 2 commits April 9, 2023 00:34
Instructions for changing console resolution in a VirtualBox FreeBSD guest.
I've seen from the Internet that many people have been struggling with this....
Instructions for changing console resolution and keyboard type in a VirtualBox FreeBSD guest.
I've seen from the Internet that many people have been struggling with this...
@HubTou
Copy link
Author

HubTou commented Apr 9, 2023

I can provide a VirtualBox VM if someone wants to test the tips described?

@sergio-carlavilla
Copy link
Contributor

Np, I'll review it and commit it.
Thanks!

kern.vty=sc
....

Then, after rebooting, you'll be able to list available console video modes and select one with `vidcontrol` (be sure to adjust the video memory setting for this VM in VirtualBox parameters to a sufficient value). For example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Then, after rebooting, you'll be able to list available console video modes and select one with `vidcontrol` (be sure to adjust the video memory setting for this VM in VirtualBox parameters to a sufficient value). For example:
Shut down the guest, then review its video memory setting.
Allow enough memory for the intended resolution.
After the guest boots, man:vidcontrol[1] will allow you to specify a listed mode.
For example:

@@ -394,6 +394,46 @@ Mount the shared folder from within the guest system like this:
# mount_vboxvfs -w myshare /mnt
....

If you want to change the resolution of the console but `vidcontrol -i mode` returns an empty list, then you'll need to switch from the "vt" console driver to the "sc" console driver as explained in man:vidcontrol[1].
Copy link
Contributor

@grahamperrin grahamperrin Sep 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you want to change the resolution of the console but `vidcontrol -i mode` returns an empty list, then you'll need to switch from the "vt" console driver to the "sc" console driver as explained in man:vidcontrol[1].
If you want to change the resolution of the console, but `vidcontrol -i mode` returns an empty list: you may use the legacy man:syscons[4] alternative to the man:vt[4] console driver.
According to the manual page:
NOTE: the syscons driver is not compatible with systems booted via man:uefi[8].
Forcing use of syscons on such systems will result in no usable console.

This includes NOTE: as an AsciiDoc admonition.

@@ -394,6 +394,46 @@ Mount the shared folder from within the guest system like this:
# mount_vboxvfs -w myshare /mnt
....

If you want to change the resolution of the console but `vidcontrol -i mode` returns an empty list, then you'll need to switch from the "vt" console driver to the "sc" console driver as explained in man:vidcontrol[1].

Add the following line to [.filename]#/boot/loader.conf#:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Add the following line to [.filename]#/boot/loader.conf#:
For syscons (sc), add the following line to [.filename]#/boot/loader.conf#:

# vidcontrol MODE_325
....

If this new video mode is acceptable, it can be permanently set on boot for all virtual consoles by adding it to [.filename]#/etc/rc.conf#:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If this new video mode is acceptable, it can be permanently set on boot for all virtual consoles by adding it to [.filename]#/etc/rc.conf#:
If the new mode is acceptable, it can be set for all virtual consoles:

Comment on lines +421 to +423
[.programlisting]
....
allscreens_flags="MODE_325"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[.programlisting]
....
allscreens_flags="MODE_325"
[source,shell]
....
# sysrc allscreens_flags+="MODE_325"

For the configuration to take effect, either reboot -r or restart the OS.

allscreens_flags="MODE_325"
....

If you are using a foreign keyboard, you also need to add appropriate keymap and font lines to [.filename]#/etc/rc.conf#.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you are using a foreign keyboard, you also need to add appropriate keymap and font lines to [.filename]#/etc/rc.conf#.
If you use a foreign keyboard, you should also add appropriate keymap and font lines to [.filename]#/etc/rc.conf#.
See man:rc.conf[5].

....

If you are using a foreign keyboard, you also need to add appropriate keymap and font lines to [.filename]#/etc/rc.conf#.
Beware, the keymap files are different from "vt" to "sc" console types! Check [.filename]#/usr/share/syscons/keymaps# for appropriate values...
Copy link
Contributor

@grahamperrin grahamperrin Sep 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Beware, the keymap files are different from "vt" to "sc" console types! Check [.filename]#/usr/share/syscons/keymaps# for appropriate values...
NOTE: keymap files for syscons differ from those for vt.
For appropriate values, see files in [.filename]#/usr/share/syscons/keymaps#.

If you are using a foreign keyboard, you also need to add appropriate keymap and font lines to [.filename]#/etc/rc.conf#.
Beware, the keymap files are different from "vt" to "sc" console types! Check [.filename]#/usr/share/syscons/keymaps# for appropriate values...

For example, in order to set a French keyboard do:
Copy link
Contributor

@grahamperrin grahamperrin Sep 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For example, in order to set a French keyboard do:
For example, to set a French keyboard, a font size, and font:

Comment on lines +433 to +434
keymap="fr.iso.acc"
font8x16="iso-thin-8x16"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that this format suits syscons (not vt).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants