Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

CrossCode

A retro-inspired 2D Action-RPG set in the distant future · By Radical Fish Games

Unofficial Linux support thread

A topic by Nyaaori created Mar 08, 2022 Views: 3,633 Replies: 47
Viewing posts 1 to 12
(5 edits) (+15)

I decided to change this to a general Linux support thread to help people out.

If you’re experiencing crashing and none of the other fixes helped, please provide the following info:

  • Output of inxi -CSGIj

or

  • What CPU you have (cat /proc/cpuinfo | grep model\ name | head -n1)
  • Desktop Environment, ie KDE, GNOME, XFCE, i3, Sway
  • Distro you’re using, ie Arch, Clear Linux, Debian 11, Ubuntu 22.04, or Void
  • Usage of Xorg or XWayland
  • Output of glxinfo | grep 'OpenGL.*string'
  • Total system memory [RAM and Swap] (free -m)

as well as what behaviour you experience with the game: ie immediate crashing, or crashing after a few minutes, or running poorly in general.


Below is the original post from before turning this into a general support thread.


Heads up, the Linux version crashes on some systems, this can be fixed by updating the version of nwjs in use.

For anyone that runs into this, head over to https://nwjs.io/ and download the latest version [tested with v0.62.0]​, extract it into your CrossCode install, delete the CrossCode binary and rename nw to CrossCode

There’s some chance that updating nwjs like this might break something in game, but I haven’t run into any issues yet. Either way, it’s better than crashing before you can even get into the game.

Edit: 20 hours into the game and still no issues, even the DLC seems to work fine with the updated nwjs. Also I made some Lutris install scripts for the itch.io version and they should be available on Lutris shortly, once they get approved.


(+3)

thank you so much for posting the fix

(+1)

the fix stopped working

Is it behaving the same as before or does it now crash at a different point?

Also, are you running the game directly or using the itch client?

(3 edits)

I did this fix, running directly. Does not work. Crashes with the error 

[15784:15784:0313/102524.052265:ERROR:x11_input_method_context_impl_gtk.cc(144)] Not implemented reached in virtual void libgtkui::X11InputMethodContextImplGtk::SetSurroundingText(const base::string16 &, const gfx::Range &)

[15610:15610:0313/102310.953352:ERROR:chrome_browser_main_extra_parts_x11.cc(62)] X IO error received (X server probably went away)

Cannot even start playing. sometimes crashes while loading, other times when clicking new game

Something to note that if I run it on my other pc, it runs without even needing to do the fix. Installed through app on the other pc.

Try to run the game with "--disable-gpu" it work for me. I just launch the bin with the command: "./CrossCode gamemoderun mangohud %command% --disable-gpu"

I tried the fix with nswjs a long ago and didn't work, but this one haven't failed so far.

This worked. Thank you!

To help narrow this issue down for everyone, could you provide the output of glxinfo | grep 'OpenGL.*string' on both the system you experienced crashing on and your working system?

(2 edits)

2 months late, but here it is:

Crashing System:

OpenGL vendor string: AMD
OpenGL renderer string: AMD KAVERI (LLVM 13.0.1, DRM 3.42, 5.15.37-1-lts)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.0.3
OpenGL core profile shading language version string: 4.60
OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.0.3
OpenGL shading language version string: 4.60
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Do note this started working without needing --disable-gpu. i suspect it is because we switched to amdgpu from radeon drivers.

Working System:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 510.60.02
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL version string: 4.6.0 NVIDIA 510.60.02
OpenGL shading language version string: 4.60 NVIDIA
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 510.60.02
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Does this run on Mint guys? I unzipped the package & when I try to run  the CrossCode file (which I assume is the binary?), it just says no known programs associated with it.

(1 edit)

Make sure to mark it as executable first, chmod +x CrossCode from a terminal will do fine for that, if it still won’t run when you click it, try running it from a terminal with ./CrossCode

Not sure which DE you’re using, but you might also be able to right click the file and click “Execute” or “Run”.

Cheers, running it from a terminal did the trick! Not sure why it won't run from a shortcut, when it's flagged as an executable, eh.

(1 edit)

This fix worked like a charm for me on the current version of SteamOS on my Steam Deck. Thanks a bunch.

(+2)

Oh, SteamOS 3? Well if you also want perfectly scaled pixels, set the game to fit mode and 1x, exit it, and set your launch parameters in the game properties (works for non-steam games too) to gamescope -w 568 -h 320 -fine -- %command%

Do you use the Steam version? Because I can't get the itch.io version to work at all. I already patched the input fix but controls are not working at all and in the Steam UI I get a constant Steam loading symbol since I patched the input fix in.

I have not been able to run the game from within the Steam UI mode. Somehow the game runs in the background (with sounds and menus and all) but I was not able to get the focus to the game video output. Running it from desktop mode worked fine though. I ran into the input problems but since had no time to give it another go. I might look into it on sunday.

Same problem. In Steam UI the game runs in the background and I hear the game sound. In desktop mode the game runs but inputs are not working correct so I can't proceed further than the first shooting tutorial.

(2 edits) (+1)

Setting the gamescope command should fix that, but give me a second to test it. I may not have a steam deck yet but I do have the same software stack as I’m running the same build of steam.

Tested, seems to be a bug with gamescope and/or steam’s gamepad mode, might be worth opening a support ticket with valve or a bug report on gamescope’s repo at https://github.com/Plagman/gamescope

Awesome, thanks in advance for your efforts.

(1 edit)

Got around to testing, and as my post now says, it seems to be a bug with gamescope or steam’s game ui.

In the meantime, running it from desktop mode with gamescope -w 568 -h 320 -fine -- %command% as your launch parameters for the game [if running from steam] should provide a great experience, just make sure you have the game’s graphics set to fit and 1x as those parameters let gamescope take care of scaling.

If not running from steam, your launch command would be gamescope -w 568 -h 320 -fin -- ./CrossCode

(+2)

This worked for me on Arch:

cd ~/.config/itch/apps/crosscode
./CrossCode --disable-gpu

@Nyaaori this fix worked for me without changing the nwjs version.

thanks, this works!

Worth noting that this flag, as self described, disables GPU acceleration. Do make sure you’re still getting 60fps, as the game slows down at lower framerates which will mess with intended gameplay.

Out of curiosity, what’s the output of glxinfo | grep 'OpenGL.*string' on your system? [on arch, glxinfo is in the mesa-demos package, if you need to install it]

(1 edit)

If this is of any interest, here’s the output of glxinfo on my machine:

OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon R7 300 Series (PITCAIRN, DRM 3.44.0, 5.16.14-arch1-1, LLVM 13.0.1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.3.7
OpenGL core profile shading language version string: 4.60
OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.3.7
OpenGL shading language version string: 4.60
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.3.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Disabling the GPU acceleration does work but my (not so good i guess) CPU can’t keep up and it’s unplayable.

Also, I installed NWJS 0.62.0 and it didn’t work any better (same behavior, crash short after exec).

Maybe worth noting that I’m running XWayland? I don’t know if that’s truly related to the error message from NWJS.

Thanks, could you try to upgrade to Mesa 22 and test again on 0.62.0?

The game works fine on nwjs 0.62.0 on Mesa 22.1[git]’s Intel driver

With crashing on the older nwjs version, it didn’t matter if running with xwayland or xorg.

OK now pacman -Qi mesa-git | grep Version; ~/.config/itch/apps/crosscode/CrossCode --version and still no luck :(

Version         : 22.1.0_devel.151101.2f9976debc5.8bc02d9b7565c5f9961ae3bb7f058d35-1
nwjs 71.0.3578.98

Does it means that the mesa-radeon package provided by mesa doesn’t behave the same as the intel version (yet)?

(1 edit)

Oh, I just realised you’re using a Pitcairn GPU, which means you’re likely on the older radeon driver rather than the newer amdgpu driver. Can you try with the amdgpu driver?

Instructions to check and switch are available here: https://wiki.archlinux.org/title/AMDGPU#Enable_Southern_Islands_(SI)and_Sea_Islands(CIK)_support

Pitcairn is Southern Islands.

I don’t have time right now but I’ll report here as soon as I try the amdgpu driver, and hopefully it will confirm that older drivers are not supported for Pitcairn.

However, I guess nothing can be done on the CrossCode side about this as it is kernel space stuff? Maybe mesa could? Or should we at last get rid of the older drivers altogether?

The issue is most likely in nwjs or even in chromium.

However, CrossCode could implement a workaround that automatically disables GPU acceleration on known buggy driver/nwjs combinations, that’s not ideal though and it would be best to find the actual cause of the problem and fix it.

Today I got time to check about this.

Apparently, I already were using the amdgpu driver (as per the output of dmesg | egrep 'amdgpu|radeon' below) and I tried again with both the nw version from crosscode and from nwjs.io and nothing changed. lspci -k gave the same output as the one in the archwiki because I have the exact same GPU (driver in use is amdgpu, and both radeon and amdgpu are loaded).

I haven’t tested with the radeon driver yet, but it’s pretty straightforward to do so if you think it’s worth it (I don’t want to reboot right now).

Ok, so maybe we could report a bug to either nwjs or chromium if we could narrow down the issue to something less specific to CrossCode and more about GPU acceleration on linux?

I don’t think it’s a great idea to set the burden of maintaining a compatibility list on the CrossCode side, especially when it’s so easy to get it working with Wine for now (it’s a bit sad to say, but it’s the current state of thing).

Thank you alot for your help and commitment in this issue, I greatly appreciate it @Nyaaori :-)

[    1.401263] [drm] radeon kernel modesetting enabled.
[    1.401333] radeon 0000:01:00.0: SI support disabled by module param
[    1.403378] [drm] amdgpu kernel modesetting enabled.
[    1.405924] amdgpu: Ignoring ACPI CRAT on non-APU system
[    1.405927] amdgpu: Virtual CRAT table created for CPU
[    1.405941] amdgpu: Topology: Add CPU node
[    1.406061] fb0: switching to amdgpu from EFI VGA
[    1.406238] amdgpu 0000:01:00.0: vgaarb: deactivate vga console
[    1.406355] amdgpu 0000:01:00.0: enabling device (0006 -> 0007)
[    1.406506] amdgpu 0000:01:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported
[    1.406588] amdgpu 0000:01:00.0: amdgpu: Fetched VBIOS from VFCT
[    1.406592] amdgpu: ATOM BIOS: 113-C6347100-OU2
[    1.406611] amdgpu 0000:01:00.0: amdgpu: PCIE atomic ops is not supported
[    1.410484] amdgpu 0000:01:00.0: amdgpu: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used)
[    1.410491] amdgpu 0000:01:00.0: amdgpu: GART: 1024M 0x000000FF00000000 - 0x000000FF3FFFFFFF
[    1.410568] [drm] amdgpu: 2048M of VRAM memory ready
[    1.410570] [drm] amdgpu: 3072M of GTT memory ready.
[    1.411207] amdgpu 0000:01:00.0: amdgpu: PCIE GART of 1024M enabled (table at 0x000000F400300000).
[    1.434565] [drm] amdgpu: dpm initialized
[    2.008426] amdgpu 0000:01:00.0: amdgpu: SE 2, SH per SE 2, CU per SH 5, active_cu_number 16
[    2.142347] fbcon: amdgpudrmfb (fb0) is primary device
[    2.320314] amdgpu 0000:01:00.0: [drm] fb0: amdgpudrmfb frame buffer device
[    2.660126] [drm] Initialized amdgpu 3.44.0 20150101 for 0000:01:00.0 on minor 0

Would be worth trying to radeon driver too if you get the time, at least to collect info on if it works any different.

Also, if you have chromium, check chrome://gpu in it to see if it has hardware acceleration enabled on both drivers, if it doesn’t than perhaps nwjs is ignoring the built in compatibility table.

I want to package the game in Gentoo Linux, but I've been waiting for an official update with this fix. I can have it download the newer NW.js anyway, but I'd rather not. It's been working great for me. Can we make this happen?

(1 edit)

I recently submitted lutris install scripts for 64/32 bit and with/without the DLC, I also packaged the game as an appimage for personal use and it works quite well.

Lutris scripts have yet to be approved yet, their moderation team is probably heavily backlogged or something.

Here are said scripts:

As for the crashing: Updating nwjs appears to fix it for people on amdgpu and crocus drivers, but –disable-gpu is necessary for people on radeonsi and other older drivers. Still waiting on more info to be sure about this though.

Yeah, I'm on amdgpu.

(1 edit)

I already posted my issue in another thread, and it might be Linux specific still, so I link it here again.
The specs you are asking: https://paste.ee/p/9FWeA

(1 edit)

Do you have Steam or ds4drv running in the background?

If so, make sure neither are running, then try again.

Thanks a lot. I checked with the systemmonitor for running processes that are named like this, and there is nothing. 

I did a reboot, and started the game again, just to be sure. Same 

Any chance you have some other controller software running?

Also worth double checking that the in game controller settings look correct

Yeah. I use this controller in a dozen of other games.

You could have xboxdrv running, as it appears Garuda comes with it; if it is running you can stop it with systemctl stop xboxdrv as you would with most services

If not, the only other discrepancy I can think of is you using a v2 of the dualshock whereas I’ve got the v1

(4 edits)

I use the Nacon SLEH 00470 - BB4469Blk, it is found as 146b:0603 BigBen Interactive PC Compact Controller

And xboxdrv is not running: 

systemctl status xboxdrv

Unit xboxdrv.service could not be found

I really don’t know then, you can try this which I’ve found to sometimes fix dualshock controller shenanigans:

  1. Have game running and controller connected
  2. Run ds4drv with ds4drv --hidraw
  3. Wait 5 seconds
  4. Close ds4drv by pressing ctrl+c twice

You could also try leaving ds4drv running and seeing if that makes a difference.

(1 edit)

Oh, so you are running an userspace driver? But why, when there is in kernel support? Anyway, I did try your suggestion and it didnt work. 

Thanks a lot for the help :)

(1 edit)

I haven’t been, I’ve just found that running and exiting ds4drv happens to sometimes fix controller issues.

I’m not really sure what else there is to try, does the controller have any different behaviour between wired and bluetooth mode?

Edit: Also, do L2/R2 move the target around in addition to the function they’re supposed to do? You might need to swap the action of L1/L2 in the game settings to test that.

(1 edit)

arch linux instructions since it wouldnt launch for me and said steamapi was missing. You don't need steam installed:

  1.  install nwjs-bin from aur
  2. run the command `nw <DIRECTORY-OF-CROSSCODE>`

A bit odd given that Arch was one of the distros I tested and never ran into that issue, good to know you can use a system-wide nwjs install though.

Hey just got the steam deck.
I downloaded, unzip'd, and chmod +x the game file.
I right clicked and added the game to steam.
The game launches and plays but the controller is all wonky. 
It continuously aims to the left and the right joy stick only moves it 30 degrees to either side.
The r2 and l2 triggers do not seem to work.
I tired "gamescope -w 568 -h 320 -fin -- ./CrossCode" from above but that did not help. 
The game is running smoothly but the controls do not work.
Any help is appreciated.