[Gta04-owner] Where did /dev/dri/card0 and /dev/fb0 run off to?

Josua Mayer josua.mayer97 at gmail.com
Sat Jun 23 23:17:36 CEST 2018


Hi Nikolaus,

I think I have tracked down the crash. Fixing it however opens a new book!

Am 23.06.2018 um 07:43 schrieb H. Nikolaus Schaller:
> Hi Josua,
> basically there has been a lot of moves from omapfb to omapdrm
> fo the display subsystem. I think omapfb will be deprecated and
> unmaintained in v4.18.
>
>> Am 22.06.2018 um 23:34 schrieb Josua Mayer <josua.mayer97 at gmail.com>:
>>
>> And some more progress!
> Nice!
>
>> The error message about dummy sw sync timeline goes away when
>> 1) /sys/kernel/debug/sync/sw_sync is writable by surfaceflinger
>> 2) libsync is patched to know about that path
>>
>> 2) is easily solved by cherry-picking a commit from upstream
>> 1) is a little more troublesome: I understand ueventd is responsible for
>> setting permissions, so I added a line to ueventd.gta04.rc:
>> /sys/kernel/debug/sync/sw_sync    0660    root    graphics
>> But an ls after boot has shown that the file continues to be owned by
>> root, with mode 644.
>> I finally ended up adding a chmod 666 to init.gta04.rc "on boot".
>>
>> Now SurfaceFlinger makes some serious progress by creating an EGL
>> context and getting information about available GL-ES, until it finally
>> dies :(
>> 01-01 07:08:45.634  2371  2371 F libc    : Fatal signal 11 (SIGSEGV),
>> code 1, fault addr 0x0 in tid 2371 (surfaceflinger)
>>
>> Please find attached a log-file with more detailed information.
>>
>> I also made a false conclusion down below!
>> pwm_omap_dmtimer was always loaded,
> it is used for the backlight driver.
>
>> the missing modules were
>> encoder-opa362 and connector-analog-tv.
> Yes, with letux-4.17 we have enabled the tvout and it needs these two
> modules.
>
> BTW to answer a question from a previous mail: the DT entries for display
> are scanned by the omapdrm driver to identify what video ports should
> be initialized. So if we remove them, there will be no video despite
> all config for panel drivers and pinmux etc.
>
>> Without these omapdrm never went
>> ahead to create the framebuffer, and dri devices.
>>
>> I am not sure I will be able to figure out why SurfaceFlinger dies.
>> Volunteers welcome to drop in!
> I know of similar issues with X11 drivers. There are several different
> drivers available (simple, modesetting, turbo) and some of them end
> up with a SEGFAULT(11).
:( though maybe this means we can debug one of these instead of android
surfaceflinger.
Does the modesetting one work?
>
> What I assume is that they are compiled for an incompatible ioctl
> but I have no ideas how to check it. Well, maybe running an strace.
>
> BR,
> Nikolaus
>
>> br
>> Josua Mayer
>>
>> Am 22.06.2018 um 21:35 schrieb Josua Mayer:
>>> Okay. We know that fb0 exists on the letux debian, which the android
>>> kernel .config is based off.
>>> So the problem is likely a kernel module that has to be loaded, but had
>>> been overlooked.
>>>
>>> I took all modules present on the letux system, and added a section to
>>> load_modules.sh for loading them one by one. Called sleep 1 after each
>>> one and let it boot once more. This time I could watch when the
>>> framebuffer device came up:
>>> 01-01 05:06:51.872  1555  1555 I load_modules.sh: Loading module
>>> snd_soc_gtm601
>>> 01-01 05:06:52.055  1555  1555 I load_modules.sh: done
>>> 01-01 05:06:53.413  1555  1555 I load_modules.sh: Loading module
>>> pwm_omap_dmtimerdone
>>> [   63.811706] omapdrm omapdrm.0: DMM not available, disable DMM support
>>> [   64.031341] omapdrm omapdrm.0: Tiled buffers require DMM
>>> [   64.086120] Console: switching to colour frame buffer device 60x40
>>> [   64.116973] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
>>>
>>> So it appears I have identified at least one module that was missing,
>>> pwm_omap_dmtimer.
>>> Maybe there are some more, as a lot more modules were actually loaded by
>>> the script.
>>>
>>> But this is good news, because replicant is getting much further now:
>>> 01-01 05:06:55.681  2651  2651 I SurfaceFlinger: SurfaceFlinger is starting
>>> 01-01 05:06:55.684  2651  2651 I SurfaceFlinger: SurfaceFlinger's main
>>> thread ready to run. Initializing graphics H/W...
>>> 01-01 05:06:55.684  2651  2651 D libEGL  : Emulator without GPU support
>>> detected. Fallback to software renderer.
>>> 01-01 05:06:55.693  2651  2651 D libEGL  : loaded
>>> /system/lib/egl/libGLES_android.so
>>> 01-01 05:06:55.857  2651  2651 E gralloc : failed to put fb info
>>> 01-01 05:06:55.857  2651  2651 W gralloc : page flipping not supported
>>> (yres_virtual=640, requested=1280)
>>> 01-01 05:06:55.857  2651  2651 I gralloc : using (fd=12)
>>> 01-01 05:06:55.857  2651  2651 I gralloc : id           = omapdrm
>>> 01-01 05:06:55.857  2651  2651 I gralloc : xres         = 480 px
>>> 01-01 05:06:55.857  2651  2651 I gralloc : yres         = 640 px
>>> 01-01 05:06:55.857  2651  2651 I gralloc : xres_virtual = 480 px
>>> 01-01 05:06:55.857  2651  2651 I gralloc : yres_virtual = 640 px
>>> 01-01 05:06:55.857  2651  2651 I gralloc : bpp          = 32
>>> 01-01 05:06:55.857  2651  2651 I gralloc : r            = 16:8
>>> 01-01 05:06:55.857  2651  2651 I gralloc : g            =  8:8
>>> 01-01 05:06:55.857  2651  2651 I gralloc : b            =  0:8
>>> 01-01 05:06:55.857  2651  2651 I gralloc : width        = 76 mm
>>> (160.421051 dpi)
>>> 01-01 05:06:55.857  2651  2651 I gralloc : height       = 102 mm
>>> (159.372543 dpi)
>>> 01-01 05:06:55.857  2651  2651 I gralloc : refresh rate = 60.00 Hz
>>> 01-01 05:06:55.884  2651  2651 E hwc-drm-plane: Could not get rotation
>>> property
>>> 01-01 05:06:55.884  2651  2651 I hwc-drm-plane: Could not get alpha property
>>> 01-01 05:06:55.886  2651  2651 E hwc-drm-plane: Could not get rotation
>>> property
>>> 01-01 05:06:55.886  2651  2651 I hwc-drm-plane: Could not get alpha property
>>> 01-01 05:06:55.888  2651  2651 E hwc-drm-plane: Could not get rotation
>>> property
>>> 01-01 05:06:55.888  2651  2651 I hwc-drm-plane: Could not get alpha property
>>> 01-01 05:06:55.889  2651  2651 E hwcomposer-drm: Failed to create dummy
>>> sw sync timeline -1
This is why it fails down below. Again, forgot to set permissions in
init.rc for sw_sync.
>>> 01-01 05:06:55.890  2651  2651 E SurfaceFlinger: composer device failed
>>> to initialize (Operation not permitted)
>>> 01-01 05:06:55.890  2651  2651 W SurfaceFlinger: no suitable EGLConfig
>>> found, trying a simpler query
>>> 01-01 05:06:55.890  2651  2651 F SurfaceFlinger: no suitable EGLConfig
>>> found, giving up
>>> 01-01 05:06:55.890  2651  2651 F libc    : Fatal signal 6 (SIGABRT),
>>> code -6 in tid 2651 (surfaceflinger)
>>> 01-01 05:06:55.890  2651  2651 F libc    : Unable to open connection to
>>> debuggerd: Connection refused
>>>
>>> Now is the time to figure out which of these error messages is fatal,
>>> and how to solve the underlying problem, e.g. what is this rotation
>>> property, and where should it come from?
>>> As to the sw sync timeline: I remember seeing this a few months ago, and
>>> it was related to a kernel driver that may need loading.
>>>
>>> Am 22.06.2018 um 18:49 schrieb Josua Mayer:
>>>> Good day to you all,
>>>>
>>>> While again looking into where I left off with replicant a few months
>>>> ago, I came across a big blocker that more or less prevents any
>>>> meaningful work:
>>>> Neither /dev/fb0 nor /dev/dri/* do exist.
>>>> How can we find out why that happens?
>>>>
>>>> Versions:
>>>> I am using my own kernel branch based on letux-4.17.2 instead of the
>>>> previously known-working version work/lukas/android-4.10.
>>>> I wanted to minimize the number of patches on the android kernel, and be
>>>> closer to upstream while potentially debugging problems in
>>>> drm_hwcomposer and how it talks to /dev/dri/card0.
>>>>
>>>> In that previous 4.10 tree I notice this commit:
>>>> commit 00702c5e70b8adb8c1b0c116f1d4a41e3569ada1
>>>> boot:dts: disable display1/tv0 to make /dev/graphics/fb0 appear
>>>>
>>>> I checked its diff, and all it does is remove an alias from device-tree,
>>>> so it does not really seem to disable anything.
>>>> And sure enough, applying this change in my DTBs makes no difference to
>>>> the issue of missing /dev/fb0 (and dri).
>>>>
>>>> Lukas, do you remember what the idea behind that commit was?
>>>>
>>>> Please find attached a boot log of my latest replicant build. Maybe it
>>>> contains a hint for the more trained eye?
>>>>
>>>> br
>>>> Josua Mayer
>>>>
>> <replicant2.log>_______________________________________________
>> Gta04-owner mailing list
>> Gta04-owner at goldelico.com
>> http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner
> _______________________________________________
> Gta04-owner mailing list
> Gta04-owner at goldelico.com
> http://lists.goldelico.com/mailman/listinfo.cgi/gta04-owner



More information about the Gta04-owner mailing list