I have to run a user interface program that needs X and programs that draw in predetermined areas at the same time.
With kernel 3.9.6, X Server 1.14.4, and fglrx video driver these programs run and use the typical system
fbfd = open("/dev/fb0", O_RDWR);
if (fbfd == -1)
{
perror("Error: cannot open framebuffer device");
exit(1);
}
// Get fixed screen information
if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo) == -1)
{
perror("Error reading fixed information");
exit(2);
}
// Get variable screen information
if (ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo) == -1)
{
perror("Error reading variable information");
exit(3);
}
// Map the device to memory
fbp = (char *) mmap(0, vinfo.yres * vinfo.pitch, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0);
while now that I had to upgrade to kernel 5.11.21, X Server 1.20.11 and amdgpu driver these programs do not draw on the console where the interface runs.
I need a pointer to a buffer where I can write to draw, if it is impossible to modify the system to be able to write then I need a function that returns me a pointer where I can write via X or some other way to be able to draw freely.