# Change resolution console and X11 to 1024x768 FreeBSD v11



## robbo007 (Apr 1, 2019)

Hi all,
I've installed FreeBSD 11 on my Raspberry Pi. How can I change the console resolution and X11 to 1024x768?
Cheers,
Rob


----------



## SirDice (Apr 1, 2019)

Setting up xorg on the pi
					






					adventurist.me


----------



## robbo007 (Apr 1, 2019)

Thanks I just saw that one and I've installed those packages.  I can open X11 but the resolution is pretty big. How can I force 1024x768? Changing the /etc/xorg.conf ?


----------



## SirDice (Apr 1, 2019)

You shouldn't have a /etc/xorg.conf. It's /usr/local/etc/X11/xorg.conf and even that shouldn't exist any more.

Setting Monitor Resolution in a File


----------



## George (Apr 1, 2019)

The scfb driver ignores the "Screen" section of the xorg.conf files. From scfb man file:


```
For this driver it is not required to specify modes in the Screen
section of the configuration file.  The scfb driver picks up the
currently used video mode from the framebuffer driver and uses it.
Video modes specifications in the configuration file are ignored.
```

Also, xrandr will only show the currently used screen resolution. At least on a Raspberry Pi 3 it might be impossible to change it.


----------



## robbo007 (Apr 2, 2019)

If I run xrandr it says: Can't open display. Not sure if this is due to it being a Raspberry Pi B? Has anyone successfully changed the resolution on a Raspberry Pi?

Also is there a way to force a window size for an App when launching it? Ive got one app which opens so big with this resolution I can't use it properly.


----------



## George (Apr 2, 2019)

What window manager are you using?
It can be done in the window manager configuration files.


With `Alt + Space` you might get the window options, then go to resize, and resize with arrow keys.


----------



## trev (Apr 2, 2019)

robbo007 said:


> Not sure if this is due to it being a Raspberry Pi B? Has anyone successfully changed the resolution on a Raspberry Pi?



What is the default resolution?

I just fired up my RPi B and the default xorg screen resolution is 1824x984.


----------



## robbo007 (Apr 2, 2019)

Mine must be lower than 1024x768. How did you change it? Please share going crazy here trying many combos. 
Thanks,
Rob


----------



## trev (Apr 3, 2019)

Here's all that I think may be relevant (FreeBSD 11):


```
Section "Monitor"
    Identifier  "Monitor"
EndSection

Section "Device"
    Identifier  "Generic FB"
    Driver      "scfb"
    Option    "NoAccel"    "True"
EndSection

Section "Screen"
    Identifier  "Screen"
    Device      "Generic FB"
    Monitor     "Monitor"
    DefaultDepth 16
    SubSection "Display"
       Depth     16
    EndSubsection
EndSection
```

And config.txt:


```
disable_commandline_tags=1
gpu_mem=32
hdmi_force_hotplug=1
device_tree=rpi.dtb
device_tree_address=0x100
kernel=uboot.img
```

My monitor is a BENQ G2420HDBL (24" wide screen, resolution 1920x1080 @ 60Hz).


----------



## robbo007 (Apr 3, 2019)

Which file and location do I need to add that to?


----------



## trev (Apr 3, 2019)

I have a /usr/local/etc/X11/xorg.conf file and config.txt goes in the MSDOS boot partition (there should be one already).


----------



## robbo007 (Apr 3, 2019)

hmmm Xorg looks in /etc/xorg.conf on my install. I've added your comments above to that file and also to the config.txt. I get this error.

My monitor is a Dell 2011H 20" with a native res of 1600 x 900 at 60 Hz. Any ideas?


```
root@rpi-b:/etc # cd /var/log/
root@rpi-b:/var/log # cat Xorg.
Xorg.0.log      Xorg.0.log.old  Xorg.1.log      Xorg.1.log.old 
root@rpi-b:/var/log # cat Xorg.0.log
[   223.313]
X.Org X Server 1.18.4
Release Date: 2016-07-19
[   223.314] X Protocol Version 11, Revision 0
[   223.314] Build Operating System: FreeBSD 11.2-RELEASE-p9 arm
[   223.315] Current Operating System: FreeBSD rpi-b 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 12:24:52 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/RPI-B arm
[   223.319] Build Date: 23 March 2019  02:39:30AM
[   223.319] 
[   223.319] Current version of pixman: 0.34.0
[   223.320]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   223.320] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   223.323] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Apr  2 03:58:27 2019
[   223.325] (==) Using config file: "/etc/X11/xorg.conf"
[   223.326] (==) No Layout section.  Using the first Screen section.
[   223.327] (**) |-->Screen "Screen" (0)
[   223.327] (**) |   |-->Monitor "Monitor"
[   223.329] (**) |   |-->Device "Generic FB"
[   223.330] (==) Automatically adding devices
[   223.330] (==) Automatically enabling devices
[   223.330] (==) Not automatically adding GPU devices
[   223.330] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   223.333] (==) FontPath set to:
    /usr/local/share/fonts/misc/,
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    /usr/local/share/fonts/Type1/,
    /usr/local/share/fonts/100dpi/,
    /usr/local/share/fonts/75dpi/
[   223.333] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   223.333] (II) The server relies on devd to provide the list of input devices.
    If no devices become available, reconfigure devd or disable AutoAddDevices.
[   223.334] (II) Loader magic: 0x20549c
[   223.334] (II) Module ABI versions:
[   223.334]     X.Org ANSI C Emulation: 0.4
[   223.334]     X.Org Video Driver: 20.0
[   223.334]     X.Org XInput driver : 22.1
[   223.335]     X.Org Server Extension : 9.0
[   223.336] (II) LoadModule: "glx"
[   223.339] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   223.411] (II) Module glx: vendor="X.Org Foundation"
[   223.411]     compiled for 1.18.4, module version = 1.0.0
[   223.412]     ABI class: X.Org Server Extension, version 9.0
[   223.412] (==) AIGLX enabled
[   223.412] (II) LoadModule: "scfb"
[   223.414] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[   223.416] (II) Module scfb: vendor="X.Org Foundation"
[   223.416]     compiled for 1.18.4, module version = 0.0.4
[   223.417]     ABI class: X.Org Video Driver, version 20.0
[   223.417] (II) scfb: driver for wsdisplay framebuffer: scfb
[   223.419] (--) Using syscons driver with X support (version 2.0)
[   223.419] (--) using VT number 2

[   223.420] (WW) Falling back to old probe method for scfb
[   223.420] scfb trace: probe start
[   223.421] (II) scfb(0): using default device
[   223.421] scfb trace: probe done
[   223.422] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   223.422] scfb: PreInit 0
[   223.423] (II) scfb(0): Using: depth (24),    width (640),     height (480)
[   223.423] (EE) scfb(0): specified depth (16) or bpp (16) doesn't match framebuffer depth (24)
[   223.424] (II) UnloadModule: "scfb"
[   223.424] (EE) Screen(s) found, but none have a usable configuration.
[   223.424] (EE)
Fatal server error:
[   223.425] (EE) no screens found(EE)
[   223.426] (EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.
[   223.426] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   223.427] (EE)
[   223.429] (EE) Server terminated with error (1). Closing log file.
root@rpi-b:/var/log #
```


----------



## SirDice (Apr 3, 2019)

robbo007 said:


> mmm Xorg looks in /etc/xorg.conf on my install.


Xorg looks in a number of locations, doesn't mean this is the correct one on FreeBSD though. Move it to /usr/local/etc/X11/xorg.conf so it's at a known and expected location.


----------



## robbo007 (Apr 3, 2019)

Using this hack in the config.txt seems to force the X11 resolution too:






						R-Pi configuration file - eLinux.org
					






					elinux.org
				




# Uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

Thanks for all your help everyone.


----------

