Forum Discussion
- 3 years ago
Desktop is another folder inside the personal onedrive that is defaulted to sync, or is it not? So this would create yet another instance of the cache folder to be uploaded...
Anyway, i'll try this workaround by copying it temporarily to elsewhere, since it's not acceptable to have more than 1GB of cache data synced.
- 3 years ago
UPDATE!! Verified on a clean Windows 11 install and NO group policy needed!
#Constant notifications from OneDrive while playing a game with Dx12 files in user documents directory.
Showing it's working-> new cache after deleting the old synced cache:
The OneDrive icon on the .PcDx12 files seen in the image above have a different icon now. Instead of a green check, it's an all grey circle (-)
What OneDrive icons mean?
#Simply put, need to create a couple registry keys and values (verified by Microsoft article below)
Issue:
Having DirectX 12 cache being uploaded to OneDrive while playing a PC game--Battlefield 2042. It is ok if the cache gets stored to help the game run, however the network connection performance was affected. This was due to OneDrive uploading the cache data as it was being downloaded in real time.
On the PC, checked the folder:
%userprofile%\OneDrive\Desktop\Documents\Battlefield 2042\cache
C:\Users\YOURUSERNAME\OneDrive\Desktop\Documents\Battlefield 2042\cache
There were cache file types: .PcDx12 in this folder along with the 'Green' check marks. This noted OneDrive the files were uploaded and backed up.
After some research on the Microsoft IT support site, (learn.microsoft.com), an article explained in detail a simple solution. It explained that although folders cannot be excluded from sync, certain file types CAN be excluded. This made sense because some users may not want to upload executable '.exe' files or .bat batch files--as examples. Also, work environments may enable many features on their domain(s). No Group policy editing, yes!
https://learn.microsoft.com/en-us/sharepoint/use-group-policy
To review this information in the article above, search for: Exclude specific kinds of files from being uploaded
*We're NOT going to use group policy--only enable a feature.
In the article, it explains to add a registry key to enable the built in functionality of OneDrive to omit file types from syncing. After creating the key, we can add the file type. In this case we can add a value to filter the .PcDx12 cache files from syncing to OneDrive. This method proved functional and worked properly. The article discusses group policy as well, but that is NOT needed on a personal computer.
With this method, the solution was found to omit the *.PcDx12 files from upload. It still permits new temp files to be downloaded, an all other files are not affected. The game works just as it was intended, and without any cache uploads to OneDrive.
After successfully enabled the feature, the new .PcDx12 files have small all grey (-) OneDrive icon noting these files will not be uploaded.
Hovering over one of the files, a tooltip window shows the file status, and it reads 'Excluded not synced'. Perfect. It is worth noting, all the previously downloaded cache files will still have green check marks, so deleting all the old .PcDx12 cache files in the Battlefield 2042 cache folder first was the best option after enabling the feature. Then, all the new downloaded cache will not get uploaded and synced.
#Overview
Registry show here:
From the article, it shows the following path must exist in the registry editor:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive\EnableODIgnoreListFromGPO
From there we’ll create a new string value and data for the value image below.
same registry image as right above ^
There was a post in this thread a few pages back that had a fast method to create a .reg file and simply create the keys from a file--that works, too. This will do the same using the same method manually.
#Details
Click start > type run and open the run command
Type regedit
navigate to:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive\EnableODIgnoreListFromGPO
Make sure the above registry path exists. If not, make sure to create the keys (folders) in the registry exactly as shown above.
#In my case, there was not a OneDrive key or the EnableODIgnoreListFromGPO key
There was only: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\
You may need to create the keys. To create a new key right click on the next folder up that does exist and select New > ‘Key’ make sure to type in the name exactly or copy and paste the single key name from above one at a time(if necessary). The keys will have folder icons.
Next:
Click to select the key (folder) "EnableODIgnoreListFromGPO" so it is highlighted in the left-hand pane.
Next move the mouse into the right-hand pane empty space and right click.
Select New > String Value
Name the new string value:
*.PcDx12
please make sure to have the asterisk and the dot before so it reads *.PcDx12 this ensures all files with this extension .PcDx12 will not get synced.
Next, we need to enter a value for the string.
Right click the new value named *.PcDx12 and click modify.
In the pop-up box, below the 'Value data:'
Type in:
*.PcDx12
Click 'OK'
(The value data will be the same as the name of the String)
Just to verify, there should now be a new String Value Named *.PcDx12 and the value's data *.PcDx12 located in the keypath: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive\EnableODIgnoreListFromGPO
Proceed to click OK (if have not yet) and exit out of the Registry Editor
Once complete, the PC will need to be restarted for the settings to take effect.
Review the current cache for Battlefield 2042
In this folder, if you have not yet deleted any cache, there will still be files in the folder already synced to OneDrive with green checks on the files.
From here, you can delete the old .PcDx12 files, or open and run Battlefield 2042 and play a match or two, and come back to compare the new files to the old files. In this way, it will verify the feature is working properly. However, I recommend you can delete the cache files, and then run Battlefield 2042 and play a match or two and revisit the cache folder. Once having played some matches, review the folder to see the new icon on the files and the details Excluded from sync icon. I recommend after verifying its working to make sure to delete all the old .PcDx12 files with the green checks and empty recycle bin.
To find the cache again In the Run Command copy and paste to access the cache folder or navigate to the second path below.
%currentuser%\OneDrive\Desktop\Documents\Battlefield 2042\cache
OR navigate to the following folder:
C:\Users\YOURUSERNAME\OneDrive\Desktop\Documents\Battlefield 2042\cache
The new .PcDx12 DirectX cache files will now be excluded from uploading and syncing to OneDrive. The OLD synced files will have to be deleted to stop them from syncing.
*************************
New cache files after deleting all the old cache and starting from new cache:
--------------------------
Thought I'd beat a dead horse and show the image below with the Cache files after making the change, but without deleting the cache first. Without deleting the cache files first, some were simply modified and resynced, so deleting the cached files first allowed the new cache to be stored only local. According to OneDrive, any file that has been approved to sync, will continue to sync until it is deleted. The new files won't get synced after making the changes above. Here's an image (below) before I deleted the cache after making the change. You can see some old files still synced. After deleting the cache, no more Dx12 files synced. The 2 other .db and .manifest files in the folder will sync, and that's just fine.
Thank you for reading.
- sk1lld3 years agoLegend
@JBshellshock
Or you could just uninstall OneDrive like I did.
About Battlefield 2042 General Discussion
Recent Discussions
- 6 hours ago
- 19 hours ago
- 19 hours ago
- 2 days ago
- 2 days ago