You are not logged in.

#1 2017-11-12 14:10:12

kekc
Member
Registered: 2017-11-10
Posts: 15

GNOME headless setup (no monitor connected)

Follow-up from here.
Still struggling to make GNOME work on a headless machine. LXDE and XFCE are working fine, while GNOME on Xorg is crashing straight from LightDM greeter:

Process 12529 (gnome-shell) of user 1000 dumped core.

                                             Stack trace of thread 12529:
                                             #0  0x00007f16450b7cd4 meta_window_get_monitor (libmutter-1.so.0)
                                             #1  0x00007f16412e11c8 ffi_call_unix64 (libffi.so.6)
                                             #2  0x00007f16412e0c2a ffi_call (libffi.so.6)
                                             #3  0x00007f1645b52cbb n/a (libgjs.so.0)
                                             #4  0x00007f1645b54617 n/a (libgjs.so.0)
                                             #5  0x00007f163efab64d n/a (libmozjs-52.so.0)
                                             #6  0x00007f163ef9e687 n/a (libmozjs-52.so.0)
                                             #7  0x00007f163efaae97 n/a (libmozjs-52.so.0)
                                             #8  0x00007f163efab46f n/a (libmozjs-52.so.0)
                                             #9  0x00007f163efab779 n/a (libmozjs-52.so.0)
                                             #10 0x00007f163ed9b219 n/a (libmozjs-52.so.0)
                                             #11 0x00002ae4cbac73c6 n/a (n/a)
                                             #12 0x000055d2c930a490 n/a (n/a)
                                             #13 0x00002ae4cbabd888 n/a (n/a)
                                             #14 0x00007f163f1a6923 n/a (libmozjs-52.so.0)
                                             #15 0x00007f163f1aef8b n/a (libmozjs-52.so.0)
                                             #16 0x00007f163efaaf14 n/a (libmozjs-52.so.0)
                                             #17 0x00007f163efab46f n/a (libmozjs-52.so.0)
                                             #18 0x00007f163efab779 n/a (libmozjs-52.so.0)
                                             #19 0x00007f163ee3eb44 _Z20JS_CallFunctionValueP9JSContextN2JS6HandleIP8JSObjectEENS2_INS1_5ValueEEERKNS1_16HandleValueArrayENS1_13MutableHandleIS6_EE (libmozjs-52.so.0)
                                             #20 0x00007f1645b7cbf8 gjs_call_function_value (libgjs.so.0)
                                             #21 0x00007f1645b4cf89 gjs_closure_invoke (libgjs.so.0)
                                             #22 0x00007f1645b6b6ff n/a (libgjs.so.0)
                                             #23 0x00007f1646e8f6f5 g_closure_invoke (libgobject-2.0.so.0)
                                             #24 0x00007f1646ea30b0 n/a (libgobject-2.0.so.0)
                                             #25 0x00007f1646ea7696 g_signal_emit_valist (libgobject-2.0.so.0)
                                             #26 0x00007f1646ea8920 g_signal_emit (libgobject-2.0.so.0)
                                             #27 0x00007f164508d8c8 meta_plugin_manager_event_simple (libmutter-1.so.0)
                                             #28 0x00007f1645095ff2 n/a (libmutter-1.so.0)
                                             #29 0x00007f164509609d meta_window_actor_show (libmutter-1.so.0)
                                             #30 0x00007f16450bd93f n/a (libmutter-1.so.0)
                                             #31 0x00007f16450be90e n/a (libmutter-1.so.0)
                                             #32 0x00007f16450b5433 n/a (libmutter-1.so.0)
                                             #33 0x00007f1645857975 n/a (libmutter-clutter-1.so)
                                             #34 0x00007f1645858623 n/a (libmutter-clutter-1.so)
                                             #35 0x00007f1646bbf270 g_main_context_dispatch (libglib-2.0.so.0)
                                             #36 0x00007f1646bc0f69 n/a (libglib-2.0.so.0)
                                             #37 0x00007f1646bc1f42 g_main_loop_run (libglib-2.0.so.0)
                                             #38 0x00007f16450a9030 meta_run (libmutter-1.so.0)
                                             #39 0x000055d2c8220011 n/a (gnome-shell)
                                             #40 0x00007f16478dff6a __libc_start_main (libc.so.6)
                                             #41 0x000055d2c822016a n/a (gnome-shell)

Xorg.conf is really simple - needed to set the default resolution for headless setup, otherwise default is 1024x768:

Section "Device"
    Identifier  "ConfVideo"
    Driver      "modesetting"
EndSection

Section "Monitor"
    Identifier  "VirtMon"
    HorizSync 30.0 - 81.0
    VertRefresh 56.0 - 75.0
#    Option "DPMS"
#    Option "PreferredMode" "1920x1080"
EndSection

Section "Screen"
    Identifier  "ConfScreen"
    Monitor     "VirtMon"
    Device      "ConfVideo"
    DefaultDepth 24
    SubSection "Display"
      Depth 24
      Modes "1920x1080"
      Virtual 1920 1080
    EndSubSection
EndSection
seth wrote:

For completeness sake:
- "Xorg -configure" is (probably "accidentally") broken ever since, deprecated and not supposed to be used
- "Can't open display" simply means that the DISPLAY variable isn't set on the shell you're calling xrandr from
- "none of the DE utils work as no monitor is connected" is kinda beyond me - it should really not matter whether there's a monitor attached, though you'll indeed have to tell the system what resolution to use
- https://wiki.archlinux.org/index.php/Xr … esolutions

Seth, thanks for the input. Since it seems that finding display or monitor for GNOME shell is instrumental, a few comments on DISPLAY and DE utils:
- "Can't open display" seems a common problem with headless setups. I read the wiki page and searched the internet for a couple of hours, but still cannot find a solution to make xrandr work - any command starting with xrandr returns "Can't open display". I tried to set $DISPLAY variable manually to ":0" and ":0.0", but still no luck. Where to dig?
- Seems DE utils also search for monitor, but GNOME does so on startup and then crashes. I tried to launch XFCE's display settings - either empty GUI, or "xfce4-display-settings: Cannot open display: ."

Any ideas on how to set up the display properly / make GNOME work on headless machine?

Last edited by kekc (2017-11-12 14:16:17)

Offline

Board footer

Powered by FluxBB