No GTK/Wekbkit2 rendering on hdmi output

I built a typical Wekbit2 Gtk4 app that renders html content and when opened locally on the device the screen remains white but if I drag the screen I can see the objects placed as part of the dom.
If I remotely start the app using ssh-o ForwardX11=yes -X user@ip the app renders correctly in my host.

Is there any 2D driver required in jetson5.1.1 to make it work?

int main(int argc, char* argv[]) {
    // Initialize GTK+
    gtk_init(&argc, &argv);

    // Create a window that will contain the browser instance
    GtkWidget *main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

    // Set the window size if we are running remotely or use the full screen size
    int screen_width = 800;
    int screen_height = 800;
    if (!isRemoteX11()){
        printf("Local Display\n");
        getScreenSize(&screen_width, &screen_height);
    } else {
        printf("Remote X display, simulating resolution of %dx%d\n", screen_width, screen_height);
    }
    
    gtk_window_set_default_size(GTK_WINDOW(main_window), screen_width, screen_height);

    // Remove the resize capability from the main window
    gtk_window_set_resizable(GTK_WINDOW(main_window), FALSE);

    // Make the main window truly fullscreen
    gtk_window_fullscreen(GTK_WINDOW(main_window));

    // Create a browser instance
    WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());

    // Put the browser area into the main window
    gtk_container_add(GTK_CONTAINER(main_window), GTK_WIDGET(webView));

    // Set up callbacks so that if either the main window or the browser instance is
    // closed, the program will exit
    g_signal_connect(main_window, "destroy", G_CALLBACK(destroyWindowCb), NULL);
    g_signal_connect(webView, "close", G_CALLBACK(closeWebViewCb), main_window);


    // Load a web page into the browser instance
    webkit_web_view_load_uri(webView, "file:///usr/web/index.html");

    // Make sure that when the browser area becomes visible, it will get mouse
    // and keyboard events
    gtk_widget_grab_focus(GTK_WIDGET(webView));
    gtk_window_present(GTK_WINDOW(main_window));

    // Make sure the main window and all its contents are visible
    gtk_widget_show_all(main_window);

    // Run the main GTK+ event loop
    gtk_main();

    return 0;
}

Hi,
Could you try Jetpack 4.6.4 and see if it works? Also Jetpack 5.1.2 is released, you may upgrade to the version and try.

thanks for the answer! I’ll try that separately to validate if that can be related, nevertheless we need 5.1.1 due to the version of the camera drivers.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.