Tag Archives: cloud

Fix Wi-Fi 6 Gaming Lag: Essential Tips

Wi‑Fi 6 Gaming Fixes

If when streaming Xbox Cloud Gaming your ethernet wired PC plays perfectly but the same games over Wi‑Fi feel laggy, the issue is almost always latency instability (ping spikes), not raw download speed. This post explains why that happens, what you can change on the PC only (no router access required), includes a ready PowerShell ISE script that applies recommended Wi‑Fi and Bluetooth coexistence tweaks and generates a one‑click revert script, and shows exactly how to run the revert and enable Edge hardware acceleration.

Why Wi‑Fi jitter breaks cloud gaming

  • Speed ≠ stability. High Mbps only matters if latency is steady. Frequent ping spikes cause input lag, stutter, and low stream quality.
  • Bluetooth and Wi‑Fi can collide. Bluetooth uses 2.4 GHz and can interfere with Wi‑Fi if the adapter shares radios or if Wi‑Fi falls back to 2.4 GHz.
  • Driver and power settings matter. Adapter power saving, roaming aggressiveness, and transmit power affect micro‑disconnects and jitter.
  • DNS and network stacks help with lookup delays and occasional stutter but won’t fix large routing or interference problems.

What you can do on the PC now

Priority changes (PC only)

  • Prefer 5 GHz and ensure the adapter is using 802.11ax/802.11ac when available.
  • Disable adapter power saving and set roaming aggressiveness to low.
  • Enable Bluetooth coexistence (driver option) so Wi‑Fi and BT coordinate.
  • Set DNS to a fast public resolver such as 1.1.1.1 and 8.8.8.8 and flush DNS.
  • Close background network apps and enable Game Mode in Windows.
  • Temporarily disable other Bluetooth devices while gaming to test for interference.
  • Test with continuous ping to a stable host (for example 8.8.8.8) and watch for spikes.

Script: apply changes and create a revert script

How to use: open PowerShell ISE as Administrator, paste the script below into a new file, save, then press Run Script (F5). The script will back up current settings to %USERPROFILE%\WiFiGamingBackup, apply recommended changes, and write a revert script in the same folder.

WARNING: Use the below at your own risk

powershell

<#
Optimize-WiFi-BT-WithRollback.ps1
Run in PowerShell ISE as Administrator.
- Backs up adapter advanced properties, DNS, Bluetooth service state, and power plan to JSON.
- Applies recommended settings for gaming over Wi-Fi while enabling Bluetooth coexistence.
- Writes a revert script that restores the saved state.
#>
# Require admin
If (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Error "Run PowerShell ISE as Administrator."
Break
}
Write-Host "Starting Wi‑Fi and Bluetooth optimization with rollback generation..." -ForegroundColor Cyan
# 1) Identify active Wi-Fi adapter
$wifi = Get-NetAdapter -Physical | Where-Object { $_.Status -eq 'Up' -and ($_.InterfaceDescription -match 'Wireless|Wi-Fi|WLAN' -or $_.Name -match 'Wi-Fi|Wireless|WLAN') } | Select-Object -First 1
if (-not $wifi) {
Write-Error "No active Wi‑Fi adapter found. Ensure Wi‑Fi is enabled and connected."
exit 1
}
$adapterName = $wifi.Name
Write-Host "Active adapter:" $adapterName -ForegroundColor Green
# 2) Prepare backup folder and file
$backupDir = Join-Path $env:USERPROFILE "WiFiGamingBackup"
if (-not (Test-Path $backupDir)) { New-Item -Path $backupDir -ItemType Directory | Out-Null }
$timestamp = (Get-Date).ToString("yyyyMMdd_HHmmss")
$backupFile = Join-Path $backupDir "WiFiGamingBackup_$timestamp.json"
# 3) Collect current state
$advProps = Get-NetAdapterAdvancedProperty -Name $adapterName | Select-Object DisplayName, DisplayValue
$ifIndex = (Get-NetAdapter -Name $adapterName).ifIndex
$currentDns = (Get-DnsClientServerAddress -InterfaceIndex $ifIndex -ErrorAction SilentlyContinue).ServerAddresses
$btService = Get-Service -Name bthserv -ErrorAction SilentlyContinue
$btState = if ($btService) { @{ Exists = $true; Status = $btService.Status; StartType = (Get-WmiObject -Class Win32_Service -Filter "Name='bthserv'").StartMode } } else { @{ Exists = $false } }
$powerOut = powercfg -getactivescheme 2>&1
$powerGuid = if ($powerOut -match '\(([^)]+)\)') { ($powerOut -split '\s+')[3] } else { $null }
$backup = @{
Timestamp = $timestamp
AdapterName = $adapterName
AdvancedProperties = $advProps
DnsServers = $currentDns
BluetoothService = $btState
PowerPlanGuid = $powerGuid
}
$backup | ConvertTo-Json -Depth 6 | Out-File -FilePath $backupFile -Encoding UTF8
Write-Host "Backup written to $backupFile" -ForegroundColor Green
# 4) Helper to set adapter advanced property if present
function Set-IfAvailable {
param([string]$Adapter, [string]$DisplayName, [string]$DisplayValue)
$prop = Get-NetAdapterAdvancedProperty -Name $Adapter | Where-Object { $_.DisplayName -eq $DisplayName }
if ($prop) {
try {
Set-NetAdapterAdvancedProperty -Name $Adapter -DisplayName $DisplayName -DisplayValue $DisplayValue -NoRestart -ErrorAction Stop
Write-Host "Set '$DisplayName' -> '$DisplayValue'"
} catch {
Write-Warning "Failed to set '$DisplayName' -> '$DisplayValue': $_"
}
} else {
Write-Host "Skipping missing property: $DisplayName" -ForegroundColor DarkYellow
}
}
# 5) Apply recommended settings (tries multiple common DisplayName variants)
$settings = @(
@{Name='Preferred Band'; Value='Prefer 5 GHz band'},
@{Name='Preferred Band'; Value='3. Prefer 5GHz band'},
@{Name='Band'; Value='5 GHz'},
@{Name='Wireless Mode'; Value='802.11ax/802.11ac'},
@{Name='Wireless Mode'; Value='802.11ax'},
@{Name='Roaming Aggressiveness'; Value='Lowest'},
@{Name='Roaming Aggressiveness'; Value='1 - Lowest'},
@{Name='Power Save Mode'; Value='Disabled'},
@{Name='Power Save Mode'; Value='Off'},
@{Name='U-APSD Support'; Value='Disabled'},
@{Name='Transmit Power'; Value='Highest'},
@{Name='Transmit Power'; Value='100%'},
@{Name='Bluetooth Collaboration'; Value='Enabled'},
@{Name='Bluetooth Coexistence'; Value='Enabled'},
@{Name='Bluetooth Collaboration Mode'; Value='Enabled'}
)
Write-Host "`nApplying adapter settings..." -ForegroundColor Cyan
foreach ($s in $settings) { Set-IfAvailable -Adapter $adapterName -DisplayName $s.Name -DisplayValue $s.Value }
# Channel width attempts
Set-IfAvailable -Adapter $adapterName -DisplayName 'Channel Width for 5GHz' -DisplayValue '80 MHz'
Set-IfAvailable -Adapter $adapterName -DisplayName 'Channel Width for 5GHz' -DisplayValue 'Auto'
Set-IfAvailable -Adapter $adapterName -DisplayName 'Channel Width' -DisplayValue '80 MHz'
# 6) Set DNS servers to Cloudflare and Google
try {
Write-Host "`nSetting DNS servers to 1.1.1.1 and 8.8.8.8"
Set-DnsClientServerAddress -InterfaceIndex $ifIndex -ServerAddresses @('1.1.1.1','8.8.8.8') -ErrorAction Stop
Write-Host "DNS updated" -ForegroundColor Green
} catch {
Write-Warning "Failed to set DNS: $_"
}
# 7) Flush DNS and reset network stacks
Write-Host "`nFlushing DNS and resetting network stacks..."
try {
ipconfig /flushdns | Out-Null
netsh winsock reset | Out-Null
netsh int ip reset | Out-Null
Write-Host "Network stacks reset. Reboot recommended." -ForegroundColor Green
} catch {
Write-Warning "Network reset commands encountered an error: $_"
}
# 8) Bluetooth service handling option (default: do not stop)
$stopBluetooth = $false
if ($stopBluetooth) {
try {
if ($btService -and $btService.Status -ne 'Stopped') {
Stop-Service -Name bthserv -Force -ErrorAction Stop
Set-Service -Name bthserv -StartupType Disabled
Write-Host "Bluetooth service stopped and disabled."
}
} catch {
Write-Warning "Could not stop Bluetooth service: $_"
}
} else {
Write-Host "`nBluetooth service left unchanged. To auto-stop Bluetooth set `$stopBluetooth = $true` in this script and re-run." -ForegroundColor Yellow
}
# 9) Set power plan to High Performance if available
try {
$high = powercfg -l | Select-String -Pattern "High performance|High Performance"
if ($high) {
$guid = ($high -split '\s+')[3]
powercfg -setactive $guid
Write-Host "Power plan set to High Performance."
} else {
Write-Host "High Performance plan not found; skipping."
}
} catch {
Write-Warning "Power plan change failed: $_"
}
# 10) Generate revert script that restores saved values
$revertPath = Join-Path $backupDir "Revert-WiFiGamingChanges_$timestamp.ps1"
$revertScript = @"
<#
Revert-WiFiGamingChanges_$timestamp.ps1
Restores adapter advanced properties, DNS, Bluetooth service state, and power plan from:
$backupFile
Run as Administrator.
#>
If (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Error "Run PowerShell as Administrator."
Break
}
\$backup = \$null
try {
\$backup = Get-Content -Path '$backupFile' -Raw | ConvertFrom-Json
} catch {
Write-Error "Could not read backup file: $backupFile"
exit 1
}
\$adapter = \$backup.AdapterName
# Restore advanced properties
foreach (\$p in \$backup.AdvancedProperties) {
try {
Set-NetAdapterAdvancedProperty -Name \$adapter -DisplayName \$p.DisplayName -DisplayValue \$p.DisplayValue -NoRestart -ErrorAction Stop
Write-Host "Restored \$($p.DisplayName) -> \$($p.DisplayValue)"
} catch {
Write-Warning "Failed to restore \$($p.DisplayName): \$_"
}
}
# Restore DNS
try {
if (\$backup.DnsServers) {
\$ifIndex = (Get-NetAdapter -Name \$adapter).ifIndex
Set-DnsClientServerAddress -InterfaceIndex \$ifIndex -ServerAddresses \$backup.DnsServers -ErrorAction Stop
Write-Host "Restored DNS servers: \$($backup.DnsServers -join ', ')"
}
} catch {
Write-Warning "Failed to restore DNS: \$_"
}
# Restore Bluetooth service state
if (\$backup.BluetoothService.Exists -eq \$true) {
try {
\$svc = Get-Service -Name bthserv -ErrorAction SilentlyContinue
if (\$svc) {
if (\$backup.BluetoothService.Status -ne \$svc.Status) {
if (\$backup.BluetoothService.Status -eq 'Running') { Start-Service -Name bthserv -ErrorAction SilentlyContinue }
if (\$backup.BluetoothService.Status -eq 'Stopped') { Stop-Service -Name bthserv -Force -ErrorAction SilentlyContinue }
}
\$wmi = Get-WmiObject -Class Win32_Service -Filter "Name='bthserv'"
if (\$wmi -and \$backup.BluetoothService.StartType) {
\$wmi.ChangeStartMode(\$backup.BluetoothService.StartType) | Out-Null
Write-Host "Restored Bluetooth service start mode to \$($backup.BluetoothService.StartType)"
}
}
} catch {
Write-Warning "Failed to restore Bluetooth service state: \$_"
}
}
# Restore power plan
try {
if (\$backup.PowerPlanGuid) {
powercfg -setactive \$backup.PowerPlanGuid
Write-Host "Restored power plan GUID \$($backup.PowerPlanGuid)"
}
} catch {
Write-Warning "Failed to restore power plan: \$_"
}
Write-Host "Revert complete. Reboot recommended."
"@
$revertScript | Out-File -FilePath $revertPath -Encoding UTF8
Write-Host "`nRevert script created at: $revertPath" -ForegroundColor Green
# 11) Short ping test
Write-Host "`nRunning 20-second ping test to 8.8.8.8. Observe for spikes." -ForegroundColor Cyan
ping 8.8.8.8 -n 20
Write-Host "`nDone. Backup: $backupFile" -ForegroundColor Cyan
Write-Host "Revert script: $revertPath" -ForegroundColor Cyan
Write-Host "Reboot recommended to ensure all changes take effect." -ForegroundColor Yellow

How to execute the revert script safely

Location: the script and backup are stored in %USERPROFILE%\WiFiGamingBackup.

Option A — Run from File Explorer

  1. Press Win + R, paste:Code%USERPROFILE%\WiFiGamingBackup and press Enter.
  2. Right‑click the revert script Revert-WiFiGamingChanges_*.ps1Run with PowerShell.
  3. Confirm any prompts and reboot when finished.

Option B — Run from PowerShell ISE (recommended)

  1. Open PowerShell ISE as Administrator.
  2. File → Open → select the revert script from %USERPROFILE%\WiFiGamingBackup.
  3. Press Run Script (F5).
  4. Reboot after completion.

Option C — Run from an elevated PowerShell prompt

  1. Open Windows PowerShell as Administrator.
  2. Run:

powershell

Set-Location -Path "$env:USERPROFILE\WiFiGamingBackup"
.\Revert-WiFiGamingChanges_YYYYMMDD_HHMMSS.ps1
  1. Reboot when the script finishes.

What the revert script restores

  • Adapter advanced properties to their previous values.
  • Adapter DNS servers to the saved values.
  • Bluetooth service status and startup mode (if present).
  • The previously active power plan GUID.

Keep the backup JSON and revert script in %USERPROFILE%\WiFiGamingBackup until you’re confident the changes are permanent.

Edge hardware acceleration

Why enable it Hardware acceleration offloads video decoding and rendering to the GPU, reducing CPU load and improving frame stability for browser‑based cloud gaming. This can reduce stutter and improve perceived responsiveness.

How to enable in Edge

  1. Open Microsoft Edge.
  2. Go to Settings → System and performance.
  3. Toggle Use hardware acceleration when available to On.
  4. Restart Edge for the change to take effect.

Extra Edge tips

  • Enable secure DNS in Edge: Settings → Privacy, search, and services → Use secure DNS and choose Cloudflare or Google.
  • Disable unnecessary extensions and close background tabs while gaming.

Verify success and troubleshoot

  • Ping test: open an elevated PowerShell or Command Prompt and run:

powershell

ping 8.8.8.8 -t

Look for consistent low latency and no frequent spikes above ~50–100 ms.

  • Play test: run a short cloud gaming session and compare responsiveness to your wired baseline.
  • If spikes persist: temporarily disable Bluetooth to test whether the controller is the cause; try a USB‑Ethernet adapter or a short Ethernet run if possible; consider router changes (channel, QoS) if you can access it.

Final notes and safety

  • Driver variability: some adapter properties may not exist; the script skips missing items and records current values for rollback.
  • Bluetooth stop is optional and disabled by default to avoid disrupting other devices. Change the script variable only if you understand the impact.
  • Router changes (channel, width, QoS) are not modified by this script and require router access; they can further improve stability if needed.
  • Keep the backup and revert script in %USERPROFILE%\WiFiGamingBackup so you can restore original settings at any time.

Happy Gaming!

How to Secure Your Azure SQL Database

  1. Authentication and Authorization:
    • Use Azure Active Directory (Azure AD) authentication for better security.
    • Implement firewall rules to control access to your database.
    • Assign minimal permissions to users based on their roles (principle of least privilege).
  2. Encryption:
    • Enable Transparent Data Encryption (TDE) to protect data at rest.
    • Use Always Encrypted to secure sensitive data in transit.
    • Consider client-side encryption for additional protection.
  3. Auditing and Monitoring:
    • Enable Azure SQL Auditing to track database activity.
    • Set up Azure Monitor to receive alerts and insights.
    • Regularly review logs and audit trails.
  4. Network Security:
    • Isolate your database using Virtual Network Service Endpoints.
    • Restrict public access and use private endpoints.
  5. Patch Management:
    • Keep your database engine up to date with the latest security patches.
    • Regularly review vulnerability assessments.
  6. Backup and Recovery:
    • Implement automated backups and test recovery procedures (remember a backup is only theoretically there unless it has been tested and proven to work).
    • Store backups conforming to the 3-2-1 Backup Rule explained below (do not assume your backups are safe just because they are in the cloud).

The 3-2-1 Backup Rule: Ensuring Data Resilience

The 3-2-1 Rule is a robust strategy that emphasizes redundancy, resilience, and data availability. Here’s what it entails:

  1. Three Copies of Your Data:
    • Maintain the original data and create at least two additional copies.
  2. Two Different Types of Media for Storage:
    • Store your data on distinct forms of media (e.g., hard drives, tapes) to enhance redundancy.
  3. At Least One Copy Off-Site:
    • Safeguard one backup copy in an off-site location, separate from your primary data and on-site backups.

By adhering to this rule, you mitigate single points of failure, protect against corruption, and ensure data safety even in unexpected events or disasters

Android Shopping

Buying advice for Android TV Sticks

My previous posting, “Android TV Sticks, the time is now” was dedicated to heralding a potential new era of super cheap, multi-purpose home computing driven by Android TV Sticks (ATS’s).

In this posting I’d like to offer some advice when buying an ATS. Let’s start with the straight forward stuff and finish up with the options that need to be weighed up by each buyer separately.

Firstly don’t be a cheapo.

Pay the extra $10-$20 dollars and get a quad-core model instead of the dual-core. It offers a lot more bang for your buck.

Purchase an ATS that has an external antenna.

Why?

Because there have been a lot of models in the past that suffer from Wifi problems. Not that the stick won’t pick up any signals it’s just the range will be very limited. The problems stem from electronic interference from within the stick casing. The folks at Rikomagic, for example, noticed that you can dramatically improve WiFi performance on the MK802 IV just by moving the antenna around inside the case. Some sites recommend making a hole and letting the antenna hang outside the case altogether but you can avoid all that hassle if you just buy a stick which has an external antenna.

Compensate for limited internal storage with an external SD card.

Don’t worry about the internal storage of an ATS. Most ATS’s have a microSD card slot that can support cards up to 32GB in capacity. Considering that you can pick up a card that size for under $25 these days, it doesn’t cost much to quadruple your storage.

Keep in mind not all SD cards are created equally. They are separated into classes mainly representing speed of data transfer, class 10 being the best. I wouldn’t go lower than an 8, but if you are running games from the external card go for the 10.

Class 10 SD cardI particularly appreciate the SD slot as I’m not a fan of storing everything on “the cloud”. There are companies that have a finger in device production and data storage that are pushing the use of “the cloud” by not providing SD slots. They do this because they can make money off of providing storage of your data while using your data. Kinda like how banks make money by holding onto your money. Everyone loves banks right. Right? If you don’t know which companies I’m talking about, just Google it.

man yells at cloud(Goddamn data vampires)

We can’t control all electronics with our minds yet.

You’ll need some means of interacting with the device and there are a number of options. For some this will be a hidden cost of buying an ATS but most geeks will have some of these things, if not all of these things, lying around the house.

Low tech way first. A usb wired mouse and keyboard will be able to plug directly into the ATS. Left click of a mouse emulates a screen touch while right click conveniently emulates the back button. It’s actually very pleasant navigating around like that. Regarding keyboards, anything that requires the typing of text will bring up the on-screen keyboard. You could theoretically use the mouse pointer to type things out, in the same way the human race could theoretically count every grain of sand, but typing on a physical keyboard connected to the ATS will work nicely.

The more high tech solutions would be to use a wireless keyboard and mouse but there are further options still. Do you choose a typical keyboard or a keyboard/mouse combo or even an air mouse which usually looks like a traditional remote control but it works gyroscopically like a Wii Remote. Below are a few photos of your choices.

Traditionally shaped keyboard and mouseKeyboard/Mouse comboRemote air mouseKeyboard/mouse combo air mouseThese peripherals will either be connectible via bluetooth or by means of a teeny-tiny usb dongle if it works via radio frequency.

Finally the most hi-tech solution would be to use another android device to control the stick, namely your phone and/or tablet. Most sticks come with an app pre-installed which allows the stick to be controlled locally, i.e. over the wifi network or via bluetooth, by any android device that has the necessary controller app installed.

Overfed flash drive or malnourished router?

There are Android Mini PC’s which are larger than ATS’s, they typically look like a small router, but have pretty much the same hardware as an ATS (which begs the question what the hell are they doing with all the extra space?).

Android Mini PC

These larger devices usually have a built in camera and microphone. That’s really the key selling feature as there are no mic ports on most ATS’s and driver support for external webcams is pretty non-existent.

There are some apps that allow for connecting an external usb camera to an ATS though but compatibility is not assured. A good one is the free app Dashcam (good in the sense that it’s free).

These larger Mini PC’s, let’s call them Android TV Boxes or ATB’s for short, open up a whole range of webcamming opportunities . . . take that whatever way you want . . . as people will be able to skype back and forth turning the TV into something like the viewscreen on star trek.

Star Trek the next generation viewscreen

In fact some of these Mini PCs take the form of chunky webcams with sweet android goodness inside. Let’s call this species an Android TV Webcam or ATW for short.Android TV webcamThe camera on all these devices still won’t be that great (despite what manufactures promise. . . I’ve been fooled before) but that will only improve in time.

The built in microphones are not only usefully for the likes of Skype, Viber and Google Talk they also come in useful for talking to the device stating search terms for the browser or using Google Now.

(Things really are getting like star trek. When I can bark the commands “Tea. Earl grey. Hot.” at a 3D printer and get a delicious beverage it will officially be the future. )

One very important thing to note, for android 4.2 at least, is that Google Now doesn’t work with Bluetooth devices! How stupid is that‽‽‽ (Interrobangs, I’m bringing them back!)

It’s something to do with Bluetooth being third party yada yada yada, but whatever the reason this is a major short coming considering that Bluetooth headset users are probably the most likely to make use of Google Now.

(Given that all headset users are pretentious egotistical sociopaths who assume we all want to know their business.)

Cartoon of man using headset

So why buy an ATS over an ATB or ATW?

For me it boiled down to value. An ATS offers you the best performance in computing at the lowest price, which is all I was really interested in. Right now webcam and microphones are features I probably wouldn’t use much, if at all, so I wasn’t going to pay extra for that. Aside from money the only other thing I considered was the presence the device would have in the room. An ATS is discreet as it is designed to be plugged in directly at the back of the TV. The added benefit is that they’re a small robust little rectangle allowing them to be put into a bag, or even a pocket, and taken anywhere.

ATB’s and ATW’s on the other hand are designed to be placed somewhere they can capture the room with the built in camera. Again considering I wouldn’t be using the extra features either one would just be cluttering the room needlessly.

But that’s just me. If you’re using an ATB or ATW and have something you’d like to share about it please feel free to comment below.