Ultimaker / Cura

3D printer / slicing GUI built on top of the Uranium framework
GNU Lesser General Public License v3.0
5.97k stars 2.04k forks source link

[CURA 4.0.0 BETA] Black screen after 2 minutes with Ryzen CPU and ASUS motherboard #5265

Open fanfan7110 opened 5 years ago

fanfan7110 commented 5 years ago

Hello, At each launch without exception of Cura 4.0.0 beta, the software runs for about 1 to 2 minutes then the screen goes black, all the USB systems are disconnected and the PC is permanently blocked in this black screen. Even the Reset does not work anymore. The power must be turned off and then reactivated to restart. There is no precise point that triggers this problem, as it can happen without a model, with a model, during a calculation or even empty. To check, I reformatted the computer and reinstalled everything and the problem returned to the identical. On my second PC (less powerful but Intel processor) the problem does not appear. By taking the same configuration of the intel but copied in the Ryzen, the bug is still there. This is not an installation problem or defective files. I would rather look at an incompatibility with the processor.

Application Version CUra 4.0

Platform Windows 10

Printer Alphawise U20

Steps to Reproduce Just install in a ryzen5

Actual Results Black screen

robnivis commented 5 years ago

I had the problem with cura 3.6.0 and cura 4

For the amount of money ultimaker make, it feels like the ā‚¬500 it would take to build a decent ASUS Ryzen PC to test this is trivial. Especially considering how widespread Ryzen is becoming

Ghostkeeper commented 5 years ago

For Ultimaker it's always been a matter of not having enough people to do the work rather than enough money or tools.

Not all Ryzen computers reproduce this though. One of our colleagues just got a Ryzen as well with ASUS motherboard, but doesn't see it happen (so far).

I would also have no idea where to look for a fix :confused: It's not like Python has an instruction that says "please freeze the CPU and make the screen go black" that accidentally gets triggered in our code due to a typo or something. It'll be either a bug in CPython, Qt or in GCC together with these Ryzen chips, and I suspect it's some bug in the power control of that motherboard which triggers on the type of power behaviour that Cura has, i.e. bursts of high CPU usage with breaks in between (like the internet says).

TheFluffyWalrus commented 5 years ago

So since I can reproduce this what can I do to help you fix the problems for other people?

Ghostkeeper commented 5 years ago

Maybe you could try putting Cura and CuraEngine's process on a lower priority?

Or maybe try running a different process at the same time that always takes 100% CPU, so that there are no breaks in the CPU usage any more (as far as the motherboard is concerned).

TheFluffyWalrus commented 5 years ago

Cura and the slicing engine both on low priority with prime95 eating everything so far so good... it is 12:31AM EST will leave this running while I sleep.... @Ghostkeeper Another thing I noticed about everyone crashing is we all have NVIDIA cards as well. I don't think its effecting people with ATI cards.... Could it also be GPU related?

EDIT: SPOKE TOO SOON..... As I was shutting off the light to leave the room computer shut off dead as a door nail... So whats next brother?

Ghostkeeper commented 5 years ago

Do you have ASUS AI Suite installed? According to this thread and this post it can crash the GPU. It's been mentioned before here.

This guy with a similar issue mentions that he had installed MSI command centre and it pops up a message saying that his voltages are wrong: thread

I also see a lot of threads online where they ask the user to upgrade the BIOS on the motherboard or the BIOS on the GPU. And a lot of people complaining that ASUS quality control is terrible...

TheFluffyWalrus commented 5 years ago

I dont have ASUS AI suite installed... I will update my BIOS and and see if there is a BIOS update for my Founders Edition RTX then do the test again and report back.

Edit 1: My Motherboard bios was already up to date

Edit 2: No bios for the GPU

rxdpunk commented 5 years ago

I clean installed no AI suite current bios on everything still happens

Ghostkeeper commented 5 years ago

Maybe something else you could try is to install a very old version of Cura: http://dulek.net/work/Cura-2.1.2-win64.exe See if it happens there. Installing this should not influence your modern Cura installation unless you install it over the same folder (but by default they are installed to different folders).

TheFluffyWalrus commented 5 years ago

Ok will do that it looks like Nvidia release some new drivers that fixed a bug in old drivers that caused CPU issues going to test with those and see what happens first.

https://www.tomshardware.com/news/nvidia-430-39-driver-cpu-usage-issues,39195.html

TheFluffyWalrus commented 5 years ago

still crashed after drivers update trying old cura now

TheFluffyWalrus commented 5 years ago

@Ghostkeeper 2.1.2 does not seem to be causing the same issues as the newer versions of cura

Ghostkeeper commented 5 years ago

Aha, so it must be either something we added in the past 4 years, or a nondeterministic issue... Doesn't narrow it down much, but it's something.

It'll still be very hard to debug this if we can't reproduce the issue ourselves though.

TheFluffyWalrus commented 5 years ago

Any way to add a logger to the current version? That just constantly logs everything your application is doing until the computer crashes? I'm more than happy to run such an application.

On Fri, May 3, 2019, 5:03 AM Ghostkeeper notifications@github.com wrote:

Aha, so it must be either something we added in the past 4 years, or a nondeterministic issue... Doesn't narrow it down much, but it's something.

It'll still be very hard to debug this if we can't reproduce the issue ourselves though.

ā€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Ultimaker/Cura/issues/5265#issuecomment-489019762, or mute the thread https://github.com/notifications/unsubscribe-auth/AB6PHDDQ4K6GFAFBWFOS36DPTP5UXANCNFSM4GT63QFQ .

Ghostkeeper commented 5 years ago

Thanks for your enthusiastic effort, by the way. It's nice to have a community willing to help.

@LipuFei you had a library that you added to Cura to output all the memory modifications in Python, right? What was it? If it's a pure Python library we can copy that into the source directory on a branch and create a build with it.

I don't think we'll see much though. If the processor freezes, it won't be able to write anything to file any more after the freeze, so it will have the last few seconds in the output buffer and won't be able to store it on disk before the freeze if we log it.

TheFluffyWalrus commented 5 years ago

You are offering a fantastic piece of software for free as well as sharing the source why would I not want to help. This is exactly what open source is about.

adamheinmiller commented 5 years ago

How many legacy versions are available/can be built? Since you've established an upper and lower boundary on the problem, we should be able to b-tree this and narrow it down to a few months with only a few more tests.

Can a working Cura version be built from the Github repo? I work in software development, albeit not Python, but if I could get it built and running locally I could help narrow it down to an offending commit.

On May 3, 2019, at 5:03 AM, Ghostkeeper notifications@github.com wrote:

Aha, so it must be either something we added in the past 4 years, or a nondeterministic issue... Doesn't narrow it down much, but it's something.

It'll still be very hard to debug this if we can't reproduce the issue ourselves though.

ā€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

fieldOfView commented 5 years ago

It would be my guess that the "thing" happens in PyQt or Qt that ship with Cura, not actually the (Python) Cura code itself. Since Cura 2.1, the version of PyQt has been upped a couple of times. I also don't think 2.1 is the last version that does not crash. Cura 2.7 is still available here: https://ultimaker.com/en/products/ultimaker-cura-software/list

TheFluffyWalrus commented 5 years ago

I'll go install cura 2.7 now

TheFluffyWalrus commented 5 years ago

no crashes in 2.7 trying 3.2.1

TheFluffyWalrus commented 5 years ago

@Ghostkeeper it seems its 3.6 and 4 that are the only ones that seem to crash I am currently testing 3.5.1 and no issues so far 5 hours in

Ghostkeeper commented 5 years ago

That narrows it down a bit. It seems we split off the branches for 3.5 on the 19th of September (Talk Like a Pirate Day), and for 3.6 on the 30th of October, so it must be some commit between that. When looking through the commits on cura-build-environment I see a bunch of changes to Python libraries as well as this change to the VC build environment and this change adding xz (and some commits for only MacOS).

Lexiv commented 5 years ago

I had the same issue with 4.0. It seems to be fixed in 4.1 beta for me

Ghostkeeper commented 5 years ago

Huh, that's weird. We didn't change anything to fix this. Leastways, not on purpose. How about the 4.1 stable?

Lexiv commented 5 years ago

Is there a 4.1 stable?

fieldOfView commented 5 years ago

Yes, see https://ultimaker.com/en/products/ultimaker-cura-software

Lexiv commented 5 years ago

Oh sorry, got a bit confused because it wasn't available on sunday šŸ˜…

4.1 stable hasn't crashed my pc either (yet?). I've only sliced once with it though. Maybe someone else who had this problem before can test 4.1.

My PC specs:

Ryzen 2600 Asus X470 Prime Windows 10 (1809)

adamheinmiller commented 5 years ago

I updated my Ryzen PC to Cura 4.1 last night (specs further up the thread) and I haven't had any issues yet. I had Cura open last night for ~90 minutes while intermittently using it, and then left it open to idle overnight. My PC put itself to sleep after an hour or so, but woke right up this morning with no issues.

With Cura 3.6 my PC would hard crash in just a few minutes of even having it open and idle.

I'll keep using it and see if any issues come up, but there definitely seems to be a positive improvement here with this version.

On May 28, 2019, at 11:43 PM, Lexiv notifications@github.com wrote:

Oh sorry, got a bit confused because it wasn't available on sunday šŸ˜…

4.1 stable hasn't crashed my pc either (yet?). I've only sliced once with it though. Maybe someone else who had this problem before can test 4.1.

My PC specs:

Ryzen 2600 Asus X470 Prime Windows 10 (1809)

ā€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Ghostkeeper commented 5 years ago

On the Ultimaker forum someone reported that he still has this problem in Cura 4.1: https://community.ultimaker.com/topic/26654-cura-crashes-my-entire-computer/?tab=comments#comment-240611

Lexiv commented 5 years ago

My PC crashed again too while having Cura 4.1 open in the background.. so yeah, the problem is still there šŸ˜•

adamheinmiller commented 5 years ago

I also experienced a few crashes over the weekend. They were different though - my PC crashed and restarted on its own in a more traditional manner. They occurred while Cura was open in the background, and seemed to take more time to occur.

On Jun 3, 2019, at 8:34 AM, Lexiv notifications@github.com wrote:

My PC crashed again too while having Cura 4.1 open in the background.. so yeah, the problem is still there šŸ˜•

ā€” You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Asbra34 commented 5 years ago

I also have this problem with 4.1, but in some rare cases the computer can reboot rather than become unresponsive. I first thought this had something to do with my overclock so i reset my OC setting but it made no difference. The computer usually becomes unresponsive within 20 minutes of opening Cura.

System: Ryzen 7 2700X Asus X470 Prime GTX 1070

Skybeat commented 5 years ago

I have the same issue and reported it in this case https://github.com/Ultimaker/Cura/issues/5988

But i have this issue also with Cura 3.5. My System Windows 10 v.1903 AMD Ryzen 7 2700X Nvidia Geforce 1060GTX 6GB

For me the crash comes some times after 1 minute some thimes after 10 minutes etc. It is different eachtime i use Cura. My Log attached in the Case #5988

lenne0815 commented 4 years ago

Same Issue here, pc reboots with 4.1. Nvid / Ryzen

lenne0815 commented 4 years ago

Still same issue on 4.2. if i remember correctly i can confirm it started with 3.6.

Ghostkeeper commented 4 years ago

But i have this issue also with Cura 3.5

Ah so maybe it did occur then but maybe less often? Cura 3.5 had fairly different power usage patterns than Cura 3.6 due to the changes to gap filling lines merging back then.

lenne0815 commented 4 years ago

Only happens when cura idles in the backgroud, ive never had it happening while in ise.

And its easy to reproduce because it happens 100% of the time.

disneytoy commented 4 years ago

SAME PROBLEM:

Ryzen 3700x 32gb RAM Asus Prime x470. GTX 460 (old) Win 10 Ultimate x64. Cura 4.1.

3 times in a row my computer shut down after less than 5 minutes, while I was printing. I thought it might be USB or the printers main board?

Then I ran my computer 73 hours no issues. (no Cura)

Then today, NO USB plugged in, I was trying to set-up a new Cura profile, and my computer shut down. Everything on Idle. Ryzen temps in the mid 30c. 3-5% load (not printing).

As a new build I was concerned it may be CPU, Motherboard, Power supply, but now at least I know it is Cura. That is sad, because that is the only slicer I have any experience with.

Be great for a fix. With all the new Rizens I can only imagine many more problems. the 3700x is quite amazing for 8 cores and 65 watt TCP.

Skybeat commented 4 years ago

Since so many people have this issue, will a developer of CURA may give us some information or even a tool to debug get some more information for the developers? It is a bad situation to know that cura will frezz the pc but you want and need to slice a object. So please developer team of cura, give us some status info about the very bad BUG and what are the next steeps from your side to go on and fix this major BUG. Thank you!

LipuFei commented 4 years ago

@LipuFei you had a library that you added to Cura to output all the memory modifications in Python, right? What was it? If it's a pure Python library we can copy that into the source directory on a branch and create a build with it.

That library meliae is not pure Python and it's outdated for a long time. The release, if I remember it right, only works for Python 2. I partially ported it to Python 3 around 18 months ago, but I don't know if it's usable now. In short, that library is not available at the moment.

LipuFei commented 4 years ago

@Skybeat We have discussed this, if this is hardware issue that it cannot cope with a certain busty workload pattern, unfortunately we don't think that we can do much about it. We also don't have any Ryzen hardware to debug this issue, which makes it more difficult. But if you have more information or ideas on what could have caused the problem, we are happy to try them out.

That being said, one thing I can think of is that, in Cura, we have a thread pool for running jobs. This thread pool will create an equal amount of threads as the number of your CPU cores. With Ryzen there are more CPU cores, so more threads. So, this can be special in the case of Ryzen, although those threads are mostly idle.

I will create a Cura build with 2 threads max in the thread pool and upload the link here. You can try it see if it makes any difference. Thanks!

lenne0815 commented 4 years ago

Sounds great, right now its atleast for usb printing unusable for amd users. Another annoyance is that it just survices that many hard crashes before parts break, right now the octoprint plugin stopped working for me.

Ghostkeeper commented 4 years ago

Handling 20 threads should be no problem for the operating system though. Right now Firefox is running 255 processes on my computer (wtf...) let alone the number of threads in each of those.

LipuFei commented 4 years ago

@Skybeat @lenne0815 Hi all, the link below is a Cura 4.2.1 build with at most 2 threads in the job queue.

https://we.tl/t-VubRI3UrF5

disneytoy commented 4 years ago

Commenting on your thought of creating too many threads. I have the 3700x 8 core 16. My last shutdown was on a fresh restart/Cura launch, No model loaded, I was just setting up a printer profile.

I'm thinking it is filling something up, that is why it takes a couple minutes to get to the crash.

Thanks for you work.

With these new Ryzen CPUs you will see a lot more users. AMD is killing it across the board on CPU vale from low end to server level.

I will try your new build and report back.

Cura is my favorite slicer:-)

Asbra34 commented 4 years ago

@LipuFei I tested your build and it still crashed the computer, i sliced a part and then let it idle and within 10 minutes the screen was black and unresponsive.

LipuFei commented 4 years ago

@Asbra34 I'm now curious, if you launch Cura, don't slice anything and let it idle, will it also go black? This may help us to isolate the issue to Cura or CuraEngine.

janrg commented 4 years ago

@LipuFei Perhaps another avenue of investigation would be to create a bunch of binaries for the commits mentioned in https://github.com/Ultimaker/Cura/issues/5265#issuecomment-489535920 to nail down the exact commit that caused this issue?

LipuFei commented 4 years ago

@janrg @Skybeat mentioned that 3.5 also causes the problem for him. :(

Good idea though, it's still a bit tricky to figure out where to start the split. I think starting from figuring out if running Cura alone will cause a crash can already help a lot.

Splitting with Cura release versions still gives a way too broad scope because it includes all the parts that were just mentioned.

Asbra34 commented 4 years ago

@LipuFei I started cura almost immediately after your comment and it just now crashed, so around 20 minutes. I just started it and did not load any models or anything.