Hi,
How can I set frame buffer default or max resolution in multi-user boot mode (no graphics)? I figured I can do it with framebuffer after device is booted, but not when it is booting.
I tried looking into kernel parameters, but with no success. I extracted dts files inspired by this thread, but I could not find any documentation about it therefore I dropped the idea.
extracted.dts.zip (66.6 KB)
I tried also changing boot parameters (or deleting APPEND part) in /boot/extlinux/extlinux.conf with no success. When APPEND part was deleted kernel still booted with a bunch of default parameters.
Currently to I’m. using:
#!/usr/bin/env bash
echo 4 >/sys/class/graphics/fb0/blank # TURN SCREEN OFF
echo "D:1920x1080p-60" > /sys/class/graphics/fb0/mode # SET RESOLUTION
echo -e '\033[9;0]' > /dev/tty1 # DISABLE SLEEP
echo 0 > /sys/class/graphics/fb0/blank # TUNR SCREEN ON
Setup:
Jetson tx2 with 4.9.140-tegra.
My /proc/cmdline:
console=ttyS0,115200 androidboot.presilicon=true
firmware_class.path=/etc/firmware root=/dev/mmcblk0p1 rw rootwait
rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0
net.ifnames=0 isolcpus=1-2 video=tegrafb no_console_suspend=1
earlycon=uart8250,mmio32,0x3100000 nvdumper_reserved=0x2772e0000
gpt tegra_fbmem2=0x800000@0x9607d000 lut_mem2=0x2008@0x9607a000
tegra_fbmem3=0x800000@0x96882000 lut_mem3=0x2008@0x9687f000
usbcore.old_scheme_first=1 tegraid=18.1.2.0.0 maxcpus=6 boot.slot_suffix=
boot.ratchetvalues=0.2031647.1 bl_prof_dataptr=0x10000@0x275840000
sdhci_tegra.en_boot_part_access=1
Cheers
Hi,
It is normal because the driver wants to give you the best resolution it can support.
If lacking of display manager (GUI), then the mode you set is not able to be recorded so each reboot/hotplug will set it back.
Currently my solution is to poll the /sys/class/graphics/fb0/mode file for changes and when that happens set my desired resolution and frame rate. Is there some other way where I could lock in to specific resolution? I don’t need to change resolution at all.
Can you please elaborate on the mode you set is not able to be recorded
.
How can I set frame buffer default or max resolution in multi-user boot mode (no graphics)?
Because you said there is no GUI here, what you are using is called framebuffer console. And fb console is not able to record the display mode you once set as “display setting” in GUI.
Also, how to configure the display console depends on the driver of each platform. Thus, using some methods from x86 ubuntu may not help here because tegra display controller driver does not support them.
You can try to use some generic API/tool for your case so that no need to change resolution through the sysfs.
For example, you can try to use fbset.
https://manpages.debian.org/stretch/fbset/fbset.1.en.html
Yeah, I tried using that, but display image is distorted. Therefore I’m just writing in fb0/mode file “1920x1080p60” and it works. If I use fbset It is repeating image multiple times on the screen and I can see on the display settings it has failed to negotiate resolution and frame rate.
Command: fbset -fb /dev/fb0 -g 1920 1080 1920 1080 32 --timings 6734 148 88 36 4 44 5 -pixclock 6734
Output:
mode "1920x1080-60"
# D: 148.500 MHz, H: 67.500 kHz, V: 60.000 Hz
geometry 1920 1080 1920 1080 32
timings 6734 148 88 36 4 44 5
hsync high
vsync high
nonstd 1
accel true
rgba 8/16,8/8,8/0,8/24
endmode
When using the bash script provided earlier I get:
mode "1920x1080-60"
# D: 148.500 MHz, H: 67.500 kHz, V: 60.000 Hz
geometry 1920 1080 1920 1080 32
timings 6734 148 88 36 4 44 5
hsync high
vsync high
nonstd 1
accel true
rgba 8/16,8/8,8/0,8/24
endmode
Both are exactly the same. Bash scripts provides desired output, fbset fails provide desired output.
And none of these records the screen resolution.
When GUI is used, how does it records the settings for the user/screen/output port? Perhaps I could simulate something like that. I would be happy if you just pointed me to the right direction.
Hi,
Sorry that I don’t know how gnome desktop saves these parameters.
As for your latest comment here, please note that tegra does not accept a mode created from userspace and only want the modes from edid or dts. Thus, I guess fbset is trying to add a new mode and get rejected by driver.