Menu

VeraCrypt 1.23: File in file container not accessible after computer is idle overnight

Bernhard
2018-10-29
2022-07-27
1 2 > >> (Page 1 of 2)
  • Bernhard

    Bernhard - 2018-10-29

    VeraCrypt 1.23: Device not accessible after computer is idle overnight
    I am running VeraCrypt 1.23 (no-hotfix version) on a Lenovo W520 with Windows 10 Pro x64, 1709. After not using this computer for 4 weeks, I recently started using it again and applied the Windows October security patch and also upgraded to VeraCrypt 1.23 (Version from Sept. 12, i.e. apparently not the hotfix one).
    Ever since then, if I leave my computer idle overnight, the next morning I am getting a "Device not accessible" error on one file container. It doesn't happen, if I just leave the computer idle for a few hours during the day, but I've had it happen 3 times, when the computer was idle overnight. After a restart of my computer everything works again (at least until the next overnight idling).
    When this problem happens, the files on the host drive outside of the VeraCrypt file container are still accessible without a problem, only the files within the container are no longer accessible. FWIW the driver is an external USB drive with an SSD that is connected to the USB-3 port of my computer.
    I'm not sure what's is the problem here, but it seems to be connected to the recent updates/upgrades of Windows Security Updates and/or VeraCrypt. Can anyone advise me on how I can track down the culprit?

     
  • Enigma2Illusion

    Enigma2Illusion - 2018-10-30

    In the VeraCrypt application, click on the word Settings > Preferences.

    Can you post a screenshot of the Preferences screen?

    Did you previously in Windows disable sleep or hibernate mode? Windows OS upgrades are notorious for resetting some of your custom options.

     
  • Bernhard

    Bernhard - 2018-10-31

    Thanks so much for your response.

    I've (hopefully) attached an image file with the preferences.

    My Windows Power Plan is set to never put the computer to sleep, while on AC power (30 min while on battery power). But since I have a UPS , it should have stayed on AC power all the way.

    As far as I can tell the system went neither to sleep nor into hibernate mode during any of those nights. But perhaps I am not understanding your question re sleep and hibernate modes?

    One more nugget of information: Last night / this morning I observed the problem again on my USB3 -SSD and this time I also checked a file container on another drive (linked via USB2 though a powered hub to a USB2 port of my computer). That file container on my USB2 drive was unaffected and worked fine, even while the container on the USB3 drive was not accessible.

    If you need any more information or can advise me on how to set log levels, etc. to catch the problem next time around, please let me know.

     
  • Enigma2Illusion

    Enigma2Illusion - 2018-10-31

    In Windows, open the Settings > System > Power & sleep > Additional power settings > Change plan settings > Change advanced power settings > USB settings > USB selective suspend > Disable for both battery and pluggin in.

    https://www.windowscentral.com/how-prevent-windows-10-turning-usb-devices

     
  • Bernhard

    Bernhard - 2018-10-31

    Thank you. They were both set to "Enabled", so I set them to "Disabled" and rebooted (for good measure). I'll let you know, what happens (might take a few days, if all goes well).

     
  • Bernhard

    Bernhard - 2018-11-01

    Unfortunately USB selective suspend does not appear to have been the problem, because I saw the same issue again this morning:

    • Files inside SSD file container were not accessible
    • Files outside the SSD file container were accessible
    • Files inside a different file container on a different drive were accessible

    So how do I proceed now? Try a different USB port for the SSD?

     
  • Enigma2Illusion

    Enigma2Illusion - 2018-11-01

    Check the event logs in Windows looking for errors of the VeraCrypt dismounting during the night.

    What error(s) are occuring?

     
  • Bernhard

    Bernhard - 2018-11-02

    I am seeing lots of DistributedCOM errors (problem with "Local Activation permission"), but they happen around the clock, so that's not it.

    I didn't notice errors in the Windows Application Log, but the Windows System Log has an series of warnings/erros starting at 2018-11-01 09:42:50 local time that start with:

    • 2018-11-01 09:42:50, Level: Warning, Source: Microsoft-Windows-Ntfs, Event-ID:140): The system failed to flush data to the transaction log. Corruption may occur in VolumeId: O:, DeviceName: \Device\VeraCryptVolumeO.
      (An operation was attempted to a volume after it was dismounted.)
      And the Details show Error: Error 0xc000026e .

    However from the local time, this is likely either when I logged back in in the morning or when I tried to open the file on the file contrainer on drive O:

    However I did notice some information messages in the System Log that might pertain to this. They are of source "Ntfs (Microsoft-Windows-Ntfs)" and have Event-ID 98:

    • 2018-11-01 1:46:46 Volume P: (\Device\HarddiskVolume9) is healthy. No action is needed.
    • 2018-11-01 3:53:41 Volume P: (\Device\HarddiskVolume10) is healthy. No action is needed.
    • 2018-11-01 5:24:47 Volume P: (\Device\HarddiskVolume11) is healthy. No action is needed.

    These events look relevant, because Volume P: is the volume on the SSD that hosts the VeraCrypt file container mounted as O: Since the \Device name of P: changes, it looks like it was dismounted and remounted and perhaps that causes the problem with VeraCrypt.

    The only events these times coincide with are Security-Auditing events ("Audit Success"), which also happen at other times.

    This morning (Nov, 2nd) I did not have the problem and I also did not see any of the Ntfs events 98 in the log.

    So those log info msgs look like they're pointing to the problem, but what causes this is not clear to me.

     
  • Enigma2Illusion

    Enigma2Illusion - 2018-11-02

    Google seach the "NTFS Event-ID 98" and then search for "Windows error 0xc000026e".

    For some reason your SSD is going offline or powering down.

    In your power settings, do you have it set to turn off disk drives after a certain amount of time?

    Another possiblity is your SSD has an internal timer set to enter power save mode which can cause this issue. I had this problem with Western Digital external HDDs until they released a tool that allowed you to disable the power save mode setting that is saved in the external drive memory.

    With the VeraCrypt volumes dismounted, run chkdsk on all drive letters on the SSD by opening the command window as administrator.

    Command example:

    chkdsk P: /f /r
    

    This will scan and attempt to repair any anomolies found on the disk.

     
  • Bernhard

    Bernhard - 2018-11-02

    Thanks so much for your response. The Power Plan had (strangely enough) indeed a power off setting for disk drives of 99 minutes when plugged-in. I do not remember setting that, so I'm wondering, if that was a "present" by the most recent Windows update.

    The strange thing is that with 99 minutes the powering down should have happened much more frequently, not just during the night. Also the last two pairs of events are only 91 minutes apart.

    In any case I've now set this option to "Never" for both battery and AC mode and am going to reboot my computer for good measure, so hopefully that will take care of it.

    My SSD is a Samsung 850 Pro (incidendally the same model as my boot drive, which also happens to be enrypted with VeraCrypt). The Samsung Magician software doesn't give much information about USB drives, but I checked my boot drive and it doesn't provide any options to set power modes, so I hope that's not a problem here.

    Re. chkdsk: I ran it on drive P: and luckily it didn't find any problems.

    In any case I will post the results of the latest change. If all goes well, this might take a few days.

     
  • Bernhard

    Bernhard - 2018-11-03

    Yes, USB selective suspend was already disabled. :)

    FWIW, this morning I didn't have the issue. that that happened in previous nights (before disabling hard drive turn off), so I'm going to keep monitoring this.

     
  • Bernhard

    Bernhard - 2018-11-05

    Unfortunately I had the same problem again this morning and found - once again - NTFS Event-ID 98 in the Windows system log.

    I checked the power plan once again and both USB selective suspend and "Turn off hard disks" are disabled. I did notice however another setting "PCI Express -> Link state Power Management" and it is set to "Maximum power savings". Not sure, if this (indirectly) affects USB devices as well and perhaps I should set this to "Off"...

    Other than that I'm not sure what else to do. Perhaps connect the SSD to a powered ub instead of directly to the USB-3 port of my computer?

     
  • Enigma2Illusion

    Enigma2Illusion - 2018-11-05

    I did notice however another setting "PCI Express -> Link state Power Management" and it is set to "Maximum power savings". Not sure, if this (indirectly) affects USB devices as well and perhaps I should set this to "Off"...

    Agreed. Set to off for both battery and plugged in.

    While you are in the advanced settings, check the Sleep settings for:

    • Sleep after > Never (for plugged in)
    • Allow hybrid sleep > Off (for both battery and plugged in)
    • Hibernate after > Off (for plugged in)
    • Allow wake timers > Disable (for both battery and plugged in)
     
  • Bernhard

    Bernhard - 2018-11-05

    Wow you're fast. :) :) :)

    Ok, PCI Link State Power Management now set to off.

    The Sleep settings were as you suggested, except for "Allow Wake timers", which was set to "Important wake timers only". ( I now remember changing that a few months ago, when I was trying out wake-on-LAN and never changed it back). I now changed that one to "Disabled" as well and will reboot for good measure.

    As usual I'll keep you posted of the results.

     
  • Bernhard

    Bernhard - 2018-11-10

    Things went well for a couple of nights, but today I had the same problem again (and once again event 98 in the Windows system log). :(

    So at this point I'm wondering, if this is a hardware problem - perhaps with that USB port - and if perhaps I should move the drive to a powered USB hub, which is connected to a different USB port on my computer.

    Thoughts on that or other suggestions?

     
  • Enigma2Illusion

    Enigma2Illusion - 2018-11-10

    So at this point I'm wondering, if this is a hardware problem - perhaps with that USB port - and if perhaps I should move the drive to a powered USB hub, which is connected to a different USB port on my computer.

    As a test, you could swap the ports to see if that causes the powered USB hub to go offline or power down. If the issue occurs on the powered USB hub, then the problem points to the specific USB port on your PC.

    Is the external SSD powered by a power adapter plugged into the wall outlet? Just want to make sure the source of power is external from the PC to the external drive.

    Using the Samsung Magician by switching to the external SSD, click on the SMART located under the Total Bytes Written. Note the POR Recovery Count value in the RAW column. When the drive has another incident, check the RAW value. Is this number increasing?

    POR Recovery Count
    A count of the number of sudden power off cases. If there is a sudden power off, the firmware must recover all of the mapping and user data during the next power on. This is a count of the number of times this has happened.

    I would check the Samsung forums for issues with SSD going offline or powering down based on the Windows Event Logs you posted to see if other people have encounted this problem.

    I would check you PC users forums for issues related to devices powering down or going offline when using the specific port on your PC.

     
  • Bernhard

    Bernhard - 2018-11-11

    The SDD ist NOT powered by an external power adapter. I'm using a Satechi USB Type C enclosure ( https://www.amazon.com/gp/product/B01FWT2N3K ) and a Belkin USB-A to USB-C Cable (USB 3.1) that I bought in the Apple Store. Now I've removed the drive from the USB-3 type A port of my Lenovo W520 and connected it to my Anker 10 port USB hub ( https://www.amazon.com/gp/product/B005NGQWL2 ) and that is connected to a different USB port on the W520.

    So should I be using an enclosure with external power adapter for this? I thought that the power delivery in USB 3.0 is sufficient and I would not need an external power adapter. Or does this only apply to USB-C?

    As far as POR Recovery Count goes, I am actually running a software called "Hard Disk Sentinel and it shows that POR Recovery Count has been going up. I checked the history and on Oct 18 it was 13, on Oct 28 it was 18 and today (currently) it is 22 (all decimal values). So it has gone up significantly in the last few days and weeks.

    I'm going to look into the Samsung and Lenovo forums as you suggest and I'll let you know, if the next event will cause this counter to go up once again.

    Once again, thanks so much for all your help, I really appreciate it.

     
  • Enigma2Illusion

    Enigma2Illusion - 2018-11-11

    So should I be using an enclosure with external power adapter for this? I thought that the power delivery in USB 3.0 is sufficient and I would not need an external power adapter. Or does this only apply to USB-C?

    I do not know if the power output from the PC is sufficient for the external drive that you linked in your post above.

    You might need to review the power requirements for the external SSD with the power output capabilities for the PC. Maybe an antivirus scan is running late on certain nights that is causing too much power draw causing the PC to reduce or cut power to the device. Just a wild guess on my part.

     
  • Bernhard

    Bernhard - 2018-11-11

    Thanks again for your super-fast response. Your question re. power requirement is a very valid one and I went back and checked the numbers.

    According to Samsung's data sheet the 850 Pro uses max. 3.5W, and that's for the 2TB version ( https://www.samsung.com/semiconductor/minisite/ssd/product/consumer/850pro/ ). Tom's Hardware measured 3W power consumption for the 1TB version ( https://www.tomshardware.com/reviews/samsung-850-pro-ssd-performance,3861-10.html ).

    My SSD is only 512 GB, so power consumption should be less than that, but let's play it safe and assume 3.5 W max. According to https://en.wikipedia.org/wiki/USB_3.0#Power_and_charging a USB 3.0 port can provide 900mA, so at 5V that would be 4.5 W.

    As far as the USB-A to USB-C cable goes, that was at the time positively reviewed by Benson Leung (a Google engineer), who has been reviewing USB-C related accessories for a while in regards to possible spec violation. So the cable shouldn't be a problem either, it is actually also suitable as a charging cable. So almost all of the 4.5W should make it to the SSD.

    So with about 1W of available power not utilized, it would seem that the port has ample power reserve to drive the SSD. Or am I looking at this the wrong way?

     
  • Enigma2Illusion

    Enigma2Illusion - 2018-11-11

    Does the PC manual have specifications for power output for the applicable ports?

    I would consider contacting Samsung support to determine what is causing your external SSD drive to go offline. Perhaps they can provide better ideas of what is causing the device to go into power save mode or offline.

     

    Last edit: Enigma2Illusion 2018-11-11
  • Bernhard

    Bernhard - 2018-11-11

    The PC manual as well as the data sheet unfortunately don't give any details about the USB 3.0 ports re. power output.

    Contacting Samsung support is a great idea, but before I do that. I'd like to gather a few more data points.

    • Currently I'm testing with the powered USB 3.0 hub (power through the USB A to C cable).
    • If that fails I can also test it with my powered USB 3.0 to SATA adapter ( https://www.amazon.com/gp/product/B005B3VO24/ ), which would also rule out cable and enclosure as a problem.
    • If the latter were to fail as well, it wouldn't seem to be a power problem, a cable problem or an enclosure problem.

    Once I have that tested, that might give the Samsung support more data points to work with (I hope), because at that point the drive (and the computer) are the only common denominators left.

    Does that make sense?

    On this topic could I also ask you a bit of a philosophical question that i've been wondering for some days now:

    Let's assume for a second, that changing one of the options in the power plan (e.g. USB selective suspend) would have actually solved my problem. Apparently is has in the past for some users or you wouldn't have suggested it.

    Then the thing that I am wondering about is, why does Windows implement a feature (like USB selective suspend), but doesn't implement it in a way that it is
    1. either completely transparent to the software on top of Windows
    2. or (perhaps in the case of lower-level drivers) provides a mechanism (API), so that these lower-level drivers be notified of such an occurence and thus can handle this event properly? Then such an event would once again transparent to the application software. (FWIW VeraCrypt would probably fall in this category of "lower-level drivers".)

    This is of course unrelated my particular problem, since an "unexpected power drop" of some sort wouldn't fall in the category of a Windows feature, but I'm curious about it nontheless.

     
  • Enigma2Illusion

    Enigma2Illusion - 2018-11-12

    I recommended disabling the USB Selective Suspend due to my external drives going into power save mode.

    The rest of questions should be directed to the Microsoft community forum.

     
  • Bernhard

    Bernhard - 2018-12-04

    It's been several weeks now and after running that SSD from a powered USB hub, it's been rock-solid.

    I'd just like to say thank you for all your help. I very much appreciate all the time and effort you put into helping me with this issue, even when it was clear that this wasn't related to VeraCrypt at all.

    Thanks again,
    Bernhard

     
  • Juido van Doom

    Juido van Doom - 2022-07-26

    Hi im picking this up, because i did stumble over that exact same problem. just in my case its not an external usb hdd but an internal. i will try the suggested settings and keep you posted tomorrow :D

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.