Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question on running in headless linux server using xvfb #15

Closed
Kahdeg-15520487 opened this issue Jul 10, 2021 · 2 comments
Closed

Question on running in headless linux server using xvfb #15

Kahdeg-15520487 opened this issue Jul 10, 2021 · 2 comments

Comments

@Kahdeg-15520487
Copy link

Kahdeg-15520487 commented Jul 10, 2021

My question is : Does the bad parameter opengl error actually prevent the program from running or it's just taking long to run?

Here is the command i use:

xvfb-run ./mapshot-linux render /opt/factorio/saves/_autosave1.zip --factorio_binary /home/kahdeg/factorio/factorio/bin/x64/factorio --alsologtostderr --factorio_verbose

Here is the log:
kahdeg@ubuntu-s-1vcpu-1gb-sgp1-01:~/factorio$ xvfb-run ./mapshot-linux render /opt/factorio/saves/_autosave1.zip --factorio_binary /home/kahdeg/factorio/factorio/bin/x64/factorio --alsologtostderr --factorio_verbose
I0710 17:55:55.415234 16550 factorio.go:282] Found factorio data dir: /opt/factorio
I0710 17:55:55.419056 16550 factorio.go:275] Path /home/kahdeg/.factorio does not exists, skipped
I0710 17:55:55.419230 16550 factorio.go:282] Found factorio data dir: /home/kahdeg/factorio
I0710 17:55:55.419331 16550 factorio.go:275] Path /home/kahdeg/Library/Application Support/factorio does not exists, skipped
I0710 17:55:55.419420 16550 factorio.go:289] Using Factorio data dir: /home/kahdeg/factorio
I0710 17:55:55.419507 16550 factorio.go:282] Found factorio data dir: /opt/factorio
I0710 17:55:55.419568 16550 factorio.go:275] Path /home/kahdeg/.factorio does not exists, skipped
I0710 17:55:55.419623 16550 factorio.go:282] Found factorio data dir: /home/kahdeg/factorio
I0710 17:55:55.419677 16550 factorio.go:275] Path /home/kahdeg/Library/Application Support/factorio does not exists, skipped
I0710 17:55:55.419728 16550 factorio.go:289] Using Factorio data dir: /home/kahdeg/factorio
I0710 17:55:55.419805 16550 factorio.go:355] Factorio binary found: /home/kahdeg/factorio/factorio/bin/x64/factorio
I0710 17:55:55.419860 16550 factorio.go:362] Using Factorio binary: /home/kahdeg/factorio/factorio/bin/x64/factorio
I0710 17:55:55.419945 16550 render.go:100] runid: 145cef61-79cb-4f3d-a4de-bb40b67b56c3
I0710 17:55:55.420055 16550 root.go:30] temp dir: /tmp/mapshot145082056
I0710 17:55:55.420124 16550 factorio.go:110] Looking for save "/opt/factorio/saves/_autosave1.zip"; /opt/factorio/saves/_autosave1.zip exists.
Generating mapshot "_autosave1" using file /opt/factorio/saves/_autosave1.zip
I0710 17:55:55.491328 16550 render.go:120] copied save from "/opt/factorio/saves/_autosave1.zip" to "/tmp/mapshot145082056/_autosave1.zip"
I0710 17:55:55.491751 16550 factorio.go:183] copying mod Aircraft from /home/kahdeg/factorio/mods/Aircraft_1.7.2.zip to /tmp/mapshot145082056/mods/Aircraft_1.7.2.zip
I0710 17:55:55.605142 16550 factorio.go:216] copied mod file "/home/kahdeg/factorio/mods/Aircraft_1.7.2.zip" to "/tmp/mapshot145082056/mods/Aircraft_1.7.2.zip"
I0710 17:55:55.605395 16550 factorio.go:183] copying mod AsphaltPaving from /home/kahdeg/factorio/mods/AsphaltPaving_1.3.1.zip to /tmp/mapshot145082056/mods/AsphaltPaving_1.3.1.zip
I0710 17:55:55.658041 16550 factorio.go:216] copied mod file "/home/kahdeg/factorio/mods/AsphaltPaving_1.3.1.zip" to "/tmp/mapshot145082056/mods/AsphaltPaving_1.3.1.zip"
I0710 17:55:55.658305 16550 factorio.go:183] copying mod PavementDriveAssistContinued from /home/kahdeg/factorio/mods/PavementDriveAssistContinued_3.0.1.zip to /tmp/mapshot145082056/mods/PavementDriveAssistContinued_3.0.1.zip
I0710 17:55:55.665668 16550 factorio.go:216] copied mod file "/home/kahdeg/factorio/mods/PavementDriveAssistContinued_3.0.1.zip" to "/tmp/mapshot145082056/mods/PavementDriveAssistContinued_3.0.1.zip"
I0710 17:55:55.665845 16550 factorio.go:183] copying mod Todo-List from /home/kahdeg/factorio/mods/Todo-List_19.2.0.zip to /tmp/mapshot145082056/mods/Todo-List_19.2.0.zip
I0710 17:55:55.672228 16550 factorio.go:216] copied mod file "/home/kahdeg/factorio/mods/Todo-List_19.2.0.zip" to "/tmp/mapshot145082056/mods/Todo-List_19.2.0.zip"
I0710 17:55:55.672249 16550 factorio.go:183] copying mod mod-list.json from /home/kahdeg/factorio/mods/mod-list.json to /tmp/mapshot145082056/mods/mod-list.json
I0710 17:55:55.674500 16550 factorio.go:206] created mod-list.json
I0710 17:55:55.680940 16550 render.go:136] mod created at "/tmp/mapshot145082056/mods/mapshot"
I0710 17:55:55.681245 16550 render.go:89] overrides file created at "/tmp/mapshot145082056/mods/mapshot/overrides.lua"I0710 17:55:55.681410 16550 render.go:151] removed done-file "/home/kahdeg/factorio/script-output/mapshot-done-145cef61-79cb-4f3d-a4de-bb40b67b56c3": remove /home/kahdeg/factorio/script-output/mapshot-done-145cef61-79cb-4f3d-a4de-bb40b67b56c3: no such file or directory
Starting Factorio...
I0710 17:55:55.681662 16550 factorio.go:124] Running factorio with args: [--disable-audio --disable-prototype-history --load-game /tmp/mapshot145082056/_autosave1.zip --mod-directory /tmp/mapshot145082056/mods]
0.000 2021-07-10 17:55:55; Factorio 1.1.35 (build 58756, linux64, full)

0.173 Operating system: Linux (Ubuntu 18.04)
0.173 Program arguments: "/home/kahdeg/factorio/factorio/bin/x64/factorio" "--disable-audio" "--disable-prototype-history" "--load-game" "/tmp/mapshot145082056/_autosave1.zip" "--mod-directory" "/tmp/mapshot145082056/mods"
0.173 Read data path: /home/kahdeg/factorio/factorio/data
0.173 Write data path: /home/kahdeg/factorio/factorio [7748/50668MB]
0.173 Binaries path: /home/kahdeg/factorio/factorio/bin
0.188 System info: [CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz, 1 core, RAM: 1993 MB]
0.188 Environment: DISPLAY=:99 WAYLAND_DISPLAY= DESKTOP_SESSION= XDG_SESSION_DESKTOP= XDG_CURRENT_DESKTOP= __GL_FSAA_MODE= __GL_LOG_MAX_ANISO= __GL_SYNC_TO_VBLANK= __GL_SORT_FBCONFIGS= __GL_YIELD=
0.189 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: en]
0.331 Available displays: 1
0.331 [0]: screen - {[0,0], 640x480, SDL_PIXELFORMAT_RGB565, 0Hz}
0.380 Error Util.cpp:83: Failed to create OpenGL context: Could not create GL context: BadValue (integer parameter out of range for operation)

here i was waiting for about 1 minute then i manually CTRL+C the process

^C 70.653 Received SIGINT, shutting down
XIO: fatal IO error 4 (Interrupted system call) on X server ":99"
after 442 requests (61 known processed) with 0 events remaining.

@Palats
Copy link
Owner

Palats commented Jul 13, 2021

The xvfb approach is a bit of a hack, so I'm afraid I cannot help much here. A couple of things still:

  • I do think that indeed the GL context creation error is an indication that it won't work.
  • When I tried it a while ago, I've never managed to make it work on Ubuntu 18.04 - which seems to be the release you are using. On 20.04, it was fine.

@Palats
Copy link
Owner

Palats commented Oct 17, 2021

Duplicate of #16

@Palats Palats marked this as a duplicate of #16 Oct 17, 2021
@Palats Palats closed this as completed Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants