knute
Posts: 885
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas

How to get HDMI output on so I can set screen size without monitor

Sat Dec 04, 2021 3:41 am

PI3B+ Current Bullseye KMS No monitor. How do I get it out of composite mode and into HDMI and then how do I get it to 1920x1080 so when I connect with VNC I get a 1920x1080 desktop? I tried every combination I could think of with hdmi_force_hotplug, hdmi_group and hdmi_mode.

W. H. Heydt
Posts: 16170
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: How to get HDMI output on so I can set screen size without monitor

Sat Dec 04, 2021 4:38 am

knute wrote:
Sat Dec 04, 2021 3:41 am
PI3B+ Current Bullseye KMS No monitor. How do I get it out of composite mode and into HDMI and then how do I get it to 1920x1080 so when I connect with VNC I get a 1920x1080 desktop? I tried every combination I could think of with hdmi_force_hotplug, hdmi_group and hdmi_mode.
Ssh into the Pi. Run "sudo raspi-config". Second item, "2 Display Options", then "D5 VNC Resolution". Within that, set the resolution you want.

User avatar
HawaiianPi
Posts: 7735
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: How to get HDMI output on so I can set screen size without monitor

Sat Dec 04, 2021 9:34 am

Make sure your OS is fully updated sudo apt update && sudo apt full-upgrade -y followed by reboot.

Add ",nocomposite" to vc4-kms-v3d in config.txt (dtoverlay=vc4-kms-v3d,nocomposite), reboot, then set the desired headless VNC resolution in Raspberry Pi Configuration (or raspi-config).

If you have already set the resolution, you may need to change it to something else, reboot and then change it back.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?

knute
Posts: 885
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas

Re: How to get HDMI output on so I can set screen size without monitor

Sat Dec 04, 2021 8:19 pm

Thanks all for the responses. I tried both techniques and the first gave me a 1920x1080 window with the desktop in the upper left corner still the same size as before. Adding the ,nocomposite and using the Raspberry Pi Configuration program worked like a charm. I had this all worked out before but everything has changed with Bullseye.

MacsandaPi
Posts: 124
Joined: Tue Dec 30, 2014 7:44 pm

Re: How to get HDMI output on so I can set screen size without monitor

Sat Dec 04, 2021 10:20 pm

My thanks to HawaiianPi, as well. I installed Bullseye on my Pi 2B today and encountered the exact same problem as described by the OP. HawaiianPi's solution worked perfectly! :D

User avatar
HawaiianPi
Posts: 7735
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: How to get HDMI output on so I can set screen size without monitor

Sun Dec 05, 2021 2:54 am

For those who are interested, the non-Pi4 models default to composite video out when no HDMI display is detected, and the old firmware stuff like hdmi_force_hotplug don't work with the new kms driver. So you have to disable composite output to get a higher resolution for VNC.

This doesn't happen with the Pi4 because it doesn't automatically enable composite output without an HDMI display (using composite output slightly reduces performance on Pi4 models, so you have to manually enable it), which is why headless VNC settings work on the Pi4.

You could try and revert to the older fkms driver in Bullseye, or you can continue to use the previous Buster release. There was an announcement that they will continue to support Buster for awhile, and it's available as an install option in RPi-Imager again.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?

knute
Posts: 885
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas

Re: How to get HDMI output on so I can set screen size without monitor

Sun Dec 05, 2021 6:01 pm

Thanks for the info on the changes with Bullseye. That's one of the frustrating things about Linux is that it is constantly changing. Bullseye in particular has had some interesting new twists.

Good looking rabbit by the way!



s/Buster/Bullseye/
Last edited by knute on Mon Dec 06, 2021 8:24 pm, edited 1 time in total.

prickett
Posts: 10
Joined: Mon Apr 30, 2018 1:42 am

Re: How to get HDMI output on so I can set screen size without monitor

Mon Dec 06, 2021 1:18 am

Thanks HawaiianPI. I tried everything people were talking about tweaking to no avail. Your solution fixed my problem.

pkkrusty
Posts: 1
Joined: Wed Dec 08, 2021 5:05 pm

Re: How to get HDMI output on so I can set screen size without monitor

Wed Dec 08, 2021 5:10 pm

HawaiianPi solved my problem. Bullseye and a Zero 2 W was giving me headaches until I found this. However, HDMI is not active, and I'm limited to the resolutions listed in the raspi-config program. Any way to choose a custom resolution?

Matha
Posts: 27
Joined: Mon Dec 17, 2012 3:22 pm

Re: How to get HDMI output on so I can set screen size without monitor

Sun Dec 12, 2021 8:05 pm

Another round of thank you to @HawaiianPi.

Did the change (delete one character) to the Buster dtoverlay statement per Bullseye documentation after the full upgrade but wonder why the ",nocomposite" append string was omitted even as an optional suggestion. QA testers don't use VNC as a test case?

No complaints about Bullseye - bleeding edge is fine as long as this forum exists. So many reproducible issues solved simply by browsing the content. Plus building again from source is always fun.

Thanks again, HawaiianPi!

Kind regards.

optimax
Posts: 3
Joined: Sat Sep 27, 2014 9:52 am

Re: How to get HDMI output on so I can set screen size without monitor

Wed Jan 19, 2022 9:07 am

Hi,
On a raspberry pi 2B, using nocomposite works fine to connect via VNC in a headless configuration. I have set the VNC resolution to 1920x1080.
However, the pi will no longer boot correctly if you subsequently DO connect an HDMI screen. No screen, no VNC connection, no ssh connection... :o The only option is to reboot with no screen connected, and then revert nocomposite config before booting again to recover HDMI screen.
So it seems that the config will accomodate either headless (with nocomposite) or HDMI (without nocomposite), but not both :(
Even if switching from screen connected to headless or vice versa does not happen every day, is there any suggestion on how to deal with this without editing config.txt every time ?

Paul-12TA
Posts: 19
Joined: Sun Jun 07, 2020 8:15 am
Location: South of U.K.

Re: How to get HDMI output on so I can set screen size without monitor

Wed Jan 19, 2022 5:23 pm

Add ",nocomposite" to vc4-kms-v3d in config.txt (dtoverlay=vc4-kms-v3d,nocomposite), reboot, then set the desired headless VNC resolution in Raspberry Pi Configuration (or raspi-config).
This worked very well for me on my new RPi Zero 2W when headless. Thank You!

User avatar
HawaiianPi
Posts: 7735
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: How to get HDMI output on so I can set screen size without monitor

Thu Jan 20, 2022 4:00 pm

pkkrusty wrote:
Wed Dec 08, 2021 5:10 pm
HawaiianPi solved my problem. Bullseye and a Zero 2 W was giving me headaches until I found this. However, HDMI is not active, and I'm limited to the resolutions listed in the raspi-config program. Any way to choose a custom resolution?
One possible solution are HDMI dummy plugs (used by crypto miners to activate their GPUs without a display). They only cost a few dollars each in small quantities. It's basically a fake monitor dongle that performs the HDMI handshake and supplies EDID data.

I have a few of them that support up to 4K60, but not all do (check the spec's).

These are the resolution and refresh settings available with one connected to my 4B (non-Pi4 will get up to 1920x1200 60Hz).
HDMI_dummy.jpg
HDMI_dummy.jpg (31.37 KiB) Viewed 1887 times

Remember, if you have a 4B or Zero you will also need an adapter (Pi0 is mini-HDMI and Pi4B is micro-HDMI).

optimax wrote:
Wed Jan 19, 2022 9:07 am
On a raspberry pi 2B, using nocomposite works fine to connect via VNC in a headless configuration...
However, the pi will no longer boot correctly if you subsequently DO connect an HDMI screen. No screen, no VNC connection, no ssh
It should not affect SSH logins, so that's odd (and possibly an unrelated problem). :?

optimax wrote:
Wed Jan 19, 2022 9:07 am
... is there any suggestion on how to deal with this without editing config.txt every time ?
You could probably use conditional config.txt settings. Something like:

Code: Select all

[pi2]
dtoverlay=vc4-kms-v3d,nocomposite

[EDID=AOC-28E850]
dtoverlay=vc4-kms-v3d
[all]
So your Pi2B will have nocomposite, unless it's connected to the monitor. That's just off the top of my very sleepy head, I haven't tested it, and you'll need to know the EDID name of your monitor.


EDIT
After getting some sleep I played around a bit with the conditional config.txt settings I suggested above, and this worked for me.

Code: Select all

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# Additional overlays and parameters are documented /boot/overlays/README

# Settings for Pi4 models (4B, 400, CM4)
[pi4]
arm_boost=1
dtparam=audio=on
camera_auto_detect=1
display_auto_detect=1
dtoverlay=vc4-kms-v3d
[all]

# Settings for Pi3 models (3B, 3B+, 3A+, CM3, CM3+)
# Would also work for Pi2 models if [pi3] was changed to [pi2]
[pi3]
dtparam=audio=on
camera_auto_detect=1
display_auto_detect=1
dtoverlay=vc4-kms-v3d,nocomposite
[EDID=SAM-SyncMaster]
dtoverlay=vc4-kms-v3d
[all]

# Settings for Pi Zero models (Zero, Zero W/WH, Zero 2)
[pi0]
camera_auto_detect=1
dtoverlay=vc4-kms-v3d,nocomposite
[EDID=SAM-SyncMaster]
dtoverlay=vc4-kms-v3d
[all]

# Settings for all models
max_framebuffers=2
disable_overscan=1
I set the headless VNC resolution to 720p and when I booted each model headless, that's what I got with VNC.

With an old Samsung monitor connected, both VNC and the monitor were at the monitor's preferred resolution (1440x900p).

Tested on a Zero W, Zero 2, 3B+ and 4B.

Not sure if this is the best solution, but it works.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?

Return to “Troubleshooting”