Menu

File container on USB drive is no longer accessible after suspend in Win10

Crashy
2019-07-14
2023-01-09
  • Crashy

    Crashy - 2019-07-14

    Hi... I'm using VeraCrypt on a USB ThumbDrive in a mobile setting. When the computer resumes from suspend VeraCrypt still shows the volume as mounted, but all open handles are dead and explorer can no longer browse the directory. All other files on the USB drive are still accessible. A remount in VC makes the encrypted drive usable again.

    Until recently everything was working fine. Now I moved from Win7 on Dell Latitude to Win10 on Lenovo Thinkpad. Due to the double change I can't tell which one causes the issued. I sucpect Win10 though.

    I'm on VC 1.23 Hotfix 2 64bit
    I have set my USB ports to always charge in the Bios
    USB selective suspend is disabled
    Nothing in the Event Viewer
    The file container is mounted as removable media

    After searching the forum, the issue could be related to these 2 threads but it's not exactly the same as my volume still shows mounted but is in a corrupted state.
    VeraCrypt 1.23: File in file container not accessible after computer is idle overnig
    volumes on USB drives are dismounted unexpectedly

     
  • Crashy

    Crashy - 2019-07-15

    After a reboot, it seems to work. Maybe this was needed to get the "USB selective suspend" to work.

    Still quite weird: the file handles to the hosting USB stick were not affected. Only the VC drive in a file container on the USB stick got into an undefined state.

    I'll continue to monitor.

     
  • Crashy

    Crashy - 2019-07-16

    It happened again. The laptop went into standby for 40 minutes and the encrypted drive was defunctional after wake-up.

    This can be seen in the system events:
    1. Kernel Power - System goes into standby
    2. Disk - controller error on on \Device\Harddisk1\DR5 (HDD1 is the hosting thumbdrive)
    3. Kernel Power - Resume from S3
    4. fastfat - warning (no description available)
    5. Application Popup - error on delayed write

     
  • Crashy

    Crashy - 2019-07-16

    Sorry for pushing, but this is becoming annoying. I just lost my Thunderbird address book after TB on the VC volume crashed after a suspend.

     
  • Kurt Fitzner

    Kurt Fitzner - 2019-07-17

    This is almost impossible to remotely debug. This problem may not affect file handles at all - file handles are at a higher level, and they won't close unless there is an error that occurs during activity on any one of those particular handles. Disk controller errors, however, will cause VeraCrypt to automatically unmount the volume.

    What is causing the controller error could be any number of things. Different USB devices require different power levels during S3 sleep. Some can get by unpowered. Others require some power. Or it could be that particular device just not playing nicely with your system as it negotiates and enters the sleep state.

     
  • Kurt Fitzner

    Kurt Fitzner - 2019-07-17

    Hit send to early, sorry. By way of advice, the first thing I'd look at is your BIOS/firmware settings. Mine allows me to set whether my USB ports remain powered at S3/S4/S5. Also, you can look at disabling USB selective suspend. When a USB device goes into low power and enters a selective suspent state while the computer is on, then it does not get any notice that the computer goes into sleep mode. So it's possible your USB device, if it already placed itself in low power mode, is not playing nicely with selective suspent and is expecting the computer not to go to sleep without telling it.

     
  • Crashy

    Crashy - 2019-07-18

    Hi Kurt, thanks for spending some thoughts on this:
    Just to be clear: VeraCrypt did not unmount the volume. It is still listed in the VC main window. Just the contents of the volume are no longer accessible: open file handles are defunct. Browsing the drive in explorer is still possible, at least to a certain depth that is probably cached.

    I checked:
    1) USB ports powered in BIOS
    2) USB ports powered in Lenovo Vantage settings
    3) USB selective suspend disabled

    However, I found that my Laptop, a Thinkpad L380 Yoga, only specifies one USB 3.1 port as "Always On". The 2nd one not. I had my thumbdrive plugged into the 2nd one so far and did just plug it into the "Always On" one. Downside of this is that I will not be able to use the Laptop as a power bank to my other devices when on the road.

    Today, prior to changing the USB port, for the first time, I got a meaningful warning from VC in the Windows Message Pane:
    Warning: VeraCrypt volume auto-dismounted
    Before you physically remove or turn off a device containing a mounted volume, you should always dismount the volume in VeraCrypt first.
    This time, the VC volume was dismounted and not in an undetermined state.

    While this indicates that you are right, I still wonder why this happens at all. I keep Libreoffice documents open on the Thumbdrive root directory that just resume perfectly after suspend. Only the VC volume in a file container crashes. This is very inconvenient.

     
  • Crashy

    Crashy - 2019-07-21

    OK same problem again.
    This time the computer went into hibernation with very low power. Maybe it cut off power from the always-on USB port.

    After resume, VeraCrypt still shows the drive as mounted but it is no longer accessible.

    After 30 minutes of me looking at the event log for what happened, the same message in the Windows 10 message pane as above appeared and the drive was no longer shown as mounted.

    The VeraCrypt behavior seems to be unreliable regaring USB Power in the combination of Windows 10 and Lenovo Thinkpads.

    If I can help debugging this, I am happy to do so.

     
  • Crashy

    Crashy - 2019-10-27

    Well folks, I moved to a Microsoft Surface Book 2 now. And it's even worse there. Sometimes it only takes 10 minutes while I've been actively using the device and I get a message that the Veracrypt volume (on the same USB 3 Sandisk Ultrafit) was forcefully dismounted. Sometimes I lose the volume without a notification as described above. I don't dare to use my encrypted software anymore as I do not want to risk to corrupt my data.

    Any ideas on this, meanwhile? I have set the USB device to not switch of to save power. I have not yet looked at the Bios, but as far as I read, there is no such setting.

     
  • Crashy

    Crashy - 2019-11-12

    Meanwhile I found a workaround: I use a USB 2.0 cable to connect the USB drive. No more disconnects.

    Not a nice solution as I have a cable hanging out of my Surface Book, now. But at least the random disconnects have stopped.

    Not to mention that it's approximately 1/4 as fast as USB 3.

     

    Last edit: Crashy 2019-11-12
  • Philip Smith

    Philip Smith - 2019-11-13

    Was the usb near something like another object, because even the slightest movement can ssometimes make the connections 1 or more unstable and that slight movement disconects the USB .

    Just as a slight movement of the cable at the point where it plugs into the usb socket can break the connection. mine was being broken by something as simple as the mouse cable hitting it.

     
  • Crashy

    Crashy - 2019-11-18

    Hi Philip, I believe not, as the same would apply to the USB 2.0 cable hanging out of the computer, now.
    Also be aware, that this is the 2nd computer where I have this problem.

    Initially I thought it was due to upgrading to USB 3.x in the Thinkpad and the Surface. But I just checked and noticed that at least the Dells I had before (Latitude E7440 and E7450) did also have USB 3.0.

     
  • Ben Schaf

    Ben Schaf - 2022-02-21

    Hi, I am currently having the exact same problem, did you ever find a solution to this @crashy?

     
  • Crashy

    Crashy - 2022-12-06

    Hi Ben, honestly my post is a bit delayed. The only solution that worked for me on the Surface Book was to move the VC file container to the internal HDD. Up until recently when the HDD became almost full, I moved the container back to the USB stick where it seems to be more stable now.

    In the meantime I had done whatever I could to prohibit the computer from going into standby as I had lost some data on multiple occasions where the computer decided that I was not using it, installed an update and automatically rebooted itself. Big thanks here, Microsoft!!!

    VC on USB seems to have benefitted from this as well. The only times when I lost the VC mount was when the computer was on battery for an extended period of time, e.g. multiple hours or even goes into suspend to disc due to an empty battery.

    On such occasions I did find some warning messages in event viewer: the computer was asking the USB device to power off, the USB did not allow this and only then Windows forcefully cut off power from it.

     
  • Crashy

    Crashy - 2023-01-09

    Quick update on this issue on the Surface Book 2: USB Selective Suspend can only be managed by changing the Power Management Options in USB Devices and Hubs in Device Manager.

    Untick the "Allow the Computer to turn off this device to save power" option there.

    It seems I now only have the issue when the device goes into suspend which is fairly acceptable.

    However, this obviously has some negative effect to power consumption.

     

Log in to post a comment.