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

Missing libxcb-cursor0 causes version 2.9.2 to crash #378

Closed
Jed28 opened this issue Apr 20, 2024 · 12 comments · Fixed by #381 or #382
Closed

Missing libxcb-cursor0 causes version 2.9.2 to crash #378

Jed28 opened this issue Apr 20, 2024 · 12 comments · Fixed by #381 or #382
Labels
AppImage (packaging) bug Something isn't working

Comments

@Jed28
Copy link

Jed28 commented Apr 20, 2024

Describe the bug
Unable to launch ProtonUp-Qt-2.9.2-x86_64.AppImage

To Reproduce
Launch it with any method

Expected behavior
Program opens

Screenshots
2024-04-20_20-49

Desktop (please complete the following information):

  • Platform: PC
  • System: Mint 21.3, kernel 6.5.0-26-generic, last mesa from the PPA.
  • Version: ProtonUp-Qt 2.9.2
  • How did you install ProtonUp-Qt?: AppImage

Additional context
2.8.0 work fine, tried to update and latest version doesn't work 2.9.2. I can test other version if you think it would help?

Terminal output

$ ./ProtonUp-Qt-2.9.2-x86_64.AppImage 
ProtonUp-Qt 2.9.2 by DavidoTek. Build Info: Official AppImage by DavidoTek.
Python 3.10.4 (main, Apr  2 2022, 09:04:19) [GCC 11.2.0], PySide 6.7.0
Platform: LinuxMint 21.3 Linux-6.5.0-26-generic-x86_64-with-glibc2.35
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, wayland-egl, wayland, xcb.

[1]    2597968 IOT instruction (core dumped)  ./ProtonUp-Qt-2.9.2-x86_64.AppImage
@Jed28 Jed28 added the bug Something isn't working label Apr 20, 2024
@DavidoTek
Copy link
Owner

There hasn't much changed since v2.9.1 except the build system. Can you try if v2.9.1 works fine?

It is possible that we need to include additional libraries within the AppImage that are not available on all distributions.

qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.

Can you check whether xcb-cursor0 and libxcb-cursor0 are installed on your system?
You can do this by running following command in your terminal: dpkg -l | grep cursor0

@Jed28
Copy link
Author

Jed28 commented Apr 20, 2024

ProtonUp-Qt-2.9.1-x86_64.AppImage works.

./ProtonUp-Qt-2.9.1-x86_64.AppImage 
ProtonUp-Qt 2.9.1 by DavidoTek. Build Info: Official AppImage by DavidoTek.
Python 3.8.2 (default, Mar 13 2020, 10:14:16) [GCC 9.3.0], PySide 6.2.4
Platform: LinuxMint 21.3 Linux-6.5.0-26-generic-x86_64-with-glibc2.29
Gtk-Message: 22:30:00.623: Failed to load module "xapp-gtk3-module"
Loading locale en / en_AU
Loaded ctmod GE-Proton
Loaded ctmod Wine-GE
Loaded ctmod Boxtron
Loaded ctmod D8VK (nightly)
Loaded ctmod Kron4ek Wine-Builds Vanilla
Loaded ctmod Lutris-Wine
Loaded ctmod Luxtorpeda
Loaded ctmod Northstar Proton (Titanfall 2)
Loaded ctmod Proton Tkg
Loaded ctmod Proton Tkg (Wine Master)
Loaded ctmod Roberta
Loaded ctmod Steam-Play-None
Loaded ctmod SteamTinkerLaunch
Loaded ctmod SteamTinkerLaunch-git
Loaded ctmod vkd3d-lutris
Loaded ctmod vkd3d-proton
Loaded ctmod Wine Tkg (Valve Wine)
Loaded ctmod Wine Tkg (Vanilla Wine)
Loaded ctmod DXVK
Loaded ctmod DXVK Async
Loaded ctmod DXVK (nightly)
qt.pysideplugin: Environment variable PYSIDE_DESIGNER_PLUGINS is not set, bailing out.
qt.pysideplugin: No instance of QPyDesignerCustomWidgetCollection was found.
Gamepad error: No gamepad found.

Can you check whether xcb-cursor0 and libxcb-cursor0 are installed on your system?
You can do this by running following command in your terminal: dpkg -l | grep cursor0

dpkg -l | grep cursor0
ii  libwayland-cursor0:amd64                       1.20.0-1ubuntu0.1                                 amd64        wayland compositor infrastructure - cursor library
ii  libwayland-cursor0:i386                        1.20.0-1ubuntu0.1                                 i386         wayland compositor infrastructure - cursor library

I did a sanity test and re-downloaded v2.9.2 but got the same results in original post.

@DavidoTek
Copy link
Owner

Okay. Are you running X11 or Wayland? You can check by running: echo $XDG_SESSION_TYPE

Can you also try installing libxcb-cursor0 by running sudo apt install libxcb-cursor0

If that helps, I will check whether we can include the libxcb-cursor0 within the AppImage file

@sonic2kk
Copy link
Contributor

From a quick search, it seems like Linux Mint at least does not include libxcb-cursor0. A couple of people have had issues since December 2023 onward getting some programs to work, and fixed them by installing (among other packages) libxcb-cursor0 (Linux Mint forums thread reply).

@Jed28
Copy link
Author

Jed28 commented Apr 21, 2024

Installing libxcb-cursor0 got it working. It no longer finds the steam directory automaticity but I can add it manually.

I'm running X11.

@Jed28 Jed28 closed this as completed Apr 21, 2024
@sonic2kk
Copy link
Contributor

sonic2kk commented Apr 21, 2024

I wonder why it doesn't find your Steam directory. Where is Steam installed on your computer? And does v2.9.1 find your Steam directory? You might have to clear your custom Steam directory from ~/.config/pupgui/config.ini.

@DavidoTek
Copy link
Owner

From a quick search, it seems like Linux Mint at least does not include libxcb-cursor0.
Installing libxcb-cursor0 got it working.

Okay, let's see if others report the issue as well. If that is the case, we may need to include it in the AppImage.

It no longer finds the steam directory automaticity but I can add it manually
I wonder why it doesn't find your Steam directory. Where is Steam installed on your computer? And does v2.9.1 find your Steam directory?

Strange, works for me. Is there a case where the stricter checks added with #356 may break something?

@Jed28 can you run following commands and upload the output here? Thanks.

ls ~/.local/share/Steam
ls ~/.local/share/Steam/config
ls ~/.steam/root
ls ~/.steam/root/config
ls ~/.steam/steam
ls ~/.steam/steam/config
ls ~/.steam/debian-installation
ls ~/.steam/debian-installation/config

@DavidoTek DavidoTek changed the title 2.9.2 x86_64 crashes on launch Missing libxcb-cursor0 causes version 2.9.2 to crash Apr 22, 2024
@Jed28
Copy link
Author

Jed28 commented Apr 22, 2024

v2.9.1 finds it automaticity. I removed the config file ~/.config/pupgui/config.ini and it didn't help. Steam is in the default install from apt. I have compatibilitytools.d on a separate ssd with my games, I've syslinked it to it's default dir. This is the dir I have to manually add in v2.9.2 /home/jed/.local/share/Steam/compatibilitytools.d/.

╭─jed@Mint ~ 
╰─$ ls ~/.local/share/Steam
appcache                     depotcache                     linux32                 steam                           tenfoot
bin                          error.log                      linux64                 steamapps                       ThirdPartyLegalNotices.css
bin_steamdeps.py             fontconfig                     logs                    steamclient64.dll               ThirdPartyLegalNotices.doc
bootstrap.tar.xz             fossilize_engine_filters.json  music                   steamclient.dll                 ThirdPartyLegalNotices.html
clientui                     friends                        package                 steamdeps.txt                   ubuntu12_32
compatibilitytools.d         GameOverlayRenderer64.dll      public                  steam_msg.sh                    ubuntu12_64
config                       graphics                       resource                steam.sh                        update_hosts_cached.vdf
controller_base              installscriptevalutor_log.txt  servers                 steam_subscriber_agreement.txt  userdata
d3ddriverquery64.dxvk-cache  legacycompat                   ssfn755478843335273001  steamui
╭─jed@Mint ~ 
╰─$ ls ~/.local/share/Steam/config
config.vdf                         DialogConfigOverlay_1920x1080.vdf  DialogConfigOverlay_960x540.vdf  libraryfolders.vdf    widevine
coplay_76561197970983747.vdf       DialogConfigOverlay_1920x980.vdf   DialogConfig.vdf                 loginusers.vdf
DialogConfigOverlay_1920x1019.vdf  DialogConfigOverlay_3840x1080.vdf  htmlcache                        steamapps.vrmanifest
╭─jed@Mint ~ 
╰─$ ls ~/.steam/root
appcache                       friends                        resource                                      steamui-public
bin                            GameOverlayRenderer64.dll      ssfn2335116415555082738                       tenfoot
bin_steamdeps.py               graphics                       standalone_installscript_progress_228980.vdf  ThirdPartyLegalNotices.css
bootstrap.tar.xz               installscriptevalutor_log.txt  steam                                         ThirdPartyLegalNotices.doc
clientui                       legacycompat                   steamapps                                     ThirdPartyLegalNotices.html
compatibilitytools.d           linux32                        steamclient64.dll                             ubuntu12_32
config                         linux64                        steamclient.dll                               ubuntu12_64
controller_base                local.vdf                      steamdeps.txt                                 update_hosts_cached.vdf
d3ddriverquery64.dxvk-cache    logs                           steam_msg.sh                                  userdata
debian-installation            music                          steam.sh                                      WINDOWSTEMPDIR_FONTCONFIG_CACHE
depotcache                     package                        steam_subscriber_agreement.txt
fossilize_engine_filters.json  public                         steamui
╭─jed@Mint ~ 
╰─$ ls ~/.steam/root/config
1c666d2c02fc_gyro.vdf        coplay_76561197970983747.vdf       DialogConfigOverlay_1920x1022.vdf  DialogConfig.vdf      virtualgamepadinfo.txt
401b5f8fc177_gyro.vdf        DialogConfigOverlay_1280x720.vdf   DialogConfigOverlay_1920x1080.vdf  htmlcache             widevine
avatarcache                  DialogConfigOverlay_1918x1078.vdf  DialogConfigOverlay_1928x1092.vdf  libraryfolders.vdf
config.vdf                   DialogConfigOverlay_1920x1019.vdf  DialogConfigOverlay_3840x1080.vdf  loginusers.vdf
config.vdf.async1379686.tmp  DialogConfigOverlay_1920x1020.vdf  DialogConfigOverlay_800x450.vdf    steamapps.vrmanifest
╭─jed@Mint ~ 
╰─$ ls ~/.steam/steam
appcache                       friends                        resource                                      steamui-public
bin                            GameOverlayRenderer64.dll      ssfn2335116415555082738                       tenfoot
bin_steamdeps.py               graphics                       standalone_installscript_progress_228980.vdf  ThirdPartyLegalNotices.css
bootstrap.tar.xz               installscriptevalutor_log.txt  steam                                         ThirdPartyLegalNotices.doc
clientui                       legacycompat                   steamapps                                     ThirdPartyLegalNotices.html
compatibilitytools.d           linux32                        steamclient64.dll                             ubuntu12_32
config                         linux64                        steamclient.dll                               ubuntu12_64
controller_base                local.vdf                      steamdeps.txt                                 update_hosts_cached.vdf
d3ddriverquery64.dxvk-cache    logs                           steam_msg.sh                                  userdata
debian-installation            music                          steam.sh                                      WINDOWSTEMPDIR_FONTCONFIG_CACHE
depotcache                     package                        steam_subscriber_agreement.txt
fossilize_engine_filters.json  public                         steamui
╭─jed@Mint ~ 
╰─$ ls ~/.steam/steam/config
1c666d2c02fc_gyro.vdf        coplay_76561197970983747.vdf       DialogConfigOverlay_1920x1022.vdf  DialogConfig.vdf      virtualgamepadinfo.txt
401b5f8fc177_gyro.vdf        DialogConfigOverlay_1280x720.vdf   DialogConfigOverlay_1920x1080.vdf  htmlcache             widevine
avatarcache                  DialogConfigOverlay_1918x1078.vdf  DialogConfigOverlay_1928x1092.vdf  libraryfolders.vdf
config.vdf                   DialogConfigOverlay_1920x1019.vdf  DialogConfigOverlay_3840x1080.vdf  loginusers.vdf
config.vdf.async1379686.tmp  DialogConfigOverlay_1920x1020.vdf  DialogConfigOverlay_800x450.vdf    steamapps.vrmanifest
╭─jed@Mint ~ 
╰─$ ls ~/.steam/debian-installation
appcache                       friends                        resource                                      steamui-public
bin                            GameOverlayRenderer64.dll      ssfn2335116415555082738                       tenfoot
bin_steamdeps.py               graphics                       standalone_installscript_progress_228980.vdf  ThirdPartyLegalNotices.css
bootstrap.tar.xz               installscriptevalutor_log.txt  steam                                         ThirdPartyLegalNotices.doc
clientui                       legacycompat                   steamapps                                     ThirdPartyLegalNotices.html
compatibilitytools.d           linux32                        steamclient64.dll                             ubuntu12_32
config                         linux64                        steamclient.dll                               ubuntu12_64
controller_base                local.vdf                      steamdeps.txt                                 update_hosts_cached.vdf
d3ddriverquery64.dxvk-cache    logs                           steam_msg.sh                                  userdata
debian-installation            music                          steam.sh                                      WINDOWSTEMPDIR_FONTCONFIG_CACHE
depotcache                     package                        steam_subscriber_agreement.txt
fossilize_engine_filters.json  public                         steamui
╭─jed@Mint ~ 
╰─$ ls ~/.steam/debian-installation/config
1c666d2c02fc_gyro.vdf        coplay_76561197970983747.vdf       DialogConfigOverlay_1920x1022.vdf  DialogConfig.vdf      virtualgamepadinfo.txt
401b5f8fc177_gyro.vdf        DialogConfigOverlay_1280x720.vdf   DialogConfigOverlay_1920x1080.vdf  htmlcache             widevine
avatarcache                  DialogConfigOverlay_1918x1078.vdf  DialogConfigOverlay_1928x1092.vdf  libraryfolders.vdf
config.vdf                   DialogConfigOverlay_1920x1019.vdf  DialogConfigOverlay_3840x1080.vdf  loginusers.vdf
config.vdf.async1379686.tmp  DialogConfigOverlay_1920x1020.vdf  DialogConfigOverlay_800x450.vdf    steamapps.vrmanifest

@sonic2kk
Copy link
Contributor

Hm, that all looks correct. Although what is the "real" Steam install from apt? I don't use any distro with apt so it's not clear to me where the default is.

If you put an (empty) compatibilitytools.d in your Steam install folder (you can test by renaming your symlinked folder and then creating in a new empty non-symlink folder) does ProtonUp-Qt then find your Steam install directory?

I'm wondering if maybe some of the changes made in v2.9.1 need to better follow symlinks or something.

@sonic2kk
Copy link
Contributor

sonic2kk commented Apr 23, 2024

Looking at the changes for #356, it may actually be the opposite problem. I just tested with compatibilitytools.d as a symlink and ProtonUp-Qt cannot find my Steam installation.

This is probably something to do with how we're using realpath. Probably the path to the install dir because of the symlink, instead being /home/user/.local/share/Steam/compatibilitytools.d (where compatibilitytools.d is a symlink), the path will become /path/to/symlink. ProtonUp-Qt does a lot of things relative to the compatibilitytools.d install directory.

This might be a bit tricky, because we use realpath for a reason: To filter out actual Steam path symlinks. But this is for the base Steam root path and not for compatibilitytools.d specifically.

Maybe we just need to take a look at how we use realpath when we already have compatibilitytools.d in the path, and move up a dir before using realpath.

We use realpath here, but this is for determining the Steam base path.

os.path.realpath(os.path.join(HOME_DIR, _STEAM_ROOT)) for _STEAM_ROOT in ['.local/share/Steam', '.steam/root', '.steam/steam', '.steam/debian-installation']

We then use realpath here in the new is_valid_launcher_installation method, and I think this is the culprit:

return is_valid_steam_install(os.path.realpath(os.path.join(install_dir, '..')))

If we assume install_dir (which is based on {_STEAM_ROOT}/compatibilitytools.d to be /home/user/.local/share/Steam/compatibilitytools.d (where compatibilitytools.d is a symlink pointing to /path/to/the/compatibilitytools.d), then os.path.realpath(os.path.join(install_dir, '..')) returns /path/to/the. This is because it takes the realpath to the symlink, which is /path/to/the/compatibilitytools.d, and then moves up a directory. This results in is_valid_launcher_installation looking for the Steam data files in the symlink's containing folder and not in the actual Steam root.

When working on #356 I didn't consider symlinks being used in this way. In fact, I'm pretty sure a lot of ProtonUp-Qt doesn't account for symlinks in this way when working with relative directories (for example with Lutris). I think using a symlinked folder for the launcher folder is going to cause problems with other launchers too in different ways (it may find them but it may not install correctly).

This needs some consideration on how and if to handle... One solution may be to use abspath. Which seems to do the same thing as realpath but does not resolve symlinks. In the cases of determining the Steam Root in constants.py we probably do want to resolve symlinks (since we use this to check for duplicate paths, we want to know if symlinks are pointing to the same place) but for determining a valid launcher install, we probably want to use abspath.

See this StackOverflow answer.

os.path.abspath returns the absolute path, but does NOT resolve symlinks in its argument.
os.path.realpath will first resolve any symbolic links in the path, and then return the absolute path.

Sample snippet:

import os

user_dir = os.path.expanduser('~')

# Ensure compatibilitytools.d is a symlink for testing
# For example let's assume it's pointing to `/tmp/compatibilitytools.d`
steam_root = '/.local/share/Steam/compatibilitytools.d' 
compat_tools_dir = os.path.join(user_dir, steam_root)  # Path might be: '/home/user/.local/share/Steam/compatibilitytools.d'

steam_install_dir_realpath = os.path.realpath(os.path.join(compat_tools_dir, '..'))  # Would return '/tmp'
steam_install_dir_abspath = os.path.abspath(os.path.join(compat_tools_dir, '..'))  # Would return '/home/user/.local/share/Steam'

I just tested and using os.path.abspath fixes the issue for me, if I use a symlink for compatibilitytools.d. We may want to consider using this in more places too.

@sonic2kk
Copy link
Contributor

sonic2kk commented Apr 23, 2024

#381 should fix it, but there may need to be some discussion with DavidoTek to ensure this is valid (I didn't know how abspath and realpath differed until now, so some time to validate it is probably good for example 🙂) and also to see if we need to do this in any other places around the codebase. Talking about just my contributions, I've probably used realpath in places where abspath would suffice and we may want to try and correct that now while it's fresh in our minds 😄

#381 (or a solution along these lines), and including libxcb-cursor0 if possible in the AppImage, are probably the two components needed to resolving this issue.

@DavidoTek
Copy link
Owner

DavidoTek commented Apr 23, 2024

and including libxcb-cursor0 if possible in the AppImage

Including libxcb-cursor0 increases the AppImage by around 20 Kilobyte, that is fine.
I guess checking which libraries are included in the AppImage in general is a good idea. It's a bit scary that there is a missing library even though the AppImage increased from 60 to 91 Megabytes with the v2.9.2 release...

EDIT: The increase could be caused by the change of the path from site-packages to dist-packages. The cleaning script in AppImageBuilder.yml does only try to clean site-packages though. pypa/pip#5722 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AppImage (packaging) bug Something isn't working
Projects
None yet
3 participants