DietPi Display Resolution

Please, could someone help about a Dell?

I have a QHD 2560 x 1440 @ 60 Hz display, I’ve tested several distros last week on my Pi4 and had full 2K resolution. The distro I liked the most was DietPi, but I’m struggling to understand the reason my display is recognized as a Full HD Display and I can’t change it to a higher resolution at diet-config. I’ve installed the Mate Desktop and want to have a better resolution because it seems blur.

I also tried somes configs at config.txt, hdmi_group=1 and hdmi_group=97 but it didn’t work. Plus hdmi_cvt=2560 1440 60 3 0 0 0.

Gave some “/opt/vc/bin/tvservice -m CEA” and “/opt/vc/bin/tvservice -m DMT” and the highest resolution it supports is 1080p. As I said, in many other distro I could get 2K.

One thing I realized is that on Mate it doesn’t show the Brand and Model of my monitor as I can see in other distros.


Regards,

José

Hi,

many thanks for your report. Just one question. Was it working on Raspberry OS? Because DietPi for RPi devices is based on Raspberry OS and if it was working on Raspberry OS, it might be possible on DietPi as well. :thinking:

Hello, I’ve tested Raspberry OS two days ago and I got 2K resolution without any further configuration!

Maybe MichaIng has an idea what is missing compare to plain Raspberry OS

For 4k 60 Hz add hdmi_enable_4kp60=1 to config.txt: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md

G_CONFIG_INJECT 'hdmi_enable_4kp60=' 'hdmi_enable_4kp60=1' /boot/config.txt

The resolution you tried via hdmi_group=97 2160p = 3840 × 2160 which exceeds your monitor? There seems to be no mode that explicitly matches 2560 x 1440 :thinking:.

Ah and basically dietpi-config does not support >1080p resolution yet, good to be reminded that this still needs to be done. So what you need to take care of:

  • Either comment or set framebuffer_width and framebuffer_height to match your desired resolution.
  • If you use hdmi_mode + hdmi_group, I think the framebuffer settings should be commented instead to not interfere.
  • Or comment all video/hdmi related settings and check if auto-detection works fine.

Easiest should be to copy the config.txt from the OS that worked fine with your monitor over to DietPi, which should then behave the same then.

Dear MichaIng, thanks for your replay!

First of all, I made a mistake and got confused whit hdmi_group=97, saw 2160p and thought it was 2k, but its 4K. :frowning:

Despite that mistake, I could solve the problem.

“- Either comment or set framebuffer_width and framebuffer_height to match your desired resolution.”
A: Alone, it doesn’t work!

“- If you use hdmi_mode + hdmi_group, I think the framebuffer settings should be commented instead to not interfere.”
A: I created a custom resolution “hdmi_cvt=2560 1440 60 3 0 0 0”, “hdmi_group=2” and “hdmi_group=87” but it didn’t work.

“Or comment all video/hdmi related settings and check if auto-detection works fine.”
A: I started with the default Dietpi config.txt and it didn’t work.

“Copy the config.txt from the OS that worked fine with your monitor over to DietPi”
A: It made the trick!!! But why? I realized that Dietpi has a better config.txt file and better explanations compared against Raspberry Pi OS, but I found 2 interesting lines on Raspberry OS config.txt and would suggest you to evaluate them:

[pi4]

Enable DRM VC4 V3D driver on top of the dispmanx display stack

dtoverlay=vc4-fkms-v3d
max_framebuffers=2

I know they made it work!

Great that it works now. Yes the default config.txt of Raspbian/Raspberry Pi OS is actually an ancient one that has never really been adjusted for any newer RPi model, e.g. I think the contained (commented) overclocking settings show RPi 1 defaults :slight_smile:.

With RPi 4 indeed those two settings have been added, below the [pi4] category, so only active there. The first is the GPU driver, actually that should not be relevant as long as you don’t use any graphics software, including desktop, media players, browser or others.

The second enables the second HDMI connector. I’m not sure if, in case this is set to “1”, the second connector is unusable or if the one framebuffer is attached automatically to the HDMI port where the single monitor is attached. To reduce memory usage it makes sense to set this to “1” as long as you only use one HDMI and use the 1. HDMI port then, if necessary.

So basically I would be surprised of any of this two settings is really required to display >1080p resolutions :thinking:.

What I have not yet thought about is the GPU memory and framebuffer sizes. By default DietPi RPi images are shipped with minimal 16 MiB GPU memory split. I’m not sure if it can be calculated like this and not even sure if the framebuffer is hold in system memory or GPU memory (some things have been shifted from GPU to system memory with RPi 4), but 2560x1440 with default 16 bit depths would mean a minimum of 16/8 * 2560 * 1440 / 1024 / 1024 > 7 MiB which is the raw colour definition for every pixel. I guess there is some meta data around, but that’s already half of the 16 MiB GPU memory.
Long story short, did you increase the GPU memory split as solution attempt? On Raspberry Pi OS it’s 64 MiB, the default if not defined or commented.

Hi all,

Piggybacking off this question. I’m also trying to get 2560x1440 working. Does the custom config.txt that you create live in /boot/dietpi? If not, where is it supposed to live? Thanks!

It’s the usual Raspberry OS config.txt located in /boot

So adding the following to config.txt puts me at 1366x768 resolution now (previously 1920x1080… trying to get 2560x1440 - my native resolution)… so bizarre.

Here’s what’s in my config.txt:

hdmi_group=2
hdmi_mode=87
hdmi_cvt=2560 1440 60 3 0 0 1
max_framebuffer_width=2560
max_framebuffer_height=1440
hdmi_pixel_freq_limit=400000000

hdmi_pixel_freq_limit seems to not exist, but instead hdmi_max_pixel_freq: https://www.raspberrypi.org/documentation/configuration/config-txt/video.md

Also try to add hdmi_enable_4kp60=1. Same as above, not sure from which resolution on this is required to have 60 Hz, or if it’s really just required from 4k on, like 3840xh resp, 4096xh.

And try to raise the gpu_mem_1024 to at least 64 (default) or more.

And finally what does the following say about supported DMT modes?

tvservice -m DMT

Hi Michal, thanks for trying to solve this.

Added hdmi_max_pixel_freq=4000000 and hdmi_4k60p=1 with no luck. gpu_mem_1024 is at 128.

root@DietPi:~# tvservice -m DMT
Group DMT has 19 modes:
           mode 4: 640x480 @ 60Hz 4:3, clock:25MHz progressive 
           mode 5: 640x480 @ 72Hz 4:3, clock:31MHz progressive 
           mode 6: 640x480 @ 75Hz 4:3, clock:31MHz progressive 
           mode 8: 800x600 @ 56Hz 4:3, clock:36MHz progressive 
           mode 9: 800x600 @ 60Hz 4:3, clock:40MHz progressive 
           mode 10: 800x600 @ 72Hz 4:3, clock:50MHz progressive 
           mode 11: 800x600 @ 75Hz 4:3, clock:49MHz progressive 
           mode 16: 1024x768 @ 60Hz 4:3, clock:65MHz progressive 
           mode 17: 1024x768 @ 70Hz 4:3, clock:75MHz progressive 
           mode 18: 1024x768 @ 75Hz 4:3, clock:78MHz progressive 
           mode 21: 1152x864 @ 75Hz 4:3, clock:108MHz progressive 
           mode 28: 1280x800 @ 60Hz 16:10, clock:83MHz progressive 
           mode 35: 1280x1024 @ 60Hz 5:4, clock:108MHz progressive 
           mode 36: 1280x1024 @ 75Hz 5:4, clock:135MHz progressive 
           mode 47: 1440x900 @ 60Hz 16:10, clock:106MHz progressive 
           mode 58: 1680x1050 @ 60Hz 16:10, clock:146MHz progressive 
           mode 83: 1600x900 @ 60Hz 16:9, clock:108MHz progressive 
           mode 85: 1280x720 @ 60Hz 16:9, clock:74MHz progressive 
           mode 86: 1366x768 @ 60Hz 16:9, clock:72MHz progressive

And my config:

# Docs: https://www.raspberrypi.org/documentation/configuration/config-txt/

#-------Display---------
# If you get no picture, set the following to "1" to apply most compatible HDMI $
#hdmi_safe=1

# Uncomment to adjust the HDMI signal strength if you have interferences, blanki$
# - Values from "0" to "11" are allowed, use values above "7" only if required, $
# - Default on first RPi1 A/B is "2", else "5", on RPi4 this setting is ignored.
#config_hdmi_boost=5

# Uncomment if HDMI display is not detected and composite is being outputted.
#hdmi_force_hotplug=1

# Uncomment to disable HDMI even if plugged, e.g. to force composite output.
#hdmi_ignore_hotplug=1

# Uncomment to force a console size. By default it will be display's size minus $
#framebuffer_width=1280
#framebuffer_height=720

# Uncomment to enable SDTV/composite output on RPi4. This has no effect on previ$
#enable_tvout=1
# SDTV mode
#sdtv_mode=0

# Uncomment to force a specific HDMI mode (this will force VGA).
#hdmi_group=1
#hdmi_mode=1

# Custom code to get 2560x1440 working

hdmi_group=2
hdmi_mode=87
hdmi_cvt=2560 1440 60 3 0 0 1
max_framebuffer_width=2560
max_framebuffer_height=1440
hdmi_enable_4kp60=1
hdmi_max_pixel_freq=400000000

# Uncomment to force an HDMI mode rather than DVI. This can make audio work in D$
hdmi_drive=2

# Set "hdmi_blanking=1" to allow the display going into standby after 10 minutes$
# With default value "0", the display shows a blank screen instead, but will not$
# NB: With "1" some applications (e.g. Kodi, OMXPlayer) cannot prevent display s$
#hdmi_blanking=1

# Set to "1" if your display has a black border of unused pixels visible.
disable_overscan=1

# Uncomment the following to adjust overscan. Use positive numbers if console go$
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# Rotation
display_hdmi_rotate=0
lcd_rotate=0

#-------RPi camera module-------
#start_x=1
#disable_camera_led=1

#-------GPU memory splits-------
gpu_mem_256=128
gpu_mem_512=128
gpu_mem_1024=128

#-------Boot splash screen------
disable_splash=1

#-------Onboard sound----------
dtparam=audio=on

#-------I2C-------------
dtparam=i2c_arm=off
dtparam=i2c1=off
#dtparam=i2c_arm_baudrate=100000

#-------SPI-------------
dtparam=spi=off

#-------Serial/UART-----
# NB: Enabled for 1st run only. If you want to keep this setting, please set CON$
#core_freq=500
enable_uart=0

#-------Overclock-------
temp_limit=75
initial_turbo=20

#over_voltage=0
#arm_freq=1500
#core_freq=500

#over_voltage_min=0
#arm_freq_min=300
#core_freq_min=250
#sdram_freq_min=400
dtoverlay=disable-wifi

Strange that it does not find any 2560 width mode to be supported. How is it with CEA?

tvservice -m CEA

In the docs about custom modes, they also add hdmi_drive=2. This should actually only force HDMI audio, but worth to give it a try.

And it contains another option to try:

hdmi_force_mode
Setting to > 1 > will remove all other modes except the ones specified by > hdmi_mode > and > hdmi_group > from the internal list, meaning they will not appear in any enumerated lists of modes. This option may help if a display seems to be ignoring the > hdmi_mode > and > hdmi_group > settings.

=> Try to add:

hdmi_force_mode=1

Otherwise we should have a look into the RPi forum, whether there is a similar report about >1080p monitors not being detected as such: https://www.raspberrypi.org/forums/viewforum.php?f=28

I did have hdmi_drive=2 but uncommented it.

Here’s CEA

Group CEA has 9 modes:
           mode 1: 640x480 @ 60Hz 4:3, clock:25MHz progressive 
           mode 2: 720x480 @ 60Hz 4:3, clock:27MHz progressive 
           mode 3: 720x480 @ 60Hz 16:9, clock:27MHz progressive 
           mode 4: 1280x720 @ 60Hz 16:9, clock:74MHz progressive 
  (prefer) mode 16: 1920x1080 @ 60Hz 16:9, clock:148MHz progressive 
           mode 17: 720x576 @ 50Hz 4:3, clock:27MHz progressive 
           mode 18: 720x576 @ 50Hz 16:9, clock:27MHz progressive 
           mode 19: 1280x720 @ 50Hz 16:9, clock:74MHz progressive 
           mode 31: 1920x1080 @ 50Hz 16:9, clock:148MHz progressive

Unfortunately using hdmi_force_mode=1 didn’t work, but I’ll check out the forum you linked. Thanks for trying to help!