KDE4 crashes my machine

Hi,

I have installed xorg and properly configures my /etc/X11/xorg.conf file. I know it is ok because I get the proper behavior when I use #Xorg -config xorg.conf -retro, that is, I get into X with some grayish screen and my mouse pointer is there and working. When I hit ctrl-alt-bksp then I get back to the console without errors.

I then installed KDE4 and modified my .xinitrc file to have this line: exec /usr/local/kde4/bin/startkde.

When I type #startx, I see the KDE wallpaper, then a window appears in the middle of the screen. It has one icon (a disk drive). After a while 3 or 4 more icons appears. I can move the mouse pointer. When I click the mouse the window moves to the upper left corner of the screen and then my computer crashes and even reboots by itself sometimes... And even if I don't click the mouse, the machine ends up crashing.

Is this a xorg configuration problem? My xorg.conf file seems ok. Is there something I need to do to configure KDE properly?

I am on FreeBSD 8.0 - RELEASE, amd64. My video card is an ATI Radeon HD 3870.

Thanks.
 
I just tried it. I saw the graphical logon screen, was able to type in my user name the hit the tab key and it crashed...

Besides, I didn't plan to use KDM.
 
Well, now I'm stuck as KDM always starts and crash my machine. How am I supposed to fix /etc/ttys? I started in single user mode but the system doesn't know "vi"...
 
When in single-user mode, run fsck -y and when that finishes, run mount -u / and mount /usr. You can then edit /etc/ttys.
 
There was one error: config/hal: couldn't initialise context: (null) ((null))

Also some warnings, one of which was to the effect that support for the r600 chipset was incomplete and experimental...

I should mention that I tried to install xfce4 before trying KDE and my system also crashed at startup. It seems to be a xorg problem. Driver maybe?
 
The problem has to do with hal and input devices. The warnings I get are related to mouse and keyboard. So I provided hal with a proper .fdi file and the system is able to go a bit further but still crashes at some point... In KDE it crashed while some server was starting (Anakona or somethin') and in xfce4 I got to see the desktop properly and moved the mouse a bit before crashing...

At this point, I think my system is a bit trashy as my file system reports errors when I boot - I started X as root (I know it is bad but didn't think I would get into so much trouble). Would it be a good idea to re-install FreeBSD and Xorg and use the latest of my config files? I think I am close to a solution but it is still elusive.

For those who have FreeBSD 8.0 on amd64 with either KDE4 or xfce4 installed, how did you configured your .kdi for Hal? And xorg.conf?

I installed Linux back in the 90s and configuring X sucked. I am surprised to see it is still the case.

Your help is appreciated!
 
Hi,

I modified my x11-input.fdi file and no longer have the config/hal error showing in Xorg.0.log

KDE4 still crashes. There are some failures reported in Xorg.0.log. Here is the part where they appear:

Code:
(II) RADEON(0): Reference Clock: 27000
drmOpenDevice: node name is /dev/dri/card0
Failed to change owner or group for file /dev/dri! 2: No such file or directory
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
Failed to change owner or group for file /dev/dri/card0! 2: No such file or directory
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 10, (OK)
drmOpenByBusid: drmOpenMinor returns 10
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0

Thanks!
 
do you have radeon.ko, drm.ko modules loaded in the kernel?
do a # kldstat to find out.

Can you start X with a simple .xinitrc containing only an xterm ?

Have you checked for hardware issues with your system? Have you done any memory tests?
 
Hi!

kldstat showed that radeon.ko and drm.ko were not loaded. All there was was the firewall which is the first thing I configured. Is there a way to load these two modules by tweaking a configuration file like I did for the firewall or do I have to compile a custom kernel? If so what are the general steps?

I started # xinit and the default xterm showed but my machine rebooted...

As for hardware issues, the only special devices I use are my Radeon HD 3870 which is a bit recent for Xorg and my keyboard, a Saitek Eclipse II but I use the standard pc104 model in my .fdi file for hal.

I have not done any memory tests. But I think my problem has to do with configurations.

Thanks for your help!
 
Bateleur said:
I started # xinit and the default xterm showed but my machine rebooted...

I have not done any memory tests. But I think my problem has to do with configurations.

So your problem is not KDE, your machine reboots whenever you start X, ( xinit) right? (btw DONT run X as root).
This is far from normal, and no configuration is supposed to panic the system. Your system should stay alive, no matter what hald, dbus, or X (xorg.conf) are trying to do.

Do you have any dumps in /var/crash/ ?
 
Hi,

but radeon.ko and drm.ko are not loaded. Should they be?

And yes I started X using # xinit. I did start X as root. Like I said, I thought things would go smoothly. Is it possible I screwed the system somehow and need to reinstall?

I will see in /var/crash/

Thanks.
 
Ok, there was a file in /var/crash/ called minfree. It's a text file with only one line, the number 2048.

Also, when I start X using xinit, the xterm is just a white square and is not preperly drawn. Then the machine reboots.

Should I load radeon.ko and drm.ko in the kernel?

Thanks!
 
Something I forgot to tell you: the driver specified in xorg.conf is "radeon". Should I be using "radeonhd" instead? If so, should I install a separate package for it?

Cheers!
 
FreeBSD 8.0-RELEASE will provide 2D acceleration via the radeon kernel module when you use either 'radeon' or 'radeonhd' in your xorg.conf file. The kernel module is usually the first suspect when a system completely crashes. When did you check the output of 'kldstat'? Was it while X was running? It's unusual for Xorg to bring down an entire operating system when it's not using kernel modules.

If you want to try the radeonhd Xorg module, you can install that driver with the x11-drivers/xf86-video-radeonhd port (or package), however there have been a number of people with Xorg crashes related to the radeonhd driver on the freebsd-x11 mailing list lately, so most have been switching over to radeon driver.

I agree with an earlier suggestion that you should run a memory test on your machine, btw.
 
Hi,

I'll stick with the "radeon" driver then. "kldstat" was run while not in X which I guess explains why it is not loaded. I cannot to anything when I start X, my machine just crashes so it is impossible to run "kldstat" at that time.

Maybe I need to reinstall? When I installed Xorg, I tried to do it thru ports but that didn't work. After about 45min. it stopped with an error. I then installed it with "pkg_add". That worked but my system is probably a mess right now.

Ho do you do a memory test in FreeBSD?

Thanks!
 
Edit your /etc/X11/xorg.conf file and add these lines to the Module section:

Disable "dri"
Disable "dri2"

If they are being loaded in there, make sure you comment out the "Load" lines. That will prevent the kernel modules from getting loaded, so we can at least determine if that is the source of the problem.

As for testing the memory. The best way is to burn an ISO image of memtest to CD and booting off of it: http://www.memtest.org/#downiso

Adam
 
Hi,

I tried to disable both "dri" and "dri2" in "xorg.conf". Things sort of worked: the screen was entirely black; then a white square appeared at the top left corner of the screen (it was not a "window" per say as it had no borders or anything, it was just a white square); I could use the "white square" to type in commands, i.e. it was usable - it had a prompt; "ls -al" would list my files etc...; I typed "exit" to exit X and it worked.

Should I still perform a memory test or do you have something else in mind?

Thanks a lot!
 
I went further and tried KDE and it worked flawlessly...

What is disable when one remove dri and dri2? What's the limitation? I think it is performance related, right? When I moved windows in KDE, things were sort of slow and you could see "window trails".

What should I do to make dri and dri2 work in my kernel?
 
I have the exact same FreeBSD release, with "radeon HD 4890" graphics card, and no problems.

Go back to your text console and try to load radeon kernel module by hand
# kldload radeon
See if that crashes your system.
See with # kldstat if drm is also loaded.
 
Hi!

I was able to manually load radeon and drm was loaded in the process. I started Xorg with xcfe4 and it worked perfectly. It seems like there is a problem loading radeon when starting X - or is it supposed to be loaded at boot time?
 
It *should* work fine being autoloaded by X. However, you can also load it at boot time in /boot/loader.conf. If it works when you manually load radeon and then start X, I would next try loading radeon from /boot/loader.conf and seeing if that works.
 
Hi...

I was able to load manually. But startx worked only because my xorg.conf file was disabling dri and dri2... I had forgotten about that. If I modify /boot/loader.conf, how should my xorg.conf file look like? Should it enable dri and dri2, disable them or simply should I comment out all enable and disable lines in there?
 
Well the only reason I suggested adding the module to /boot/loader.conf is because you said that Xorg worked if you loaded the modules manually before running X. If you have dri and dri2 enabled, load the modules manually before running X, but X still causes the machine to reboot, there's no point in loading the modules from /boot/loader.conf.

It might be worth tracking -STABLE, though, since a number of DRM related changes were committed to -STABLE after the 8.0 release.

Adam
 
Back
Top