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

problems with lutris... #209

Open
skysix2 opened this issue Jan 6, 2025 · 13 comments
Open

problems with lutris... #209

skysix2 opened this issue Jan 6, 2025 · 13 comments

Comments

@skysix2
Copy link

skysix2 commented Jan 6, 2025

let me explain better, I'm using conty on batocera linux to have a good lutris and steam environment, isolated from the rest.
batocera does not have all the tools required by conty , but I worked around the problem using these variables:
USE_OVERLAYFS=0
HOME_DIR="<alternative home dir>"
ALLOW_ROOT=1
DISPLAY=":0.0"

then, first mounting conty with "-m" in BASE_DIR, then applying a manual overlay on top with batocera's overlayfs
and then launching conty.sh with:
CUSTOM_MNT="$P_CONTY_BASEDIR/root-merged" ./conty.sh \
--bind /etc/fonts /etc/fonts \
--bind /userdata /home/root/userdata \
lutris $OPT1

but sometimes lutris does not start returning python errors of its modules, very strange and then I noticed this with "findmnt":

├─/home tmpfs tmpfs rw,nosuid,nodev,relatime,mode=755
│ └─/home/root /dev/sdb1[/batocera/system]
│ │
│ └─/home/root /dev/sdb1[/batocera/roms/ports/.data/conty/conty-home]

HOME is mounted 2 times, the first is $HOME of batocera and the second is the one set by me, and with the "env" command I notice these missing:
nvidia_drivers_shared_dir=/userdata/system/.local/share/Conty/overlayfs_shared/nvidia
overlayfs_dir=/userdata/system/.local/share/Conty/overlayfs_2e72483_6c3f96a

they are probably mounted in the first HOME and not in the second, therefore they are lost.
the question is:

  • is it possible that there is a race condition between the 2 mounts and that sometimes they are in the correct order and sometimes not?
  • second question, could this be the cause of the malfunction of lutris?
  • third question, wouldn't it be better to use only the second HOME in order to avoid the problem?

this is the lutris error for reference:

2025-01-06 23:40:43,032: The Battle.net source is unavailable because Google protobuf could not be loaded: No module named 'google'
Traceback (most recent call last):
 File "/bin/lutris", line 67, in <module>
 app = Application() # pylint: disable=invalid-name
 ^^^^^^^^^^^^^
 File "/usr/lib/python3.12/site-packages/lutris/gui/application.py", line 80, in __init__
 GObject.add_emission_hook(Game, "game-start", self.on_game_start)
 File "/usr/lib/python3.12/site-packages/lutris/exception_backstops.py", line 131, in _error_handling_add_emission_hook
 return _original_add_emission_hook(emitting_type, signal_spec, error_wrapper, *args, **kwargs)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^
TypeError: could not get typecode from object

Thanks in advance for this great project!!

@Kron4ek
Copy link
Owner

Kron4ek commented Jan 7, 2025

is it possible that there is a race condition between the 2 mounts and that sometimes they are in the correct order and sometimes not?

I don't know, but assuming this is possible, you can disable automounting if the first parititons to avoid this problem.

second question, could this be the cause of the malfunction of lutris?

Probably not, but it's hard to say for sure.

nvidia_drivers_shared_dir=/userdata/system/.local/share/Conty/overlayfs_shared/nvidia
overlayfs_dir=/userdata/system/.local/share/Conty/overlayfs_2e72483_6c3f96a
they are probably mounted in the first HOME and not in the second, therefore they are lost.

If /userdata is still accessible outside of the container, they shouldn't be lost. Anyway, if the graphics acceleration works (glxinfo -B inside the container must show the correct info about your Nvidia driver, if you are using Nvidia), then there is no problem.

@skysix2
Copy link
Author

skysix2 commented Jan 7, 2025

thanks for the quick reply,
I'll try to disable auto mount as soon as I can and do some tests

@skysix2
Copy link
Author

skysix2 commented Jan 7, 2025

here I am again, if I understood correctly, to disable automount I have to set these 2 variables:
SANDBOX=1
SANDBOX_LEVEL=1

is this correct?

does this also affect individual files automounted by conty such as:
/etc/passwd
/etc/hostname
etc..., or are those used anyway?
I'll be able to try in a few hours...

@Kron4ek
Copy link
Owner

Kron4ek commented Jan 7, 2025

is this correct?

Yes.

does this also affect individual files automounted by conty such as:
/etc/passwd
/etc/hostname
etc..., or are those used anyway?

These are unaffected and will be used anyway.

https://github.com/Kron4ek/Conty/blob/master/conty-start.sh#L693

@skysix2
Copy link
Author

skysix2 commented Jan 8, 2025

in the end I haven't been able to test yet, I should be able to do it this evening

thanks again

@skysix2
Copy link
Author

skysix2 commented Jan 9, 2025

hello!
i managed to do some tests with the sandbox at level1 and unfortunately bwrap gives me this error:
bwrap: Can't bind mount /oldroot/var/run on /newroot/var/run: Unable to mount source on destination: No such device
and conty exits immediately.

going back to the initial problem (the one that led me to use batocera overlayfs to have /usr/ writable, the error is unable to mount unionfs) when conty starts using CUSTOM_MNT, from conty's bash the entire / remains read-only. so I make the changes I need before launching conty, the changes are to remove control over the root user from both lutris and steam so that it can be used on batocera.

but at this point I don't think I have the skills to go further, it's probably just a problem with environment variables that it inherits from batocera (I'll try with sandbox level 2 if I can)
I'll try to ask you if you can do a test on batocera (if you have time) you could probably figure out the problem on the fly, and then solving it upstream would be a great facilitation
to install batocera, just flash it on a USB stick and boot from there

thanks in the meantime...

@trashbus99
Copy link

You can use the modded builds uureel and I built. Mine works v41 amd/intel only. Uureels works older versions including Nvidia.

@skysix2
Copy link
Author

skysix2 commented Jan 9, 2025

hi @trashbus99 !
thanks for the offer, where can I download your builds?

actually I wanted to avoid using the uureel ones they are really very modified and full of programs that I don't use, conty_lite.sh is enough for me I only use lutris and steam.
and I wanted to avoid using modified builds to maintain the possibility of being able to update safely from this official github.
my simple conty management script performs the 2 changes that I need on the fly and that's it

@trashbus99
Copy link

trashbus99 commented Jan 9, 2025

mine has fewer, but still a bunch. curl -L bit.ly/arch-profork | bash

@skysix2
Copy link
Author

skysix2 commented Jan 9, 2025

@trashbus99 your scripts do not download a pre-made conty build but build it directly on batocera, with the same file/directory structure of uureel...

can't i just download the build?

@trashbus99
Copy link

sorry. no.

@skysix2
Copy link
Author

skysix2 commented Jan 10, 2025

yuppy!!
i finally found the root of the problem!! it was my fault :(
now i am able to use official conty_lite.sh again without any tweaks!!

sorry for the inconvenience and thanks to everyone!!

@trashbus99
Copy link

can't i just download the build?

Now you can.

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

3 participants