Skip to content

Example of a dummy screen #536

@maitredede

Description

@maitredede

Hello,

I am trying to build an application to build a fake screen, but it seams that I am missing some things, since my display almost freeze.

I am using Debian 13 (trixie) that provides libevdi 1.14.8, on amd64 PC.

The principle of the program would be :

  • init
  • while no signal (sigint) do
    • dump on terminal display events (and get updated pixel values)
  • cleanup

I did not find a working example that does not free my display, nor any doc of the lifecycle of an application using this library.

It looks like I hit a deadlock somewhere : a first call to evdi_handle_events allows to get the first display mode set, but the next poll (from evdi_get_event_ready) goes timeout.

When I receive a "mode change" event, I recreate and reregister the buffers, and ask for an update. But I never get a response back, and I can't use my computer.

I have a failsafe that stop my program after 1min (with a disconnect/close).

main.c

gcc main.c -o simulate_display -levdi -Wall
sudo timeout 120 ./simulate_display

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions