Forums

[v16] GOG Lunix: Blank Screen on Startup (Diagnosis & Solutions)

All Forums All Forums UI / Menus Bugs [v16] GOG Lunix: Blank Screen on Startup (Diagnosis & Solutions)

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Joe 1 year, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #5848

    leycec
    Participant

    As a meagre token of my gratitude for Joe and Hannah’s continued heroics, I’d like to diagnosis and (…with any grisly luck from the Carrion God) solve a Linux-specific X11 blocker I recently stumbled over.

    Under Linux, “Serpent in the Staglands” (v16) requires the running X11 server to listen for IPC events on the physical socket “/tmp/.X11-unix/X0”. This is sort-of bad. Modern versions of X11 available on bleeding-edge rolling release Linux distributions (e.g., Gentoo, Arch, Slackware) no longer listen on that socket by default. For both security and efficiency, modern versions of X11 only listen on the abstract socket “@/tmp/.X11-unix/X0” by default.

    Note the “@” prefixing the latter path. That path is not actually prefixed by a “@” character, even though it appears to be. The “@” is shorthand for the null byte – which, for obvious reasons, is unprintable. Since pathnames (on all OSes including Windows) are prohibited from containing null bytes, that path is not actually a valid path and hence does not physically exist on the filesystem. It is, however, a valid socket name for passing to Linux kernel socket routines (e.g., getsockname()). Thus the term “abstract socket.” (See the paragraph beginning “abstract: an abstract socket address is…” of man 7 unix.)

    If the running X11 server is not listening on the above physical socket, “Serpent in the Staglands” displays a blank (black) window on startup with the following terminal output:

    Running Serpent in the Staglands
    .
    .
    .
    displaymanager : xrandr version warning. 1.4
    displaymanager : trying .X11-unix
    Using libudev for joystick management
    Importing game controller configs

    If the running X11 server is listening on the above physical socket, “Serpent in the Staglands” displays the expected non-blank window (“Ho there, stranger.”) with the following terminal output:

    Running Serpent in the Staglands
    .
    .
    .
    displaymanager : xrandr version warning. 1.4
    displaymanager : trying .X11-unix
    client :0 has 1 screens
    displaymanager screen (0): 1600 x 900
    Using libudev for joystick management
    Importing game controller configs

    Note the correct detection of the current display device in the latter but not the former case. Unsurprisingly, I’ve encountered this exact same issue with numerous older Unity games – but not all. Hairbrained Studios’ “Shadowrun: Returns” and “Shadowrun: Dragonfall” both behave as expected, despite being (relatively, anyway) older Unity games.

    This implies there may be some means for Whalenought Studios to address this in a future update. Until then, however, Linux users may address this themselves by forcing the X11 server to listen on both the above physical and abstract sockets as follows:

    1. Create the physical socket directory as root:
    $ sudo mkdir -p /tmp/.X11-unix
    $ sudo chmod 1777 /tmp/.X11-unix
    2. Restart the running X11 server.

    For security, the /tmp/.X11-unix directory must be owned by the root superuser and have the exact permissions above (i.e., 1777).

    For users whose /tmp directories are mounted to a volatile filesystem (such as an in-memory RAM disk), note that you will need to repeat the above steps on system restarts. So much for godhood, huh?

    If this issue is not trivially fixable on your end, Joe and/or Hannah, it’d be swell (…why doesn’t anyone say “swell,” anymore? It’s still a swell adjective!) if the start.sh script could be updated to automatically detect a missing /tmp/.X11-unix directory and explicitly warn the user of impending doom. For example:

    [ -d “/tmp/.X11-unix” ] ||
    echo “Physical socket \”/tmp/.X11-unix\” not found. (It’s the Hindenberg all over again!)” 1>&2

    May the coming Spring in Portland be bright and warm. Thanks for all the isometric fish.

    Cheers,
    Sess

    • This topic was modified 1 year, 6 months ago by  leycec.
    • This topic was modified 1 year, 6 months ago by  leycec.
    #5867

    Joe
    Keymaster

    Hey sorry for missing this earlier, and thanks so much for letting us know!

    We’ll verify that Unity builds for Linux are working correctly for the expansion, thanks for details on that (it was working on our test system, but that can obviously vary).

    For Serpent we’ll take a look and see if there’s something we can get going to correct that on our end, we’re locked into an older version of Unity for that but can see if there’s a workaround we can implement.

    Thanks again!

    Cheers

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.