# [radeon] System sometimes freezes on xorg shutdown



## kpedersen (Jun 18, 2010)

Hello,

I was given a new laptop to use at work today but it happens to be the dreaded IBM Thinkpad T42 which I have had trouble with back in 7.0-RELEASE times.

Basically what happens is that when using the "radeon" driver, when I close the x server either manually or via shutting down, occasionally it completely crashes the computer.

I have tried commenting out dri, dri2 and glx in the xorg.conf but it still can sometimes freeze 

My card is...
ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]

I am using FreeBSD 8.0-RELEASE

If anyone has found a sloution to this I would be very greatful if you would share!


----------



## wblock@ (Jun 18, 2010)

http://forums.freebsd.org/showthread.php?t=13477 has the xorg.conf that works for me using dbus and hal on 8-STABLE.

Don't know what problems others have had, but the T42's Radeon 7500 has always been very consistent for me.  The only things on the whole machine that are questionable are the Intel 2100 wireless and middle-clicking.


----------



## kpedersen (Jun 19, 2010)

Ah, my T42 has an atheros wifi 

Apart from this stupid crashing radeon card, it would be the perfect FreeBSD laptop.

Ok, I will give some parts of your xorg.conf a shot. Personally I do not use hald or dbus (Option "AutoAddDevices" "False") because I find them messy. I don't imagine this to be a reason for the whole system to crash (occasionally).

That Composite Disable section looks worth a shot anyway!

Thanks for your reply


----------



## qsecofr (Jun 19, 2010)

I have a ati radeon card & driver.  had some very similar symptoms: X would freeze somewhat randomly forcing hard shut down.
http://forums.freebsd.org/showthread.php?t=13962


----------



## kpedersen (Jun 19, 2010)

Hmm, wblock I tried your xorg.conf but it still seems to freeze occasionally on closing the xserver and very occasionally on starting the xserver.

qsecofr, thanks for the link, I will try 
	
	



```
Option "AccelMethod" "XAA"
```

Although turning acceleration off completely does not help so I am not so sure this will, Our problems might be slightly different, mine crashes on startup or shutdown but once it is running, it is 100% stable.

Anyways I will try this suggestion but keep the ideas coming! 

EDIT: Unfortunately this didn't work 

I also have a Radeon 9700 in another laptop and the exact same thing happens, so this eliminates hardware faults. Since this happens both times I use a Radeon card, I cannot be the only one who is experiencing this problem?!

Luckily my thinkpad t42 has 1024x768 so the vesa driver *can* suffice, but my other laptop has a widescreen resolution rendering vesa quite useless as a solution due to lack of widescreen support.


----------



## wblock@ (Jun 19, 2010)

Can you show the Xorg.0.log and xorg.conf?  This is itchy to me, since my T42 is very solid.  I would suggest testing with dbus and hal enabled.  Since you're seeing the problem on two different systems, it may be a configuration problem that's common between them.

Let's see... other customizations on the T42:
/boot/loader.conf:

```
acpi_ibm_load="YES"
```

/etc/sysctl.conf:

```
dev.acpi_ibm.0.events=1
```


----------



## wblock@ (Jun 19, 2010)

Finally got motivated to put this on flcl with all details: http://laptop.bsdgroup.de/freebsd/index.html?action=show_laptop_detail&laptop=12947


----------



## kpedersen (Jun 20, 2010)

Right, I tried copying your config.

I already had *acpi_ibm_load="YES"*

I don't know what *dev.acpi_ibm.0.events=1* does, but I tried it anyway.

I duplicated your *xorg.conf* entirely and enabled *hald* and *dbus*

Yet, the darn thing still freezes after I tried stopping and starting X11 about 4 times...


----------



## wblock@ (Jun 20, 2010)

kpedersen said:
			
		

> Yet, the darn thing still freezes after I tried stopping and starting X11 about 4 times...



Maybe it's not X but the window manager.  Or xdm/gdm/kdm, or something in your .xinitrc or .xsession.

Mine is running xfce with xdm, haven't tried others.  Just to be sure, this is a hard lockup where the machine doesn't respond to ctrl-alt-f1 or pings or ssh from another system, right?


----------



## kpedersen (Jun 20, 2010)

I have tried with both twm and mwm as window managers and as far as I can tell it is a hard lockup, the keyboard is inoperable, *ctrl-alt-f1* does not take me to a terminal and any open ssh connections timeout.

My .xinitrc and .xsession are default (i.e I do not have any in my home directory)

This is all from a simple *startx*

It looks like I may have to just use vesa for now 

Btw, any idea what the horizsync or vertrefresh is for this laptop? Obviously like most monitors / laptops, it doesnt say anywhere in the documentation and it never seems to get reported in *Xorg.log*

Currently I am using 

HorizSync 10-100
VertRefresh 10-100

The vesa driver seems to require these variables or it stays at 800x600.

Thanks a lot for your help, and any other suggestions. Keep 'em coming


----------



## wblock@ (Jun 20, 2010)

kpedersen said:
			
		

> I have tried with both twm and mwm as window managers and as far as I can tell it is a hard lockup, the keyboard is inoperable, *ctrl-alt-f1* does not take me to a terminal and any open ssh connections timeout.
> 
> My .xinitrc and .xsession are default (i.e I do not have any in my home directory)
> 
> This is all from a simple *startx*



Just now I tried logging into and out of xfce via xdm ten times--no problem.  Disabled xdm in /etc/ttys and without .xinitrc, startx (twm) ten times, also no problem.

BIOS version is the most recent, 3.23 from 2007.  8.1-prerelease i386 from Jun 18 2010. 1.5G RAM.  Caps lock off, Ethernet cable is blue, LCD facing east.

Please post a copy of Xorg.0.log and I'll compare with mine.



> It looks like I may have to just use vesa for now
> 
> Btw, any idea what the horizsync or vertrefresh is for this laptop? Obviously like most monitors / laptops, it doesnt say anywhere in the documentation and it never seems to get reported in *Xorg.log*
> 
> ...



VertRefresh 60 should work for most LCD displays.  As long as HorizSync includes the range that's 1024x768, it shouldn't matter.  xrandr shows 1024x768 under radeon as HorizSync 48.4 KHz, VertRefresh 60Hz.  But vesa won't recognize a valid screen for mine, so please post your xorg.conf also.



> Thanks a lot for your help, and any other suggestions. Keep 'em coming



You're welcome.  If only one of them would work...


----------



## kpedersen (Jun 21, 2010)

Hi wblock,

The xorg.conf that I am using is the one you posted here http://laptop.bsdgroup.de/freebsd/index.html?action=show_laptop_detail&laptop=12947

I have noticed that when I use GDM one of my radeon laptops seems to crash very rarely.

I am going to see if I can swap in the T42 for a T60, which is a shame because the T42 was thinner!

Also when the shops are open tomorrow, I will pick up a blue ethernet cable to see if it indeed helps 

The fact that vesa does not recognize a valid screen for your t42, does seem odd (slightly different radeon chipsets?). Try making a fresh xorg.conf *Xorg -configure* and then put...


```
HorizSync 10-100
Vertrefresh 10-100
```

(Soz I would post my xorg.conf, but I do not have the laptop on me today)


----------



## wblock@ (Jun 21, 2010)

kpedersen said:
			
		

> I have noticed that when I use GDM one of my radeon laptops seems to crash very rarely.



Gah.  That it's not just one machine suggests some common configuration that's bad.  I would blame Gnome, but lots of people seem to use it.  Some add-on application?  Wait, does this happen after suspending the computer?

...


> The fact that vesa does not recognize a valid screen for your t42, does seem odd (slightly different radeon chipsets?). Try making a fresh xorg.conf *Xorg -configure* and then put...
> 
> HorizSync 10-100
> Vertrefresh 10-100



I recreated an xorg.conf.  All it needs is

```
HorizSync 46.8
VertRefresh 61
```

xfce even runs okay on it, although it's like going back in time to the xfree86 days.


----------

