Citra crashes laptop after *second* boot

Issue:
Upon first boot after install, I cn play as much as I want, open and close the emulation, etc.
On second boot, if I load up an emulator, it crashes my laptop. Not a full reboot, but the screen goes black, I get kicked to my os sign in splash, and once I sign back in all my applications (citra, discord, any tabs I have open) are gone.
I uninstlled and reinstalled and was able to play again… on the first boot. The second boot gave the same issues again.
I tried looking through the log file and noticed a MemoryFill error, but upon searching through about a dozen threads with that error most A., don’t involve their entire pc crashing, just citra, and B., don’t get further than uploading an incorrect citra log.
I did see one post mention turning off shaders, which I tried, but I got the same results.

I would rather prefer not to have to remove and reinstall citra every time I want to play a game.
I can however remove and reinstall citra to get a log of it when it’s working properly to compare, if that’d help.

System Information

  • Operating System: Linux Mint Cinnamon 20.3 (Una)

  • CPU: Intel Core i7-6700HQ

  • GPU: NVIDIA GM107M [GeForce GTX 960M]

  • Citra Version (found in title bar): Citra Nightly 1751

  • Game: Pokemon X and Pokemon Super Myster Dungeon

  • Screenshot of Issue (include the full Citra window including titlebar): N/A

Diagnostic Log
citra_log.txt (13.4 KB)

In order to save a copy of the log, follow this guide:
https://community.citra-emu.org/t/how-to-upload-the-log-file/296

System Information for Support

Client Version                               Nightly 1751   HEAD-2fc7def6f
Operating System                             KDE Flatpak runtime
CPU                                          Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz | AVX2 | FMA
Graphics API                                 OpenGL 3.3.0
Graphics Renderer                            NVIDIA GeForce GTX 960M/PCIe/SSE2
GPU Driver Version                           510.47.03
CPU JIT                                      [x]
Hardware Renderer                            [x]
Hardware Shader                              [x]
Hardware Shader, Accurate Multiplication     [x]
Shader JIT                                   [x]
System Region                                -1
Shader Disk Cache                            [x]

I did not find anything wrong in your log file. Please wait for a human moderator to assist.

Can you post a copy of the dmesg output (as an attachment) after the Citra/system crashes? It might contain some clues.

Hoo boy that command prints a lot of info. Here you go though, as an attachment not in a code box, yeah?

dmesg output.txt (92.7 KB)

As an update, it’s been two weeks since my last post and the issue persists.
My hopes of the problem resolving itself have dwindled.

Sorry for the late response. The dmesg log does not show any anomaly.

Can you install inxi and upload the output of inxi -v3? It seems to me that your Mesa version is probably very low and may contain some bugs.

Here you are.
inxi -v3.txt (1.8 KB)

Ah, I see. I suspect that either the GPU driver was out of memory or video RAM was running out.

The NVIDIA GPU used in your system had a history of video memory related issues on Linux system (especially the OpenGL component).

What you could try to do is:

  • Disable the “Disk Shader Cache” in the settings.
  • Each time you want to use a GPU-intensive program, try to power-cycle your system beforehand (not reboot: please power down your system, disconnect it from power supply, wait for 10 seconds, then plug in the power supply and power it back on. This will make sure the GPU state is cleared).

The first option, as I mentioned, I have tried in the past. Though I should have been more clear, by shaders I meant both the “Enable Hardware Shaders” field and the “Disk Shader Cache” field. I tried it again now to the same result.

The second option of power cycling my program failed to work as well. Kicked to sign in splash, all programs gone.

If it’s an issue of running out of vram or ram I’m curious why it only crashes following the second boot, or why reinstalling it would clear the cache. Very puzzled right now. :confused:

Unless Liu has another idea, this is sounding a lot like either an issue with your OS or maybe some sort of hardware defect. I’d reinstall your distro if I were you, just to be sure.

Hate to take the hassle of the nuclear approach but I’ll give it a shot, then go through past troubleshooting steps to see if any stick after reinstallation. Will report back after.

Unfortunately the problem persists. Program works fine on fresh install after first boot, but upon closing it and opening again, trying to load a rom crashes me to my login splash.

Are you still using the Flatpack build? If so, try building it yourself: Building for Linux - Citra

Make sure to include the AAC dependencies as well.

Hi, sorry for the long delay, life got messy and I started doing some digging.

I’ve followed the instructions for building it myself, resulting in a new “citra” folder with an executable in “dist”

When launching from that “citra.desktop” executable… it works! No more crashing on second boot!
And then I went to add citra to my start menu… and found the original start menu shortcut from the flatpack version was still there. Also, trying to make a shortcut for the .desktop file in citra/dist failed repeatedly, so i tested using the command for the original shortcut, “citra-qt %f” instead for this new shortcut… and that worked.
Confused, given there seemed to be no difference between the shortcuts in the menu manager, I tried the original shortcut again… and it crashed my system when i tried to boot a game on citra.

I found that beyond the details in the menu manager, all three of these options (custom citra-qt shortcut, original shortcut, and new citra.desktop file) had their own .desktop file.

So, I looked at the difference between them.
The citra.desktop file from the flatpack is hosted in user/.local/share/applications
The citra.desktop file from the self build is in user/citra/dist
The custom shortcut with just the citra-qt command is in user/.local/share/applications

The only visible difference, other than file location, between the two formal citra.desktop files is that the original shortcut had NoDisplay=False. Removing that didn’t change anything though and that line was in the custom .dektop file as well, which doesn’t result in the crashing behaviour.

As near as I can tell both files execute the exact same command, opening the same program, but one for some reason causes Citra to crash if you open a game after launching the program a second time.

I am able to ignore/disable that original shortcut, however the fact that it remained on my system after removing the program from my system via the package manager, and the fact that it seems to be identical to the new citra.desktop file, still launches citra, but results in crashing, is of concern.

I cannot attach the files so i will be copying and pasting the code via text boxes.

citra/dist/citra.desktop

[Desktop Entry]
Version=1.0
Type=Application
Name=Citra
GenericName=3DS Emulator
GenericName[fr]=Émulateur 3DS
Comment=Nintendo 3DS video game console emulator
Comment[fr]=Émulateur de console de jeu Nintendo 3DS
Icon=citra
TryExec=citra-qt
Exec=citra-qt %f
Categories=Game;Emulator;Qt;
MimeType=application/x-ctr-3dsx;application/x-ctr-cci;application/x-ctr-cia;application/x-ctr-cxi;
Keywords=3DS;Nintendo;
PrefersNonDefaultGPU=true

.local/share/applications/citra.desktop

[Desktop Entry]
Version=1.0
Type=Application
Name=Citra
GenericName=3DS Emulator
GenericName[fr]=Émulateur 3DS
Comment=Nintendo 3DS video game console emulator
Comment[fr]=Émulateur de console de jeu Nintendo 3DS
Icon=citra
TryExec=citra-qt
Exec=citra-qt %f
Categories=Game;Emulator;Qt;
MimeType=application/x-ctr-3dsx;application/x-ctr-cci;application/x-ctr-cia;application/x-ctr-cxi;
Keywords=3DS;Nintendo;
PrefersNonDefaultGPU=true
NoDisplay=false

.local/share/application/alacarte-made-946d2d8a-aebd-11ec-ac54-a947073cf5d4.desktop

[Desktop Entry]
Name=Citra
Exec=citra-qt %f
Comment=
Terminal=false
Icon=citra
Type=Application
NoDisplay=false

If there is any further followup I can do to help understand this bug and work towards a solution for those encountering it in future, do let me know.