1

I've been working with pygame and keep running into the issue that I can't get it to output video at 1080p. The available video resolutions I get from pygame.display.list_modes() is [(1600, 1200), (1280, 1024), (1024, 1024), (1824, 984), (1280, 960), (1152, 864), (1024, 768), (800, 600), (768, 576), (640, 480)]

With a resolution above 1920x1080, like 1600x1200, my TV fails to produce any output. When I try to do pygame.display.set_mode((1920,1080)), I get pygame.error: No video mode large enough for 1920x1080

I thought the Raspberry Pi supported 1080p output? Is there any way that I can get pygame to output in this resolution? Is this a video mode issue that runs deeper than pygame?

I should note that I'm running a vanilla install of the latest version of Raspbian.

2

Raspberry Pi does not natively support 1920x1080 mode. when displaying UI or rendering video, the image created is about 1280x720, upscaled later to fill the whole screen. seems like there's nothing to do about that.

3

There is a solution and it worked for me. Credit to inno_it in the raspberry pi forums for the answer.

Open up your config.txt file in your boot.

sudo nano /boot/config.txt (make sure to run sudo for privileges)

uncomment framebuffer_width=1280 and framebuffer_height=720

set these both to 1920 and 1080 respectively.

scroll down and set disable_overscan=1

Ctrl+x and press Y to save.

Pygame will now render in fullscreen 1080p.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.