Linux support thread

Ask here if you experience technical problems with X Rebirth.

Moderator: Moderators for English X Forum

the1freak
Posts: 14
Joined: Tue, 26. Aug 08, 13:34
x3tc

Post by the1freak »

Now that I can fly in X-Rebirth with a Joystick in Linux I actually hit the buy button :-)

I have a T16000M, but I'm having some trouble Here's a picture of the button layout for context. For reasons I don't understand, buttons 5-8 are registered as hat movements. This means that I can't use both the real hat and these buttons for different functions, currently hitting either one of the side buttons or moving the hat results in the camera moving.

I tried creating a gamecontrollerdb.txt file using the controllertest utility, but that didn't change the behaviour.

I also tried using sdl-jstest tool to check everything was working fine at the SDL layer, and indeed it looked like all was well there (with or without the gamecontrollerdb.txt file in the same directory).

Code: Select all

% cat gamecontrollerdb.txt
030000004f0400000ab1000000010000,Thrustmaster T.16000M,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b4,guide:b5,start:b6,dpleft:b7,dpdown:b8,dpright:b9,dpup:b10,leftshoulder:b11,lefttrigger:b12,rightshoulder:b13,righttrigger:b14,leftstick:b15,leftx:a0,lefty:a1,rightx:a2,righty:a3,
I then thought maybe it was a Steam issue, and tried to run steam like this:

Code: Select all

export SDL_LINUX_JOYSTICK="'Thrustmaster T.16000M' 4 1 0"
steam
(then run X-rebirth from there)
But that didn't help. Any ideas how I can use these 6 buttons independently from the hat?

EDIT:
gpu: Nvidia GeForce GTX 760, nvidia driver
cpu: Intel i5-4570 CPU @ 3.20GHz
RAM: 8GB
distro: Arch Linux

I just realised I probably should've created a bug report instead, so I created XRNIX-58 - sorry for double-posting..
there are many signatures, but this one is mine!
User avatar
Gligli
Posts: 1026
Joined: Fri, 2. Nov 07, 14:11
x3ap

Post by Gligli »

Hi

afaik, you made right by posting here the "textual" part of your report :)

You did try to remap in game, do you?

If I refer to your first *code (the long one)(which seems cut), only 16 buttons are correctly distinguished. Miss the 4 Hat ones.
And only Lxy and Rxy are distinguished. Miss Zrot and the Thruster one.

Hope it helps :)
On se rend vers la connaissance avec circonspection.
c.a.d, avec un immense respect et la peur au ventre.
the1freak
Posts: 14
Joined: Tue, 26. Aug 08, 13:34
x3tc

Post by the1freak »

OK, I've double-checked the mappings using the remap keys thing:

11 button 5
12 POV up
13 POV down
14 POV left
15 POV right
16 =ReadText1022-42= (screenshot)

I appreciate I originally reported buttons 5-8 as broken, and now it's 11-16 - I'm sure that has something to do with the left vs right handed mode switch.

(The T16000M joystick has a right and left handed mode (with a switch at the base and a kit to swap out bits of the stick), the difference being that the buttons on the base (5-8 and 11-16) get swapped around. I thought I did all my testing with the switch in the right handed position, but maybe it only works if it's in the right place when it's first plugged into the USB port or so, not entirely sure.. This shouldn't make a difference for this bug though)

Regarding only 4 axes and 16 buttons being registered in the running of the controllerdb generation tool: that's correct - the tool seems to want to map everything to an xbox controller. If I would've tried to map the hat, I would've ended up 2 buttons short. But I figured that wasn't necessary since X-Rebirth picked up the hat just fine (out of band so to say). Also, the joystick only has 4 axes (x,Y,Z rotation and throttle), but the controllerdb tool maps them to axes that are called something different. Key point: the right number of buttons and axes are registered (excluding the real hat), so I think that's all OK. I'd prefer not to use the remapping tool, since it seems to be more for gamepads than joysticks.
there are many signatures, but this one is mine!
User avatar
Gligli
Posts: 1026
Joined: Fri, 2. Nov 07, 14:11
x3ap

Post by Gligli »

"Underestimate the power of the force not a good Idea will be" :D
the1freak wrote:I'd prefer not to use the remapping tool, since it seems to be more for gamepads than joysticks.
Don't fool yourself, "the game was designed for Xbox controller use" is a matter of User Interface: the way you call menus, the way they are display. In other words, we don't have windows controlled by a mouse.
Nothing to do with plastic shapes or whatever :)

From Egosoft side, you are forced to remap Rebirth if you don't use Xbox controller (a profile-name is already provided by them)
From Linux side, you're forced too. Bcz you wants to be sure of what happen, step by step, button by button...
the1freak wrote:I then thought maybe it was a Steam issue
I assume that steam-OS by-passes or forwards the OS-joystick-configuration(-files?) to games. (I may be wrong)
the1freak wrote:I originally reported buttons 5-8 as broken, and now it's 11-16 - I'm sure that has something to do with the left vs right handed mode switch. but maybe it only works if it's in the right place when it's first plugged into the USB port or so, not entirely sure.
Here we are, I could have bet on it :)
Each (used)"state" of your joystick shall have a configuration file regard to the OS (gamecontrollerdb.txt in your case, but the name can be different) loaded whether by the program which have generated it or by a little script on your computer start (which call the last).

Little point here but important: be sure that this switch is not recognised as a button or whatever phantom like by the "configurator" which leads to other problems... Don't be afraid, personally I simply make without once configured :) (I have some kind too)

Finally I saw some other topics related to windows for the USB plug thing... I plug it before starting the computer (start-scripted method with jscal)
the1freak wrote:I tried creating a gamecontrollerdb.txt file using the controllertest utility, but that didn't change the behaviour.
EDIT:
distro: Arch Linux
It shall. If you set 'whatever' you shall find this 'whatever' in game. Just try to swap 2 buttons for example.
Remember, here we talk of a non mapped or default mapped controller. You probably have to pre-calibre a few ones.
the1freak wrote:I also tried using sdl-jstest tool to check everything was working fine at the SDL layer, and indeed it looked like all was well there (with or without the gamecontrollerdb.txt file in the same directory).
This means SDL version of js-test. Try one on your repository but I assume that steam already installed it :)
I use the gtk version of it and 'jscal' which gives jscal-gtk and jstest-gtk (Ubuntu links a few posts upper)
the1freak wrote:. This shouldn't make a difference for this bug though
Uh! Everything gravitate around :)
And once done both jscal and jstest, you shall Remap in game.
the1freak wrote:But that didn't help. Any ideas how I can use these 6 buttons independently from the hat?
You have only the possibilities setted by 'the switch'.
the1freak wrote:Regarding only 4 axes and 16 buttons being registered in the running of the controllerdb generation tool: that's correct - the tool seems to want to map everything to an xbox controller.
At that level, those tools don't know what an xbox controller is :) but only

Code: Select all

x:b0,...,leftx:a0,...
a for analogue b for buttons d for digital (buttons may be annalogue) and so on...
the1freak wrote:If I would've tried to map the hat, I would've ended up 2 buttons short.
I don't understand this. variables once calibre are fixed that's not an fifo or filo pile... :?
the1freak wrote: But I figured that wasn't necessary since X-Rebirth picked up the hat just fine (out of band so to say).
It can't 'pick' something undefined, or we miss something :)
the1freak wrote:Also, the joystick only has 4 axes (x,Y,Z rotation and throttle), but the controllerdb tool maps them to axes that are called something different.
No matter the call.
Warning, an Axe is 2 gauges(Yup and Ydown in ex).
And the thruster one is probably different of the other as it's physically represented as 1 gauge (+backward?)
the1freak wrote:Key point: the right number of buttons and axes are registered (excluding the real hat), so I think that's all OK.
Imo, once the whole easy procedure done, everything shall be functional except a phantom button which involve furtherer procedure (patched jscal) that I didn't done... (without speaking of force feed back [ffb])

Pfeew... Hard time reply :)
On se rend vers la connaissance avec circonspection.
c.a.d, avec un immense respect et la peur au ventre.
the1freak
Posts: 14
Joined: Tue, 26. Aug 08, 13:34
x3tc

Post by the1freak »

According to comments on the bug Timon has managed to reproduced the issue and is working on a fix, which is great to hear! :)

Gligli, much studied the force, you have.

I think there is a difference between joysticks and game controllers, at least SDL2 has different APIs for them. Whether this has any practical implications for X-Rebirth I don't know.

Now, regarding the left/right handed button. It's underneath the joystick, so it's not meant to be a button used during gameplay. Using both sdl2-jstest and X-rebirth, I can confirm that it does flip buttons 5-8 and 11-16 around at the hardware level, and it does take effect immediately. I can also confirm that the SDL2 GUID of the joystick stays the same regardless of the setting, so you don't need two different gamecontrollerdb.txt files. Unplugging and plugging the joystick back in changes nothing. I really do think it's irrelevant in this context, except that it may have confused me - I'm trying to use the joystick left-handed, so that I can use my right hand for the mouse, which works well once you turn off X-Rebirth's gamepad mode ;-).

The controllermap utility I used came from the SDL2 source code, and it displays an xbox360 (-like) controller on screen. It highlights the buttons one by one, and you press whichever button you want to correspond to that button on the gamepad. If you look at any gamecontrollerdb.txt (like my snippet above or the community one), you'll see that it maps concepts like "guide" and "righttrigger" to numbered buttons (b5), and axes like leftx/y and rightx/y to numbered axes (a0). Once you've run out of buttons on the screen, the mapping tool exits and prints the results. That's how I know I would've ended up 2 buttons short if I tried to map the hat to controller buttons.
there are many signatures, but this one is mine!
User avatar
Gligli
Posts: 1026
Joined: Fri, 2. Nov 07, 14:11
x3ap

Post by Gligli »

the1freak wrote: Gligli, much studied the force, you have.
Aww, I'll never end it. Don't you?
the1freak wrote:Now, regarding the left/right handed button. It's underneath the joystick, so it's not meant to be a button used during gameplay. Using both sdl2-jstest and X-rebirth, I can confirm that it does flip buttons 5-8 and 11-16 around at the hardware level, and it does take effect immediately. I can also confirm that the SDL2 GUID of the joystick stays the same regardless of the setting, so you don't need two different gamecontrollerdb.txt files(...)- I'm trying to use the joystick left-handed, so that I can use my right hand for the mouse, which works well once you turn off X-Rebirth's gamepad mode ;-).
Lol, Much more clear for me now and obvious then... I didn't understood a simple crossing: I thought you could remove those part :D Sorry then.
On se rend vers la connaissance avec circonspection.
c.a.d, avec un immense respect et la peur au ventre.
User avatar
daret
Posts: 6
Joined: Mon, 30. Nov 15, 11:14
x4

Post by daret »

daret wrote: 3) FPS Drop
Strange FPS Drop (Repairable with change Ultra to high and back). It was reproducible, but after I recorded this Video it didn't show up again.
https://youtu.be/Nt4oApvO2h8
I started a new game and the FPS Drop showed up again.
It is the first "acquire captain" mission.
fallenwizard
Posts: 634
Joined: Tue, 13. Apr 10, 20:03
x4

Post by fallenwizard »

Are there any plans to update the Linux build to 4.0 beta 4 soon?

I can't test the HoL DLC with my main OS atm because the Linux version is still at 3.61.
timon37
EGOSOFT
EGOSOFT
Posts: 508
Joined: Fri, 14. Dec 12, 11:02
x4

Post by timon37 »

fallenwizard wrote:Are there any plans to update the Linux build to 4.0 beta 4 soon?
Yep it'll be available soon, though I'm afraid it'll be bumpy so please *really* backup savegames before you switch to it;p
User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r »

We're not afraid! Bring it on! :lol:
Corbet
Posts: 75
Joined: Sat, 12. Dec 15, 07:30

Post by Corbet »

Thanks for the news timon37. Version 3.61 works very well already and looking forward to start testing 4.00.
timon37
EGOSOFT
EGOSOFT
Posts: 508
Joined: Fri, 14. Dec 12, 11:02
x4

Post by timon37 »

It is out, and since we now have a buildmachine, it'll be updated in sync with windows.
This also means that with the release of 4.0 we'll be getting rid of the linux and macosx branches.
Just follow the standard instructions if you wanna try the beta:
http://forum.egosoft.com/viewtopic.php?t=355582
fallenwizard
Posts: 634
Joined: Tue, 13. Apr 10, 20:03
x4

Post by fallenwizard »

timon37 wrote:It is out, and since we now have a buildmachine, it'll be updated in sync with windows.
This also means that with the release of 4.0 we'll be getting rid of the linux and macosx branches.
Just follow the standard instructions if you wanna try the beta:
http://forum.egosoft.com/viewtopic.php?t=355582
Thanks for the surprise, timon! This makes me a happy Linux user :D

I have tried to switch to the public_beta branch. Sadly, neither Steam Cloud nor the application itself works. Console output:

Code: Select all

Failed to resolve path before download
CUser::OnRemoteStorageConflictResolution() - result I/O Operation Failed  
-----After Steam opened the steam cloud conflict dialog.

Generating new string page texture 144: 512x256, total string texture memory is 3.83 MB
Game update: AppID 2870 "X Rebirth", ProcID 4332, IP 0.0.0.0:0
ERROR: ld.so: object '/home/manuel/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/manuel/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/manuel/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 4338 != 4333, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/manuel/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/manuel/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
Elephant Memory Manager Initialized with 0MB
Elephant Memory Manager Name And Callstack Base Address is 0x12e67eb
Elephant Memory Manager Mode: Resizable Mode, Has small heap: No, 64bit, Version: 1.7.3
Heap Resize Generic 0x0x7f73c845f000 to 0x0x7f73d245efc0
Failed to initialize SDL2: 'No available displays'Game removed: AppID 2870 "X Rebirth", ProcID 4332 
-----After trying to start the game
This is not my machine's fault because the graphics driver works fine:

Code: Select all

direct rendering: Yes
OpenGL renderer string: GeForce GTX 970/PCIe/SSE2
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth, 
    GL_KHR_robustness, GL_KTX_buffer_region, GL_NVX_conditional_render, 
    GL_NV_conditional_render, GL_NV_conservative_raster, 
    GL_NV_path_rendering, GL_NV_path_rendering_shared_edge, 
    GL_ARB_compute_variable_group_size, GL_ARB_conditional_render_inverted, 
    GL_KHR_robustness, GL_KTX_buffer_region, GL_NVX_conditional_render, 
    GL_NV_conditional_render, GL_NV_conservative_raster, 
    GL_NV_path_rendering, GL_NV_path_rendering_shared_edge, 
    GL_EXT_raster_multisample, GL_EXT_render_snorm, GL_EXT_robustness, 
    GL_NV_blend_equation_advanced_coherent, GL_NV_conditional_render, 
    GL_NV_packed_float_linear, GL_NV_path_rendering, 
    GL_NV_path_rendering_shared_edge, GL_NV_pixel_buffer_object, 
    GL_OES_element_index_uint, GL_OES_fbo_render_mipmap, 
EDIT: 3.61 via the linux branch works.
timon37
EGOSOFT
EGOSOFT
Posts: 508
Joined: Fri, 14. Dec 12, 11:02
x4

Post by timon37 »

@fallenwizard

Hmm weird, really weird. The only situations I've seen that error in is if the DISPLAY=:0 variable is not set correctly (usually to :0), or if the given user doesn't have access to X (can be worked around by doing: xhost +).

But in that case 3.61 shouldn't work either, though just in case if you can try doing xhost + (from a normal terminal), and adding export DISPLAY=:0 to the testandlaunch script at line 4.

Other than that open a console go to the game folder and gimme the output of: ldd XRebirth
fallenwizard
Posts: 634
Joined: Tue, 13. Apr 10, 20:03
x4

Post by fallenwizard »

Nope. Neither works.

There seems to be a regression in SDL2, but I don't know if you use this exact SDL2 version: http://permalink.gmane.org/gmane.comp.lib.sdl/71707
so I'll try to use the SDL2 library provided by Gentoo.

EDIT: Output of ldd:

Code: Select all

        linux-vdso.so.1 (0x00007ffe235ee000)
        libluajit-5.1.so.2 => lib/libluajit-5.1.so.2 (0x00007fd13e7ec000)
        libavformat.so.55 => lib/libavformat.so.55 (0x00007fd13e4d4000)
        libavcodec.so.55 => lib/libavcodec.so.55 (0x00007fd13d844000)
        libswscale.so.2 => lib/libswscale.so.2 (0x00007fd13d5dc000)
        libswresample.so.0 => lib/libswresample.so.0 (0x00007fd13d3c4000)
        libavutil.so.52 => lib/libavutil.so.52 (0x00007fd13d17c000)
        libsteam_api.so => lib/libsteam_api.so (0x00007fd13cf54000)
        libGLEW.so.1.12 => lib/libGLEW.so.1.12 (0x00007fd13ccbc000)
        libxml2.so.2 => lib/libxml2.so.2 (0x00007fd13c95c000)
        libopenal.so.1 => lib/libopenal.so.1 (0x00007fd13c6ec000)
        libvorbisfile.so.3 => lib/libvorbisfile.so.3 (0x00007fd13c4dc000)
        libSDL2-2.0.so.0 => lib/libSDL2-2.0.so.0 (0x00007fd13c1ac000)
        libGL.so.1 => /usr/lib64/opengl/nvidia/lib/libGL.so.1 (0x00007fd13bef4000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libgcc_s.so.1 (0x00007fd13bcdc000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fd13b93c000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fd13b64c000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fd13b444000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fd13b224000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libstdc++.so.6 (0x00007fd13ae9c000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fd13ac94000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd13ea5c000)
        libbz2.so.1.0 => lib/libbz2.so.1.0 (0x00007fd13aa84000)
        libz.so.1 => lib/libz.so.1 (0x00007fd13a864000)
        libva.so.1 => lib/libva.so.1 (0x00007fd13a64c000)
        libvorbis.so.0 => lib/libvorbis.so.0 (0x00007fd13a414000)
        libogg.so.0 => lib/libogg.so.0 (0x00007fd13a20c000)
        libGLX.so.0 => /usr/lib64/opengl/nvidia/lib/libGLX.so.0 (0x00007fd139fd4000)
        libGLdispatch.so.0 => /usr/lib64/opengl/nvidia/lib/libGLdispatch.so.0 (0x00007fd139cc4000)
        libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fd139984000)
        libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007fd13976c000)
        libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fd139544000)
        libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fd13933c000)
        libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007fd139134000)
        libbsd.so.0 => /usr/lib64/libbsd.so.0 (0x00007fd138f1c000)

EDIT2:

Yes. The SDL version is to blame. I've replaced the libSDL2-2.0.so.0 version in the lib folder with the one provided by my distro. I can start the game now as you can see here:
http://imgur.com/kVv3BeE
Corbet
Posts: 75
Joined: Sat, 12. Dec 15, 07:30

Post by Corbet »

fallenwizard wrote:EDIT2:

Yes. The SDL version is to blame. I've replaced the libSDL2-2.0.so.0 version in the lib folder with the one provided by my distro. I can start the game now as you can see here:
http://imgur.com/kVv3BeE
Fixed the problem for me as well on SteamOS 2.0. I copied libSDL2-2.0.so.0 from Steam runtime. I don't know what kind of build options were used but Steam runtime library is about 6x smaller (~1MB vs ~6MB)

But otherwise the game runs and looks very nice! Keep up good work.

SteamOS 2.0 + i7 + GTX 750 Ti
fallenwizard
Posts: 634
Joined: Tue, 13. Apr 10, 20:03
x4

Post by fallenwizard »

After testing Build 31 there are 2 things that are bothering me:

The game re-initializes every time I alt tab, even when using borderless window mode.


FIXED in Beta 6:

Code: Select all

I've also noticed that the "privacy settings" option in the settings menu crashes the UI with this error message:

======================================
Error while executing onEvent script for event: onClick.
Errormessage: H:\P\temp\r205931\gameoptions.lua:3570: /home/manuel/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so: undefined symbol: AllowPersonalizedData
======================================
Last edited by fallenwizard on Sat, 23. Jan 16, 02:52, edited 3 times in total.
jeckhack
Posts: 17
Joined: Sat, 16. Jan 16, 22:57
x4

Post by jeckhack »

Corbet wrote:
fallenwizard wrote:EDIT2:

Yes. The SDL version is to blame. I've replaced the libSDL2-2.0.so.0 version in the lib folder with the one provided by my distro. I can start the game now as you can see here:
http://imgur.com/kVv3BeE
Fixed the problem for me as well on SteamOS 2.0. I copied libSDL2-2.0.so.0 from Steam runtime. I don't know what kind of build options were used but Steam runtime library is about 6x smaller (~1MB vs ~6MB)

But otherwise the game runs and looks very nice! Keep up good work.

SteamOS 2.0 + i7 + GTX 750 Ti
Hi! Could you tell what fps you have when you start freeplay with ultra gfx with 4x antialiasing?
fallenwizard
Posts: 634
Joined: Tue, 13. Apr 10, 20:03
x4

Post by fallenwizard »

Version: 4.0 Beta 6 (Build 35) using a GTX 970 with the proprietary NVIDIA driver


Seems like the system map is glitchy. Zooming out from the zone map to the system map results in a black map screen. Zooming in slightly results in this: https://veuwer.com/i/3khf.png

This is especially noticable with the new expanded map in 4.0 with the HoL DLC.

Also please add the new build to the bug tracker, so I can avoid to flood this thread.
dracflamloc
Posts: 20
Joined: Sat, 13. Dec 03, 21:06
x3

Post by dracflamloc »

Just bought the game after learning linux support is back. Do we still need to switch to the linux alpha branch in steam?

Return to “X Rebirth - Technical Support”