Skip to main content

Sainsmart 1.8 display + Rasperry Pi

1 min read

Recently I bougt one of those tiny Sainsmart 1.8 inch displays to use it as a secondary monitor for my Kodi-based (raspian) media center in the living room.

The setup was pretty easy and fbi showed up pictures on the display five minutes after I got the wiring done. \o/

The problems started when I tried to run some demo pygame code on it. All I got was an error I did not understand because everything was setup correctly.

Traceback (most recent call last):
  File "test.py", line 19, in 
    pygame.display.set_mode()
pygame.error: No video mode large enough for 128x160

After fiddling around for a while, I created the file /etc/fbmodes with the following content:

mode "128×160"
geometry 128 160 128 160 16
timings 0 0 0 0 0 0 0
endmode

Works for me. Errors gone. =)