Skip to content

Commit 5fe6981

Browse files
How to change the video resolution (#1002)
* How to change the video resolution Provide code showing how to change video resolution when Portenta X8 is plugged into an external monitor/display * Small fix on "real time" to "a real time clock" --------- Co-authored-by: Julián Caro Linares <j.carolinares@arduino.cc>
1 parent 3e669ed commit 5fe6981

File tree

1 file changed

+23
-2
lines changed
  • content/hardware/04.pro/boards/portenta-x8/tutorials/11.display-output-webgl

1 file changed

+23
-2
lines changed

content/hardware/04.pro/boards/portenta-x8/tutorials/11.display-output-webgl/content.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,35 @@ Now we need a USB Hub that has an available video output connector, for example,
143143

144144
![X8 usb hub setup](assets/portentaX8_hub_screen.svg)
145145

146-
***As a reference, a list of validated USB-C® to HDMI hubs that you can use are: [ACT AC7022](https://www.act-connectivity.com/en-us/usb-c-to-hdmi-multiport-adapter-4k-usb-hub-pd-pass-ac7022), [ACT AC7041](https://www.act-connectivity.com/en-us/usb-c-to-hdmi-multiport-adapter-with-ethernet-ac7041), [ACT AC7042](https://www.act-connectivity.com/en-us/usb-c-to-hdmi-multiport-adapter-with-ethernet-and-ac7042)***
146+
***As a reference, a list of validated USB-C® to HDMI hubs that you can use are: [TPX00145](https://store.arduino.cc/products/usb-c-to-hdmi-multiport-adapter-with-ethernet-and-usb-hub) and [TPX00146](https://store.arduino.cc/products/usb-c-to-hdmi-multiport-adapter-4k-usb-hub-pd-pass-through).***
147147

148-
By default, if you connect the board to a display, you will see the "home screen" with the `Arduino PRO` background wallpaper, and a bottom bar with real-time.
148+
By default, if you connect the board to a display, you will see the "home screen" with the `Arduino PRO` background wallpaper, and a bottom bar with a real-time clock.
149149

150150
***You can interact with the interface by plugging USB devices into your hub, like a mouse or a keyboard.***
151151

152152
![X8 home-screen](assets/portentaX8-home-screen.png)
153153

154+
If you need to change the resolution of your display/monitor to improve the video output quality, you need to add a specific resolution to the configuration file of the graphical server (Weston on Portenta X8). To do so, you need to generate the right **Modeline**, i.e. a row that specifies a custom mode for the graphical interface to correctly drive the display.
155+
156+
In the next steps, we provide an example of a 1600 x 758 display running at 60Hz. If you need to modify the modeline and generate a new one, you can use `cvt` command, which is already installed in the Linux image running on your Portenta X8 (see [here](https://wiki.ubuntu.com/X/Config/Resolution#Adding_undetected_resolutions) to get more information).
157+
158+
To get started in modifying the resolution of your display, connect to your Portenta X8 through ADB (check [this link](https://docs.arduino.cc/tutorials/portenta-x8/user-manual#working-with-linux) to learn how to do it).
159+
160+
At this point, you are ready to modify the `/etc/xdg/weston/weston.ini` file with `Vim` command as follows:
161+
162+
```arduino
163+
sudo vim /etc/xdg/weston/weston.ini
164+
```
165+
166+
You can now add the following lines to the `weston.ini` file:
167+
168+
```arduino
169+
[output]
170+
name=DP-1
171+
mode=98.00 1600 1680 1840 2080 758 761 771 787 -hsync +vsync
172+
```
173+
Save the file and exit. To see the changes in place, you have to reboot your Portenta X8 by using the command `sudo systemctl reboot`. When the board gets started again, you will be able to see your display with the right resolution.
174+
154175
### Running The Container
155176

156177
If you obtained the container from **Foundries.io**, it will run automatically after a few seconds.

0 commit comments

Comments
 (0)