Computer screen keeps restarting desktop randomly

For some reason, whenever i'm trying to do something, at some point. My computer screen will restart itself and everything closes. It doesn't restart completely, the screen just goes black, and i'm back at desktop mode with everything closing. It's starting to get super annoying, especially when i'm trying to do some work or even playing some of my games, and all of a sudden, everything closes and i have to start all over again. Even when i don't have lots of tabs open, it still does it. Is there some way of fixing it? If so, pls let me know and thank you 🙂
33 Replies
AgentElrond
AgentElrond2w ago
That's likely a KDE crash, but unfortunately it could happen for a few reasons. 1. Are you using KDE? @Mouldlicker69 2. Can you run ujust logs-this-boot or ujust logs-last-boot depending on whether you've rebooted or not? Then scroll way down, and look for errors In particular, if you find "dumped core" or "segmentation fault" or a stack trace, some sort of errors, that is the main clue we're looking for. Ideally, if this crash happens often, you would run the log command to check logs right after, and post the messages after the crash so we can try to figure it out. I've made some changes that reduced KDE crashing so I'm hoping we can help, but it depends why it's happening
Mouldlicker69
Mouldlicker69OP2w ago
Yes, I do use KDE, and i'll give that a go later. I'll let you know if it works, and if so, Thanks 👍
AgentElrond
AgentElrond2w ago
I don't know how familiar you are with Linux, so just to give you an idea what the messages would look like, you can see some here: https://discord.com/channels/1072614816579063828/1432840141101338654/1434260904211517521 It would help to have that "dumped core" section (which can mean a trace about why a KDE crash happened), as well as some of the earlier messages leading up to the crash. In the meantime some other questions: 3. Are you AMD or nVidia? 4. How much RAM do you have, and did you happen to have something like System Monitor running, to know if RAM was running out? 5. Have you installed any custom themes, wallpapers, etc. for KDE? 6. If you are nVidia, in a terminal can you run this to check the descriptor count:
lsof -p $(pidof plasmashell) | grep sync_file | wc -l
lsof -p $(pidof plasmashell) | grep sync_file | wc -l
Mouldlicker69
Mouldlicker69OP2w ago
Thanks for letting me know. I'm somewhat knowledgeable with Linux, i started with my Steam Deck since 2023, and learned some of the basics on how to use it. However, i'm still bit of a monkey when it comes to the terminal lol. Btw, i tried the boot command that you showed me, and didn't see either the dumped core, or segmentation fault. However i do think it might be related to the RAM. Cause although it's a 16GB DDR4 3200Mhz. Whenever i tri to boot up games like Warhammer 3, which require only 8gb. It lasts for like an hour or 2, and closes itself along with Steam, with a message saying low memory shortage. So i think the people who built it might've screwed up and therefore why it's been happening. However, my PC didn't do the whole restart thing until recently. Cause when i got my PC back in July, it didn't do this. So maybe it's already starting to wear out and might need to be replaced soon. Idk. Or perhaps some bottleneck issue. Here's the specs down below just incase 👇 Processor AMD Ryzen 5 4500 Graphics Card ASUS DUAL RTX 3050 6GB System Memory 16GB DDR4 3200Mhz Case MSI M100R Cooling Solution AMD Wraith Stealth Motherboard MSI A520M-A Pro Power Supply 650W And also, i only have the Dracula icons and Miku cursor that i used for the Steam Deck, which also didn't do this. Besides that, I don't think that's got anything to do with it, for now atleast
Mouldlicker69
Mouldlicker69OP2w ago
Ok, i did another command i saw on Google, and i see the Dumped Core bit now. There's lots of them, but i only screenshotted the latest one today. If that's what it's supposed to be. What do i do from here?
No description
Mouldlicker69
Mouldlicker69OP2w ago
Sry if i come off like a tech iliterate neanderthal. I only know how to do practical things with PCs. Coding ain't my thing lol
AgentElrond
AgentElrond2w ago
I have 16GB as well, the thing is if a memory leak makes you run out of memory, that could happen even with 32GB in theory so it's hard to say why it happened you have an Nvidia graphics card like me, and unfortunately their drivers aren't as solid on Linux yet as AMD just FYI, so there may sometimes be glitches @Mouldlicker69 looking at the log, that's a Discord crash, and I notice it used 1GB memory max which is a lot so maaaaybe you were running low. Did you find any other groups of red lines like that? Those usually indicate crash dumps That crash in particular doesn't look like it would have taken out the window manager. You might want to use a text editor or something to search for "kwin_wayland" and see if there are errors
Mouldlicker69
Mouldlicker69OP2w ago
Yeah, i knew it was somewhat related to the memory. So you think i should replace my current RAM with new ones? And btw, there were lots of red lines. I just screenshotted the latest one, cause there were too many to screenshot. And as for the NVIDIA thing, true. Although it's been working fine so far, along with everything else. So far, my finger mostly points to the RAM Also. i'll try and have a look at that soon
AgentElrond
AgentElrond2w ago
Sorry, there are a bunch of factors and this is the painful troubleshooting process when crashes happen This is one of the things with Linux, sometimes weird stuff happens and this troubleshooting process is the price we pay. To clarify: I don't KNOW that it's your RAM, do don't buy more (especially because it's really expensive right now). I think the most helpful thing right now would be, keep playing / working until you see another crash, and then once you get a terminal open again, immediately run this to save the log: ujust logs-this-boot > /tmp/log.txt Then you can open it with a text editor, like kwrite /tmp/log.txt Finally, in the editor, you can scroll until you find the time of the crash. Delete everything earlier than like, 1 minute before the crash. This should leave you with a partial log, with a ton of data around the time of the crash. If you can post THAT partial log in this Discord channel as an attachment, hopefully I or someone else can read it. @Mouldlicker69 I know that's a lot, so let me know if you have questions about the steps.
Mouldlicker69
Mouldlicker69OP6d ago
Ok, i have a problem. It restarted again and tried the commands you showed me, however they do not work for some reason. I tried typing in different ways but nothing works. And when i typed only "ujust logs-this-boot" It won't let me type anything. What should i do now?
Mouldlicker69
Mouldlicker69OP6d ago
No description
amel
amel6d ago
you put the wrong command ujust logs-this-boot > /tmp/log.txt prints the log into a file called /tmp/log.txt which you must open using a text editor (for example kwrite /tmp/log.txt) ujust logs-this-boot > $HOME/Documents/logs-this-boot.txt can also work. do that, then open the Documents folder from Dolphin/File Manager, and open logs-this-boot.txt if it helps you work with a more familiar directory
AgentElrond
AgentElrond6d ago
what amel said @Mouldlicker69 the first command worked, it dumps the (very long) log output into a file called /tmp/log.txt To view it, you can run the command kwrite /tmp/log.txt or open it in another text editor
Mouldlicker69
Mouldlicker69OP6d ago
I just tried it, and i am being serious. Nothing showed up. Is it supposed to give me no hostname after typing the first command or am i missing something?
No description
Mouldlicker69
Mouldlicker69OP6d ago
Also, neither did the documents one worked 🙁
amel
amel6d ago
you wrote "kwrite /tmp/logs.text" the correct file extension would be .txt
AgentElrond
AgentElrond6d ago
what amel said
Mouldlicker69
Mouldlicker69OP6d ago
Yeah, my bad. I copied and pasted from the text here and it was misspelled. So i typed it correctly and found a lot of parts where the restarts happend. I can't screenshot all of them so i screenshotted the latest one around 19:33. They all look the same so i take it those were the crashes that happend.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Mouldlicker69
Mouldlicker69OP6d ago
No description
No description
No description
Mouldlicker69
Mouldlicker69OP6d ago
Sorry if it's too much to read. I didn't want to miss out a thing just incase there might be any clues to what's been going on
Mouldlicker69
Mouldlicker69OP6d ago
No description
AgentElrond
AgentElrond6d ago
I'm so sorry, you're right I mistyped it too!
Mouldlicker69
Mouldlicker69OP6d ago
Nah, don't sweat it. We all misspell something from time to time, It happens 👍
AgentElrond
AgentElrond6d ago
there should be some way to copy and paste the entire thing as an "attachment" I don't know if Discord will let you do that or not Do you have the part of the log just before 19:32:54 ? (sorry if I missed it in one of the pictures) Anyway those are good logs though I'd like to know if anything happened just before that point. For the giant stack trace I don't know if I will have time tonight, but hopefully I (or someone else) can find a reference to it online to see what might cause the KDE crash.
Mouldlicker69
Mouldlicker69OP6d ago
I do, just gotta screenshot those too. Gimme a sec. And sorry if i take too long
AgentElrond
AgentElrond6d ago
I'm guessing a widget or theme or something is misbehaving. I'm AFK for a while, no rush at all
Mouldlicker69
Mouldlicker69OP6d ago
This is all the stuff i manage to screenshot . If you want me to take more, just ask anytime
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Mouldlicker69
Mouldlicker69OP6d ago
And don't worry about that. I don't want to be more of a burden that i've already been so far.
AgentElrond
AgentElrond6d ago
OK, thinking out loud here, doesn't look like anything obvious triggered the KDE crash So the segfault (a crash) is KDE / Plasma itself @Mouldlicker69 it's difficult going through these images Nevermind found it, this seems to be the stack trace from the KDE crash: https://media.discordapp.net/attachments/1436802957369806869/1437954650061144265/image.png?ex=69151f20&is=6913cda0&hm=34a969aba8c2e3d324a6e9f9903423f659e4ebe37c897da493d4a6b5ae0d0d13&=&format=webp&quality=lossless&width=1204&height=709 @Mouldlicker69 when you get time, could you please hide any personally identifying stuff on your desktop, then post a screenshot of your system's desktop? I want to see what your widgets, style etc. look like in case anything is non-default. I know you have Dracula icons and a Miku cursor, which probably aren't related but...you might try turning them off for a couple days. Even though it didn't crash the Steam Deck, you're running a newer version of Bazzite and the Qt library which might interact differently. After some internet searching, I don't see any obvious common crash cause from your stack trace. If someone happens by and knows KDE / Qt details better, maybe they can help. In my case, I ended up disabling a couple systray (taskbar) widgets and it reduced my KDE crashes, but I don't know what to suggest in your case.
Mouldlicker69
Mouldlicker69OP5d ago
Here's a screenshot of my desktop, along with the widgets i use. Also including the plugins i have for my Icons and such
No description
No description
No description
No description
No description
No description
No description
No description
AgentElrond
AgentElrond5d ago
I really don't know which might be causing it If you were really motivated, and the crash happens (for example) once per day, you could disable like 3 of the customizations, then check if you get another crash. But I get that's time-consuming and annoying. Sorry I don't have more ideas.
Mouldlicker69
Mouldlicker69OP5d ago
I'll give that a try. I've already uninstalled some apps i don't really use anymore, so hopefully that somewhat helps too Btw, i also saw on Google that Dust might have a part in it as well. And i haven't cleaned it out since July (When i first got the PC). So i'll try and get the dust out of the system, and hope that also helps
AgentElrond
AgentElrond5d ago
I would be very surprised It's a good general thing to clean, but probably wouldn't crash KDE specifically like this (wear a mask / bandana when you clean)

Did you find this page helpful?