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
endmode

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
endmode
# 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
endm

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:

#/etc/X11/xorg.conf
Section "Monitor"
        Identifier      "Builtin Default Monitor"


EndSection
Section "Device"
        Identifier      "Builtin Default fbdev Device 0"
        Driver          "fbdev"
EndSection
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
	EndSubSection
EndSection
Section "ServerLayout"
        Identifier      "Builtin Default Layout"
        Screen          "Builtin Default fbdev Screen 0"
EndSection

my

I checked the contents of /sys/class

 for i in /sys/class/graphics/fb0/* ; do echo $i ; cat $i 2>/dev/null ; done
/sys/class/graphics/fb0/bits_per_pixel
16
/sys/class/graphics/fb0/bl_curve
/sys/class/graphics/fb0/blank
/sys/class/graphics/fb0/console
/sys/class/graphics/fb0/cursor
/sys/class/graphics/fb0/dev
29:0
/sys/class/graphics/fb0/device
/sys/class/graphics/fb0/mode
/sys/class/graphics/fb0/modes
U:960x540d-0
U:1280x1024p-0
/sys/class/graphics/fb0/name
DRM emulated
/sys/class/graphics/fb0/pan
0,0
/sys/class/graphics/fb0/power
/sys/class/graphics/fb0/rotate
0
/sys/class/graphics/fb0/state
0
/sys/class/graphics/fb0/stride
2560
/sys/class/graphics/fb0/subsystem
/sys/class/graphics/fb0/uevent
MAJOR=29
MINOR=0
DEVNAME=fb0
/sys/class/graphics/fb0/virtual_size
960,540

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):

image

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

Regards,

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 https://forum.beagleboard.org/t/how-to-fix-no-hdmi-output-with-4-19-94-ti-r42-crash-on-mouse-move-with-4-19-94-ti-r71/31520/9:

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.