monome / norns

norns is many sound instruments.
http://monome.org
GNU General Public License v3.0
633 stars 147 forks source link

RasPi Framebuffer assignment #749

Closed okyeron closed 5 years ago

okyeron commented 5 years ago

In building norns on Raspberry Pi I've run into this issue:

With a Pi 3b+ the onboard HDMI seems to want framebuffer fb0. So with my DAC board/hat which uses the same OLED display - I've had to recompile norns screen.c to use fb1 for the OLED.

I recently found this reference:

Application software that uses the frame buffer device (e.g. the X server) will use /dev/fb0 by default (older software uses /dev/fb0current). You can specify an alternative frame buffer device by setting the environment variable $FRAMEBUFFER to the path name of a frame buffer device, e.g. (for sh/bash users):

export FRAMEBUFFER=/dev/fb1

So perhaps it would be possible to have screen.c reference $FRAMEBUFFER - and then set an environment variable in the norns startup scripts - instead of hard coding fb0?

tehn commented 5 years ago

we could also just have the fb be a command line arg passed to matron, which defaults to fb0.

i'd prefer to avoid more environment setup if possible. but i suppose if $FRAMEBUFFER isn't available we also just use fb0?

ngwese commented 5 years ago

i agree with the notion that if matron and co are going to become more configurable that it is done via explicit command line arguments (with the current values as default) as opposed to environment variables.

okyeron commented 5 years ago

Addressed with #783