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

Cinnamon crashes and breaks when launching "Virtual keyboard" #101881

Closed
wucke13 opened this issue Oct 27, 2020 · 13 comments · Fixed by #187434
Closed

Cinnamon crashes and breaks when launching "Virtual keyboard" #101881

wucke13 opened this issue Oct 27, 2020 · 13 comments · Fixed by #187434
Assignees
Labels
0.kind: bug Something is broken 6.topic: cinnamon Desktop environment

Comments

@wucke13
Copy link
Contributor

wucke13 commented Oct 27, 2020

Describe the bug
When cinnamon is started either via gdm or exec cinnamon-session-cinnameon in a .xinitrc.

  • Sometimes the desktop icons do load
  • Always a window spawns telling me that I'm in fallback mode
  • no taskbar, no window decorations (hence I think no compositor & window manager)

To Reproduce
Here I'm kind of unsure: I deleted all nemo and cinnamon folder in $HOME, .config and .local/share. Still this occurs on all of my machines.
IIRC this first happen when accidentally starting a "virtual keyboard" app

  1. Start cinnamon
  2. Start "Virtual keyboard"
  3. Some cinnamon components crash instantly, the and the behavior is reproducible on further attempts of starting cinnamon

Expected behavior
Cinnamon starts and is usable

Additional context
Booting into an old generation did not fix this, however, I'm quite unsure what could be the cause of it. This is some log which I could create by running cinnamon from a .xinitrc. I'm not sure whether this is related to the issue or not.

relevant .xinitrc:

exec cinnamon-launcher --debug

Output captured (the log is over 2000 lines long, this is from the very end and might be the issue):

(nemo-desktop:7615): GLib-CRITICAL **: 22:40:05.139: g_strstr_len: assertion 'haystack != NULL' failed
** Message: 22:40:05.139: nemo-desktop: session is not cinnamon (checked XDG_SESSION_DESKTOP,DESKTOP_SESSION environment variables.) Applying default behavior
cinnamon-session[7339]: DEBUG(+): t+0.70044s: CsmAutostartApp: (pid:7619) done (status:0)
Cjs-Message: 22:40:05.212: JS LOG: About to start Cinnamon
Cjs-Message: 22:40:05.262: JS LOG: [LookingGlass/info] Cinnamon.AppSystem.get_default() started in 48 ms
Cjs-Message: 22:40:05.269: JS LOG: [LookingGlass/info] loading user theme: /run/current-system/sw/share/themes/Mint-Y-Dark/cinnamon/cinnamon.css
Cjs-Message: 22:40:05.282: JS LOG: [LookingGlass/info] added icon directory: /run/current-system/sw/share/themes/Mint-Y-Dark/cinnamon

(cinnamon:7561): Cjs-WARNING **: 22:40:05.283: Some code accessed the property 'BackgroundManager' on the module 'backgroundManager'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Cinnamon warning: Log level 128: posix_spawn avoided (fd close requested)
cinnamon-session[7339]: DEBUG(+): t+1.18960s: CsmXsmpServer: ice_io_error_handler (0x12ad0e0)
cinnamon-session[7339]: DEBUG(+): t+1.18965s: CsmXSMPClient: IceProcessMessagesIOError on '0x13143b0 [cinnamon 10b8bc0d0be326c08e160383480453759900000073390000]'
cinnamon-session[7339]: DEBUG(+): t+1.18968s: CsmManager: disconnect client
cinnamon-session[7339]: DEBUG(+): t+1.18969s: CsmManager: disconnect client: /org/gnome/SessionManager/Client23
cinnamon-session[7339]: DEBUG(+): t+1.18970s: CsmXSMPClient: getting restart style
cinnamon-session[7339]: DEBUG(+): t+1.18971s: CsmManager: autorestart not set, not restarting application
cinnamon-session[7339]: DEBUG(+): t+1.18972s: CsmStore: Unreffing object: 0x13143b0
cinnamon-session[7339]: DEBUG(+): t+1.18973s: CsmManager: Client removed: /org/gnome/SessionManager/Client23
cinnamon-session[7339]: DEBUG(+): t+1.18983s: CsmManager: disconnect client
cinnamon-session[7339]: DEBUG(+): t+1.18985s: CsmManager: disconnect client: /org/gnome/SessionManager/Client23
cinnamon-session[7339]: DEBUG(+): t+1.18986s: CsmXSMPClient: getting restart style
cinnamon-session[7339]: DEBUG(+): t+1.18987s: CsmManager: autorestart not set, not restarting application
cinnamon-session[7339]: DEBUG(+): t+1.18988s: CsmClient: disposing /org/gnome/SessionManager/Client23
cinnamon-session[7339]: DEBUG(+): t+1.18989s: CsmXSMPClient: xsmp_finalize (0x13143b0 [cinnamon 10b8bc0d0be326c08e160383480453759900000073390000])
Traceback (most recent call last):
  File "/nix/store/jqxihmciar0jcp0bavmnl2w2gvbpliwn-cinnamon-common-4.6.1/bin/.cinnamon-launcher-wrapped", line 72, in <module>
    os.execvp(FALLBACK_COMMAND, (FALLBACK_COMMAND,) + FALLBACK_ARGS)
  File "/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python3.8/os.py", line 568, in execvp
    _execvpe(file, args)
  File "/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python3.8/os.py", line 610, in _execvpe
    raise last_exc
  File "/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python3.8/os.py", line 601, in _execvpe
    exec_func(fullname, *argrest)
FileNotFoundError: [Errno 2] No such file or directory
(II) AIGLX: Suspending AIGLX clients for VT switch
cinnamon-session[7339]: DEBUG(+): t+5.41061s: Starting app: /org/gnome/SessionManager/App2
cinnamon-session[7339]: DEBUG(+): t+5.41068s: CsmAutostartApp: starting cinnamon-screensaver.desktop: command=cinnamon-screensaver startup-id=10b8bc0d0be326c08e160383480454203300000073390001
cinnamon-session[7339]: GLib-DEBUG(+): t+5.41077s: posix_spawn avoided (fd close requested)
cinnamon-session[7339]: DEBUG(+): t+5.41238s: CsmAutostartApp: started pid:7669
cinnamon-session[7339]: WARNING: t+5.71344s: Detected that screensaver has appeared on the bus

Notify maintainers
@mkg20001 @worldofpeace

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.8.11, NixOS, 20.09beta538.0cfe5377e89 (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.7
  • channels(root): "nixos-20.09.1469.13d0c311e3a, nixos-unstable-21.03pre244932.84d74ae9c9c"
  • channels(wucke13): "nixos-unstable-21.03pre246062.420f89ceb26, nixpkgs-unstable-19.09pre170896.6e5caa3f8ac, nixos-unstable-small-19.03pre161392.50bb0afa7ce"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@wucke13 wucke13 added the 0.kind: bug Something is broken label Oct 27, 2020
@worldofpeace
Copy link
Contributor

I will say that it does start in lightdm. IIRC upstream uses slick greeter and lightdm, so maybe it's just broken for that dm.

@worldofpeace worldofpeace changed the title Cinnamon crashes right away after being started Cinnamon crashes after benig started with gdm or .xinitrc Oct 27, 2020
@worldofpeace worldofpeace changed the title Cinnamon crashes after benig started with gdm or .xinitrc Cinnamon crashes after being started with gdm or .xinitrc Oct 27, 2020
@wucke13
Copy link
Contributor Author

wucke13 commented Oct 27, 2020

@worldofpeace it is broken when started on .xinitrc as well, and it used to work in gdm just a day a go as well. Thinking more of the problem, what else can break the startup of cinnamon if all of these are empty/removed:

  • .cinnamon
  • .config/autostart
  • .config/cinnamon-session
  • .config/nemo
  • .local/share/cinnamon/
  • .local/share/nemo

? There must be something in my $HOME which alters the startup procedure of cinnamon to break (otherwise it wouldn't work for you?!) but what can it be?

Edit: I now gathered a more meaningful error:

[cinnamon-settings-daemon-smartcard] Failed to start: no suitable smartcard driver could be found
Cinnamon warning: Log level 128: unsetenv() is not thread-safe and should not be used after threads are created
cinnamon-session[25662]: WARNING: t+0.58209s: Failed to start app: Unable to start application: Failed to execute child process “redshift-gtk” (No such file or directory)
Clutter-Message: 23:31:51.387: Sync method: PRESENTATION TIME
Traceback (most recent call last):
  File "/nix/store/zhi3lazzgx3as042ljhlkrcw3b9nrcw5-blueberry-1.3.9/lib/blueberry/.blueberry-obex-agent.py-wrapped", line 29, in <module>
    gi.require_version('Notify', '0.7')
  File "/nix/store/92vw09mbzjik0d42naz6c9fapyz93pqh-python3.8-pygobject-3.36.1/lib/python3.8/site-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Notify not available
QApplication: invalid style override passed, ignoring it.
    Available styles: Breeze, Windows, Fusion
kdeconnect.core: KdeConnect daemon starting

(nemo-desktop:25928): GLib-CRITICAL **: 23:31:51.499: g_strstr_len: assertion 'haystack != NULL' failed
** Message: 23:31:51.499: nemo-desktop: session is not cinnamon (checked XDG_SESSION_DESKTOP,DESKTOP_SESSION environment variables.) Applying default behavior
kdeconnect.core: onStart
kdeconnect.core: KdeConnect daemon started
kdeconnect.core: Broadcasting identity packet
Cjs-Message: 23:31:51.564: JS LOG: About to start Cinnamon
Cjs-Message: 23:31:51.594: JS LOG: [LookingGlass/info] Cinnamon.AppSystem.get_default() started in 28 ms
Cjs-Message: 23:31:51.602: JS LOG: [LookingGlass/info] loading user theme: /run/current-system/sw/share/themes/Mint-Y-Dark/cinnamon/cinnamon.css
Cjs-Message: 23:31:51.612: JS LOG: [LookingGlass/info] added icon directory: /run/current-system/sw/share/themes/Mint-Y-Dark/cinnamon

(cinnamon:25878): Cjs-WARNING **: 23:31:51.613: Some code accessed the property 'BackgroundManager' on the module 'backgroundManager'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.
Cinnamon warning: Log level 128: posix_spawn avoided (fd close requested)
Traceback (most recent call last):
  File "/nix/store/1zxm7y2blxz2k5pgc55ajv3a7wsxajnd-cinnamon-common-4.6.1/bin/.cinnamon-launcher-wrapped", line 72, in <module>
    os.execvp(FALLBACK_COMMAND, (FALLBACK_COMMAND,) + FALLBACK_ARGS)
  File "/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python3.8/os.py", line 568, in execvp
    _execvpe(file, args)
  File "/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python3.8/os.py", line 610, in _execvpe
    raise last_exc
  File "/nix/store/z65l1jqvxa58zzwwa3bvglb6asj4y8cv-python3-3.8.5/lib/python3.8/os.py", line 601, in _execvpe
    exec_func(fullname, *argrest)
FileNotFoundError: [Errno 2] No such file or directory
(II) AIGLX: Suspending AIGLX clients for VT switch
ICE default IO error handler doing an exit(), pid = 25931, errno = 11
xinit: connection to X server lost

waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.

Edit 2: Found the remaining part thing:

dconf. After renaming ~/.config/dconf, cinnamon starts just fine. Holy moly. Running "Virtual keyboard" from the cinnamon menu breaks it immediately, though.

@wucke13 wucke13 changed the title Cinnamon crashes after being started with gdm or .xinitrc Cinnamon crashes and breaks when launching "Virtual keyboard" Oct 27, 2020
@mkg20001
Copy link
Member

dconf load / << EOF
[org/cinnamon/desktop/a11y/applications]
screen-keyboard-enabled=false
screen-reader-enabled=false
EOF

@mkg20001
Copy link
Member

@worldofpeace

Which package provides gio for Notifiy? We'd need to add that to buildInputs then the error should be fixed

@veprbl veprbl added the 6.topic: cinnamon Desktop environment label Oct 28, 2020
@worldofpeace
Copy link
Contributor

That is libnotify. Be sure to on the source code to always run a rg gi.repository to see what namespaces are imported. From there you track where those typelibs come from to determine the dependencies that belong in buildInputs

@1ctinus
Copy link

1ctinus commented May 20, 2021

Any updates on this?

@mkg20001
Copy link
Member

It would need to be tested if the issue still persists.

@wucke13
Copy link
Contributor Author

wucke13 commented May 21, 2021

The bug is still persistent.

  • system: "x86_64-linux"
  • host os: Linux 5.11.16, NixOS, 20.09.4058.22612485a46 (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 3.0pre20200829_f156513
  • channels(root): "nixos-20.09.4058.22612485a46, nixos-unstable-21.05pre285574.8e4fe32876c"
  • channels(wucke13): "nixos-unstable-21.03pre246062.420f89ceb26, nixpkgs-unstable-19.09pre170896.6e5caa3f8ac, nixos-unstable-small-19.03pre161392.50bb0afa7ce"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

@wucke13
Copy link
Contributor Author

wucke13 commented Jun 3, 2021

The bug is still present in 21.05:

  • system: "x86_64-linux"
  • host os: Linux 5.12.4, NixOS, 21.05.20210601.5237039 (Okapi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.4pre20210503_6d2553a
  • channels(root): "nixos-21.05.641.5237039cc1e, nixos-unstable-21.11pre292748.6933d068c5d"
  • channels(wucke13): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

@mkg20001
Copy link
Member

mkg20001 commented Jun 4, 2021

The main problem I have is that I have no idea where to even start debugging the segfault, as it seems to be part of native code

@wucke13
Copy link
Contributor Author

wucke13 commented Jun 6, 2021

Any chances upstream has some idea? Not sure how to get in touch with them without making it seem like "We have a problem and you shall fix it".

@baronleonardo
Copy link
Contributor

I ran strace cinnamon-screensaver and I found that it is missing caribou, just install it and the bug will disappear.
I think this package is a must or we have a security-issue here

@bobby285271 bobby285271 self-assigned this Aug 19, 2022
@bobby285271
Copy link
Member

bobby285271 commented Aug 19, 2022

I can confirm installing caribou fixes the issue. I haven't really looked into it yet, the related line is likely at
https://github.com/linuxmint/cinnamon/blob/5.4.10/js/ui/virtualKeyboard.js#L268

And I managed to SIGSEGV gjs-console (cjs-console) in a nix-shell -p cinnamon.cjs -p gnome.caribou shell with:

const Caribou = imports.gi.Caribou;
new Caribou.KeyboardModel({ keyboard_type: 'tablet' });

I search for the output Failed to load keyboard file tablet/us: Could not find layout file for us, and found this https://github.com/GNOME/caribou/blob/master/libcaribou/xml-deserializer.vala#L33

So I do XDG_DATA_DIRS=$(nix-build -A gnome.caribou)/share:$XDG_DATA_DIRS and the SIGSEGV is gone. So I guess caribou is needed for this case.

bobby285271 added a commit to bobby285271/nixpkgs that referenced this issue Aug 19, 2022
Some of its layout files are required for constructing a keyboard model.

Closes NixOS#101881
bobby285271 added a commit that referenced this issue Oct 17, 2022
Some of its layout files are required for constructing a keyboard model.

Closes #101881

(cherry picked from commit 3de049f)
@JohnRTitor JohnRTitor moved this to Done in Cinnamon Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: cinnamon Desktop environment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

7 participants