Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: Blob on 02 February 2022, 12:32:06

Title: [SOLVED]cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Blob on 02 February 2022, 12:32:06
Hello,

My Artix-cinnamon  System just hangs with a black screen at boot  :'(
Everything seems fine at boot until dmesg shows:
Code: [Select]
[   10.454619] cinnamon-screen[3061]: segfault at 18 ip 00007f6c18b4a7f4 sp 00007ffde2214960 error 4 in libgtk-3.so.0.2404.27[7f6c18ab6000+384000]
[   10.454630] Code: c4 08 5b 5d c3 90 f3 0f 1e fa 48 8b 7f 10 48 85 ff 74 0b e9 5e c8 ff ff 66 0f 1f 44 00 00 48 83 ec 08 48 89 d7 e8 8c f8 17 00 <48> 8b 40 18 48 8b 78 10 67 e8 3e 35 09 00 48 83 c4 08 48 89 c7 e9

I can open a virtual Terminal with Ctrl+Alt+F5 .

So  I tried reinstall cinnamon. But that didn't help. I figured: just use a diffent Desktop Enviroment.

I Installed Plasma/KDE  and lxqt   like instructed here: https://wiki.artixlinux.org/Main/Installation#Desktop_Environment (https://wiki.artixlinux.org/Main/Installation#Desktop_Environment)

Unfortunatly artix still (seems to) try to start cinnamon.And i have no clue how to tell the system to use one of this instead.

I tried to create the file ~/.xinitrc with just one line
exec startlxqt
but this does not work at boot time.

I can start lxqt form the virtual Terminal with:
$ /usr/bin/startlxqt
or just:
$ startx

But its quite anoying to do this everytime.

So I have 2 opportunites:
1. fix cinnamon to work again
2. tell Artix  use another Desktop enviroment.

Any tipps and hints are welcome.  :)
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: strajder on 02 February 2022, 13:27:56
How did you install cinnamon? Have you updated your system?

Edit: If you have installed from a cinnamon graphical ISO, you probably have autologin enabled (https://wiki.archlinux.org/title/LightDM#Enabling_autologin) in lightdm (default DM in the cinnamon graphical ISO). To temporarily disable autologin, you can execute:
Code: [Select]
su
sed -i.bak 's/^\(autologin\)/#\1/g' /etc/lightdm/lightdm.conf

This should (after restarting lightdm) present you with a login screen and allow you to choose a session. Still, the cinnamon issue should be investigated more thoroughly, so more details about it are needed.
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Blob on 02 February 2022, 18:43:51
Hey Thank you for the answer.

Yes you were right. I installed from a cinnamon graphical ISO & autologin was enabled.
I followed your advise and turned it off. After a reboot it got to the login-screen.

But sadly that didn't helped much. When i choose to start ltqx i come to an black screen &dmesg tells:
Quote
starting ltqx with handmade .xinitrc in $HOME
[   22.303624] lightdm-gtk-gre[2666]: segfault at 10 ip 00007f9acac4b100 sp 00007ffca387bab8 error 4 in libcairo.so.2.11704.0[7f9acabf3000+d2000]
[   22.303633] Code: 8b 44 24 28 64 48 2b 04 25 28 00 00 00 75 11 48 83 c4 38 31 c0 5b 5d 41 5c 41 5d 41 5e 41 5f c3 ff 15 ec 2a 0b 00 0f 1f 40 00 <8b> 47 10 c3 66 66 2e 0f 1f 84 00 00 00 00 00 90 8b 47 14 c3 66 66

tarting ltqx .xinitrx in $HOME removed
[   27.432942] lightdm-gtk-gre[2682]: segfault at 10 ip 00007fc7cf9ab100 sp 00007ffda6a267f8 error 4 in libcairo.so.2.11704.0[7fc7cf953000+d2000]
[   27.432952] Code: 8b 44 24 28 64 48 2b 04 25 28 00 00 00 75 11 48 83 c4 38 31 c0 5b 5d 41 5c 41 5d 41 5e 41 5f c3 ff 15 ec 2a 0b 00 0f 1f 40 00 <8b> 47 10 c3 66 66 2e 0f 1f 84 00 00 00 00 00 90 8b 47 14 c3 66 66

But when i open from the blackscreen a virtual terminal is can start ltqx with /usr/bin/startltqx  : :o


Quote
Have you updated your system?
Yes. I am doing updates. the last Update before trouble (the one before this, the story is in the next spoiler) was with 80 packages:
Spoiler (click to show/hide)

The trouble i had in advance:
Spoiler (click to show/hide)

after this there were more updates with the following packages:
Spoiler (click to show/hide)


So I still can't boot into any Desktop enviroment.
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: nous on 02 February 2022, 19:21:04
Long shot, but can you try re-installing cairo?
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Blob on 02 February 2022, 21:15:30
Thanks for your reply !

Quote
can you try re-installing cairo?
Done. But still no Desktop after login-screen, just black Monitor & dmesg keeps telling:
lightdm-gtk-gre[2668]: segfault .........
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Chris Cromer on 02 February 2022, 21:26:56
Can you try running this command:
Code: [Select]
gdk-pixbuf-query-loaders --update-cache

Also could you show me the output of:
Code: [Select]
df -h
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Blob on 02 February 2022, 22:04:51
Hi There,
thanks for your reply

df -h shows:
Quote
Filesystem                 Size     Used     Avail Use%    Mounted on
dev                               10M             0     10M      0%    /dev
run                               3.8G      2.1M    3.8G      1%     /run
/dev/dm-0                916G   548G    322G   63%    /
shm                             3.8G     8.0K      3.8G      1%    /dev/shm
cgroup_root            10M             0        10M    0%    /sys/fs/cgroup
/dev/nvme0n1p1    300M  428K     299M    1%    /boot/efi
tmpfs                         766M          0     766M    0%    /run/user/1000

and i have done : gdk-pixbuf-query-loaders --update-cache but nothing changed.

But Stop: I can't start lxqt from virtual Terminal anymore. Not sure if this happend after cairo reinstall or this step.
Trying these brings something new:
Quote
.qpa.xcb: could not connect to display
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, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Chris Cromer on 02 February 2022, 23:17:35
Been doing some more digging, and this is a gtk problem. I have seen the same errors in gnome and other gtk softwares. Maybe reinstalling gtk, libgtk, etc might help.

Alsonot just arch and artix related, there are reports of this error in fedora, ubuntu, linux mint, and arch linux.

I saw various fixes, some people say X works, and others say it doesn't. Others say Y fixes it, and others say it doesn't. Seems like a strange rare bug with more than one possible cause.

Will keep digging.
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Blob on 03 February 2022, 00:15:23
Thanx for digging !!!

I did a quick:
pacman -S -l | grep Installiert | grep gtk | cut -d " " -f 2

which showed serveral files. I reinstalled them all via :

pacman -Sy breeze-gtk clutter-gtk gtk-update-icon-cache gtk2 gtk3 gtkmm3  gtksourceview3 gtksourceview4 kde-gtk-config lightdm-gtk-greeter webkit2gtk wxgtk-common wxgtk3 artix-gtk-presets libappindicator-gtk3 libdbusmenu-gtk3 libfm-gtk2 libindicator-gtk3
this didn't help.

So i also reinstalled:          lightdm & lightdm-gtk-greeter

I'm sorry to say this, but none of this helped. Still can't start any Desktop. 
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Chris Cromer on 03 February 2022, 01:26:57
Thanx for digging !!!

I did a quick:
pacman -S -l | grep Installiert | grep gtk | cut -d " " -f 2

which showed serveral files. I reinstalled them all via :

pacman -Sy breeze-gtk clutter-gtk gtk-update-icon-cache gtk2 gtk3 gtkmm3  gtksourceview3 gtksourceview4 kde-gtk-config lightdm-gtk-greeter webkit2gtk wxgtk-common wxgtk3 artix-gtk-presets libappindicator-gtk3 libdbusmenu-gtk3 libfm-gtk2 libindicator-gtk3
this didn't help.

So i also reinstalled:          lightdm & lightdm-gtk-greeter

I'm sorry to say this, but none of this helped. Still can't start any Desktop. 
Is everything up to date? Have you done a pacman -Syu?

You could give a complete package reinstall a shot:
Code: [Select]
pacman -Q | awk '{ print $1 }' | sort > /tmp/pacman-installed.tmp
pacman -Qm | awk '{ print $1 }' | sort | comm -3 /tmp/pacman-installed.tmp - > /tmp/pacman-to-reinstall.tmp
pacman -S --noconfirm $(cat /tmp/pacman-to-reinstall.tmp)
rm /tmp/pacman-{to-reinstall,installed}.tmp

This will reinstall 100% of the packages you have installed.

This should fix any missing files, bad permissions, missing deps, rerun all hooks, replace arch packages with artix packages, and various other possible things. Depending on how many packages you have installed, and the speed of your machine, this can take a while.
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: tintin on 03 February 2022, 06:58:59
So I have 2 opportunities:
1. fix cinnamon to work again
2. tell Artix  use another Desktop environment.

Any tips and hints are welcome.  :)
Hello,
This is just to provide a workaround for number 2.
As you have installed KDE and LXQT you could try SDDM instead of Lightdm.

If you are using openrc:

Code: [Select]
sudo  pacman -Sy sddm-openrc
Code: [Select]
sudo rc-update add sddm default
Restart the system.

If this solution works and you prefer auto-login:
Code: [Select]
sudo usermod -a -G autologin <your_user_name>
Code: [Select]
sudo mkdir /etc/sddm.conf.d
Code: [Select]
sudo touch /etc/sddm.conf.d/autologin.conf

Code: [Select]
sudo nano /etc/sddm.conf.d/autologin.conf
Add the lines below:
Code: [Select]
[Autologin]
User=<your_user_name>
Session=xfce

And eventually:
sudo pacman -Rsu lightdm

Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Blob on 03 February 2022, 09:15:25
Is everything up to date? Have you done a pacman -Syu?
...
You could give a complete package reinstall a shot:

Yes everything ist up to date.  pacman -Syu runs at least once a day.

I did a complete package reinstall as suggested. (List of all Files in Hide)
Spoiler (click to show/hide)

None of this helped. dmesg still shows the lightdm-gtk-gre segfault .

At least i can use /usr/bin/startx with  ~./xinitrc (exec startlxqt) again to come into Desktop from virtual Console.

Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Blob on 03 February 2022, 09:35:49
Hello,


This is just to provide a workaround for number 2.

If you are using openrc:

sudo  pacman -Sy sddm-openrc
Yes I am using openrc .

I am not really into all the xinit / Desktop / Displaymanager stuff and have no clue how all of this works together. So please don't be offended for my Question beforer proceeding :

When i do:
Quote
sudo  pacman -Sy sddm-openrc
i got:
Quote
sddm-openrc and displaymanager-openrc are in conflict (init-displaymanager). Remove displaymanager-openrc? [y/N]

But there is no package called displaymanager-openrc in the full systeminstall.

Even  pacman -S -l | grep displaymanager shows nothing.

Is this just normal or do I do just more damage by removing nonexisting packages. Because I suppose if the sddm workaround does not work it will be hard to reinstall a nonexisting package 
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: tintin on 03 February 2022, 10:21:27
Ok.


Quote
When i do:i got:
But there is no package called displaymanager-openrc in the full systeminstall.
As Artix is of the rolling release type, it is important to regularly read the "Recent news" on https://artixlinux.org/index.php :

https://artixlinux.org/news.php#displaymanager-openrc_retirement
https://forum.artixlinux.org/index.php/topic,2161.0.html

Even  pacman -S -l | grep displaymanager shows nothing.
Right here :
Code: [Select]
pacman -Ss display-manager
world/sddm 0.19.0-7 [installé]
    QML based X11 and Wayland display manager
extra/sddm 0.19.0-7 [installé]
    QML based X11 and Wayland display manager

While
Code: [Select]
pacman -Ss displaymanager
shows me the whole list.


Quote
Is this just normal or do I do just more damage by removing nonexisting packages. Because I suppose if the sddm workaround does not work it will be hard to reinstall a nonexisting package 
If you remove displaymanager-openrc and your system is up to date, you can use sddm-openrc and fall back to lightdm-openrc if necessary.
Title: Re: cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Blob on 03 February 2022, 11:51:28
It worked ! :)

I get to the (new sddm) login screen and from there to lxqt   AND   cinnamon  ;D

I could also autologin to the lxqt Desktop

But when i try to activate autologin into cinnamon it fails.

the file  /etc/sddm.conf.d/autologin.conf
was changed to:
Quote
[Autologin]
User=JohnDoe
Session=cinnamon
and
Quote
[Autologin]
User=JohnDoe
Session=cinnamon.desktop

but both gave me only a panel & i couldn't open any window.

When i used : Panel -> troubleshoot-> restore all settings to default
the Desktop went complete black. Even reboot didn't work.

Removing the autologin and starting cinnamon from login-screen works like a charm.


###########

And yes:
Quote
As Artix is of the rolling release type, it is important to regularly read the "Recent news" on https://artixlinux.org/index.php :
You are right. I have lost track of this a while ago. Now im back to it!

Thanks to everybody who helped me out !
Title: Re: [SOLVED]cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: tintin on 03 February 2022, 12:12:59
It worked ! :)

I get to the (new sddm) login screen and from there to lxqt   AND   cinnamon  ;D

I could also autologin to the lxqt Desktop

But when i try to activate autologin into cinnamon it fails.
Great !
Have you thought about this command?
Code: [Select]
sudo usermod -a -G autologin <your_user_name>


###########


Quote
And yes:You are right. I have lost track of this a while ago. Now im back to it!
Very well.  :)

Quote
Thanks to everybody who helped me out !
You're welcome

Title: Re: [SOLVED]cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: strajder on 03 February 2022, 12:27:59
[Autologin]
User=JohnDoe
Session=cinnamon
Are you sure your username is JohnDoe? Usernames cannot contain uppercase letters.

Next thing to check is the /usr/share/xsessions/cinnamon.desktop file, which should be like this one (https://github.com/linuxmint/cinnamon/blob/66579ed9fd7d395dfd08be7643aa38ea40420da4/files/usr/share/xsessions/cinnamon.desktop).

More here: https://wiki.archlinux.org/title/SDDM#Autologin
Title: Re: [SOLVED]cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: Blob on 03 February 2022, 15:45:46
Have you thought about this command?
Code: [Select]
sudo usermod -a -G autologin <your_user_name>
Yes. I followed your great HOWTO from 2nd last post.
Quote
$ cat /etc/group | grep autologin
autologin:x:1000:


Are you sure your username is JohnDoe? Usernames cannot contain uppercase letters.

Next thing to check is the /usr/share/xsessions/cinnamon.desktop file, which should be like this one (https://github.com/linuxmint/cinnamon/blob/66579ed9fd7d395dfd08be7643aa38ea40420da4/files/usr/share/xsessions/cinnamon.desktop).
You are right JohnDoe is not my real username, i just put this in to show that i didn't used <your_user_name_here> in the field. Sorry for doing so. Name was fine. (Just to be sure i tried a 2nd time to set autologin up with the provided steps. Still no success.)

The /usr/share/xsessions/cinnamon.desktop at my system looks exactly like the one your linked.
Quote
$ cat /usr/share/xsessions/cinnamon.desktop
[Desktop Entry]
Name=Cinnamon
Comment=This session logs you into Cinnamon
Exec=cinnamon-session-cinnamon
TryExec=/usr/bin/cinnamon
Icon=
Type=Application



Title: Re: [SOLVED]cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: nous on 03 February 2022, 16:17:39
Code: [Select]
$ cat /etc/group | grep autologin
autologin:x:1000:
This is wrong. It should return your username:
Code: [Select]
artix-live:[artix]:~$ grep autologin /etc/group
autologin:x:976:artix

This /etc/sddm.conf is from a live Artix Cinnamon ISO. Setting Session and User should be enough to allow autologin, provided User is member of the autologin group.
Code: [Select]
[Autologin]
# Whether sddm should automatically log back into sessions when they exit
Relogin=false

# Name of session file for autologin session (if empty try last logged in)
Session=cinnamon.desktop

# Username for autologin session
User=artix


[General]
# Halt command
HaltCommand=/usr/bin/loginctl poweroff

# Input method module
InputMethod=qtvirtualkeyboard

# Initial NumLock state. Can be on, off or none.
# If property is set to none, numlock won't be changed
# NOTE: Currently ignored if autologin is enabled.
Numlock=none

# Reboot command
RebootCommand=/usr/bin/loginctl reboot


[Theme]
# Current theme name
Current=artix

# Cursor theme used in the greeter
CursorTheme=

# Number of users to use as threshold
# above which avatars are disabled
# unless explicitly enabled with EnableAvatars
DisableAvatarsThreshold=7

# Enable display of custom user avatars
EnableAvatars=true

# Global directory for user avatars
# The files should be named <username>.face.icon
FacesDir=/usr/share/sddm/faces

# Theme directory path
ThemeDir=/usr/share/sddm/themes


[Users]
# Default $PATH for logged in users
DefaultPath=/usr/local/bin:/usr/bin:/bin

# Comma-separated list of shells.
# Users with these shells as their default won't be listed
HideShells=

# Comma-separated list of users that should not be listed
HideUsers=

# Maximum user id for displayed users
MaximumUid=60000

# Minimum user id for displayed users
MinimumUid=1000

# Remember the session of the last successfully logged in user
RememberLastSession=true

# Remember the last successfully logged in user
RememberLastUser=true

# When logging in as the same user twice, restore the original session, rather than create a new one
ReuseSession=false


[Wayland]
# Enable Qt's automatic high-DPI scaling
EnableHiDPI=false

# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/wayland-session

# Directory containing available Wayland sessions
SessionDir=/usr/share/wayland-sessions

# Path to the user session log file
SessionLogFile=.local/share/sddm/wayland-session.log


[X11]
# Path to a script to execute when starting the display server
DisplayCommand=/usr/share/sddm/scripts/Xsetup

# Path to a script to execute when stopping the display server
DisplayStopCommand=/usr/share/sddm/scripts/Xstop

# Enable Qt's automatic high-DPI scaling
EnableHiDPI=false

# The lowest virtual terminal number that will be used.
MinimumVT=7

# Arguments passed to the X server invocation
ServerArguments=-nolisten tcp

# Path to X server binary
ServerPath=/usr/bin/X

# Path to a script to execute when starting the desktop session
SessionCommand=/usr/share/sddm/scripts/Xsession

# Directory containing available X sessions
SessionDir=/usr/share/xsessions

# Path to the user session log file
SessionLogFile=.local/share/sddm/xorg-session.log

# Path to the Xauthority file
UserAuthFile=.Xauthority

# Path to xauth binary
XauthPath=/usr/bin/xauth

# Path to Xephyr binary
XephyrPath=/usr/bin/Xephyr

Title: Re: [SOLVED]cinnamon doesn't start because of segfault in libgtk-3.so.0.2404.27
Post by: tintin on 03 February 2022, 16:35:23
Code: [Select]
$ cat /etc/group | grep autologin
autologin:x:1000:
Don't you find that someone is missing in your autologin group?

Right here :
Code: [Select]
jp-artix:[jp]:~$ cat /etc/group | grep autologin
autologin:x:1000:jp
I am jp, the user who is part of the autologin group.