4KDisplays
Notes on using DragonFly with 4K displays
4K display output is 3840x2160 and is well supported on Haswell or later cpus and discrete GPUs manufactured in 2014 or later. If the hardware supports it, DragonFly supports it, but there are a number of gotchas you have to look out for.
The main issue is that you are pushing 4x the number of pixels, requiring 4x the horsepower for the same perceived performance. 4K monitor output is beautiful but it comes at a cost.
HDMI ports generally only support 4K resolutions at 30Hz. A 30Hz refresh introduces a small but noticeable lag and also limits video playback. This has changed with newer CPUs. Kabylake and later can generally support dual 4K at 60Hz over HDMI, but note that HDMI cables have to be up to the latest spec and KVM switches cannot typically switch 4K at 60 Hz. If you get drop-outs, try using the xrandr program to reduce the refresh to 30 Hz.
The newer HDMI and Display Port connectors can generally support 4K at 60Hz. Also note that notebook cpus might not support 4K at 60Hz. I found that my BRIX supports 4K at 30Hz on the HDMI port and does not support 4K at all on the display port (probably a BIOS bug because it should at least be able to do 4K at 30 Hz on the display port). My Kabylake NUC, on the otherhand, supports 4K over HDMI and DP1.2 (via USB-C) just fine.
The computing and GPU horsepower required to drive a 4K monitor is quadrupled.
Not all hardware MP4 acceleration can handle a 4K display. You may see video tearing and lower frame rates full-screen.
Numerous GUI features in applications often wind up being too small. 'xpdf' is a great example.
Most new machines (haswell, broadwell, later) are at least dual-head and can typically drive two 4K monitors. Atom cpus are not generally able to drive 4K monitors at full resolution.
Full screen video playback is likely to have frame rate issues, though generally I can get ~20-30 fps in my own tests with a low-end desktop-Haswell (3.4GHz) or Mobile-medium-end-Broadwell (2.2GHz) or later. Video from firefox is more likely to have issues, video from an application like 'mpv' is less likely to have issues. Chrome seems to fare better.
DragonFly suggestions
Be sure to use the appropriate driver. For DragonFly, Xorg should auto-probe the driver automatically as long as it is installed and both intel native and radeon is well supported. All is lost if you are forced to back-off to the VESA driver (performance will be horrid in that case).
For Intel chipsets you should start by trying the default settings. Do not override the renderer. DragonFly supports full acceleration for most chipsets and as of August 2015 we will support full accel on Broadwell as well (at the moment accel has to be turned off but you still get the advantage of a modern non-VESA frame buffer & direct rendering). We also support accel post-Broadwell (Skylake, Kabylake).
Our AMD GPU support is not so good right now.
Depending on your cpu and gpu horsepower, with 4K monitors you can then experiment with options such as disabling TripleBuffer and SwapbufferWait.
Option "ReprobeOutputs" "TRUE" Option "TripleBuffer" "FALSE" Option "SwapbuffersWait" "FALSE"
You can cleanup Firefox's menus with the 'lxappearance' application. Install it from dports with 'pkg install lxapperance'. For Chrome you can supply the option '--force-device-scale-factor=1.5' to scale the UI properly.
You may need to accelerate your mouse. For example, with 'xset m 2 1', or other accel values.
Before you mess with font sizes, your existing defaults may be suitable if you set the DPI properly. The only way to do this reliably is to run an xrandr command in your .xinitrc. I measured my 28" 4K monitor and wound up using:
xrandr --fbmm 622x342
Some machine BIOSes go into a graphics mode when you enter the BIOS SETUP. Not all 4K monitors will support the graphics mode and will show a blank screen. Have a cheap lower-res monitor handy if this is the case for you.
Our graphical system console now autoscales the default # of columns. You may wish to enable the graphical console to allow console switching while in X, which you can do with a configuration variable in your "/boot/loader.conf" file.
kern.kms_console=1 #kern.kms_columns=N - you can set the columns specifically if desired
Remember that you can use the 'xrandr' program to adjust mode settings, mirroring, and relative monitor placement. In the worst case situation you can downgrade your output on one or both of your monitors.