canonical / desktop-security-center

GNU General Public License v3.0
13 stars 5 forks source link

Unable to launch on a Thinkpad x201 without booting with `nomodeset` #81

Open Hyask opened 1 week ago

Hyask commented 1 week ago

Is there an existing issue for this?

Describe the bug

This bug was originally reported here.

I'm unable to run some/most/all? Flutter apps on my Thinkpad x201. Desktop security center has a nicer error than subiquity, and is easier to reproduce so reporting there, but maybe it should be forwarded to Flutter instead after first investigation.

Steps to reproduce the behavior

Expected behavior

The security center should just start.

Ubuntu release

24.10

What architecture are you using?

amd64

System info

$  uname -rv && snap info snapd prompting-client desktop-security-center
6.11.0-8-generic #8-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 16 13:41:20 UTC 2024
name:      snapd
summary:   Daemon and tooling that enable snap packages
publisher: Canonical✓
store-url: https://snapcraft.io/snapd
license:   GPL-3.0
description: |
  Install, configure, refresh and remove snap packages. Snaps are
  'universal' packages that work across many different Linux systems,
  enabling secure distribution of the latest apps and utilities for
  cloud, servers, desktops and the internet of things.

  Start with 'snap list' to see installed snaps.
type:         snapd
snap-id:      PMrrV4ml8uWuEUDBT8dSGnKUYbevVhc4
tracking:     latest/stable
refresh-date: aujourd'hui à 15h22, heure des Rocheuses
channels:
  latest/stable:    2.63                   2024-10-09 (21759) 40MB -
  latest/candidate: 2.65.3                 2024-09-18 (22991) 46MB -
  latest/beta:      2.66                   2024-10-04 (23177) 46MB -
  latest/edge:      2.65.3+git225.gd33d96e 2024-10-09 (23215) 46MB -
installed:          2.63                              (21759) 40MB snapd
---
name:      prompting-client
summary:   Prompting Client
publisher: Canonical✓
store-url: https://snapcraft.io/prompting-client
license:   GPL-3.0
description: |
  The prompting user interface for snap apparmor prompting
commands:
  - prompting-client.echo
  - prompting-client.logging-level
  - prompting-client.scripted
services:
  prompting-client.daemon: simple, enabled, inactive
snap-id:      aoc5lfC8aUd2VL8VpvynUJJhGXp5K6Dj
tracking:     1/stable/ubuntu-24.10
refresh-date: aujourd'hui à 15h22, heure des Rocheuses
channels:
  latest/stable:    0+git.d60470b 2024-10-07 (51) 14MB -
  latest/candidate: ↑                                  
  latest/beta:      ↑                                  
  latest/edge:      0+git.0dad849 2024-10-07 (53) 14MB -
  1/stable:         0+git.d60470b 2024-10-07 (51) 14MB -
  1/candidate:      ↑                                  
  1/beta:           ↑                                  
  1/edge:           0+git.0dad849 2024-10-07 (53) 14MB -
installed:          0+git.d60470b            (51) 14MB -
---
name:      desktop-security-center
summary:   Desktop Security Center
publisher: Canonical✓
store-url: https://snapcraft.io/desktop-security-center
license:   GPL-3.0
description: |
  Security Center UI for the desktop
commands:
  - desktop-security-center
snap-id:      FppXWunWzuRT2NUT9CwoBPNJNZBYOCk0
tracking:     1/stable/ubuntu-24.10
refresh-date: aujourd'hui à 15h22, heure des Rocheuses
channels:
  latest/stable:    0+git.84f197a 2024-10-03 (32) 12MB -
  latest/candidate: ↑                                  
  latest/beta:      ↑                                  
  latest/edge:      0+git.0316919 2024-10-07 (36) 12MB -
  1/stable:         0+git.84f197a 2024-10-03 (32) 12MB -
  1/candidate:      ↑                                  
  1/beta:           ↑                                  
  1/edge:           0+git.0316919 2024-10-07 (36) 12MB -
installed:          0+git.84f197a            (32) 12MB -

Additional context

No response

d-loose commented 1 week ago

Thanks for your report!

The same bug has been reported here: https://bugs.launchpad.net/snap-store-desktop/+bug/2047739. @robert-ancell do you know more about this?

vanvugt commented 1 week ago

Please report the bug to https://github.com/flutter/flutter/issues and then tell us the new issue ID.

robert-ancell commented 1 week ago

glFenceSync is only used in GTK (i.e. not in the Flutter code). It has code to check if it is available and avoids it if not. Could you install gtk-3-examples and run gtk3-demo and double click on the "OpenGL Area" item on the left and see if that is working for you?

Hyask commented 1 week ago

Okay, was hard to test, because of the regular freezes I have without nomodeset, but final got it.

The OpenGL Area seems to be working fine, I have the yellow triangle rotating correctly on the different axis, same as on another machine. Is there an other test to maybe track further down what works and what doesn't?

robert-ancell commented 1 week ago

Looking at the GTK source this was fixed in GTK 3.24.39, and checks that you have OpenGL ES 3.0 or OpenGL 3.2 or the GL_ARB_sync/GL_APPLE_sync extensions.

However sync is only used if we have a custom GL context, which we have to do for Flutter and isn't used in the demo. So if you are able please compile and test the following:

#include <gtk/gtk.h>

static GdkGLContext *create_context_cb(GtkWidget *a) {
  g_autoptr(GError) error = NULL;
  GdkGLContext *c =
      gdk_window_create_gl_context(gtk_widget_get_window(a), &error);
  if (c == NULL) {
    g_printerr("Failed to create context: %s\n", error->message);
  }

  return c;
}

int main(int argc, char **argv) {
  gtk_init(&argc, &argv);

  GtkWidget *w = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_widget_show(w);

  GtkWidget *a = gtk_gl_area_new();
  g_signal_connect(a, "create-context", G_CALLBACK(create_context_cb), NULL);
  gtk_widget_show(a);
  gtk_container_add(GTK_CONTAINER(w), a);

  gtk_main();
}

Compile with gcc -g -Wall test-sync.c -o test-sync $(pkg-config --cflags --libs gtk+-3.0)

Hyask commented 5 days ago

The code you gave me opens a window filled with black. This works on both GNOME (Xorg and Wayland) and sway (Wayland), fwiw.

robert-ancell commented 3 days ago

And it doesn't show the "No provider of glFenceSync found" message, right?

Hyask commented 3 days ago

No, no message printed at all.