# firefox crashes Xorg



## roelof (May 22, 2012)

Hello, 

Today I updat*ed* Cairo and another progra*m*. Now every time I start up FF X chrashes with these messages.


```
May 21 19:37:36 tamara kernel: pid 37421 (akonadiserver), uid 0: exited on signal 11 (core dumped)
May 21 19:37:37 tamara kernel: pid 37459 (akonadiserver), uid 0: exited on signal 11 (core dumped)
May 21 19:37:37 tamara kernel: pid 37466 (akonadiserver), uid 0: exited on signal 11 (core dumped)
May 21 19:37:38 tamara kernel: pid 37474 (akonadiserver), uid 0: exited on signal 11 (core dumped)
May 21 19:37:38 tamara kernel: pid 37480 (akonadiserver), uid 0: exited on signal 11 (core dumped)
May 21 19:37:39 tamara kernel: pid 37486 (akonadiserver), uid 0: exited on signal 11 (core dumped)
May 21 19:37:49 tamara dbus[1379]: [system] Failed to activate service 'org.freedesktop.Avahi': timed out
```

This is from /var/log/messages.

Roelof


----------



## adamk (May 22, 2012)

When updating port (A), you typically have to update/rebuild every other port that depends on (A).  Have you rebuilt firefox?

BTW, none of the messages you provided appear to have anything to do with firefox.

Adam


----------



## roelof (May 22, 2012)

No, I did not rebuild firefox. I only update the ports that can be updated or UPDATING tells me to rebuild everything that depends on that port.


----------



## roelof (May 22, 2012)

I rebuilt Firefox but still the same problem. As soon as I start firefox X chrashes.

Roelof


----------



## adamk (May 22, 2012)

Well if X is crashing, maybe the X server has to be rebuilt.  What does the /var/log/Xorg.0.log file say about the crash?

Adam


----------



## roelof (May 22, 2012)

Xorg.0.log says this about the crash :

```
I) intel(0): Modeline "1440x900"x0.0  106.50  1440 1520 1672 1904  900 903 909 934 -hsync +vsync (55.9 kHz)
(II) intel(0): Modeline "1280x1024"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz)
(II) intel(0): Modeline "1600x1200"x0.0  162.00  1600 1664 1856 2160  1200 1201 1204 1250 +hsync +vsync (75.0 kHz)
(II) intel(0): Modeline "1680x1050"x0.0  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync (65.3 kHz)
(II) intel(0): EDID vendor "PHL", prod id 49240
Segmentation fault: 11 at address 0x10

Fatal server error:
Caught signal 11 (Segmentation fault: 11). Server aborting


Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
Please also check the log file at "/var/log/Xorg.0.log" for additional information.

(II) UnloadModule: "kbd"
(II) UnloadModule: "mouse"
(II) UnloadModule: "kbd"
(II) intel(0): xf86UnbindGARTMemory: unbind key 1
(WW) intel(0): drmDropMaster failed: Unknown error: -1
```


----------



## bela (May 22, 2012)

*same thing here*

I get the same error:

```
Fatal server error: Caught signal 11 (Segmentation fault: 11). Server aborting
```

This happened after updating the following ports (not sure which port is the culprit):


```
devel/boost-libs (boost-libs-1.45.0_2) 
          textproc/libxml2 (libxml2-2.7.8_2) 
          x11-fonts/fontconfig (fontconfig-2.8.0_2,1)
          print/texinfo (texinfo-4.13.20120406)
          misc/shared-mime-info (shared-mime-info-1.0)
          graphics/cairo (cairo-1.10.2_3,1)
          graphics/gdk-pixbuf2 (gdk-pixbuf-2.23.5_1)
          multimedia/gpac-libgpac (gpac-libgpac-0.4.5_4,1)
          x11-toolkits/gtk20 (gtk-2.24.6)
          graphics/gegl (gegl-0.1.8_2)
          multimedia/x264 (x264-0.123.2189)
          multimedia/ffmpeg (ffmpeg-0.7.12,1)
```
Compile from ports went smoothly but firefox, thunderbird and chromium all crash X11 with the same error massage. This happened on a Thinkpad T61 laptop with an Intel X3100 graphics card, hopefully this helps.


----------



## alext (May 22, 2012)

I think the problem comes from cairo.
I've downgraded cairo to be able to startx again.


----------



## bela (May 22, 2012)

alext, you might have a different problem. X (with wmii) works just fine for me until I launch firefox, thunderbird or chromium. 

Only "solution" I have found so far is to reinstall/downgrade the previously mentioned ports to their respective older versions (those in the previous post).


----------



## phoenix (May 22, 2012)

There appears to be an issue with the newest Intel driver for Xorg conflicting with the newest version of Cairo.  If you downgrade Cairo, everything works.

There's a thread about this on one of the mailing lists.


----------



## wblock@ (May 23, 2012)

The new cairo seems to be a problem even if you don't have Intel.


----------



## jb_fvwm2 (May 23, 2012)

Strange, I tested firefox etc with the new cairo, no problem here.
(Using the ati driver in xorg.conf)


----------



## wblock@ (May 23, 2012)

I saw text corruption in terminals and sometimes in Firefox.


----------



## timeout (May 23, 2012)

I have the same problem with intel, X and in particular xfce crashing. Any idea how long this is going to take?


----------



## z0ran (May 23, 2012)

same thing here, and i have ati driver...X is crashing only when i try to start firefox, opera, xxxterm or any other browser...any other application works with no problem...btw, i have i3-wm.


----------



## roelof (May 23, 2012)

I can confirm that downgrading Cairo to 1.10 solve the problem.
So for me it's clear that cairo 1.12 is too blame.


----------



## jb_fvwm2 (May 23, 2012)

Can someone facing those crashes run the application(s) before starting X? Sometimes it shows other shared libraries (cairo > ??? > firefox) that need to be rebuilt...


----------



## roelof (May 23, 2012)

As far as I know Firefox cannot be run without a starting X.


----------



## z0ran (May 23, 2012)

yup..downgrading cairo is the solution...thanks roelof


----------



## mlinuxgada (May 23, 2012)

I love FreeBSD. Always in beta.


----------



## roelof (May 23, 2012)

But this does not like a FreeBSD problem.
See this urls : 

https://bugs.archlinux.org/task/29257
https://bugs.gentoo.org/show_bug.cgi?id=409593
https://bugs.freedesktop.org/show_bug.cgi?id=38904


----------



## mlinuxgada (May 23, 2012)

roelof said:
			
		

> But this does not like a FreeBSD problem.
> See this urls :
> 
> https://bugs.archlinux.org/task/29257
> ...



It's not a FreeBSD problem, but was cairo even tested before inserting into ports?


----------



## jb_fvwm2 (May 23, 2012)

roelof said:
			
		

> As far as I know Firefox cannot be run without a starting X.



That is correct. But sometimes it will show "...not found, required by..." instead of "Cannot open DISPLAY" and a dependency rebuild is is order rather than a cairo downgrade, if you *attempt* to run it before X is started. (In the case of some browsers, one must locate the actual program name somewhere: 
	
	



```
locate seamonkey-bin
```


----------



## roelof (May 23, 2012)

I can try it with firefox, only I have to figure out how I can install the newer version of cairo. I think that making it from ports can help.


----------



## roelof (May 23, 2012)

When startup in runlevel 3 I get this message:


```
Error: No display specified.
```

When you want me to try in another runlevel tell me how to proceed without starting X.


----------



## jb_fvwm2 (May 24, 2012)

(this maybe should have been in my earlier post...)
From the first post in the thread, I'd guess either the problem might be located by trying to similarly run *other* qt4 applications outside of X, or rebuilding the qt4 stuff that specifically depends on cairo that you have installed. (Just a guess though.)


----------



## roelof (May 24, 2012)

Ok*ay*, but Firefox is not a gt4 application but a gtk application as far as I know.

Roelof


----------



## Head (May 24, 2012)

I have similar problems with the launch of firefox.


```
firefox -v
Mozilla Firefox 12.0
uname -pro
FreeBSD 9.0-RELEASE amd64
```

With cairo-1.12.2,1 firefox crashes Xorg and with cairo-1.10.2_3,1 all fine.
I have a Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (primary) rev 12.


----------



## roelof (May 24, 2012)

Can *i*t be a solution to start Firefox with valgrind or something like that?

Roelof


----------



## mezz@ (May 24, 2012)

mlinuxgada said:
			
		

> It's not a FreeBSD problem, but was cairo even tested before inserting into ports?


Yes. I (other users and jb_fvwm2 in here too) can't reproduce any of problems with all ports that what users have reported in here thread. It's specific to some certain driver or/and xorg-server stuff that I don't know. It's not a cairo bug, btw.

Anyway, guys, you do not need to rebuild anything. It will not solve your problem, because here is no ABI/API break.

Here's patch available for you to test: http://lists.freebsd.org/pipermail/freebsd-ports/2012-May/075103.html


----------



## mrgz (May 25, 2012)

Hi, guys. 

Applied this xorg-server patch but didn't work for me. Almost all of my GTK-based apps are crashing. Other ones like xterm, even Okular (QT4-based) run normally.


----------



## roelof (May 25, 2012)

Hello, 

I upgraded cairo back to 1.12. Placed the patch in the right directory. *R*einstalled Xserver. But still if I start up Firefox X crashes. And this started after updating cairo.

Roelof

Edit 1: Can it be a help if I dumped the dumped core files of the crash somewhere?


----------



## mezz@ (May 25, 2012)

Other people have reported that the patch doesn't help either. It means that I will have to back out cairo this weekend. Future versions of Firefox will need a newer cairo.



			
				roelof said:
			
		

> Edit 1: Can it be a help if I put dumped the dumped core files of the crash somewhere.


No need to. Linux folks already knew and most or all fixes are already in the Xorg. Our Xorg stuff is out of date.


----------



## mrgz (May 25, 2012)

As a temporary solution, I'm using tightvnc. After the traditional startx I just log to localhost:1 in fullscreen mode. As I'm using fluxbox it's pretty straightforward to set up. Inside VNC, everything runs fine.


----------



## roelof (May 25, 2012)

So, you*'re* using a VNC for using your own desktop? *A*nd w*ei*rd that inside that everything works fine.

@mezz: 

*I*s it then not better to update X instead of dropping cairo 1.12?


----------



## mrgz (May 26, 2012)

Yes. TightVNC doesn't run any Xorg server code at all. Maybe that's the reason why Firefox and other GTK-based are working.

I agree that it's better to wait for a patch than downgrade the system. Has anyone tried different video cards?


----------



## mezz@ (May 26, 2012)

Yes, it's best to update Xorg instead of dropping Cairo 1.12. But with broken Xorg for a week is unacceptable to me as I care about the quality very much. I do not think updating Xorg is easy. If it was easy we would already have the latest Xorg. Although I have never worked with Xorg stuff before so I am probably wrong about it.

Downgrading cairo today then working on Xorg/cairo stuff in the different tree (prefer in x11@'s unstable tree) is the best way to do it.


----------



## rossiya (May 26, 2012)

Confirmed here as well.  Cairo 1.12 causes Xorg to die.  Simply reverting to Cairo 1.10 with *pkg_add -r cairo* brings firefox back to life.  A parallel machine without port upgrades within the past week runs firefox without incident.


----------



## roelof (May 26, 2012)

mezz: 

I agree with you. For now downgrade is the best option and after that a developer can try to solve this.
And *I'm* happy that quality is important.


----------



## DutchDaemon (May 26, 2012)

Note:

http://www.freshports.org/commit.ph...1205260354.q4Q3sBOI042864@repoman.freebsd.org


> Back out the update of 1.12.2. Our Xorg stuff doesn't work with newer cairo
> very well to some certain machines, which those have to be fixed first before
> we can update cairo. Bump the PORTEPOCH.



Current ports version: cairo-1.10.2_3,2


----------



## jacekkowalczyk82 (Jun 8, 2020)

I think I have the same issue  with firafox crashing Xorg, but What I noticed is, it happens only when I login to DWM or fluxbox (I did not tested other window managers). 
When I was logged in to MATE session, everything works fine without any issue.


----------



## jacekkowalczyk82 (Jun 19, 2020)

I am still struggling with the xorg crash when starting firefox and chromium in window managers (DWM and fluxbox).

My system is running FreeBSD 12.1-RELEASE-p6

I have Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz (2494.28-MHz K8-class CPU) 
and Intel Haswell-ULT Integrated Graphics Controller.


I have these drm related packages installed


```
drm-legacy-kmod-g20200306      Legacy DRM modules for the linuxkpi-based KMS components
libdrm-2.4.99,1                Userspace interface to kernel Direct Rendering Module services
```

In my /etc/rc.conf I have:

```
kld_list="drm2.ko /boot/modules/i915kms.ko fuse"
```

And this is the error I got in /var/log/Xorg.0.log

```
[   877.849] (EE)
[   877.849] (EE) Backtrace:
[   877.853] (EE) 0: /usr/local/bin/Xorg (?+0x0) [0x41bc20]
[   877.857] (EE) 1: /lib/libthr.so.3 (pthread_sigmask+0x53e) [0x800b1d82e]
[   877.861] (EE) 2: /lib/libthr.so.3 (pthread_getspecific+0xdef) [0x800b1d63f]
[   877.863] (EE) 3: ? (?+0x0) [0x7ffffffff193]
[   877.867] (EE) 4: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x802778ae0]
[   877.870] (EE) 5: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x802778540]
[   877.872] (EE) 6: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x8024a7e10]
[   877.874] (EE) 7: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x8024a7010]
[   877.877] (EE) 8: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x8024ae790]
[   877.879] (EE) 9: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x8021a1930]
[   877.882] (EE) 10: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x8021a1d60]
[   877.884] (EE) 11: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x8024aff50]
[   877.887] (EE) 12: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x8024af140]
[   877.889] (EE) 13: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x8021939d0]
[   877.892] (EE) 14: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x80218d020]
[   877.894] (EE) 15: /usr/local/lib/dri/i965_dri.so (?+0x0) [0x80218d230]
[   877.896] (EE) 16: /usr/local/lib/xorg/modules/libglamoregl.so (?+0x0) [0x801c0ac50]
[   877.899] (EE) 17: /usr/local/lib/xorg/modules/libglamoregl.so (?+0x0) [0x801bf9c20]
[   877.901] (EE) 18: /usr/local/bin/Xorg (?+0x0) [0x3f6f30]
[   877.904] (EE) 19: /usr/local/bin/Xorg (?+0x0) [0x3f7400]
[   877.906] (EE) 20: /usr/local/lib/xorg/modules/libglamoregl.so (?+0x0) [0x801bfaaa0]
[   877.909] (EE) 21: /usr/local/bin/Xorg (?+0x0) [0x390f70]
[   877.911] (EE) 22: /usr/local/bin/Xorg (?+0x0) [0x298a60]
[   877.913] (EE) 23: /usr/local/bin/Xorg (?+0x0) [0x295fd0]
[   877.916] (EE) 24: /usr/local/bin/Xorg (?+0x0) [0x2a04e0]
[   877.918] (EE) 25: /usr/local/bin/Xorg (?+0x0) [0x289000]
[   877.920] (EE) 26: ? (?+0x0) [0x800457000]
[   877.921] (EE)
[   877.921] (EE) Segmentation fault at address 0xa0030
[   877.921] (EE)
Fatal server error:
[   877.921] (EE) Caught signal 11 (Segmentation fault). Server aborting
[   877.921] (EE)
[   877.921] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
for help.
[   877.921] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   877.921] (EE)
[   877.921] (II) AIGLX: Suspending AIGLX clients for VT switch
[   877.922] (EE) Server terminated with error (1). Closing log file.
```

*Can some one explain me what is wrong with my configs , drivers or anything ?*


----------



## Sevendogsbsd (Jun 19, 2020)

What is "drm2.ko"? Also, what graphics do you have, Intel? If so, do you have "libva-intel-driver" installed?

EDIT - forgot to add: this is an 8 year old necrobump. Best to start your own thread with your specific issue than bumping an old one.


----------



## jacekkowalczyk82 (Jun 19, 2020)

I have Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz (2494.28-MHz K8-class CPU) 
and Intel Haswell-ULT Integrated Graphics Controller.


```
jacek@thinkpad-x240:~ % sudo pkg info | grep driver
libva-2.6.1_2                  VAAPI wrapper and dummy driver
mesa-dri-18.3.2_10             OpenGL hardware acceleration drivers for DRI2+
xdriinfo-1.0.6_3               Query configuration information of DRI drivers
xf86-input-keyboard-1.9.0_4    X.Org keyboard input driver
xf86-input-libinput-0.29.0     X.Org libinput input driver
xf86-input-mouse-1.9.3_3       X.Org mouse input driver
xf86-video-scfb-0.0.5_2        X.Org syscons display driver
xf86-video-vesa-2.4.0_3        X.Org vesa display driver
xorg-drivers-7.7_6             X.org drivers meta-port
jacek@thinkpad-x240:~ %
```

I found somewhere in the forum that drm2.ko may be required if system is reporting that some old drm driver is used .








						Solved - Obsolete abandonware! drm-legacy-kmod
					

I installed graphics/drm-legacy-kmod-g20190213 which results in a bunch of messages when loading thus:   Apr  8 23:54:33 tiger kernel: drmn0: ======================================================= Apr  8 23:54:33 tiger kernel: drmn0: This code is obsolete abandonware. Install the...




					forums.freebsd.org


----------



## Sevendogsbsd (Jun 19, 2020)

I saw that post as well but I have a modern Intel GPU and have never used legacy so can't speak to that. Maybe someone else has and can chime in.


----------



## jacekkowalczyk82 (Jun 19, 2020)

Hmm, Funny and strange , for Intel Haswell I should be using drm-legacy-kmod (it was stated if few threads at this forum)  but I am getting this crash.

*I tried something stupid* - I installed drm-kmod package (drm-legacy-kmod was automatically removed) and now it is working fine. 
Logitech Mouse is a bit sluggish but everything works  and there is no crash. 

*The solution for my system with FreeBSD 12.1-RELEASE-p6  was to use drm-kmod instead of drm-legacy-kmod. *



```
drm-fbsd12.0-kmod-4.16.g20200221 DRM modules for the linuxkpi-based KMS components
drm-kmod-g20190710             Metaport of DRM modules for the linuxkpi-based KMS components
libdrm-2.4.99,1                Userspace interface to kernel Direct Rendering Module services
```

I do not know how to explain it.


----------



## Sevendogsbsd (Jun 19, 2020)

Have you installed libva-intel-driver as well? Not sure why your mouse is sluggish and not sure if it will help but I needed to install that package as well.


----------



## jacekkowalczyk82 (Jun 19, 2020)

No, I do not have this package installed 



Sevendogsbsd said:


> Have you installed libva-intel-driver as well? Not sure why your mouse is sluggish and not sure if it will help but I needed to install that package as well.


----------



## Sevendogsbsd (Jun 19, 2020)

According to the wiki https://wiki.freebsd.org/Graphics, 





> Furthermore, if you notice high CPU usage or excessive tearing while viewing HD video it is reported that installing the libva-intel-driver is helpful, as it enables VAAPI support on these systems. This package should be installed in addition to the drm-kmod, mesa-libs and mesa-dri packages.



Not sure that will help with your mouse issue but I always installed that package on my system. I did game on it though so not sure your use case.


----------



## jacekkowalczyk82 (Jun 19, 2020)

I will try that , thanks


----------



## jacekkowalczyk82 (Jun 26, 2020)

I Have another update
I installed package libva-intel-driver.
I noticed that system is not crashing but is very sluggish.  I checked another configuration with removed drm2.ko from kld_list
My system is running FreeBSD 12.1-RELEASE-p6
I have Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz (2494.28-MHz K8-class CPU)
and Intel Haswell-ULT Integrated Graphics Controller.

Finally the solution is :
1. Install  package drm-kmod and package drm-legacy-kmod was automatically removed.
2. Install package libva-intel-driver
3. Set kld_list in /etc/rc.conf :

```
kld_list="/boot/modules/i915kms.ko fuse"
```


----------

