In recent operating systems and more recent games you may have encountered the following message every now and then.
Sometimes the message won’t show at all depending on your windows settings and or game.
“The NVIDIA OpenGL driver lost connection with the display driver due to exceeding the Windows Time-Out limit and is unable to continue. The application must now close.
Error code: 7″
This is actually a good thing which prevents freezes of your whole operating system. In some cases however we want to workaround it by increasing the time before timeout. You can read more about this on Microsoft Support.
We do this by editing a key in the windows registry. For example I have to change this to 8 seconds or so in order to take high resolution screenshots in SpaceEngine.
Warning! Before proceeding you should know that setting this to a bad value could mess up things on your computer. Create a system restore point and backup your data!
NOTE! This affects all graphics programs and games on your computer. I recommend restoring the value after you’re done testing.
Proceed on your own risk!
Option 1: Right and select save as on any of the registry patches. Double click on them in explorer to install
TdrDelay-8sec.reg – TdrDelay set to 8 seconds (this should be enough for SpaceEngine)
TdrDelay-32sec.reg – TdrDelay set to 32 seconds (try this if error still shows)
TdrDelay-uninstall.reg – This removes the registry value which will use windows default. (Windows default is 2 seconds)
Option 2: Manually edit the registry
Open regedit.exe and navigate to:
Create a new key DWORD32 and name it exactly TdrDelay
I tried 64 but it wouldn’t work for me even though I use a 64 bit OS.
Remember that this key name is cAsE sEnSiTiVe.
Double click on the key, choose decimal value and set it to the delay that you want.
I recommend trying 8 to 32. Delete the key when you’re done.
Here is a tiny gif animation. Please excuse the Swedish 🙂
If you have any additional information to add or if I got anything wrong, please don’t hesitate to leave a comment!
This makes it a very useful simple syncing tool. The following is the script that I use to sync my laptop documents when I’m leaving the office. There are a lot of applications and tools for this but sometimes you just want a portable script.
Please note that this is a one-direction sync. It will not change or remove anything from the source folder.
- Copy and paste the following batch (*.bat) script into your favourite text editor of choice or notepad. (Not Microsoft word) You can also download it directly from here or here mirror. (You might have to right click and select save destination as)
@echo off ::Unicode CHCP 1252 echo %~dp0 ::Remove old log file if exist "%~dp0\robocopylog.txt" del "%~dp0\robocopylog.txt" ::Ignore the following file types. You can add more separated by space set exclude=*.bak *.backup ::Go through each line in the folders.txt file for /f "skip=2 delims=" %%f in ('find /v "" %~dp0\folders.txt') do ( ::Check if the relative path from current directory works if exist "%~dp0\%%f" ( ::Sync relative path robocopy "%%f" "%~dp0\%%f" /v /xf %exclude% /mir /tee /fft /log+:robocopylog.txt ) else ( ::Sync absolute path if relative didnt work robocopy "%%f" "%~dp0\%%~nf" /v /xf %exclude% /mir /tee /fft /log+:robocopylog.txt ) ) ::Wait for keyboard input before closing the window. Remove pause if you want it to close pause
- Save it where you want your backups to be stored (destination). Use whichever name you like. For example robocopy sync unicode folders.bat
- Create a new text file named folders.txt using any text editor and enter each folder that you want to make a backup off separated by a line break. (sources) Save the text file in the same folder as the batch script. Relative paths work too. Example:
- Run the script! The black window will stay open when it’s completed.
With the above example the result would look something like this:
- If source folders share the same name, they will be merged. Keep this in mind.
- This is a one-direction only sync. It will not move or remove anything from the source folder.
- If you don’t want the window to stay open when it’s complete remove the last line “pause” from the script.
- A log file is saved for each operation in robocopylog.txt
- You can add more files to exclude if you want, example:
exclude=*.bak *.backup *.mp4 *.avi
I’m a beginner slowly learning how to use git and right away during my learning process I encountered a big thorn in my foot. The following article applies to git on windows.
Search for git push 403 and you’ll get a grip of this problem.
The problem for me was swapping between different github user accounts but no reinstall or changing of user credentials would do it for me. Changing the local account did not work:
git config user.name MyNewUsername git config user.email MyNewEmail
Neither did changing the global account:
git config --global user.name MyNewUsername git config --global user.email MyNewEmail
Not even adding username and password directly into the push URL worked:
git push https://username:email@example.com/yourname/yourrepo.git
It would still attempt to push using my old account username…
The request URL returned error: 403
The next thing I tried that almost worked. However it would require me to re-enter login credentials every single time I was pushing files to the repository. What I did was delete the SSH settings stored in a file named known_hosts located in the path %userprofile%\.ssh
This is not a good workaround as re-entering both username and password every time you push can be a bit tedious.
I don’t know if I’m missing some kind of setting or if git is just ignoring to check the proper account name associated with stored SSH key. Is it just attempting to use the most recent and giving up? Shouldn’t it check and use the proper key if there are multiple?
If it’s not a setting (which I can’t find for the life of me) this is probably a bug in the windows release.
The best solution ?
The following was the solution that finally worked satisfactory for me: http://stackoverflow.com/questions/15381198/remove-credentials-from-git
This command changes so that git uses windows own credential manager:
git config --global credential.helper wincred
After this setting is changed try pushing once again, if it fails then remove the entries related to github in the windows Credential Manger in the Control Panel. See the screenshot image below.
The next time you push it should now prompt you for login credentials AND REMEMBER THEM! phew
It never occurred to me that git could use windows own credential manager in the windows control panel.
The only minor annoyance remaining is that you still have to delete your old credentials every time that you wish to use another github account.
Please leave a comment and/or correct me if I got something wrong or if you want to add additional information.