Is there any way to force use RPi5 HDMI 1 instead of HDMI 0?

Hi
I use Waveshare 5.5 AMOLED connect to RPi5 HDMI 0 by it’s small conncetor.
Sometimes I wish to output to my 1080P TV by HDMI 1,
but the screen is rotated and over-scaled.

Is there any way to force Volumio / Touch Display plugin output to HDMI 1 ( when HDMI 0 still connect to Waveshare screen ) ?

Thank you !

Did you already try editing the /boot/config.txt at the root of your sd card ?
I am no export since I used that only a few times to solve specific issues I had.

But you can find the documentation on Raspberry’s site

Before install Touch Display plugin, I can see “TEXT” on both HDMI screen :
HDMI 0 = 5.5 inch AMOLED screen with “portrait” text ( show IP address…etc )
HDMI 1 = 1080P TV with “landscape” text

After install Touch Display plugin,
I can see Volumio WebUI on HDMI 0 ( 5.5 inch screen, portrait mode ),
but HDMI 1 ( TV ) become black.

If I set Touch Display “Orientation Setting” to rotate 90 degree,
HDMI 0 ( 5.5 inch screeen ) become landscape mode,
HDMI 1 had portrait webUI image, but over-scaled.

I tried add hdmi_primary=1 to /boot/userconfig.txt

  • sets HDMI port 2 (labeled as HDMI1) as the primary display.

but no effect.

I think maybe I need to modify Touch Display plugin to force it output correct resolution
to HDMI 1, but I don’t know how to.

Or there is a command to force to use “mirror” mode of HDMI 0 and 1 with the same resolution ?

Thank you.

Hey @dewen,

Forcing Touch Display Plugin to Use HDMI 0 and 1 on Volumio (RPi 5)

Understanding Volumio’s Limitations

Volumio is designed primarily as a music player for a wide range of Single Board Computers (SBCs), some with as little as 256MB RAM, rather than a fully functional desktop environment. While the Raspberry Pi 5 is powerful enough to support multiple displays and graphical modifications, we must be mindful that such configurations may not work across all Volumio-supported devices.

Additionally, Volumio updates (OTA) will overwrite these changes, and there is no guarantee that future updates will maintain this configuration. You may need to reapply these settings after every update.


@gvolt - Please review for accuracy with the Touch Plugin.

Forcing HDMI 1 for Touch Display Plugin on Raspberry Pi 5

By default, the Touch Display plugin outputs to HDMI 0. If you wish to use HDMI 1 instead (e.g., for a 1080p TV), follow these steps.

1. Check Available HDMI Ports

Run the following command to check which HDMI ports are active:

cat /sys/class/drm/card0-HDMI-A-*/status

This will return:

  • connected → Active HDMI port
  • disconnected → Inactive HDMI port

For Raspberry Pi 5:

  • HDMI 0: /sys/class/drm/card0-HDMI-A-1/status
  • HDMI 1: /sys/class/drm/card0-HDMI-A-2/status

2. Modify Touch Display Plugin Startup Script

Since the Touch Display plugin uses xrandr to set display output, you need to edit its startup script:

nano /opt/volumiokiosk.sh

Find this line (this is only example):

xrandr --output HDMI-1 --primary --mode 1920x1080 --rotate normal

Change it to (you will need update with your screen’s resolution):

xrandr --output HDMI-2 --primary --mode 1920x1080 --rotate normal

Save and exit (CTRL+X, then Y, then Enter).


3. Modify /boot/userconfig.txt for Persistent HDMI Settings

Since config.txt is overwritten by Volumio updates, make changes in /boot/userconfig.txt instead:

nano /boot/userconfig.txt

Add the following lines:

hdmi_force_hotplug:0=1
hdmi_force_hotplug:1=1
display_default_lcd=0

This ensures that both HDMI ports are active.

For rotation and scaling issues on the TV:

hdmi_group=2
hdmi_mode=82  # 1080p @ 60Hz
hdmi_drive=2
display_rotate=0

For 180-degree rotation:

xrandr --output HDMI-2 --rotate inverted

4. Restart Volumio

Apply the changes by rebooting:

reboot

Alternative: Using Both Displays

If you want to use both screens:

  • Mirror HDMI 0 to HDMI 1:
    xrandr --output HDMI-2 --same-as HDMI-1 --scale 1.5x1.5
    
  • Extend HDMI 0 to HDMI 1:
    xrandr --output HDMI-2 --right-of HDMI-1 --mode 1920x1080
    

Final Notes

  • These changes will be overwritten by OTA updates or Plugin upgrades, so you may need to reapply them after updating Volumio or enabling/disabling plugin.
  • Some SBCs may not support these modifications, as Volumio prioritizes lightweight playback over graphical enhancements.
1 Like

/opt/volumiokiosk.sh does not contain a line containing xrandr :wink:

The Touch Display Plugin already rotates all connected displays (in the same way).

So…Is there any way to show the plugin Touch Display in both screens?
I’m able to see the login screen when I connect two screens in both of them but, as soon I activate the plugin, only one output is shown, the other is black.
Best regards

Hey @Kuentin,

The Touch Display plugin is meant to show Volumio UI on the default screen only. You can modify plugin to your needs.

There is nothing preventing our community members to create the Multi-Touch Multi-Display plugin. Personally - I do encourage such initiatives.

I am confident that our plugin guru @gvolt will extend help to such interesting project.

Kind Regards,

1 Like

Hi @nerd

Sorry for the late reply; it’s been busy these days.
I tried the command (I needed to change card0 to card1):

cat /sys/class/drm/card1-HDMI-A-*/status

It shows that HDMI-A-1 and HDMI-A-2 are connected.
However, when I run the xrandr command, e.g.,

xrandr --output HDMI-1 --primary --mode 1920x1080 --rotate normal

I get the error: Can’t open display

Is there something I need to check?

BTW, I use @2aCD Install_amoled_EDID script to rotate the screen, when I type

xrandr --display :0 -o left

in the putty ssh, it seems working and rotate the screen upside down.

Thank you!

Does

xrandr --display :0 --output HDMI-1 --primary --mode 1920x1080 --rotate normal

work?

Yes !!! It’s working, thanks a lot !!!
The mirror command also works. Now it output to both screen.
For autostart, add the command by
sudo nano /opt/volumiokiosk.sh
so it can autostart.

xrandr --display :0 --output HDMI-2 --same-as HDMI-1 --scale 1x1

I will tried it later when I have more time,
Hope I can run Now Playing or Volumio UI in HDMI-1, and Peppymeter on HDMI-2.
Will report if success, thank you !

1 Like

BTW - can you only use the same resolution on both HDMI outputs? Right?

HDMI-1 : AMOLED 5,5 inch display, 1080x1920 resolution with screen rotate to right

xrandr --display :0 --output HDMI-1 --primary --mode 1080x1920 --rotate right

HDMI-2 : iPad + USB capture card, 1920x1080 resolution

xrandr --display :0 --output HDMI-2 --primary --mode 1920x1080 --rotate normal

If I use 1080x1920 in HDMI-2 ( iPad ),
or 1920x1080 in HDMI-1 ( waveshare display )
it will show “cannot find mode 1080x1920”

volumio@volumio:~$ xrandr --display :0 --output HDMI-2 --primary --mode 1080x1920 --rotate right
xrandr: cannot find mode 1080x1920

xrandr --display :0 --output HDMI-1 --primary --mode 1920x1080 --rotate normal
xrandr: cannot find mode 1920x1080