Setting display resolution for wide touchscreen

I have read a lot of your articles, but I am only more confused at a new level…

Simple question: In order to change display resolution on the Linux system, do I need to recompile anything, e.g. U-Boot ?

Or is there one text based config file I can change ?? I have looked at /etc/X11/x-server-common where there are many lines with " -screen 480x640" and I have tried to change to " -screen 480x800" but no luck…

Thank you.

hi @JohnnyPaycheck

Could you provide the version of the hardware and software of your module?

Simple question: In order to change display resolution on the Linux system, do I need to recompile anything, e.g. U-Boot ?

Well, this depends on the type of screen and the interface you are using to connect the screen for display and touch device. In our articles, we have written about the displays we have tested successfully and the ones we are selling, we listed them in the device tree. So if you want to have proper working solution during uboot, then the best idea is to put the correct settings in the device tree and uboot settings. If you just need a correct setting during linux, you can use tools like xrandr to setup the resolution you want.

Or is there one text based config file I can change ??

Yeah, this is called Device Tree Blob.

I have looked at /etc/X11/x-server-common where there are many lines with " -screen 480x640" and I have tried to change to " -screen 480x800" but no luck.

Could you share a dmesg log?

Thanks and best regards, Jaski

Hi, thanks for your reply.
I have been Googling and playing with xrandr, which I really hoped was enough to fix my problem - but following “recipes” like this hasn’t worked for me:

gtf 800 480 60 
xrandr --newmode "800x480_60.00"  29.58  800 816 896 992  480 481 484 497  -HSync +Vsync
xrandr --addmode VGA1 800x480_60.00
xrandr --output VGA1 --mode 800x480_60.00

It’s the output device that is not correct. I have tried xrand --listmonitors which display the line:

Monitors:  1
0:  +DISP3 BG 640/169x480/127+0+0  DISP3 BG
xrandr --addmode DISP3 800x480_60.00
=> cannot find output "DISP3" 800x480_60.00
xrandr --addmode +DISP3 800x480_60.00
=> cannot find output "+DISP3" 800x480_60.00
xrandr --addmode BG 800x480_60.00
=> cannot find output "BG"

Is there a command to reveal versions of HW and SW ? Some info is flashing by on the screen during boot…

I have been Googling and playing with xrandr, which I really hoped was enough to fix my problem - but following “recipes” like this hasn’t worked for me

Could you give some details about the display you are trying to connect (interface, datasheet, …)?

Is there a command to reveal versions of HW and SW ? Some info is flashing by on the screen during boot…

HW version is printed on the module and software version can be revealed by the command uname -r.

The board is a Toradex Colibri iMX6.
The display is a 7" RGB 24 bit 800x480 pixel.

uname -r
4.1.44-2.7.4+gb1555bf

Do you have any idea why xrandr --listmonitors gives the output line
+DISP3 BG 640/169x480/127+0+0 DISP3 BG

and still says “Cannot find output” when trying to use the name(s) ?

Could you provide a datasheet of your display? A connection schematic will be also helpful. Thanks.

Hi again, here I have dmesg log, and specs for the screen.
Info: when using Win CE instead of Linux, a simple registry change is all that is needed to change to 800x480 pixel resol.
link text

dmesg.log

Schematicslink text

Hi again,

Just to emphasize: When using Win CE7 on the carrier board with Colibri IMX6 I can easily change resolution to 800x480 - so my Linux problem is not HW related.

I am really sorry that @jaski.tx was unable to get you on the right track. Let me try to emphasise a few points.

I have read a lot of your articles, but I am only more confused at a new level…

I assume you also had a look at the following article on our developer website which should really cover it all nicely:

https://developer.toradex.com/knowledge-base/display-output-resolution-and-timings-linux

Simple question: In order to change display resolution on the Linux system, do I need to recompile anything, e.g. U-Boot ?

No, usually this is not required. However, ultimately this may depend on your particular display in question and how it physically is connected.

Or is there one text based config file I can change ??

No, in most cases it is enough to adjust the vidargs e.g. from within U-Boot.

I have looked at /etc/X11/x-server-common where there are many lines with " -screen 480x640" and I have tried to change to " -screen 480x800" but no luck…

I have not heard of that file before but do also not think that it helps you in any way solving your issue.

Well, this depends on the type of screen and the interface you are using to connect the screen for display and touch device. In our articles, we have written about the displays we have tested successfully and the ones we are selling, we listed them in the device tree.

Actually, for the Colibri iMX6 this is not quite true as it only features parallel RGB as well as DVI-D aka HDMI. The former may be configured via vidargs and the later will do DDC/EDID by default.

So if you want to have proper working solution during uboot, then the best idea is to put the correct settings in the device tree and uboot settings.

During U-Boot that would be a completely different story but usually, no frame buffer in the boot loader is required. As for the device tree that is really rarely required.

If you just need a correct setting during linux, you can use tools like xrandr to setup the resolution you want.

No, xrandr may only be used to select between available DVI-D aka HDMI resolutions which previously got negotiated using DDC/EDID. Any other use of xrandr is usually not adviced.

Is there a command to reveal versions of HW and SW ? Some info is flashing by on the screen during boot…

HW:

root@colibri-imx6:~# cat /proc/device-tree/toradex,product-id; echo
0017
root@colibri-imx6:~# cat /proc/device-tree/toradex,board-rev; echo
V1.1A

SW: cat /etc/issue

I would really assume that just setting vidargs within U-Boot as follows should get you going:

Colibri iMX6 # setenv vidargs video=mxcfb0:dev=lcd,800x480M@60,if=RGB666 video=mxcfb1:off fbmem=8M

Thanks for your reply. I will try this ASAP.

You are very welcome. Do let us know how it went and whether or not you have any further questions or comments on this or other topics.

I am unfortunately still stuck… After reading a bit more in your “Getting started” section, I concluded that I need to be in the “Debug - Serial-to-USB” screen using a terminal program ?
But whatever I do pressing “anykey” during boot, it ignores that…
A line from the boot process says:
"Hit any key to stop autoboot: 0 " I assume the zero means interruption is disabled ??

How and where can I run the “setenv vidargs…” command ?

Just 10 mins after posting “cannot interrupt boot” above, I found an article that explained, that “setenv” doesn’t come compiled, but maybe “fw_setenv” did - and it did !

So I ran “fw_setenv vidargs video=mxcfb0:dev=lcd,800x480M@60,if=RGB666 video=mxcfb1:off fbmem=8M” and it seems to work - even after a reboot.

I did have an error msg. about “Bad CRC - using default environment” - but it disappeared after the above command ?

Thanks for your reply. I will try this ASAP.

And one more question: the linux doesn’t have apt or apt-get commands.
How do I update e.g. the Firefox browser ?

So is everything working now?

Not everything. We still need to find the way to backup the setup - I think by entering some maintenance menu and find the way to dump the entire flash content.
And I still cannot interrupt the booting. A line from the boot process says:
“Hit any key to stop autoboot: 0” I assume the zero means interruption is disabled ??

And how can I update e.g. Firefox ? There is no “apt” or “apt-get” commands ?

Thank you for your help.

Just 10 mins after posting “cannot interrupt boot” above, I found an article that explained, that “setenv” doesn’t come compiled, but maybe “fw_setenv” did - and it did !

While setenv is the command built-in to U-Boot to alter its environment fw_setenv is the Linux user space command to do the same.

So I ran “fw_setenv vidargs video=mxcfb0:dev=lcd,800x480M@60,if=RGB666 video=mxcfb1:off fbmem=8M” and it seems to work - even after a reboot.

And I assume the display works properly now, correct?

I did have an error msg. about “Bad CRC - using default environment” - but it disappeared after the above command ?

Yes, that warning message just indicates that no environment has ever been stored and it just falls back to the compiled-in default. Once you invoke setenv resp. fw_setenv which stores a custom setting this message disappears.