Closed Greijus closed 1 year ago
Switch to a virtual console, on the first for example by pressing Ctrl + Alt + F1 Then you can try running examples with sudo
DFBTerm depends on the LiTE library. So you need to install LiTE first (same way as DirectFB2) and then install DFBTerm Switch to a virtual console and run dfbterm using sudo
I tryed to run df_andi from tty3
totty6
using Ctrl + Alt + F3
to Ctrl + Alt + F6
, but I get the same error log posted in the first comment. Ctrl + Alt + F1
is GUI login screen, Ctrl + Alt + F2
is GUI desktop (see https://askubuntu.com/questions/66195/what-is-a-tty-and-how-do-i-access-a-tty)
Looks like tty0 is not available somehow in Ubuntu 20.04 (Error opening '/dev/tty0'!
).
Do you have any other suggestion? Is worth to mention that I was able to run the FusionSound2 examples fs_buffer
and fs_stream
from the virtual consoles as well as from the normal linux terminal.
What is the output of the following command: stat /dev/tty0
Have you tried running examples using sudo?
logs when executing $ df_andi
and $ sudo df_andi
from tty3
:
Also, this are the logs from normal terminal:
stresstech@tech:~$ df_andi
~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 2.0.0 |~~~~~~~~~~~~~~~~~~~~~~~~~~
(c) 2017-2023 DirectFB2 Open Source Project (fork of DirectFB)
(c) 2012-2016 DirectFB integrated media GmbH
(c) 2001-2016 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2023-01-03 07:25)
(*) DRMKMS/System: Using device /dev/dri/card0 (default)
(*) DRMKMS/System: Found 2 connectors, 2 encoders, 3 planes
(!) DRMKMS/VT: Error opening '/dev/tty0'!
--> Permission denied
(!) Core/Parts: Could not initialize 'system_core' core!
--> A general initialization error occurred
Segmentation fault (core dumped)
stresstech@tech:~$
stresstech@tech:~$
stresstech@tech:~$
stresstech@tech:~$ sudo df_andi
~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 2.0.0 |~~~~~~~~~~~~~~~~~~~~~~~~~~
(c) 2017-2023 DirectFB2 Open Source Project (fork of DirectFB)
(c) 2012-2016 DirectFB integrated media GmbH
(c) 2001-2016 The world wide DirectFB Open Source Community
(c) 2000-2004 Convergence (integrated media) GmbH
----------------------------------------------------------------
(*) DirectFB/Core: Single Application Core. (2023-01-03 07:25)
(*) DRMKMS/System: Using device /dev/dri/card0 (default)
(*) DRMKMS/System: Found 2 connectors, 2 encoders, 3 planes
(*) DirectFB/Input: Logitech USB Receiver (1) 0.1 (DirectFB)
(*) DirectFB/Input: Logitech USB Receiver Mouse (2) 0.1 (DirectFB)
(*) DirectFB/Input: Logitech USB Receiver Consumer (3) 0.1 (DirectFB)
(*) DirectFB/Input: Jabra Link 370 (4) 0.1 (DirectFB)
(*) DirectFB/Input: Eee PC WMI hotkeys (5) 0.1 (DirectFB)
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input
(*) DirectFB/Genefx: MMX enabled
(*) DirectFB/Graphics: MMX Software Rasterizer 0.7 (DirectFB)
(*) DRMKMS/Screen: Default mode is 1920x1200 (10 modes in total)
(*) DRMKMS/Layer: Supported properties for layer id 39
(*) alpha
(*) zpos
(!) DRMKMS/Layer: drmModeObjectSetProperty() failed setting zpos!
--> Permission denied
(!) Core/Layers: Failed to initialize layer 1!
--> Access to the resource is denied
(!) Core/Parts: Could not initialize 'layer_core' core!
--> Access to the resource is denied
../src/df_andi.c <494>:
(!) DirectFBError [DirectFBCreate( &dfb )]: Access to the resource is denied
OK, can you try: sudo df_andi --dfb:system=fbdev
I never had the failure of drmModeObjectSetProperty(), I don't have an explanation for the moment, it's to be investigated...
ok! it worked with the command sudo df_andi --dfb:system=fbdev
. Thanks!
Regarding the drmModeObjectSetProperty() failure, I'm curious what happens if you just remove the error check that follows the call to drmModeObjectSetProperty() in the drmkmsPlaneInitLayer() function:
if (err) {
ret = errno2result( errno );
D_PERROR( "DRMKMS/Layer: drmModeObjectSetProperty() failed setting zpos!\n" );
return ret;
}
Rebuild, install, then run: sudo df_andi (or sudo df_andi --dfb:system=drmkms)
I followed your instructions and it worked! I commented the error check in the drmkms_layer.c
, then when runnning sudo df-andi
works just fine, I see the pinguins...
Great, thanks for this test! So the drmkms system module will be updated accordingly.
Since you are running DirectFB2 on your desktop, you probably have a graphics card with OpenGL support. Although there are still some issues to be fixed, note that the DirectFB2-eglgbm system module combined with the DirectFB2-gles2 GFX driver provides hardware acceleration support.
To get an idea of the performance:
df_andi --dfb:system=eglgbm
df_dok --dfb:system=eglgbm
Hi,
I was able to compile the DirectFB2 library and examples on my desktop PC running on Ubuntu 20.04. However, when running the examples from the terminal I see the following:
These are mi questions:
Thank you, and my apologies for such elementary questions.