0

I connected a 320x240 TFT to my Raspberry Pi A+ running Raspbian stretch via SPI and set it up as fbtft_device. It shows up in /dev/fb1 and I can write images to it via pygame. I initialize it like this:

os.environ['SDL_FBDEV'] = '/dev/fb1'
os.environ['SDL_VIDEODRIVER'] = 'fbcon'
pygame.init()
...

The problem is that it only works when I run my python scripts as root user. As normal raspbian "pi" user, I get pygame.error: video system not initialized The pi user is in the groups gpio spi and video, and the /dev/fb1 device is owned by root, but is in the group video and has group read/write access.

What could be the cause that this only works for the root user?

Your Answer

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

Browse other questions tagged or ask your own question.