diff --git a/settings/gdm-monitor.nix b/settings/gdm-monitor.nix
index 4560a30..aea2c52 100644
--- a/settings/gdm-monitor.nix
+++ b/settings/gdm-monitor.nix
@@ -1,44 +1,59 @@
# settings/gdm-monitor-sync.nix
{ config, pkgs, lib, ... }:
-
{
# Copy monitors.xml to GDM's config directory to prevent display mode changes during login
# This eliminates the black screen/signal loss when transitioning from GDM to user session
-config = lib.mkIf (config.networking.hostName == "FredOS-Gaming") {
- environment.etc."gdm-monitors.xml" = {
- source = pkgs.writeText "monitors.xml" ''
-
-
- physical
-
- 0
- 0
- 1
- yes
-
-
- DP-3
- GBT
- G34WQCP
- 25272B000088
-
-
- 3440
- 1440
- 190.000
-
-
-
-
-
- '';
- target = "gdm-monitors.xml";
- };
-
- # Create GDM config directory and symlink the monitors.xml file
- systemd.tmpfiles.rules = [
- "d /var/lib/gdm/.config 0711 gdm gdm"
- "L+ /var/lib/gdm/.config/monitors.xml - - - - /etc/gdm-monitors.xml"
- ];
-};
+ config = lib.mkIf (config.networking.hostName == "FredOS-Gaming") {
+ # Copy monitors.xml to GDM's config directory
+ environment.etc."gdm-monitors.xml" = {
+ source = pkgs.writeText "monitors.xml" ''
+
+
+ physical
+
+ 0
+ 0
+ 1
+ yes
+
+
+ DP-3
+ GBT
+ G34WQCP
+ 25272B000088
+
+
+ 3440
+ 1440
+ 190.000
+
+
+
+
+
+ '';
+ target = "gdm-monitors.xml";
+ };
+
+ systemd.tmpfiles.rules = [
+ "d /var/lib/gdm/.config 0711 gdm gdm"
+ "L+ /var/lib/gdm/.config/monitors.xml - - - - /etc/gdm-monitors.xml"
+ ];
+
+ # Log what GDM is actually using
+ systemd.services.gdm-display-check = {
+ description = "Log GDM display settings";
+ wantedBy = [ "gdm.service" ];
+ after = [ "gdm.service" ];
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${pkgs.writeShellScript "check-gdm-display" ''
+ sleep 5
+ DISPLAY=:1024 ${pkgs.xorg.xrandr}/bin/xrandr > /tmp/gdm-display-info.txt 2>&1 || true
+ echo "=== GDM monitors.xml ===" >> /tmp/gdm-display-info.txt
+ cat /var/lib/gdm/.config/monitors.xml >> /tmp/gdm-display-info.txt 2>&1 || true
+ ''}";
+ };
+ };
+ }; # <-- This was missing
}