OpenMarine

Full Version: set (real)VNC resolution on headless Pi 3B+
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm unable to get realVNC to serve to a remote display in the resolution as set in /boot/config.txt
The 'usual' solution (modify /boot/config.txt) doesn't work...

Setup: 
RPi3B+ with freshly installed OpenPlotter v1.0.0


I've enabled VNC and SSH access. I've also enabled the OpenGL v4-kms-v3d driver.

With a physical HDMI screen attached all works fine. When I use a vncviewer, I get the exact same desktop. As expected.
When I disconnect the HDMI screen and boot the RPi Headless, vncserver always gives me 1152x864. I want to change this to something else.


I've set the usual modifications of the /boot/confg.txt file. most notably:
Code:
#hdmi_safe=1
hdmi_force_hotplug=1
hdmi_force_mode=1
hdmi_ignore_edid=0xa5000080
hdmi_group=2
hdmi_mode=9 # as well as several other modes, also from _group=1

Booting headlessly works fine, and when I log in via SSH and run tvservice -s to confirm the hdmi mode

Code:
pi@fluxpi:~ $ tvservice -s
state 0x120009 [HDMI DMT (9) RGB full 4:3], 800x600 @ 60.00Hz, progressive

vncserver and X are running:
Code:
pi@fluxpi:~ $ ps aux | grep X
root       539  2.0  5.1 139056 48692 tty7     Ssl+ 13:26   0:10 /usr/lib/xorg/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
pi         856  0.0  0.0   4372   544 pts/0    S+   13:35   0:00 grep --color=auto X
pi@fluxpi:~ $ ps aux | grep vnc
root       460  0.0  0.2   5796  2716 ?        Ss   13:26   0:00 /usr/bin/vncserver-x11-serviced -fg
root       486  0.3  1.9  28824 18036 ?        S    13:26   0:01 /usr/bin/vncserver-x11-core -service
root       577  0.2  0.8  12496  8368 ?        S    13:26   0:01 /usr/bin/vncagent service 14
pi         858  0.0  0.0   4372   560 pts/0    S+   13:35   0:00 grep --color=auto vnc

But when I connect a vncclient it gets served a 1152x864 desktop  
Huh driving me mad. All the things I find online indicate it should work by modifying the config,txt  Huh
For headless mode I change the Resolution in the Raspberry Pi Configuration.
Preferences->Raspberry Pi Configuration
click "Set Resolution"
select "DMT mode 85 1280x720"
click OK
click OK
click YES (to reboot)
e-sailing, thanks for the suggested appraoch.
Using the Raspberry Pi Configuration is just a user friendly way to set correct hdmi_mode (85 in your example) in the /boot/config.txt file.

My Pi boots fine, and running "tvservice -s" confirms the selected resolution. However RealVNC keeps serving me a 1152x864 desktop, ignoring of the actually configured display resolution.
Some progress...

When the vc4-kms-v3d driver is enabled then:
- trying to set a resolution through Preferences->Raspberry Pi Configuration results in an unresponsive systsem
- trying to set a resolution by editing /boot/config.txt works for the video signal, but the desktop and vnc get a different resolution

With the vc4-fkms-vc3 driver (the 'fake kms one'):
- I can set a resolution, which is honoured both for the video signal and the desktop resolution
- GLXgears gives a good performance

However I can not yet get a desktop resolution higher then 1920x1280.
I've tried a custom mode, e.g. for use on an ipad pro vncviewer
hdmi_cvt=2728 2046 15 1 0 0 1
hdmi_group=2
hdmi_mode=87

Booting headless, tvservice reports DMT (87), but the vncdesktop is 1920x1280 and actually quite slow
I was able to get a higher resolution when I disabled hdmi. I commented out all hdmi settings in config.txt and inserted:
framebuffer_width=2000
framebuffer_height=1300
hdmi_blanking=2
I can't replicate your 2000x1300 resolution... see code output below
Now planning to try some of the things mentioned here


Code:
pi@fluxpi:~ $ tvservice -s
state 0x40001 [NTSC 4:3], 720x480 @ 60.00Hz, interlaced
pi@fluxpi:~ $ fbset

mode "1920x1280"
    geometry 1920 1280 1920 1280 32
    timings 0 0 0 0 0 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
endmode

pi@fluxpi:~ $ vcgencmd get_config int
aphy_params_current=819
arm_freq=1400
audio_pwm_mode=514
config_hdmi_boost=5
core_freq=400
desired_osc_freq=0x33e140
desired_osc_freq_boost=0x3c45b0
disable_commandline_tags=2
disable_l2cache=1
disable_splash=1
display_hdmi_rotate=-1
display_lcd_rotate=-1
dphy_params_current=547
force_eeprom_read=1
force_pwm_open=1
framebuffer_height=1300
framebuffer_ignore_alpha=1
framebuffer_swap=1
framebuffer_width=2000
gpu_freq=300
hdmi_blanking=2
hdmi_force_cec_address=65535
init_uart_clock=0x2dc6c00
lcd_framerate=60
mask_gpu_interrupt0=1024
mask_gpu_interrupt1=0x10000
over_voltage_avs=62500
over_voltage_avs_boost=0x2932e
overscan_bottom=32
overscan_left=32
overscan_right=32
overscan_top=32
pause_burst_frames=1
program_serial_random=1
sdram_freq=450
second_boot=1
Have you been able to solve this issue?
Struggling with the same.
All hdmi settings not working headless with vc4 driver