nvidia with compiz and with dual core freeze

Bug #151382 reported by Kafi
12
Affects Status Importance Assigned to Milestone
linux-restricted-modules-2.6.24 (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

Hy,

Using the last release of gutsy. With the i386 kernel. When i activate Compiz => Freeze at a random time after. Even when i'm not doing anything. Whe are many in the same case : dual-core, nvidia, compiz => Freeze. see here :

http://forum.ubuntu-fr.org/viewtopic.php?id=152207

Or here :

http://forum.ubuntu-fr.org/viewtopic.php?id=153702

Thanks

Revision history for this message
rax_m (rax-m) wrote :

I can confirm that the same happens for me.

Toshiba P100
Dual Core
Nvidia 7600 Go with 128MB RAM

I usually can't get to a console so cannot kill x. But occasionally Alt+SysReq+K manages to kill X and allow me to log in again. Without Compiz it is very stable.
I have tried both the restricted driver and the latest driver install with Envy.

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for taking the time to report this bug and helping to make Ubuntu better. Could you please add your ~/.xsession-errors, /var/log/Xorg.0.log and the output of lspci -vvnn to your bug report as separate attachments? Thanks in advance.

Changed in compiz:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
rax_m (rax-m) wrote :
Revision history for this message
rax_m (rax-m) wrote :
Revision history for this message
rax_m (rax-m) wrote :

Hope these help. Could this possibly be a bug with the Nvidia 7600 series cards? I just seem to see a lot of comments with people having these cards.

Changed in compiz:
status: Incomplete → New
Revision history for this message
aprunai (aprunai) wrote :

I can confirm this bug, though I'm not sure it's related to linux-restricted-modules-2.6.24.
I started having freeze problems when I switched my old Asus motherboard and Athlon XP 2400+ to another Asus mobo with Athlon64 X2 3800+. I did not reinstall Gutsy - I just booted to see how the system behaved. Everything was fine, except that I started having the randomic freeze problems with the very same graphic drivers (nvidia-glx-new) that I had been using up to then.

Of course I reinstalled the whole system, then I changed to nvidia-glx and even nvidia-glx-legacy, tried installing various versions of the nVidia drivers with and without Envy, tried tweaking system settings (a good improvement was adding the line: Option "BackingStore" "False" to my xorg.conf, as stated in the Compiz FAQ, and another was disabling Powermizer monitoring in nvidia-settings). My video board is an AGP8x Asus nVidia 6600TD, which was running at 4x with the old motherboard (but I tried setting it to 4x without results).

I'd like to point out that the dual-core/nVidia freeze problem doesn't affect just Compiz. Even with graphic effects disabled, leaving the screensaver Fieldlines on for some time brings my system to a lockup (sometimes it's total, sometimes it just looks like X server only is frozen; I can guess from the led activity on my ADSL router).

Finally, something I think is very important: freezes largely happen when an upload or download is going on. My benchmark for testing them is leaving aMule running, and letting Fieldlines screensaver kick in. I leave the system like this for a while (about half an hour), and I am pretty sure I will find it frozen. Instead, without any download running, I can work even for a whole day without freezes.
This is also stated in this forum (francophone only):

http://forum.ubuntu-fr.org/viewtopic.php?pid=1293717#p1293717

Sorry for the long post.

Revision history for this message
aprunai (aprunai) wrote :

Just reporting that the bug affects Hardy Heron, too.

Revision history for this message
LimCore (limcore) wrote :

I have bug that may be the same

amd64 4800 X2 (in SMP mode, on amd64 mode)
2 GB RAM nvidia GT 8600 mianboard GA-MA78GM-S2H
I was using compiz (I think its mostly disabled now - no 3d stuff in desktop) ; I use nvidia glx-new

Screen turns off (as in - no signal), computer totally freezes (keyboard, capslock, power button, sys-rq-B nothing works...)
It happened 2 times when I was watching youtube, 1 time just using desktop, during ~2 weeks.
Reported mine as https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/228417

Revision history for this message
luigi massa (info-luigi-massa) wrote :

I've a Acer Aspire 5680.
When Compiz is active I've have the same problem.

Revision history for this message
Tito's (rcarrasco) wrote :

Same problem here, no dual core

My report is https://bugs.launchpad.net/ubuntu/+source/linux-meta/+bug/235753

Revision history for this message
Tom M. (wvm7fk202-deactivatedaccount) wrote :

Same problem here.

Hardy Heron
2.6.24-19-generic
AMD Athlon(tm) 64 X2 Dual Core Processor 4600+ (SMP mode)
GeForce 7800 GS
Both 169.12+2.6.24.13-19.42 (Ubuntu supplied driver) and 173.14.05 (from NVidia's site) affected.
I also ran the nvidia-glx (not the -new) before.. version 96.something (I can't remember) and it is affected too.
Lockup occurs completely randomly. Hard to reproduce, but it does happen a lot.

I saw a trace once but couldn't record it properly. Mentioned SMP_APIC_TIMER in it.
I've been trying to get Crashdump to work, but I can't get it to save a memory dump anywhere.

No problems whatsoever with the open source 'nv' driver. (Which I've been forced to use!)

Revision history for this message
LimCore (limcore) wrote :

For me, this problem seems to be gone since I updates recently (last few weeks), Im using
- nvidia-glx-new
- up to date kernel

ii nvidia-glx-new 169.12+2.6.24.13-19.42
ii linux-image-2.6.24-19-generic 2.6.24-19.33
Linux limcore 2.6.24-19-generic #1 SMP Wed Jun 4 15:10:52 UTC 2008 x86_64 GNU/Linux

Since this, I didn't had even one hang yet.

Revision history for this message
aprunai (aprunai) wrote :

I noticed the improvement after a recent upgrade, too. As for now, I am using this configuration:

nvidia-glx-new: 169.12+2.6.24.13-19.42
xserver-xorg-core: 2:1.4.1~git20080131-1ubuntu9.2
linux-image-2.6.24-19-generic: 2.6.24.19.34
linux-restricted-modules-generic: 2.6.24.19.21

However, I am still not using Compiz, because freezes didn't go away but became something else which suddenly (after a short "flash") lets me with a perfectly working mouse but a dead keyboard and X server. Even power button doesn't work anymore.

Revision history for this message
Alberto Milone (albertomilone) wrote :

It might be a bug in this specific old version of the driver.

Can you enable the hardy-proposed and hardy-updates repositories, install EnvyNG so as to install the latest release of the driver?

Let me know how it goes.

Changed in linux-restricted-modules-2.6.24:
status: New → Incomplete
Revision history for this message
Tom M. (wvm7fk202-deactivatedaccount) wrote :

I discovered this freeze / kernel panic has further reaching implications than I thought. Even using the 'nv' (open source Xorg driver), my system still randomly locked up while using X!

As a test, I regressed my kernel back to Gutsy 7.10's (2.6.22) and installed the latest Nvidia driver and compiled it. Everything has been working perfectly with no lockups.

I think something between 2.6.22 and 2.6.24 broke on some systems, some bug introduced by 2.6.23 or 2.6.24 that interacts horribly with either the Nvidia chipset or something else.

Revision history for this message
Tom M. (wvm7fk202-deactivatedaccount) wrote :

See bug 204996. Upgrading to 2.6.25 may fix your problem. Good luck!

Revision history for this message
LimCore (limcore) wrote :

Again I had partial freez:

bad - keyboard stoped working (on usb, replugging and to other usb plug didnt help) even capslocks where dead (did not try sysrq)

bad - monitor showed empty screen, in text mode 80x25 totally empty only in blinking cursor in top-left corner
a bit later afair during shut-down scren powered off

ok - sound was playing
ok - applications continued to run
ok - power off button worked (triggered turn off scripts)

nvidia 6800, Linux limcore 2.6.24-19-generic #1 SMP Fri Jul 11 21:01:46 UTC 2008 x86_64 GNU/Linux

Revision history for this message
aprunai (aprunai) wrote :

I surely hope this fix helps, but I'm afraid not as it seems to solve some problems with Intel hardware (I don't have anything Intel-related in my box).
Moreover, for about a week I've been using the nv driver (after uninstalling EVERYTHING which had the nVidia name in it), and my machine works like a charm. Not a single freeze or hiccup. SO I doubt that my problems are coming from the Linux kernel alone.

@Alberto Milone: sorry for not answering before to your post. Until now I have tried all versions available of the nVidia driver: from the ones in the Ubuntu repositories (nvidia-glx-new, nvidia-glx, nvidia-glx-legacy), to the ones proposed by both Envy (on Gutsy) and EnvyNG (on Hardy). I just didn't want to try the newest 177.xx as they're beta and they seem to give many problems to users on the nVnews forum.

The thing which leaves me puzzled is that my old system (Asus A7V333 mobo + Asus N6600/TD video board + AthlonXP 2400+ CPU) worked really well with nVidia drivers (nvidia-glx-new) under Gutsy; when I upgraded to my actual configuration (Asus A8V Deluxe mobo + Asus N6600/TD video board + Athlon64 X2 3800+ CPU) I kept the software section untouched just to see how it behaved, and everything went smooth except for the freezes which started to plague me. Of course I reinstalled Gutsy, then I tried every possible version of nVidia drivers, then I switched to Hardy (I must have been really desperate as I never install LTS versions); I tried every single tweak I found on forums and blogs; and finally I posted a bug report on the nVnews forum:

http://www.nvnews.net/vbulletin/showthread.php?t=117875

which remained unanswered, probably because now they're focusing on the new 177.xx drivers and mine was the 1000th bug report on the whole "dual-core + nvidia = freezes" issue.

Revision history for this message
Mark Cross (markcross) wrote :

I have an AMD64, Nvidia, Heron combination and I had random freezes.

System, Appearance, Visual Effects - None

= solved problem, stable for week+ and NO MORE FREEZES

And I think I have stopped other posts about this being = to switching off Compiz

/*
http://brainstorm.ubuntu.com/idea/11566/

gabtrat wrote on the 28 Jul 08 at 20:07
agreed. I disable Compiz to make one of my games run better, and it takes a while to get it back to normal. The icon mentioned by Rhubarb is helpful but there should be a simple way built in.

I would like to see a "Custom" option in System->Preferences->Appearance-Visual Effects & have "Advanced Desktop Effects" installed by default.

*/

Revision history for this message
aprunai (aprunai) wrote :

Yes, Compiz seems to make heavy use of some extensions which suffer from this problem. Instead, 3D games like Neverwinter Nights are able to run indefinitely without problems.
Sadly, the freeze problem is not limited to Compiz, at least for me. My system, for example, would lock when some OpenGL screensavers kicked in (FieldLines for an example, would freeze anything if left on for about half an hour); and Wine, when using OpenGL enabled apps (=Poser 7), also managed to trigger the freezes.

Revision history for this message
aprunai (aprunai) wrote :

I finally solved my issue.
I figured that the freezes were interrupt-related when I installed IRQBalance on my box and a freeze happened few seconds after the daemon had started. Then I discovered that nVidia drivers have an internal IRQ manager (possibly to distribute the GPU load over multiple cores. Why they didn't use Linux IRQ infrastructure is a mystery to me).
Luckily, while looking for a means to force IRQ assignment to a single CPU, i found a thread on Ubuntu forums about "rescheduling interrupts" and how this practice had become very aggressive in the late kernels, especially when CPU load was mid to low.
They suggested a fix, which I tried, and my box has been rock stable since that precise moment, which was about two weeks ago, with Compiz on full-time.
If someone wishes to try it, here is the command line (you must enter it as root, not with sudo):

echo 1 > /sys/devices/system/cpu/sched_mc_power_savings

I had some problems as root, too (the command was successful but the system file remained unchanged, as showed by "cat /sys/devices/system/cpu/sched_mc_power_savings" which resulted in 0 instead of 1), so I rebooted in a fail-safe environment and successfully applied the change.

Revision history for this message
Martin Zuther (mzuther) wrote :

Hi!

It seems that Ubuntu 8.10 (intrepid) is also affected by this problem. But after trying hirumono's solution, things look much better. There is however an easier way to achieve it - just start your system, open the terminal and type:

echo 1 | sudo tee /sys/devices/system/cpu/sched_mc_power_savings

You can verify that it works with "cat /sys/devices/system/cpu/sched_mc_power_savings" ...

Thanks for the solution, it was bitterly needed by me!

Martin

Revision history for this message
aprunai (aprunai) wrote :

You're welcome. And thanks for adding your line Martin, it is in fact much simpler and better! :)
Yes, sadly Ubuntu 8.10 is affected by this plague too, and I suspect this will go on until nVidia drivers are rewritten with a much less intrusive behaviour in mind. I can't say that this is THE solution to all freeze problems with nVidia and Compiz, but it surely reduced the freezes to a minimum. Things got even better since I removed the two "CPU Frequency" applets I was keeping in my system panel (one for each CPU), and I suspect that the continuous polling from them was having negative effects on system stability.
BTW, I found back the reference pages which were reported in the Italian forum thread I read back then, and I'd like to quote them:

http://www.nabble.com/Rescheduling-interrupts-to15009292.html#a15021468
http://www.lesswatts.org/tips/cpu.php#smpsched

The whole thing came out as a means to save energy on laptops. Hope this will be of help to anyone who wants to understand more about this issue!

hirumono

Revision history for this message
Martin Zuther (mzuther) wrote :

Hi!

This is probably obvious - if you want to apply the solution permanently, just add the line

  echo 1 | tee /sys/devices/system/cpu/sched_mc_power_savings

to the file "/etc/rc.local". But make sure you insert it *before* the last line ("exit 0"), which you must not remove.

All the best,

Martin

Revision history for this message
Martin Zuther (mzuther) wrote :

Well, it seems my problem was lying elsewhere (the unrelated bug #231034). But good luck in solving the problem to you!

Martin

Bryce Harrington (bryce)
Changed in linux-restricted-modules-2.6.24 (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote : linux-restricted-modules-2.6.24 is obsolete

Thank you for reporting this issue about a driver from the
linux-restricted-modules package. lrm-2.4.24 was shipped with Ubuntu
8.04 which reached end-of-life for desktop support on May 12th, 2011.

For that reason, this bug report is being closed at this time. I'm
marking it wontfix because what you describe is probably a valid issue,
but there are no plans to work on lrm 2.4.24 bugs further.

The issue may be resolved in a newer version. If not, aside from filing
a new bug report, another angle may be to file it directly with the
driver vendor.

Changed in linux-restricted-modules-2.6.24 (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.