If you own a SoC (System-on-a-chip) named Banana Pro, you might face the issue that most Linux distros available for this board do not respect the display resolution that you set in the uEnv.txt file. Especially in case you are using some HDMI -> VGA converter, this resolution-related issue can be expected. Here is a working solution to fix it.
# mount /dev/mmcblk0p1 /mnt # nano /mnt/uEnv.txt
Then you can set the desired resolution in the bootargs line by changing the disp.screen0.output_mode part to something like this:
This means that the display resolution should be set to 1920x1080 and 60Hz at the next boot.
However, as I mentioned above, this has no effect. In case the described sequence does not work for you, here is another solution.
- List all the available display modes for your board. This can be done with the following command:
# cat /sys/class/graphics/fb0/modes
This will give you an idea which resolution can be set.
- Now, set the desired resolution with the following command:
# echo "V:1024x768p-60" > /sys/class/graphics/fb0/mode
Here I am assuming that you got the value V:1024x768p-60 from the list of modes you saw in the previous step.
- Now, install the fbset tool. The command can be different depending on the distro you installed on Banana Pro. For instance, for Arch Linux use the following command:
# pacman -S fbset
- Run fbset without parameters. It will produce some output like this:
- Make sure that it matches the current resolution you set with the "echo" command. Now run the following command:
# fbset >> /etc/fb.modes
- Open the /etc/fb.modes file with any text editor (you can use something like nano). Go to the end of the file.
- There you will find the current mode. Rename the section to something like "mymode" and remove the rgba line. Before:After:
- Now, you can type the following command at any time to set the current resolution:
# fbset mymode
This will switch the display resolution for the console framebuffer.
Now, to change the Banana Pro display resolution automatically on every boot, you can do the following:
- If your distro (Bananian, for example) does not come with the systemd init manager, add the fbset mymode command to the end of the /etc/rc.local file.
- If you are using systemd (e.g. when you are using Arch Linux), create a new *.service file, i.e. display.service and put it in the following location:
- Add the following content to the display.service file:
[Unit] Description=Display resolution After=local-fs.target DefaultDependencies=no [Service] Type=simple ExecStart=/usr/bin/fbset mymode [Install] WantedBy=multi-user.target
After that, you need to enable the unit:
# systemctl enable display.service
That's it. Now, at every boot, your Banana Pro board will set the required display resolution automatically.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!