Skip to content

fbdebug: Add options to retrieve the colormap and set the fb mode

Administrator requested to merge feature/fbdebug-improvements into master

Add 2 new additional options:

  • -c <length> => retrieve the colormap and print the first values of each colors

  • -m <mode> => perform the ioctl call to set the framebuffer mode

0 => Normal
2 => Standby
3 => Suspend
4 => Off

These values/modes are those used by the xorg fbdev driver we currently use for the X server (source)

I'm not sure what are the other modes but the program accept any number as the parameter, so it's not limited to those 4 modes.

I'm currently using it to debug the downstream framebuffer driver of the Samsung Galaxy S5 kernel which has problem running X11 user interfaces.

Something I noticed is that X server (or xorg fbdev driver) sets the mode Off and Normal when it starts and the fb kernel driver throws some timeouts when trying to turn on the display again.

How to test

$ pmbootstrap build fbdebug
$ pmbootstrap chroot -- apk add fbdebug
$ pmbootstrap chroot -- mknod /dev/fb0 c 29 0
$ pmbootstrap chroot -- fbdebug -h
(prints the help)
$ pmbootstrap chroot -- fbdebug -c 24
(prints the first 24 values of each color map)
$ pmbootstrap chroot -- fbdebug -m 4
(screen turns off)
$ pmbootstrap chroot -- fbdebug -c 0
(screen turns back on)
Edited by Administrator

Merge request reports

Loading