I have a very disturbing problem running LyX with Ubuntu 12.04 on my Dell Inspiron. Ever since I purchased this laptop and installed Ubuntu 12.04, it periodically freezes and nothing can be done to wake it up except a hard reset. That by itself is not a huge deal as I am always saving important files, etc.

However, three separate times now, when I am working in LyX and the freeze happens both the file that was open in LyX and the backup file (filename.lyx~) are completely destroyed. After reboot, the files still appear in the file system but are of size 0 kb.

Needless to say, this is a dire situation to encounter and requires constantly backing files on a flash disk or remote machine.

Has anyone else had this problem? Or, any ideas what might have happened to those files? Perhaps LyX backs them up somewhere else temporarily, and they are stuck there when the OS crashes?

I couldn't find a single crash log or any other useful information. But I will gladly post other technical details if they are of use in diagnosing the problem.

Thank you!

  • Why not post that as answer?
    – Braiam
    Jan 31, 2014 at 22:47
  • I still think the issue is unresolved to some extent: it isn't clear why a backup file stored outside of the present working director should be uncorrupted while those stored in the pwd are destroyed. But, since the fix appears to work, yeah, might as well... Thanks!
    – Dave B.
    Feb 3, 2014 at 22:42

2 Answers 2


I had some luck with a workaround that I thought I would share. Instead of letting LyX back up files in the present working directory (the default setting), I created a backup directory in ~/.lyx/ and changed LyX's default settings (under Tools > Preferences > Paths) to save backups there.

My laptop inevitably hard-froze again and the .lyx file I was working on was again destroyed. However, upon reboot I was able to restore the document from the new backup directory.

It's certainly not a perfect solution, but not a bad temporary fix and perhaps gives a little insight into the larger issue of how the files are being corrupted when the OS freezes.

  • Have you given any thought to using a cloud backup solution like Ubuntu One or Dropbox? I know, another workaround, but it should be more secure. With Ubuntu One you can sync arbitrary folders and files in your home directory, e.g. your ~/.lyx folder. Feb 4, 2014 at 13:47
  • Thanks for the suggestion, I think it's a good one especially for those who don't have access to more traditional remote servers. In my case, I was backing up constantly to my home server and to a work server (yes, a little paranoid, but apparently for good reason) which saved me from completely losing the work when the crash occurred.
    – Dave B.
    Feb 4, 2014 at 20:40

I had recently the same problem (Ubuntu 14.10, LyX 2.1.1). Let's say the name of the file is paper.lyx. I found that my work was saved not only in paper.lyx and paper.lyx.emergency, which were indeed empty after the crash (not entirely, though, 12Ko instead of 130), but also in the hidden file paper.lyx~.

I renamed this file paper2.lyx, and it was almost complete (only my very last update was missing).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.