Matoking / protontricks

A wrapper that does winetricks things for Proton enabled games, requires Winetricks.
GNU General Public License v3.0
1.57k stars 35 forks source link

Failed to load module "canberra-gtk-module" #256

Closed nille02 closed 9 months ago

nille02 commented 9 months ago

Ive installed the Flatpak version on my Steamdeck. If i open it it ask for the title and then crashes with the following message in the terminal. flatpak run --branch=stable --arch=x86_64 --command=protontricks com.github.Matoking.protontricks --no-term --gui

Using winetricks 20230212-next (protontricks) - sha256sum: c32e6034661eea0cf7b3ee8a7e90a02176cdc01f78811e2ad7e0fc5458dd9672 with wine-8.0 and WINEARCH=win64
(process:1844): Gtk-WARNING **: 21:31:29.285: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: 21:31:29.285: Failed to load module "canberra-gtk-module"
This option is not available. Please see --help for all possible usages.

Does the flatpak miss the libary or is a runtime missing? I removed the tools and reinstalled already and let flatpak also remove old userdata and configurations before new installing it.

System (please complete the following information):

nille02 commented 9 months ago

A log with --verbose

(deck@steamdeck ~)$ flatpak run --branch=stable --arch=x86_64 --command=protontricks com.github.Matoking.protontricks --verbose --gui
protontricks (INFO): Running inside Flatpak sandbox, version 1.12.4.
protontricks (INFO): Found Steam directory at /home/deck/.local/share/Steam
protontricks (INFO): Using default Steam Runtime at /home/deck/.local/share/Steam/ubuntu12_32/steam-runtime
protontricks (INFO): WINETRICKS environment variable is not available. Searching from $PATH.
protontricks (INFO): Found 2 Steam library folders
protontricks (INFO): Multiple compatdata directories found for app 213670
protontricks (INFO): Multiple compatdata directories found for app 385800
protontricks (INFO): Multiple compatdata directories found for app 1942280
protontricks (INFO): Multiple compatdata directories found for app 367520
protontricks (INFO): Multiple compatdata directories found for app 571310
protontricks (INFO): Multiple compatdata directories found for app 1313140
protontricks (INFO): Multiple compatdata directories found for app 588430
protontricks (INFO): Multiple compatdata directories found for app 753640
protontricks (INFO): Multiple compatdata directories found for app 1139980
protontricks (INFO): Multiple compatdata directories found for app 1026680
protontricks (INFO): Currently logged-in Steam user: USER
protontricks (INFO): Found 4 Steam shortcuts running using Steam compatibility tools
protontricks (INFO): Using 'yad' as GUI provider
protontricks (INFO): User has configured app Proton version (CompatToolMapping): proton_experimental
protontricks (INFO): User has configured default Proton version (CompatToolMapping): proton_experimental
protontricks (INFO): Found active compatibility tool: Proton Experimental
protontricks (INFO): Active compatibility tool is a Proton installation
protontricks (INFO): Using 'bwrap = True' as default value
protontricks (INFO): Using separately installed Steam Runtime: Steam Linux Runtime 3.0 (sniper)
protontricks (INFO): Running Steam Runtime using bwrap containerization.
If any problems arise, please try running the command again using the `--no-bwrap` flag and make an issue report if the problem only occurs when bwrap is in use.
protontricks (WARNING): Current Steam Runtime not recognized by Protontricks.
protontricks (INFO): Created Steam Runtime Wine binary directory at /home/deck/.var/app/com.github.Matoking.protontricks/cache/protontricks/proton/Proton Experimental/bin
protontricks (INFO): WINE environment variable is not available. Setting WINE environment variable to Proton bundled version.
protontricks (INFO): WINESERVER environment variable is not available. Setting WINESERVER environment variable to Proton bundled version
protontricks (INFO): Starting bwrap launcher process: /home/deck/.var/app/com.github.Matoking.protontricks/cache/protontricks/proton/Proton Experimental/bin/bwrap-launcher
protontricks - bwrap-launcher 13: Following directories will be mounted inside container: /app /efi /esp /etc /home /mnt /opt /sbin /srv /tmp /run/media
protontricks - bwrap-launcher 13: Using temporary directory: /tmp/protontricks-8m1x3o8w
setlocale "de_DE.UTF-8": No such file or directory
pressure-vessel-locale-gen: Missing locale de_DE.UTF-8 (found in $LANG)
pressure-vessel-locale-gen: Generating locale de_DE.UTF-8...
pressure-vessel-locale-gen: Generated locale de_DE.UTF-8 successfully
pressure-vessel-locale-gen: Generating locale en_US.UTF-8...
pressure-vessel-locale-gen: Generated locale en_US.UTF-8 successfully
pressure-vessel-adverb[69]: W: Container startup will be faster if missing locales are created at OS level
steam-runtime-launcher-service[112]: W: The --socket option is deprecated. Prefer to use --session or --bus-name.
protontricks (INFO): bwrap launcher started
protontricks (INFO): Attempting to run command ['/app/bin/winetricks', '--gui']
(process:120): Gtk-WARNING **: 22:12:20.567: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: 22:12:20.567: Failed to load module "canberra-gtk-module"
(process:1912): Gtk-WARNING **: 22:12:31.667: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: 22:12:31.668: Failed to load module "canberra-gtk-module"
This option is not available. Please see --help for all possible usages.
protontricks (INFO): Terminating launcher process 13
protontricks (INFO): Launcher process terminated
(deck@steamdeck ~)$ 
nille02 commented 9 months ago

This is the System Log

(deck@steamdeck ~)$ sudo journalctl -f
Oct 11 12:39:15 steamdeck systemd[1]: esp.mount: Deactivated successfully.
Oct 11 12:39:15 steamdeck systemd[1]: Unmounted /esp.
Oct 11 12:39:29 steamdeck systemd[1]: Unmounting cifs mount script...
Oct 11 12:39:29 steamdeck systemd[1]: home-deck-Netzwerk-Media.mount: Deactivated successfully.
Oct 11 12:39:29 steamdeck systemd[1]: Unmounted cifs mount script.
Oct 11 12:39:49 steamdeck dbus-daemon[885]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.204' (uid=0 pid=13680 comm="sudo journalctl -f")
Oct 11 12:39:49 steamdeck dbus-daemon[885]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
Oct 11 12:39:49 steamdeck sudo[13680]: pam_systemd_home(sudo:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Oct 11 12:39:49 steamdeck sudo[13680]:     deck : TTY=pts/1 ; PWD=/home/deck ; USER=root ; COMMAND=/usr/bin/journalctl -f
Oct 11 12:39:49 steamdeck sudo[13680]: pam_unix(sudo:session): session opened for user root(uid=0) by deck(uid=1000)
Oct 11 12:39:54 steamdeck kwin_x11[6896]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 9322, resource id: 25166031, major code: 18 (ChangeProperty), minor code: 0
Oct 11 12:39:54 steamdeck systemd[1118]: Started Protontricks.
Oct 11 12:39:54 steamdeck systemd[1]: efi.automount: Got automount request for /efi, triggered by 13693 (flatpak)
Oct 11 12:39:54 steamdeck systemd[1]: Mounting /efi...
Oct 11 12:39:54 steamdeck systemd[1]: Mounted /efi.
Oct 11 12:39:54 steamdeck systemd[1]: esp.automount: Got automount request for /esp, triggered by 13697 (flatpak)
Oct 11 12:39:54 steamdeck systemd[1]: Mounting /esp...
Oct 11 12:39:54 steamdeck systemd[1]: Mounted /esp.
Oct 11 12:39:54 steamdeck systemd[1118]: Started app-flatpak-com.github.Matoking.protontricks-13686.scope.
Oct 11 12:39:58 steamdeck kwin_x11[6896]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 10447, resource id: 92274691, major code: 15 (QueryTree), minor code: 0
Oct 11 12:39:59 steamdeck plasmashell[13710]: protontricks (WARNING): Current Steam Runtime not recognized by Protontricks.
Oct 11 12:40:00 steamdeck systemd[1118]: Started app-flatpak-com.github.Matoking.protontricks-13776.scope.
Oct 11 12:40:03 steamdeck pressure-vessel-adverb[13786]: setlocale "de_DE.UTF-8": No such file or directory
Oct 11 12:40:03 steamdeck pressure-vessel-adverb[13786]: pressure-vessel-locale-gen: Missing locale de_DE.UTF-8 (found in $LANG)
Oct 11 12:40:03 steamdeck pressure-vessel-adverb[13786]: pressure-vessel-locale-gen: Generating locale de_DE.UTF-8...
Oct 11 12:40:03 steamdeck pressure-vessel-adverb[13786]: pressure-vessel-locale-gen: Generated locale de_DE.UTF-8 successfully
Oct 11 12:40:03 steamdeck pressure-vessel-adverb[13786]: pressure-vessel-locale-gen: Generating locale en_US.UTF-8...
Oct 11 12:40:03 steamdeck pressure-vessel-adverb[13786]: pressure-vessel-locale-gen: Generated locale en_US.UTF-8 successfully
Oct 11 12:40:03 steamdeck pressure-vessel-adverb[13786]: W: Container startup will be faster if missing locales are created at OS level
Oct 11 12:40:03 steamdeck steam-runtime-launcher-service[13829]: W: The --socket option is deprecated. Prefer to use --session or --bus-name.
Oct 11 12:40:04 steamdeck zenity[13837]: Locale not supported by C library.
                                                 Using the fallback 'C' locale.
Oct 11 12:40:04 steamdeck zenity[13837]: Failed to load module "canberra-gtk-module"
Oct 11 12:40:04 steamdeck plasmashell[13830]: winetricks GUI enabled, using zenity 3.44.2
Oct 11 12:40:13 steamdeck plasmashell[13830]: Using winetricks 20230212-next (protontricks) - sha256sum: c32e6034661eea0cf7b3ee8a7e90a02176cdc01f78811e2ad7e0fc5458dd9672 with wine-8.0 and WINEARCH=win64
Oct 11 12:40:15 steamdeck zenity[15900]: Locale not supported by C library.
                                                 Using the fallback 'C' locale.
Oct 11 12:40:15 steamdeck zenity[15900]: Failed to load module "canberra-gtk-module"
Oct 11 12:40:15 steamdeck plasmashell[15900]: This option is not available. Please see --help for all possible usages.
Oct 11 12:40:15 steamdeck systemd[1118]: app-flatpak-com.github.Matoking.protontricks-13776.scope: Consumed 10.502s CPU time.
Oct 11 12:40:15 steamdeck systemd[1118]: app-flatpak-com.github.Matoking.protontricks-13686.scope: Consumed 6.927s CPU time.
Matoking commented 9 months ago

You seem to have the de_DE.UTF-8 locale set up; due to how SteamOS works some locale files for locales other than en_US.UTF-8 are not generated, although you are still able to configure non-English locales. Some applications will require the said locale files and crash, however, such as zenity here which is causing the "This option is not available." error.

Protontricks should detect this and temporarily set the locale to en_US.UTF-8 to avoid this problem, but that's not happening here for some reason.

Could you try opening Konsole in desktop mode and running both of these commands and post what they print?

$ locale -a
$ locale
nille02 commented 9 months ago
(deck@steamdeck ~)$ locale -a
C
C.UTF-8
en_US.utf8
POSIX
(deck@steamdeck ~)$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
(deck@steamdeck ~)$

I doubt that it is a locale issue (just flatpak looked for the german locale but he can fallback). it falls back to C like it should and it was before no issue with it either. Unfortunately i don't see the issue except This option is not available. Please see --help for all possible usages. that triggers the gui somehow. I did try it on the the cli and it works there. e.g.

(deck@steamdeck ~)$ flatpak run --branch=stable --arch=x86_64 --command=protontricks com.github.Matoking.protontricks --no-bwrap 427520 list
protontricks (WARNING): Current Steam Runtime not recognized by Protontricks.
apps
benchmarks
dlls
fonts
settings
(deck@steamdeck ~)$
Matoking commented 9 months ago

It looks like the Flatpak environment might be using a different locale? In that case, the following commands might print something different:

$ flatpak run --command=bash com.github.Matoking.protontricks
# While inside the new shell, run the following commands
$ locale
$ locale -a

The "This option is not available." error is caused by Winetricks trying to run the command to display the main menu, eg. the following:

$ zenity --title "Winetricks - wineprefix auswählen" --text "Was möchten Sie tun?" --list --radiolist --column "" --column "" --column "" --height 500 --width 1010 --hide-column 2 FALSE help "Hilfe anzeigen" FALSE apps "Ein Programm installieren" FALSE benchmarks "Einen Benchmark-Test installieren" TRUE main "Standard wineprefix auswählen" FALSE mkprefix "Neuen wineprefix erstellen"

Presumably, if you try to run this command in Konsole as-is, it should work. However, if you prepend the locale settings LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 zenity ... or try to run the command inside the Flatpak shell like the one you get after running flatpak run --command=bash com.github.Matoking.protontricks, it should fail. Can you check if it works like so?

There's also a setlocale "de_DE.UTF-8" message in your log files, indicating something is trying to change the locale roughly when the Steam Runtime container is launched. If it's caused by the Steam Runtime launcher, it feels weird that it also seems to take effect outside the container as well.

nille02 commented 9 months ago
(deck@steamdeck ~)$ flatpak run --command=bash com.github.Matoking.protontricks
(139)(deck@steamdeck ~)$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
(deck@steamdeck ~)$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
C.UTF-8
POSIX
en_US.utf8
(deck@steamdeck ~)$ 

My guess that KDE add the german locale to the environment. That let me look at the kde settings again and all seemed fine so far. i removed german and did try it and it worked. I added german again and now it still works.

(deck@steamdeck ~)$ flatpak run --command=bash com.github.Matoking.protontricks
(deck@steamdeck ~)$ locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC=C
LC_TIME=de_DE.UTF-8
LC_COLLATE=C
LC_MONETARY=C
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME=C
LC_ADDRESS=C
LC_TELEPHONE=C
LC_MEASUREMENT=C
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
(deck@steamdeck ~)$ locale -a
C
C.utf8
POSIX
de_AT
de_AT.utf8
de_AT@euro
de_BE
de_BE.utf8
de_BE@euro
de_CH
de_CH.utf8
de_DE
de_DE.utf8
de_DE@euro
de_IT
de_IT.utf8
de_LI.utf8
de_LU
de_LU.utf8
de_LU@euro
en_AG
en_AU
en_AU.utf8
en_BW
en_BW.utf8
en_CA
en_CA.utf8
en_DK
en_DK.utf8
en_GB
en_GB.utf8
en_HK
en_HK.utf8
en_IE
en_IE.utf8
en_IE@euro
en_IL
en_IN
en_NG
en_NZ
en_NZ.utf8
en_PH
en_PH.utf8
en_SG
en_SG.utf8
en_US
en_US.utf8
en_ZA
en_ZA.utf8
en_ZM
en_ZW
en_ZW.utf8
(deck@steamdeck ~)$