Cinnamon bug with headless setup

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
s5s
Level 1
Level 1
Posts: 1
Joined: Sat Mar 16, 2024 5:16 pm

Cinnamon bug with headless setup

Post by s5s »

Hi guys,

I believe I've encountered a bug in cinnamon and I thought it's worth documenting it. In short, cinnamon DE crashes when run in headless mode. I downloaded and installed the latest Linux mint about 1-2 months ago so I have relatively recent software versions.

The long description is this. I have a PC which has an integrated graphics card on the motherboard (MB) but also a dedicated Nvidia graphics card with Nvidia drivers (v535). The PC was set up as a desktop PC attached to a single monitor plugged into the dedicated graphics card. This setup is fully working and there were no issues to report.

I converted the PC to a remote machine - in this set up, the PC is plugged into power and ethernet but has no monitor attached and I remote to it from my laptop using nomachine. Initially, this resulted in a small resolution display (e.g. 640x480). I found out that I need to have a "headless" setup as per:

https://virtualgl.org/Documentation/HeadlessNV

The resulting xorg.conf is below:

Code: Select all

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 535.154.05
Section "DRI"
        Mode 0666
EndSection

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "NVIDIA GeForce GT 1030"
    BusID          "PCI:6:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    Option         "HardDPMS" "false"
    SubSection     "Display"
        Virtual     3840 2160
        Depth       24
    EndSubSection
EndSection

This seemed to work - when I remoted to the display the login screen was full resolution. Unfortumately, almost immediately after typing my password on the login page, cinnamon crashes. As far as I can tell, it is the DE or the windows manager that crashes because I can still right-click and get a menu and start a terminal and then start applications. The windows don't have the minimize/maximize/close buttons though. I looked into '.xsession-errors' and I saw that cinnamon crashes because it can't find a monitor as show in the log below:

Code: Select all

dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting XAUTHORITY=/home/myuser/.Xauthority
/etc/X11/Xsession.d/30x11-common_xresources: line 16: has_option: command not found
/etc/X11/Xsession.d/75dbus_dbus-launch: line 9: has_option: command not found
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
/etc/X11/Xsession.d/90x11-common_ssh-agent: line 9: has_option: command not found
dbus-update-activation-environment: setting SHELL=/bin/bash
dbus-update-activation-environment: setting QT_ACCESSIBILITY=1
dbus-update-activation-environment: setting XDG_CONFIG_DIRS=/etc/xdg/xdg-cinnamon:/etc/xdg
dbus-update-activation-environment: setting XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
dbus-update-activation-environment: setting LANGUAGE=en_GB:en
dbus-update-activation-environment: setting DESKTOP_SESSION=cinnamon
dbus-update-activation-environment: setting GTK_MODULES=gail:atk-bridge
dbus-update-activation-environment: setting PWD=/home/myuser
dbus-update-activation-environment: setting XDG_SESSION_DESKTOP=cinnamon
dbus-update-activation-environment: setting LOGNAME=myuser
dbus-update-activation-environment: setting XDG_SESSION_TYPE=x11
dbus-update-activation-environment: setting GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
dbus-update-activation-environment: setting XAUTHORITY=/home/myuser/.Xauthority
dbus-update-activation-environment: setting XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/myuser
dbus-update-activation-environment: setting GDM_LANG=en_GB
dbus-update-activation-environment: setting HOME=/home/myuser
dbus-update-activation-environment: setting IM_CONFIG_PHASE=1
dbus-update-activation-environment: setting LANG=en_GB.UTF-8
dbus-update-activation-environment: setting XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
dbus-update-activation-environment: setting XDG_SESSION_CLASS=user
dbus-update-activation-environment: setting USER=myuser
dbus-update-activation-environment: setting DISPLAY=:0
dbus-update-activation-environment: setting SHLVL=1
dbus-update-activation-environment: setting XDG_RUNTIME_DIR=/run/user/1000
dbus-update-activation-environment: setting GTK3_MODULES=xapp-gtk3-module
dbus-update-activation-environment: setting XDG_DATA_DIRS=/usr/share/cinnamon:/usr/share/gnome:/home/myuser/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
dbus-update-activation-environment: setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/myuser/.local/share/JetBrains/Toolbox/scripts
dbus-update-activation-environment: setting GDMSESSION=cinnamon
dbus-update-activation-environment: setting DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
dbus-update-activation-environment: setting _=/usr/bin/dbus-update-activation-environment
dbus-daemon[2520]: Activating service name='org.a11y.atspi.Registry' requested by ':1.3' (uid=1000 pid=2512 comm="csd-keyboard " label="unconfined")
dbus-daemon[2520]: Successfully activated service 'org.a11y.atspi.Registry'
[cinnamon-settings-daemon-smartcard] Failed to start: no suitable smartcard driver could be found
[cinnamon-settings-daemon-smartcard] Failed to start: no suitable smartcard driver could be found
Gjs-Message: 11:26:02.724: Profiler is disabled. Not setting up signals.
Gjs-Message: 11:26:02.840: JS LOG: About to start Cinnamon (X11 backend)
Gjs-Message: 11:26:02.929: JS LOG: [LookingGlass/info] Cinnamon.AppSystem.get_default() started in 87 ms
Gjs-Message: 11:26:02.931: JS LOG: [LookingGlass/info] loading user theme: /usr/share/themes/Mint-Y-Dark-Aqua/cinnamon/cinnamon.css
Gjs-Message: 11:26:02.940: JS LOG: [LookingGlass/info] added icon directory: /usr/share/themes/Mint-Y-Dark-Aqua/cinnamon
Gjs-Message: 11:26:02.947: JS LOG: [LookingGlass/info] Monitor 0 not found. Not creating panel
Gjs-Message: 11:26:02.953: JS LOG: [LookingGlass/error] Could not prepare startup animation: TypeError: this.primaryMonitorInfo is undefined

(cinnamon:2651): Gjs-CRITICAL **: 11:26:02.953: JS ERROR: TypeError: layoutManager.primaryMonitor is undefined
start@/usr/share/cinnamon/js/ui/main.js:394:5
@<main>:1:47

** Message: 11:26:02.953: Execution of main.js threw exception: Script <main> threw an exception

** (at-spi2-registryd:2562): WARNING **: 11:26:03.049: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client

** (at-spi2-registryd:2562): WARNING **: 11:26:03.050: Unable to register client with session manager
** Message: 11:26:03.255: nemo-desktop: session is cinnamon, establishing proxy
blueman-applet 11.26.03 WARNING  PluginManager:151 __load_plugin: Not loading DhcpClient because its conflict has higher priority
cinnamon-session[2403]: WARNING: t+1.27771s: Detected that screensaver has appeared on the bus
blueman-applet 11.26.03 WARNING  PluginManager:151 __load_plugin: Not loading PPPSupport because its conflict has higher priority

** (nemo-desktop:2688): WARNING **: 11:26:08.915: nemo-desktop: Desktop failsafe timeout reached, applying fallback behavior
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1379: DeprecationWarning: Gdk.threads_init is deprecated
  Gdk.threads_init()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:1764: DeprecationWarning: Gdk.threads_enter is deprecated
  Gdk.threads_enter()
/usr/lib/linuxmint/mintUpdate/mintUpdate.py:803: DeprecationWarning: Gdk.threads_leave is deprecated
  Gdk.threads_leave()
blueman-applet 11.26.28 WARNING  DiscvManager:119 update_menuitems: warning: Adapter is None

(xapp-sn-watcher:2673): GLib-GObject-CRITICAL **: 11:26:33.051: g_object_set: assertion 'G_IS_OBJECT (object)' failed

(xapp-sn-watcher:2673): GLib-GIO-CRITICAL **: 11:26:33.051: g_dbus_interface_skeleton_flush: assertion 'G_IS_DBUS_INTERFACE_SKELETON (interface_)' failed

(xapp-sn-watcher:2673): GLib-GObject-CRITICAL **: 11:26:33.051: g_object_set: assertion 'G_IS_OBJECT (object)' failed

(xapp-sn-watcher:2673): GLib-GIO-CRITICAL **: 11:26:33.051: g_dbus_interface_skeleton_flush: assertion 'G_IS_DBUS_INTERFACE_SKELETON (interface_)' failed

(xapp-sn-watcher:2673): GLib-GObject-WARNING **: 11:26:33.051: invalid (NULL) pointer instance

(xapp-sn-watcher:2673): GLib-GObject-CRITICAL **: 11:26:33.051: g_signal_emit_by_name: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
cinnamon-session[2403]: WARNING: t+42.60867s: Detected that screensaver has left the bus
cinnamon-session[2403]: WARNING: t+70.97934s: Application 'cinnamon-settings-daemon-screensaver-proxy.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+70.98037s: Application 'cinnamon-settings-daemon-clipboard.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+70.98053s: Application 'cinnamon-settings-daemon-wacom.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+70.98256s: Application 'at-spi-dbus-bus.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+70.98260s: Application 'cinnamon-settings-daemon-keyboard.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+70.98262s: Application 'cinnamon-settings-daemon-print-notifications.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+70.98267s: Application 'cinnamon-settings-daemon-settings-remap.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+70.98268s: Application 'cinnamon-settings-daemon-a11y-settings.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+70.98273s: Application 'cinnamon-settings-daemon-media-keys.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+71.00144s: Application 'cinnamon-settings-daemon-xsettings.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+71.00154s: Application 'cinnamon-settings-daemon-color.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+71.00156s: Application 'cinnamon-settings-daemon-housekeeping.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+71.00156s: Application 'cinnamon-settings-daemon-automount.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+71.00158s: Application 'cinnamon-settings-daemon-power.desktop' killed by signal 1
cinnamon-session[2403]: WARNING: t+71.00280s: Application 'cinnamon-settings-daemon-background.desktop' killed by signal 1

It looks like it crashes because it cannot find a monitor. However, a monitor is defined in the xorg.conf file.

I installed xfce4 and this works without any problems and so does MATE. Cinnamon also works for a few seconds at login after which point it crashes.

First, I'd like to report the problem and second, is there a way to stop it crashing? I'd like to continue using cinnamon.


My linux mint version is below:

Code: Select all

RELEASE=21.3
CODENAME=virginia
EDITION="Cinnamon"
DESCRIPTION="Linux Mint 21.3 Virginia"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=https://www.linuxmint.com/rel_virginia_whatsnew.php
RELEASE_NOTES_URL=https://www.linuxmint.com/rel_virginia.php
USER_GUIDE_URL=https://www.linuxmint.com/documentation.php
GRUB_TITLE=Linux Mint 21.3 Cinnamon
User avatar
spamegg
Level 14
Level 14
Posts: 5118
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: Cinnamon bug with headless setup

Post by spamegg »

Welcome to the Forum.

You can report here: https://github.com/linuxmint/cinnamon/issues/ but I don't think Cinnamon was designed to run headless. I could be wrong though :D
User avatar
SMG
Level 25
Level 25
Posts: 32007
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Cinnamon bug with headless setup

Post by SMG »

s5s wrote: Sat Mar 16, 2024 5:35 pmI converted the PC to a remote machine - in this set up, the PC is plugged into power and ethernet but has no monitor attached and I remote to it from my laptop using nomachine. Initially, this resulted in a small resolution display (e.g. 640x480).
And Cinnamon was working without problems in this headless mode, correct?
s5s wrote: Sat Mar 16, 2024 5:35 pmI found out that I need to have a "headless" setup as per:

https://virtualgl.org/Documentation/HeadlessNV
It was only after you made additional changes that the problems started?

Where did you "find out you needed a headless setup"? As far as I am aware, others run Cinnamon headless without making a "headless setup".

Is VirtualGL part of nomachine or is it software you added?
s5s wrote: Sat Mar 16, 2024 5:35 pmMy linux mint version is below:
Please open the System Reports app and click the System Information tab on the left. Your computer's information should come up in the right pane. Then click the Copy button in the lower right and paste the results into a reply window here so we can see how Linux Mint views your hardware.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
Post Reply

Return to “Cinnamon”