Skip to content
Commits on Source (22)
......@@ -21,6 +21,7 @@ build-fedora:
libXdmcp-devel
libattr-devel
libcanberra-devel
libgudev-devel
libdmx-devel
libselinux-devel
libtool
......
============
Version 42.0
============
- Work better on nvidia
- Look in DATADIR for launch environment data files
- PAM updates on exherbo
- Translation updates
============
Version 41.3
============
......
......@@ -251,6 +251,15 @@ gdm_settings_direct_init (GdmSettings *settings,
return TRUE;
}
void
gdm_settings_direct_reload (void)
{
if (!settings_object)
return;
gdm_settings_reload (settings_object);
}
void
gdm_settings_direct_shutdown (void)
{
......
......@@ -30,6 +30,8 @@ G_BEGIN_DECLS
gboolean gdm_settings_direct_init (GdmSettings *settings,
const char *schemas_file,
const char *root);
void gdm_settings_direct_reload (void);
void gdm_settings_direct_shutdown (void);
gboolean gdm_settings_direct_get (const char *key,
......
......@@ -184,12 +184,16 @@ backend_value_changed (GdmSettingsBackend *backend,
g_signal_emit (settings, signals [VALUE_CHANGED], 0, key, old_value, new_value);
}
static void
gdm_settings_init (GdmSettings *settings)
void
gdm_settings_reload (GdmSettings *settings)
{
GList *l;
GdmSettingsBackend *backend;
g_list_foreach (settings->backends, (GFunc) g_object_unref, NULL);
g_list_free (settings->backends);
settings->backends = NULL;
backend = gdm_settings_desktop_backend_new (GDM_CUSTOM_CONF);
if (backend)
settings->backends = g_list_prepend (NULL, backend);
......@@ -208,6 +212,12 @@ gdm_settings_init (GdmSettings *settings)
}
}
static void
gdm_settings_init (GdmSettings *settings)
{
gdm_settings_reload (settings);
}
static void
gdm_settings_finalize (GObject *object)
{
......
......@@ -40,6 +40,7 @@ typedef enum
GQuark gdm_settings_error_quark (void);
GdmSettings * gdm_settings_new (void);
void gdm_settings_reload (GdmSettings *settings);
/* exported */
......
......@@ -53,7 +53,6 @@
#define INITIAL_SETUP_USERNAME "gnome-initial-setup"
#define GDM_SESSION_MODE "gdm"
#define INITIAL_SETUP_SESSION_MODE "initial-setup"
#define GNOME_SESSION_SESSIONS_PATH DATADIR "/gnome-session/sessions"
extern char **environ;
......@@ -240,8 +239,9 @@ build_launch_environment (GdmLaunchEnvironment *launch_environment,
g_hash_table_insert (hash,
g_strdup ("XDG_DATA_DIRS"),
g_strdup_printf ("%s:%s",
g_strdup_printf ("%s:%s:%s",
DATADIR "/gdm/greeter",
DATADIR,
system_data_dirs));
g_free (system_data_dirs);
......
......@@ -28,6 +28,10 @@
#include <glib-object.h>
#include <gio/gio.h>
#ifdef HAVE_UDEV
#include <gudev/gudev.h>
#endif
#include <systemd/sd-login.h>
#include "gdm-common.h"
......@@ -52,7 +56,10 @@
struct _GdmLocalDisplayFactory
{
GdmDisplayFactory parent;
GdmDisplayFactory parent;
#ifdef HAVE_UDEV
GUdevClient *gudev_client;
#endif
GdmDBusLocalDisplayFactory *skeleton;
GDBusConnection *connection;
......@@ -65,9 +72,14 @@ struct _GdmLocalDisplayFactory
guint seat_removed_id;
guint seat_properties_changed_id;
gboolean seat0_has_platform_graphics;
gboolean seat0_has_boot_up_graphics;
gboolean seat0_graphics_check_timed_out;
guint seat0_graphics_check_timeout_id;
guint uevent_handler_id;
#if defined(ENABLE_USER_DISPLAY_SERVER)
unsigned int active_vt;
guint active_vt_watch_id;
......@@ -622,6 +634,86 @@ lookup_prepared_display_by_seat_id (const char *id,
return lookup_by_seat_id (id, display, user_data);
}
#ifdef HAVE_UDEV
static gboolean
udev_is_settled (GdmLocalDisplayFactory *factory)
{
g_autoptr (GUdevEnumerator) enumerator = NULL;
GList *devices;
GList *node;
gboolean is_settled = FALSE;
if (factory->seat0_has_platform_graphics) {
g_debug ("GdmLocalDisplayFactory: udev settled, platform graphics enabled.");
return TRUE;
}
if (factory->seat0_has_boot_up_graphics) {
g_debug ("GdmLocalDisplayFactory: udev settled, boot up graphics available.");
return TRUE;
}
if (factory->seat0_graphics_check_timed_out) {
g_debug ("GdmLocalDisplayFactory: udev timed out, proceeding anyway.");
return TRUE;
}
g_debug ("GdmLocalDisplayFactory: Checking if udev has settled enough to support graphics.");
enumerator = g_udev_enumerator_new (factory->gudev_client);
g_udev_enumerator_add_match_name (enumerator, "card*");
g_udev_enumerator_add_match_tag (enumerator, "master-of-seat");
g_udev_enumerator_add_match_subsystem (enumerator, "drm");
devices = g_udev_enumerator_execute (enumerator);
if (!devices) {
g_debug ("GdmLocalDisplayFactory: udev has no candidate graphics devices available yet.");
return FALSE;
}
node = devices;
while (node != NULL) {
GUdevDevice *device = node->data;
GList *next_node = node->next;
g_autoptr (GUdevDevice) platform_device = NULL;
g_autoptr (GUdevDevice) pci_device = NULL;
platform_device = g_udev_device_get_parent_with_subsystem (device, "platform", NULL);
if (platform_device != NULL) {
g_debug ("GdmLocalDisplayFactory: Found embedded platform graphics, proceeding.");
factory->seat0_has_platform_graphics = TRUE;
is_settled = TRUE;
break;
}
pci_device = g_udev_device_get_parent_with_subsystem (device, "pci", NULL);
if (pci_device != NULL) {
gboolean boot_vga;
boot_vga = g_udev_device_get_sysfs_attr_as_int (pci_device, "boot_vga");
if (boot_vga == 1) {
g_debug ("GdmLocalDisplayFactory: Found primary PCI graphics adapter, proceeding.");
factory->seat0_has_boot_up_graphics = TRUE;
is_settled = TRUE;
break;
} else {
g_debug ("GdmLocalDisplayFactory: Found secondary PCI graphics adapter, not proceeding yet.");
}
}
node = next_node;
}
g_debug ("GdmLocalDisplayFactory: udev has %ssettled enough for graphics.", is_settled? "" : "not ");
g_list_free_full (devices, g_object_unref);
return is_settled;
}
#endif
static int
on_seat0_graphics_check_timeout (gpointer user_data)
{
......@@ -653,6 +745,7 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory,
gboolean wayland_enabled = FALSE, xorg_enabled = FALSE;
g_autofree gchar *preferred_display_server = NULL;
gboolean falling_back = FALSE;
gboolean waiting_on_udev = FALSE;
gdm_settings_direct_get_boolean (GDM_KEY_WAYLAND_ENABLE, &wayland_enabled);
gdm_settings_direct_get_boolean (GDM_KEY_XORG_ENABLE, &xorg_enabled);
......@@ -664,19 +757,28 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory,
return;
}
ret = sd_seat_can_graphical (seat_id);
#ifdef HAVE_UDEV
waiting_on_udev = !udev_is_settled (factory);
#endif
if (ret < 0) {
g_critical ("Failed to query CanGraphical information for seat %s", seat_id);
return;
}
if (!waiting_on_udev) {
ret = sd_seat_can_graphical (seat_id);
if (ret == 0) {
g_debug ("GdmLocalDisplayFactory: System doesn't currently support graphics");
seat_supports_graphics = FALSE;
if (ret < 0) {
g_critical ("Failed to query CanGraphical information for seat %s", seat_id);
return;
}
if (ret == 0) {
g_debug ("GdmLocalDisplayFactory: System doesn't currently support graphics");
seat_supports_graphics = FALSE;
} else {
g_debug ("GdmLocalDisplayFactory: System supports graphics");
seat_supports_graphics = TRUE;
}
} else {
g_debug ("GdmLocalDisplayFactory: System supports graphics");
seat_supports_graphics = TRUE;
g_debug ("GdmLocalDisplayFactory: udev is still settling, so not creating display yet");
seat_supports_graphics = FALSE;
}
if (g_strcmp0 (seat_id, "seat0") == 0) {
......@@ -703,7 +805,7 @@ ensure_display_for_seat (GdmLocalDisplayFactory *factory,
/* For seat0, we have a fallback logic to still try starting it after
* SEAT0_GRAPHICS_CHECK_TIMEOUT seconds. i.e. we simply continue even if
* CanGraphical is unset.
* CanGraphical is unset or udev otherwise never finds a suitable graphics card.
* This is ugly, but it means we'll come up eventually in some
* scenarios where no master device is present.
* Note that we'll force an X11 fallback even though there might be
......@@ -949,10 +1051,12 @@ on_seat_properties_changed (GDBusConnection *connection,
if (ret < 0)
return;
if (ret != 0)
if (ret != 0) {
gdm_settings_direct_reload ();
ensure_display_for_seat (GDM_LOCAL_DISPLAY_FACTORY (user_data), seat);
else
} else {
delete_display (GDM_LOCAL_DISPLAY_FACTORY (user_data), seat);
}
}
static gboolean
......@@ -1166,10 +1270,36 @@ on_vt_changed (GIOChannel *source,
}
#endif
#ifdef HAVE_UDEV
static void
on_uevent (GUdevClient *client,
const char *action,
GUdevDevice *device,
GdmLocalDisplayFactory *factory)
{
if (!g_udev_device_get_device_file (device))
return;
if (g_strcmp0 (action, "add") != 0 &&
g_strcmp0 (action, "change") != 0)
return;
if (!udev_is_settled (factory))
return;
g_signal_handler_disconnect (factory->gudev_client, factory->uevent_handler_id);
factory->uevent_handler_id = 0;
gdm_settings_direct_reload ();
ensure_display_for_seat (factory, "seat0");
}
#endif
static void
gdm_local_display_factory_start_monitor (GdmLocalDisplayFactory *factory)
{
g_autoptr (GIOChannel) io_channel = NULL;
const char *subsystems[] = { "drm", NULL };
factory->seat_new_id = g_dbus_connection_signal_subscribe (factory->connection,
"org.freedesktop.login1",
......@@ -1201,6 +1331,13 @@ gdm_local_display_factory_start_monitor (GdmLocalDisplayFactory *factory)
on_seat_properties_changed,
g_object_ref (factory),
g_object_unref);
#ifdef HAVE_UDEV
factory->gudev_client = g_udev_client_new (subsystems);
factory->uevent_handler_id = g_signal_connect (factory->gudev_client,
"uevent",
G_CALLBACK (on_uevent),
factory);
#endif
#if defined(ENABLE_USER_DISPLAY_SERVER)
io_channel = g_io_channel_new_file ("/sys/class/tty/tty0/active", "r", NULL);
......@@ -1219,6 +1356,12 @@ gdm_local_display_factory_start_monitor (GdmLocalDisplayFactory *factory)
static void
gdm_local_display_factory_stop_monitor (GdmLocalDisplayFactory *factory)
{
if (factory->uevent_handler_id) {
g_signal_handler_disconnect (factory->gudev_client, factory->uevent_handler_id);
factory->uevent_handler_id = 0;
}
g_clear_object (&factory->gudev_client);
if (factory->seat_new_id) {
g_dbus_connection_signal_unsubscribe (factory->connection,
factory->seat_new_id);
......
......@@ -267,16 +267,8 @@ static gboolean
on_sighup_cb (gpointer user_data)
{
g_debug ("Got HUP signal");
/* Reread config stuff like system config files, VPN service
* files, etc
*/
g_object_unref (settings);
settings = gdm_settings_new ();
if (settings != NULL) {
if (! gdm_settings_direct_init (settings, DATADIR "/gdm/gdm.schemas", "/")) {
g_warning ("Unable to initialize settings");
}
}
gdm_settings_reload (settings);
return TRUE;
}
......
......@@ -204,6 +204,10 @@ if xdmcp_dep.found()
]
endif
if gudev_dep.found()
gdm_daemon_deps += gudev_dep
endif
gdm_daemon = executable('gdm',
[ gdm_daemon_sources, gdm_daemon_gen_sources ],
dependencies: gdm_daemon_deps,
......
......@@ -10,7 +10,9 @@ IMPORT{cmdline}="nomodeset", GOTO="gdm_disable_wayland"
LABEL="gdm_nomodeset_end"
# Disable wayland when nvidia modeset is disabled or when drivers are a lower
# version than 470, in any case always prefer Xorg
# version than 470,
# For versions above 470 but lower than 510 prefer Xorg,
# Above 510, prefer Wayland.
KERNEL!="nvidia_drm", GOTO="gdm_nvidia_drm_end"
SUBSYSTEM!="module", GOTO="gdm_nvidia_drm_end"
ACTION!="add", GOTO="gdm_nvidia_drm_end"
......@@ -18,6 +20,9 @@ ACTION!="add", GOTO="gdm_nvidia_drm_end"
ATTR{parameters/modeset}!="Y", GOTO="gdm_disable_wayland"
# disable wayland for nvidia drivers versions lower than 470
ATTR{version}=="4[0-6][0-9].*|[0-3][0-9][0-9].*|[0-9][0-9].*|[0-9].*", GOTO="gdm_disable_wayland"
# For nvidia drivers versions Above 510, keep Wayland by default
ATTR{version}=="[5-9][1-9][0-9].*", GOTO="gdm_end"
# For nvidia drivers versions 470-495, prefer Xorg by default
GOTO="gdm_prefer_xorg"
LABEL="gdm_nvidia_drm_end"
......
# mirrors system-auth / system(-local)-login
# except for the authentication method, which is:
# always permit login
#%PAM-1.0
auth [success=ok default=1] pam_gdm.so
-auth optional pam_gnome_keyring.so
auth optional pam_gnome_keyring.so
auth sufficient pam_permit.so
account include system-local-login
......@@ -11,4 +9,4 @@ account include system-local-login
password include system-local-login
session include system-local-login
-session optional pam_gnome_keyring.so auto_start
session optional pam_gnome_keyring.so auto_start
account include system-login
#%PAM-1.0
auth substack fingerprint-auth
auth optional pam_gnome_keyring.so
auth required pam_shells.so
auth required pam_nologin.so
auth required pam_faillock.so preauth
auth required pam_fprintd.so
auth required pam_env.so
auth [success=ok default=1] pam_gdm.so
auth optional pam_gnome_keyring.so
password required pam_deny.so
account include system-local-login
session substack system-login
session optional pam_gnome_keyring.so auto_start
password include system-local-login
session include system-local-login
session optional pam_gnome_keyring.so auto_start
account required pam_nologin.so
account required pam_succeed_if.so audit quiet_success user = gdm
account required pam_permit.so
#%PAM-1.0
auth required pam_env.so
auth required pam_succeed_if.so audit quiet_success user = gdm
auth required pam_permit.so
auth required pam_env.so
auth optional pam_permit.so
account required pam_succeed_if.so audit quiet_success user = gdm
account optional pam_permit.so
password required pam_deny.so
-session optional pam_systemd.so
session optional pam_loginuid.so
session optional pam_keyinit.so force revoke
session required pam_succeed_if.so audit quiet_success user = gdm
session required pam_permit.so
-session optional pam_systemd.so
-session optional pam_elogind.so
session optional pam_permit.so
account include system-login
#%PAM-1.0
auth substack system-login
auth include system-local-login
auth optional pam_gnome_keyring.so
password required pam_deny.so
account include system-local-login
session substack system-login
session optional pam_gnome_keyring.so auto_start
password include system-local-login
password optional pam_gnome_keyring.so use_authtok
session include system-local-login
session optional pam_gnome_keyring.so auto_start
# mirrors system-auth / system(-local)-login
# except for the authentication method, which is:
# smartcard login
#%PAM-1.0
auth required pam_env.so
auth required pam_tally.so file=/var/log/faillog onerr=succeed
auth required pam_shells.so
auth required pam_nologin.so
auth [success=done ignore=ignore default=die] pam_pkcs11.so wait_for_card card_only
-auth optional pam_gnome_keyring.so
auth required pam_faillock.so preauth
auth required pam_pkcs11.so wait_for_card card_only
auth required pam_env.so
auth [success=ok default=1] pam_gdm.so
auth optional pam_gnome_keyring.so
account include system-local-login
password include system-local-login
session include system-local-login
-session optional pam_gnome_keyring.so auto_start
session optional pam_gnome_keyring.so auto_start
This diff is collapsed.
This diff is collapsed.
project('gdm', 'c',
version: '41.3',
version: '42.0',
license: 'GPL2+',
meson_version: '>= 0.50',
)
......@@ -38,6 +38,7 @@ config_h_dir = include_directories('.')
# Dependencies
udev_dep = dependency('udev')
gudev_dep = dependency('gudev-1.0', version: '>= 232')
glib_min_version = '2.56.0'
......@@ -244,6 +245,7 @@ conf.set_quoted('SYSTEMD_X_SERVER', systemd_x_server)
conf.set('WITH_PLYMOUTH', plymouth_dep.found())
conf.set_quoted('X_SERVER', x_bin)
conf.set_quoted('X_PATH', x_path)
conf.set('HAVE_UDEV', gudev_dep.found())
conf.set('HAVE_UT_UT_HOST', utmp_has_host_field)
conf.set('HAVE_UT_UT_PID', utmp_has_pid_field)
conf.set('HAVE_UT_UT_ID', utmp_has_id_field)
......
# gdm ja.po.
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# Copyright (C) 1999-2015, 2019, 2021-2022 Free Software Foundation, Inc.
# Yukihiro Nakai <nacai@iname.com>, 1999.
# ITANI Eiichiro <emu@ceres.dti.ne.jp>, 1999.
# Takayuki KUSANO <AE5T-KSN@asahi-net.or.jp>, 2000, 2010, 2012.
......@@ -13,16 +13,17 @@
# Hideki Yamane (Debian-JP) <henrich@debian.or.jp>, 2009.
# Hideki Yamane <henrich@debian.org>, 2011.
# Noriko Mizumoto <noriko@fedoraproject.org>, 2012.
# Jiro Matsuzawa <jmatsuzawa@gnome.org>, 2013, 2014.
# Jiro Matsuzawa <jmatsuzawa@gnome.org>, 2013-2014.
# Hajime Taira <htaira@redhat.com>, 2015.
# sicklylife <translation@sicklylife.jp>, 2019.
# sicklylife <translation@sicklylife.jp>, 2019, 2022.
# Peniel Vargas <penieru@gmail.com>, 2021.
#
msgid ""
msgstr ""
"Project-Id-Version: gdm master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gdm/issues\n"
"POT-Creation-Date: 2019-08-05 22:13+0000\n"
"PO-Revision-Date: 2019-08-25 21:00+0900\n"
"PO-Revision-Date: 2022-03-13 21:30-0400\n"
"Last-Translator: sicklylife <translation@sicklylife.jp>\n"
"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
"Language: ja\n"
......@@ -199,10 +200,55 @@ msgstr "ディスプレイのデバイスです"
msgid "Could not create authentication helper process"
msgstr "認証ヘルパーのプロセスを作成できませんでした"
#: daemon/gdm-session-worker.c:755
msgid ""
"You reached the maximum password authentication attempts, please try another "
"method"
msgstr "パスワード認証の試行回数上限に達したため別の方法でやり直してください"
#: daemon/gdm-session-worker.c:758
msgid ""
"You reached the maximum auto login attempts, please try another "
"authentication method"
msgstr "自動ログインの試行回数上限に達したため別の認証方法でやり直してください"
#: daemon/gdm-session-worker.c:761
msgid ""
"You reached the maximum fingerprint authentication attempts, please try "
"another method"
msgstr "指紋認証の試行回数上限に達したため別の方法でやり直してください"
#: daemon/gdm-session-worker.c:764
msgid ""
"You reached the maximum smart card authentication attempts, please try "
"another method"
msgstr "スマートカード認証の試行回数上限に達したため別の方法でやり直してください"
#: daemon/gdm-session-worker.c:766
msgid ""
"You reached the maximum authentication attempts, please try another method"
msgstr "認証の試行回数上限に達したため別の方法でやり直してください"
#: daemon/gdm-session-worker.c:756
msgid "Your account was given a time limit that’s now passed."
msgstr "アカウントに設定されていた有効期限が切れました。"
#: daemon/gdm-session-worker.c:773
msgid "Sorry, password authentication didn’t work. Please try again."
msgstr "パスワード認証に失敗しました。やり直してください。"
#: daemon/gdm-session-worker.c:776
msgid "Sorry, auto login didn’t work. Please try again."
msgstr "自動ログインに失敗しました。やり直してください。"
#: daemon/gdm-session-worker.c:779
msgid "Sorry, fingerprint authentication didn’t work. Please try again."
msgstr "指紋認証に失敗しました。やり直してください。"
#: daemon/gdm-session-worker.c:782
msgid "Sorry, smart card authentication didn’t work. Please try again."
msgstr "スマートカード認証に失敗しました。やり直してください。"
#: daemon/gdm-session-worker.c:763
msgid "Sorry, that didn’t work. Please try again."
msgstr "認証に失敗しました。やり直してください。"
......