How to set HDMI output resolution with FBDEV on Beaglebone Black?

However, I didn’t succeed yet in setting the same resolution as before.

System information: version.txt (3,1 Ko)

# /etc/fb.modes
# Only entry:
mode "960x540-70"
    # PCLK: 48.55 MHz, H: 39.41 kHz, V: 70.00 Hz
    geometry 960 540 960 540 32
    timings 20596 136 40 19 1 96 3
    hsync low
    vsync high

Without changing settings, after startup, resolution ix 1280x1024 and the fbset output (no parameters) is:

mode "1280x1024"
    geometry 1280 1024 1280 1024 16
    timings 0 0 0 0 0 0 0
    accel true
    rgba 5/11,6/5,5/0,0/0
# output from fbset command:
mode "960x540"
    geometry 960 540 950 540 16
    timings 0 36 40 17 3 96 5
    vsync high
    accel true
    rgba 5/11,6/5,5/0,0/0

Due to fbset command applied (timings are different):

fbset -fb /dev/fb0 -g 960 540 950 540 16 -t 20000 36 40 17 3 96 5 -vsync high -hsync low

After updating /etc/X11/xorg.conf to:

Section "Monitor"
        Identifier      "Builtin Default Monitor"

Section "Device"
        Identifier      "Builtin Default fbdev Device 0"
        Driver          "fbdev"
Section "Screen"
        Identifier      "Builtin Default fbdev Screen 0"
        Device          "Builtin Default fbdev Device 0"
        Monitor         "Builtin Default Monitor"

        SubSection "Display"
		Modes         "960x540" 
		Depth         16
		Virtual       960 540
Section "ServerLayout"
        Identifier      "Builtin Default Layout"
        Screen          "Builtin Default fbdev Screen 0"


I checked the contents of /sys/class

 for i in /sys/class/graphics/fb0/* ; do echo $i ; cat $i 2>/dev/null ; done
DRM emulated

As I saw two modes listed, I did the following without success:

 echo U:960x540d-0 > mode

So currently I have the following output, I would need that the display resolution is set the same as the active part (virtual_size of 960x540):


Thanks in advance for hints on fixing that.

(Note: this is a follow up on How to fix No HDMI output with 4.19.94-ti-r42, crash on mouse move with 4.19.94-ti-r71 where the resolution had me move from modeset to fbdev).

Hi @yna there is an example on forcing a specific resolution in /boot/uEnv.txt


Thanks, I updated the startup line and it’s fine.

cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet quiet video=HDMI-A-1:960x540@70e

I didn’t pay much attention to this in uEnv.txt as it said “in the event of edid real failures” and also because I expected this to be modifiable after boot.

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

The legacy fbdev (/dev/fb0) still exists for backwards compatibility and because fbcon depends on it, but for userspace use it’s been long deprecated. Things like modesetting (changing the resolution) and multiple framebuffers (for double-buffering) are only supported via drm (/dev/dri/by-path/platform-4830e000.lcdc-card), in particular the newer atomic modesetting and “dumb buffer” APIs.

1 Like

(The X11 video driver for this is called “modesetting”)

I’m completely new, but I was wondering whether you could explain how your comment relates to @RobertCNelson 's comment in

The the modesettting driver has a long history of hard locking the am335x when used… The system would hardlock, nothing would work… Serial, etc ends up just dead

Shall one use “fbdev” or “modesetting” in Xorg.conf? And how to decide?

Dunno, I don’t use X11 on beaglebones. It seems strange to me if the primary graphics API is really that broken on the am335x, and I’ve not personally encountered any freezes while using Qt5’s eglfs backend on beaglebones (which also uses drm).

I have to confirm that using modesetting in xorg.conf seem to hardlock the device.

I had just managed to switch from ‘fbdev’ to ‘modesetting’ and everything froze after a couple of seconds of moving the mouse on the screen.