LinuxFB +同时DirectFB?

发布于 2024-10-15 20:52:23 字数 9522 浏览 4 评论 0原文

我有一个嵌入式平台,有 2 个图形层(/dev/fb0 和 /dev/fb1)。

我想使用两个独立的进程: 一种直接使用 /dev/fb0 (原始模式,无视频库)。 另一个通过 directfb 使用 /dev/fb1。

我可以启动第一个,并且运行良好(我正在使用 linux open 函数打开 /dev/fb0 并直接写入)。

当我尝试启动第二个时,它陷入了 directfb 初始化。

如果我尝试使用 /dev/fb1,我无法理解为什么 directFb 会锁定 /dev/fb0。

根据 @shodanex 的要求,这是第二个进程的 strace 输出:

[pid  1483] open("/etc/directfbrc", O_RDONLY) = 7
[pid  1483] fstat64(7, {st_mode=S_IFREG|0755, st_size=472, ...}) = 0
[pid  1483] old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2f375000
[pid  1483] read(7, "system=fbdev\n#no-vt\n#no-vt-switc"..., 4096) = 472
[pid  1483] write(2, "(!) DirectFB/Config \'depth\': OK!"..., 39(!) DirectFB/Config 'depth': OK!!!! 32
) = 39
[pid  1483] read(7, "", 4096)           = 0
[pid  1483] close(7)                    = 0
[pid  1483] munmap(0x2f375000, 4096)    = 0
[pid  1483] open("/root/.directfbrc", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] write(2, "\n     =======================|  "..., 270
 =======================|  DirectFB 1.0.1  |=======================
      (c) 2001-2007  The DirectFB Organization (directfb.org)
      (c) 2000-2004  Convergence (integrated media) GmbH
    ------------------------------------------------------------

) = 270
[pid  1483] gettid()                    = 1483
[pid  1483] rt_sigaction(SIGHUP, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGINT, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGTERM, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGABRT, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGFPE, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {0x29d6f860, [], 0}, 8) = 0
[pid  1483] rt_sigaction(SIGILL, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {0x29d6f860, [], 0}, 8) = 0
[pid  1483] rt_sigaction(SIGQUIT, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGSEGV, {0x2a323fc0, [], SA_SIGINFO}, {0x29d6f860, [], 0}, 8) = 0
[pid  1483] rt_sigaction(SIGTRAP, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGBUS, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {0x29d6f860, [], 0}, 8) = 0
[pid  1483] rt_sigaction(SIGXCPU, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGXFSZ, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] write(2, "(*) DirectFB/Core: Single Applic"..., 64(*) DirectFB/Core: Single Application Core. (2010-03-25 20:40) 
) = 64
[pid  1483] open("/usr/lib/libdirectfb-1.0.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/lib/directfb-1.0-0/systems", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 7
[pid  1483] fstat64(7, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid  1483] fcntl64(7, F_SETFD, FD_CLOEXEC) = 0
[pid  1483] getdents(7, /* 10 entries */, 4096) = 288
[pid  1483] open("/usr/lib/directfb-1.0-0/systems/libdirectfb_fbdev.so", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\200&\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=59543, ...}) = 0
[pid  1483] old_mmap(NULL, 115640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f378000
[pid  1483] mprotect(0x2f384000, 65536, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f394000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xc000) = 0x2f394000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/lib/directfb-1.0-0/systems/libdirectfb_x11.so", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\200\35\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=25273, ...}) = 0
[pid  1483] old_mmap(NULL, 83288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f398000
[pid  1483] mprotect(0x2f39d000, 61440, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f3ac000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0x4000) = 0x2f3ac000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/local/lib/mylibs/libX11.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/local/lib/libX11.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/lib/libX11.so.6", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\340\205\1\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=953468, ...}) = 0
[pid  1483] old_mmap(NULL, 895116, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f3b0000
[pid  1483] mprotect(0x2f477000, 65536, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f487000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xc7000) = 0x2f487000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/local/lib/mylibs/libXext.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/local/lib/libXext.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/lib/libXext.so.6", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\340)\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=61440, ...}) = 0
[pid  1483] old_mmap(NULL, 114084, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f48c000
[pid  1483] mprotect(0x2f498000, 61440, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f4a7000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xb000) = 0x2f4a7000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/local/lib/mylibs/libxcb-xlib.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/local/lib/libxcb-xlib.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/lib/libxcb-xlib.so.0", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\300\5\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=5786, ...}) = 0
[pid  1483] old_mmap(NULL, 68112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f4a8000
[pid  1483] mprotect(0x2f4a9000, 61440, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f4b8000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0) = 0x2f4b8000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/local/lib/mylibs/libxcb.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/local/lib/libxcb.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/lib/libxcb.so.1", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\300u\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=112671, ...}) = 0
[pid  1483] old_mmap(NULL, 144212, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f4bc000
[pid  1483] mprotect(0x2f4cf000, 65536, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f4df000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0x13000) = 0x2f4df000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/lib/libXau.so.6", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\240\n\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=10880, ...}) = 0
[pid  1483] old_mmap(NULL, 71644, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f4e0000
[pid  1483] mprotect(0x2f4e2000, 61440, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f4f1000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0x1000) = 0x2f4f1000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/lib/libXdmcp.so.6", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\0\20\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=23841, ...}) = 0
[pid  1483] old_mmap(NULL, 80376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f4f4000
[pid  1483] mprotect(0x2f4f8000, 61440, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f507000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0x3000) = 0x2f507000
[pid  1483] close(8)                    = 0
[pid  1483] getdents(7, /* 0 entries */, 4096) = 0
[pid  1483] close(7)                    = 0
[pid  1483] munmap(0x2f398000, 83288)   = 0
[pid  1483] munmap(0x2f48c000, 114084)  = 0
[pid  1483] munmap(0x2f3b0000, 895116)  = 0
[pid  1483] munmap(0x2f4a8000, 68112)   = 0
[pid  1483] munmap(0x2f4bc000, 144212)  = 0
[pid  1483] munmap(0x2f4e0000, 71644)   = 0
[pid  1483] munmap(0x2f4f4000, 80376)   = 0
[pid  1483] open("/dev/fb1", O_RDWR)    = 7
[pid  1483] fcntl64(7, F_SETFD, FD_CLOEXEC) = 0
[pid  1483] setsid()                    = 1483
[pid  1483] open("/dev/tty0", O_RDONLY|O_NOCTTY) = 8
[pid  1483] ioctl(8, 0x5603, 0x7bbc1d2a) = 0
[pid  1483] ioctl(8, 0x5600, 0x497658)  = 0
[pid  1483] ioctl(7, 0x460f, 0x7bbc1d18) = 0
[pid  1483] fstat64(7, {st_mode=S_IFCHR|0600, st_rdev=makedev(29, 1), ...}) = 0
[pid  1483] ioctl(7, 0x4610, 0x7bbc1c28) = 0
[pid  1483] ioctl(8, 0x5606, 0x2)       = 0

请注意,directfb 读取 /etc/directfbrc 文件(提前检查其内容)。 之后将不会打印任何内容。

system=fbdev
fbdev=/dev/fb1
primary-layer=1
no-cursor
bg-color=00000000
disable-module=lirc
disable-module=keyboard
disable-module=ps2mouse
mode=1280x720-60
pixelformat=ARGB
depth=32
hardware
desktop-buffer-mode=backvideo

有什么想法吗? 再次非常感谢。

I have an embedded plarform which has 2 graphic layers (/dev/fb0 and /dev/fb1).

I want to use 2 separate processes:
One using /dev/fb0 directly (raw mode, no video libs).
The other using /dev/fb1 through directfb.

I can start the first one and it is working well (i'm using the linux open function to open /dev/fb0 and write to that directly).

When I try to start the second one, it gets stuck in the directfb initialization.

I can't understand why directFb is locking on /dev/fb0 if I'm trying to use the /dev/fb1.

As requested by @shodanex, here is the strace output for the second process:

[pid  1483] open("/etc/directfbrc", O_RDONLY) = 7
[pid  1483] fstat64(7, {st_mode=S_IFREG|0755, st_size=472, ...}) = 0
[pid  1483] old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2f375000
[pid  1483] read(7, "system=fbdev\n#no-vt\n#no-vt-switc"..., 4096) = 472
[pid  1483] write(2, "(!) DirectFB/Config \'depth\': OK!"..., 39(!) DirectFB/Config 'depth': OK!!!! 32
) = 39
[pid  1483] read(7, "", 4096)           = 0
[pid  1483] close(7)                    = 0
[pid  1483] munmap(0x2f375000, 4096)    = 0
[pid  1483] open("/root/.directfbrc", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] write(2, "\n     =======================|  "..., 270
 =======================|  DirectFB 1.0.1  |=======================
      (c) 2001-2007  The DirectFB Organization (directfb.org)
      (c) 2000-2004  Convergence (integrated media) GmbH
    ------------------------------------------------------------

) = 270
[pid  1483] gettid()                    = 1483
[pid  1483] rt_sigaction(SIGHUP, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGINT, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGTERM, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGABRT, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGFPE, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {0x29d6f860, [], 0}, 8) = 0
[pid  1483] rt_sigaction(SIGILL, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {0x29d6f860, [], 0}, 8) = 0
[pid  1483] rt_sigaction(SIGQUIT, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGSEGV, {0x2a323fc0, [], SA_SIGINFO}, {0x29d6f860, [], 0}, 8) = 0
[pid  1483] rt_sigaction(SIGTRAP, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGBUS, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {0x29d6f860, [], 0}, 8) = 0
[pid  1483] rt_sigaction(SIGXCPU, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] rt_sigaction(SIGXFSZ, {0x2a323fc0, [], SA_NOMASK|SA_SIGINFO}, {SIG_DFL}, 8) = 0
[pid  1483] write(2, "(*) DirectFB/Core: Single Applic"..., 64(*) DirectFB/Core: Single Application Core. (2010-03-25 20:40) 
) = 64
[pid  1483] open("/usr/lib/libdirectfb-1.0.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/lib/directfb-1.0-0/systems", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 7
[pid  1483] fstat64(7, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid  1483] fcntl64(7, F_SETFD, FD_CLOEXEC) = 0
[pid  1483] getdents(7, /* 10 entries */, 4096) = 288
[pid  1483] open("/usr/lib/directfb-1.0-0/systems/libdirectfb_fbdev.so", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\200&\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=59543, ...}) = 0
[pid  1483] old_mmap(NULL, 115640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f378000
[pid  1483] mprotect(0x2f384000, 65536, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f394000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xc000) = 0x2f394000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/lib/directfb-1.0-0/systems/libdirectfb_x11.so", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\200\35\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=25273, ...}) = 0
[pid  1483] old_mmap(NULL, 83288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f398000
[pid  1483] mprotect(0x2f39d000, 61440, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f3ac000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0x4000) = 0x2f3ac000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/local/lib/mylibs/libX11.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/local/lib/libX11.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/lib/libX11.so.6", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\340\205\1\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=953468, ...}) = 0
[pid  1483] old_mmap(NULL, 895116, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f3b0000
[pid  1483] mprotect(0x2f477000, 65536, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f487000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xc7000) = 0x2f487000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/local/lib/mylibs/libXext.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/local/lib/libXext.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/lib/libXext.so.6", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\340)\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=61440, ...}) = 0
[pid  1483] old_mmap(NULL, 114084, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f48c000
[pid  1483] mprotect(0x2f498000, 61440, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f4a7000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0xb000) = 0x2f4a7000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/local/lib/mylibs/libxcb-xlib.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/local/lib/libxcb-xlib.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/lib/libxcb-xlib.so.0", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\300\5\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=5786, ...}) = 0
[pid  1483] old_mmap(NULL, 68112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f4a8000
[pid  1483] mprotect(0x2f4a9000, 61440, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f4b8000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0) = 0x2f4b8000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/local/lib/mylibs/libxcb.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/local/lib/libxcb.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid  1483] open("/usr/lib/libxcb.so.1", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\300u\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=112671, ...}) = 0
[pid  1483] old_mmap(NULL, 144212, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f4bc000
[pid  1483] mprotect(0x2f4cf000, 65536, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f4df000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0x13000) = 0x2f4df000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/lib/libXau.so.6", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\240\n\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=10880, ...}) = 0
[pid  1483] old_mmap(NULL, 71644, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f4e0000
[pid  1483] mprotect(0x2f4e2000, 61440, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f4f1000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0x1000) = 0x2f4f1000
[pid  1483] close(8)                    = 0
[pid  1483] open("/usr/lib/libXdmcp.so.6", O_RDONLY) = 8
[pid  1483] read(8, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0*\0\1\0\0\0\0\20\0\0004\0\0\0"..., 512) = 512
[pid  1483] fstat64(8, {st_mode=S_IFREG|0755, st_size=23841, ...}) = 0
[pid  1483] old_mmap(NULL, 80376, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 8, 0) = 0x2f4f4000
[pid  1483] mprotect(0x2f4f8000, 61440, PROT_NONE) = 0
[pid  1483] old_mmap(0x2f507000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 8, 0x3000) = 0x2f507000
[pid  1483] close(8)                    = 0
[pid  1483] getdents(7, /* 0 entries */, 4096) = 0
[pid  1483] close(7)                    = 0
[pid  1483] munmap(0x2f398000, 83288)   = 0
[pid  1483] munmap(0x2f48c000, 114084)  = 0
[pid  1483] munmap(0x2f3b0000, 895116)  = 0
[pid  1483] munmap(0x2f4a8000, 68112)   = 0
[pid  1483] munmap(0x2f4bc000, 144212)  = 0
[pid  1483] munmap(0x2f4e0000, 71644)   = 0
[pid  1483] munmap(0x2f4f4000, 80376)   = 0
[pid  1483] open("/dev/fb1", O_RDWR)    = 7
[pid  1483] fcntl64(7, F_SETFD, FD_CLOEXEC) = 0
[pid  1483] setsid()                    = 1483
[pid  1483] open("/dev/tty0", O_RDONLY|O_NOCTTY) = 8
[pid  1483] ioctl(8, 0x5603, 0x7bbc1d2a) = 0
[pid  1483] ioctl(8, 0x5600, 0x497658)  = 0
[pid  1483] ioctl(7, 0x460f, 0x7bbc1d18) = 0
[pid  1483] fstat64(7, {st_mode=S_IFCHR|0600, st_rdev=makedev(29, 1), ...}) = 0
[pid  1483] ioctl(7, 0x4610, 0x7bbc1c28) = 0
[pid  1483] ioctl(8, 0x5606, 0x2)       = 0

Note that the directfb reads the /etc/directfbrc file (check its content ahead).
Nothing will be printed after that.

system=fbdev
fbdev=/dev/fb1
primary-layer=1
no-cursor
bg-color=00000000
disable-module=lirc
disable-module=keyboard
disable-module=ps2mouse
mode=1280x720-60
pixelformat=ARGB
depth=32
hardware
desktop-buffer-mode=backvideo

Have any idea?
Thaks very much again.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

内心旳酸楚 2024-10-22 20:52:23

您能否提供更多信息:

  • 当第一个进程未启动时,直接 FB 是否有效?
  • 你怎么知道 directfb 锁定了 /dev/fb0 ?

Linux FB 是一个内核驱动程序,您可以使用任何您想要使用的用户空间程序 /dev/fb 例如 directFB

DirectFB 是一个用户空间库,它与 Linux 帧缓冲区一起工作。

所以答案是肯定的,你可以在/dev/fb0上使用你自己的程序,在/dev/fb1上使用DirectFB程序。也许您应该 strace 您的 directfb 程序以了解其卡住的原因。

Could you provide more info :

  • Does direct FB works when the first process is not launched ?
  • How do you know directfb is locking on /dev/fb0 ?

Linux FB is a kernel driver, you can use any userspace program you want to use /dev/fb<x> such as directFB

DirectFB is a userspace library, it works with the Linux Frame Buffer.

So the answer is definitely yes, you can use you own program on /dev/fb0, and a DirectFB program on /dev/fb1. Maybe you should strace your directfb program to understand why it is stuck.

做个ˇ局外人 2024-10-22 20:52:23

我发现有必要指示应用程序不要切换图形模式。
我这样做就设法使两个应用程序一起运行。不再有锁定情况。

现在我正在尝试运行我的实际程序,但是 QT 正在杀死我,因为它忽略了 nographicsmodeswitch 参数。
我正在为此努力,我相信它迟早会奏效。

如果这里有人是 QT 专家,我将不胜感激。

谢谢 shodanex,你的 strace 建议非常有用。

I discovered that it is necessary to instruct the application not to switch graphics mode.
I managed to make both applications run together just doing this. No locking situations anymore.

Now I'm trying to run my actual program, however QT is killing me because it is ignoring the nographicsmodeswitch argument.
I'm working on that and I'm sure it's going to work sooner or later.

If someone here is a QT expert, I'd appreciate any help.

Thanks shodanex, your strace advice was very useful.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文