Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In attempting to write directly to the graphics frame buffer /dev/fb0 , (Ubuntu 12.04) , the graphics screen does not change.

Has Ubuntu 12.04 invalidated the use of /dev/fb0 , or does it need to be activated in some way ?

share|improve this question
2  
Can you provide a bit more detail how you do the "writing"? (script, program, command line, etc) –  John Siu Dec 13 '12 at 16:19
    
@John I tried the method described here with the same results: nothing appears on the screen. I also tried shutting off the GUI, and switching to an alternate console with Ctrl+Alt+F1, but nothing appears on the screen. I looked at using SDL, but it uses BitBlt for everything which will be too slow for individual pixel writes to the screen. –  Brian Dec 13 '12 at 18:46
    
Is it possible the screen re-fresh rate so fast that "cover" your screen update. –  John Siu Dec 13 '12 at 20:37
    
@John No , the area size being written to the screen was 200x200 pixels and there was not even a flicker. The driver is non-accelerated and you would see that flash if it were actually writing to the screen. During the various tests of turning various things on and off in Ubuntu , somewhere along the line /dev/fb0 vanished , but the thing that made me suspicious that Ubuntu is not using /dev/fb0 at all is because the GUI was present and functioned normally without /dev/fb0. I didn't even notice until when trying to open /dev/fb0 using the test program it failed to open the file. –  Brian Dec 14 '12 at 2:59
add comment

1 Answer

Had to do a 2nd ioctl() to ACTIVATE the frame buffer, then it worked.

/* Refresh buffer manually */
vi.activate |= FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE;
if(0 > ioctl(fd, FBIOPUT_VSCREENINFO, &vi)) {
  printf("Failed to refresh\n");
  return -1;
}
share|improve this answer
    
Please mark this answer as 'accepted' so everyone knows that you have solved your problem. –  Risto Salminen Oct 9 '13 at 11:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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