2026 m. birželio 10 d., trečiadienis

Fix: AMD External Monitor Blinks & Disconnects on Linux (But Works on Windows)

Your external monitor randomly blinks, the picture jumps back to the laptop screen for a few seconds, then reconnects on its own — but on Windows everything is perfect. Here's exactly why it happens on Linux with an AMD GPU, how to confirm it from the logs, and the one-line fix that solves it for most people.

The symptom

You have an external display plugged into an AMD-powered laptop. From time to time:

  • The external screen blinks / goes black for a moment.
  • Everything jumps to the laptop's built-in panel only.
  • After a few seconds the external monitor reconnects by itself.
  • On Windows, with the same cable and monitor, it never happens.

It's intermittent, it's annoying, and because Windows is fine you assume it's not the hardware. Let's prove what it actually is.

Step 1: Read the kernel log

Right after the next blink, open a terminal and run:

journalctl -k -b | grep -iE 'dpcd|link training|retrieve_link_cap|resuming'

If your machine has the same problem, you'll see a line like this:

kernel: [drm:retrieve_link_cap [amdgpu]] *ERROR* retrieve_link_cap: Read receiver caps dpcd data failed.

That single line is the whole story.

Step 2: What that error means

Your monitor is connected over DisplayPort (a native DP port, a USB-C→DP cable, or a dock). When the GPU brings the link up, it must read the monitor's capabilities — called DPCD (DisplayPort Configuration Data) — over a tiny side-channel in the cable known as the AUX channel.

When that AUX read fails, the driver can't negotiate the link, so it drops the external output. The picture falls back to the laptop panel. A moment later it retries, the read succeeds, and the monitor comes back. That is exactly the blink–disconnect–reconnect cycle you see.

Step 3: Why Windows is fine but Linux isn't

This is the part most guides get wrong. If the same cable and monitor work on Windows, the physical link is good enough — so the difference is in how each driver handles a marginal link. The real cause is usually a combination:

  1. Windows retries silently; amdgpu gives up and logs an error. When a DPCD/AUX read hiccups, the Windows AMD driver does aggressive, invisible retries before you notice. Linux's amdgpu is less forgiving — it logs the failure and tears the output down. Same glitch, different reaction.
  2. Power management — the real Linux-specific trigger. amdgpu enables an aggressive display power-saving feature called PSR (Panel Self Refresh). Entering and exiting PSR re-touches the display link and disturbs the AUX channel — exactly the channel that's failing. Windows often tunes this very differently or leaves it off.
  3. Driver/firmware maturity. Windows ships the vendor's fully-tuned driver; amdgpu has had a steady stream of AUX/link-training fixes across kernel releases.

In short: the link is slightly marginal, Windows hides it, and Linux's PSR power-saving exposes it.

The fix: disable Panel Self Refresh

The highest-yield software fix is to tell amdgpu to keep the display link awake instead of letting it nap. You do that with a kernel boot parameter: amdgpu.dcdebugmask=0x10.

On Ubuntu / Debian-based distros that use GRUB:

# 1. Back up the GRUB config
  sudo cp /etc/default/grub /etc/default/grub.bak

  # 2. Edit GRUB_CMDLINE_LINUX_DEFAULT, e.g. change:
  #      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
  #    to:
  #      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash amdgpu.dcdebugmask=0x10"
  sudo nano /etc/default/grub

  # 3. Regenerate the boot config
  sudo update-grub

  # 4. Reboot
  sudo reboot

After rebooting, confirm it's active:

cat /proc/cmdline

You should see amdgpu.dcdebugmask=0x10 in the output. Done.

What amdgpu.dcdebugmask=0x10 actually does

dcdebugmask is a bit-mask for the amdgpu driver's Display Core. Each bit switches off one display feature. The value 0x10 maps to a single bit: disable PSR (Panel Self Refresh).

PSR is a power-saving feature: when the on-screen image isn't changing, the GPU stops actively driving the panel and lets the display hold its last frame from its own memory. Great for battery — but the transitions in and out of PSR are what disturb the AUX channel and cause your dropout. Turning it off keeps the link continuously active. The only real cost is slightly higher idle power draw.

Because it's a bitmask, you can combine values by adding them:

ValueDisables
0x2Memory "stutter" power saving
0x8Clock gating
0x10PSR (Panel Self Refresh) ← the fix
0x12PSR + stutter (0x10 + 0x2)

Note: exact bit meanings can shift slightly between kernel versions, but PSR = 0x10 is stable on kernel 6.8.

If it still happens

  1. Stronger mask: use amdgpu.dcdebugmask=0x12 (PSR + stutter). Same edit, swap the value, update-grub, reboot.
  2. Update kernel + firmware for newer AUX/link-training fixes:
    sudo apt update && sudo apt full-upgrade
  3. Reduce link stress to confirm the link is genuinely marginal — lower the monitor's refresh rate (e.g. 60→50 Hz) or resolution. If the blinking stops, your cable/port is at its bandwidth limit.
  4. Then improve the hardware: swap to a known-good, properly-rated DisplayPort / USB-C cable and remove any dock or adapter from the path.

How to undo the change

sudo cp /etc/default/grub.bak /etc/default/grub
  sudo update-grub
  sudo reboot

Summary

  • Symptom: external monitor blinks, drops to the laptop panel, reconnects — only on Linux.
  • Log signature: retrieve_link_cap: Read receiver caps dpcd data failed from amdgpu.
  • Cause: a slightly marginal DisplayPort/AUX link that Windows hides with silent retries, while Linux's amdgpu — especially its PSR power-saving — exposes it.
  • Fix: boot with amdgpu.dcdebugmask=0x10 to disable Panel Self Refresh.
Blogger tips when you paste - Use the HTML view (the <> icon), not the Compose view — otherwise Blogger escapes the tags. - After pasting, switch to Compose to preview; the
 blocks render as code boxes.
  - Suggested title: Fix: AMD External Monitor Blinks & Disconnects on Linux (But Works on Windows)
  - Suggested labels: Linux, AMD, amdgpu, DisplayPort, Ubuntu, Troubleshooting, External Monitor
  - In Search Description (Settings sidebar of the post), paste: AMD external monitor blinks and disconnects on Linux but works on Windows — caused by amdgpu PSR. Fix it with amdgpu.dcdebugmask=0x10.

  The same content is saved in the file amd-external-display-blinking-linux-blogger.html if you'd rather copy from there. Want a version with inline CSS styling (colored code boxes, a highlighted "fix" callout)
  so it looks nicer on your Blogger theme?

2025 m. gruodžio 22 d., pirmadienis

Kelionės

Bendra info:

https://cafeandcowork.com - Coworking places

https://ryanestrada.com/learntoreadkoreanin15minutes/ - Learning Korean alphabet

Travel-map


Balis

https://evisa.imigrasi.go.id/ - Viza
https://www.unifiedhealingbali.com/classes - Visokie renginiai vyksta

Korea

National Foundation Day in Korea, celebrated on October 3rd, commemorates the legendary founding of the first Korean kingdom, Gojoseon, by Dangun in 2333 BCE.

The highest peak in Korea is Hallasan (Mount Halla), located on Jeju Island. Hallasan rises to 1,950 meters.

Korean (Hangul) is the official language.

Arrival card can be filled online to save time.

Apps:
Navigation - Naver Map
Taxy: Uber

Coworking:

Coworking spaces can be found on Navel maps by searching: studycaffe or 스터디 카페



https://www.behongli.com - Very nice coworking place in Behongli

https://cafeandcowork.com/seoul/

https://www.digitalnomadskorea.com/post/best-coworking-spaces-seoul



Seul

https://english.visitkorea.or.kr Information about interesting places 

Foods:

Somaek is a popular South Korean beer cocktail made by mixing soju and beer, typically a lager. The name comes from "soju" (소주) and "maekju" (맥주, beer)
 
Bibim-naengmyeon (비빔냉면) is a popular Korean dish of cold, chewy noodles mixed with a spicy, sweet, and tangy sauce, typically enjoyed during hot weather-much like Lithuanians eat šaltibarščiai (cold beet soup) to cool down in summer. The name means "mixed cold noodles": bibim = mixed, naengmyeon = cold noodles.

Tteokbokki: Spicy Korean Rice Cakes
Tteokbokki (떡볶이) is a classic and beloved Korean street food made from chewy rice cakes simmered in a fiery, sweet, and savory chili sauce. Sometimes transliterated as "Tampuki" in other languages, this dish is instantly recognizable for its bold red color and comforting, addictive taste.


The Korean savory pancake traditionally served with rice wine is called
Pajeon (파전). The pancake is typically paired with makgeolli (막걸리), a traditional Korean milky rice wine. 
Pajeon (Korean Scallion Pancake)
Pajeon gets its name from the Korean words pa (scallion) and jeon (foods that have been pan-fried in a batter). It is a popular comfort food, especially on rainy days, as the sizzling sound of the pancake cooking is said to resemble the sound of rain. 
🔗

Busan

Gamcheon Village - village created in Korea war when people migrated, after retaking Seul people moves out busat, and left towns empty.
Haeundae Blueline

Park Tour

Jeju:
 

Japan

Hiroshima

https://dive-hiroshima.com/en/information/wifi-area/ - Wifi areas

 

Osaka

Taivanas

 

https://www.likeitformosa.com  - English Walking Tours
https://en.youbike.com.tw/ - Važinėjimas dviračiu (reikalingas Taiwano numeris) 

Belief:

Good grades good life


Liuqiudrifting ball" or "island chain" Xiaoliuqiu - Lambai Island
 

Kaohsiung  -  "high hero"

Amitabha Buddha statue

Taipei

To Study Languages -  NTNU Universitetas.

Meetup groups 

 

Tainan

https://www.twtainan.net

 

Kaohsiung

https://khh.travel/en/attractions/must-visit
https://khh.travel/en/attractions/map

 

What to do - 
https://www.travel.taipei/

https://tw.forumosa.com/ 

Renting info

https://www.roc-taiwan.org/lt_en/post/760.html - Mokymasis Taiwane kalbos, aplikacija iki kovo 31

 

Nuomos svetaines:
https://www.591.com.tw/#

https://www.booking-wise0.com.tw

https://myroomabroad.com


Tailandas

https://www.agoda.com/

 

 

Svetainės pasiskaitymui


https://www.nomadlyf.com/muscat/guide
https://nomadpub.com/tel-aviv-fors-againsts/






Turkija:


https://coliving.com/spaces/fec98brz

https://nomads.com/coworking/istanbul - Žemėlapis

http://sahibinden.com - Nuoma Turkijoje veikia tik su vpn

Graikija


Gidas:

Ko vengti:
https://www.ratepunk.com/blog/post/places-to-avoid-in-athens-safety-guide

Transportas:

https://www.hellenictrain.gr/en - Traukiniai

https://www.rome2rio.com/ - Įvairūs būdai

Žemėlapis
https://hoodmaps.com/athens-neighborhood-map

 

Apratamentai:

https://coliving.com/greece

https://mobee-house.com/apartments/

 

Skrydžiai:

https://www.skyscanner.net/


Website to rent:

https://www.spitogatos.gr/

https://www.theblueground.com/furnished-apartments-athens-greece


Guides:

https://www.twoticketsanywhere.com/digital-nomad-athens/ - good


https://localnomads.com/digital-nomad-guide/athens-greece/

https://www.amysuto.com/desk-of-amy-suto/working-remotely-in-athens-greece




Bendri:

https://coliving.com/

https://www.numbeo.com/cost-of-living/gmaps.jsp - Kiek kainuoja pragyvenimas


WhatsApp Groups:

https://docs.google.com/spreadsheets/d/1eNsQI2yyt4q06JEZIL0INflROZ4aOqSXfu9Ni5mQm1I/edit?gid=0#gid=0

2025 m. gruodžio 9 d., antradienis

Krishnamurti and stuff

Idomios svetainės kurias radau, iš vieno interiu su Reza Gabjavi:

 https://inthepresenceofk.org/issues/

2025 m. spalio 12 d., sekmadienis

WireGuard Guide for Ubuntu

WireGuard Complete Guide for Ubuntu
🔒 WireGuard Complete Guide
Ubuntu Server Setup & Configuration
1 🔄 Update System

Always start by updating your system packages to ensure you have the latest security patches and dependencies:

sudo apt update && sudo apt upgrade -y
💡 Tip: The -y flag automatically confirms the upgrade prompt. Remove it if you want to review packages before upgrading.
2 📦 Install WireGuard

Install WireGuard and required tools:

sudo apt install wireguard wireguard-tools -y

For Ubuntu 18.04 and earlier, you may need to add the PPA first:

sudo add-apt-repository ppa:wireguard/wireguard sudo apt update sudo apt install wireguard wireguard-tools -y
3 🔑 Generate Keys

Generate private and public key pairs:

wg genkey | sudo tee /etc/wireguard/private.key sudo chmod 600 /etc/wireguard/private.key sudo cat /etc/wireguard/private.key | wg pubkey | sudo tee /etc/wireguard/public.key
⚠️ Security Note: Keep your private key secure! The chmod 600 command ensures only root can read the private key.
4 ⚙️ Configure WireGuard

Create and edit the WireGuard configuration file:

sudo nano /etc/wireguard/wg0.conf

Add the following configuration (example for server):

[Interface] # Server configuration PrivateKey = <your_server_private_key> Address = 10.8.0.1/24 ListenPort = 51820 SaveConfig = true # Enable IP forwarding (for server/gateway setups) PostUp = echo 1 > /proc/sys/net/ipv4/ip_forward PostUp = iptables -A FORWARD -i wg0 -j ACCEPT PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE PostDown = iptables -D FORWARD -i wg0 -j ACCEPT PostDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE [Peer] # Client 1 PublicKey = <client_1_public_key> AllowedIPs = 10.8.0.2/32 # Optional: PresharedKey for additional security # PresharedKey = <preshared_key> [Peer] # Client 2 PublicKey = <client_2_public_key> AllowedIPs = 10.8.0.3/32
📝 Configuration Notes:
  • Address: The VPN IP address for this interface
  • ListenPort: UDP port WireGuard listens on (default: 51820)
  • SaveConfig: Automatically save runtime configuration
  • AllowedIPs: IP ranges that can be routed through this peer
5 🌐 Enable IP Forwarding (Server Only)

For server/gateway setups, permanently enable IP forwarding:

sudo nano /etc/sysctl.conf

Uncomment or add this line:

net.ipv4.ip_forward=1

Apply the changes:

sudo sysctl -p
6 🎮 Manage WireGuard

Start WireGuard:

sudo wg-quick up wg0

Stop WireGuard:

sudo wg-quick down wg0

Enable on Boot:

sudo systemctl enable wg-quick@wg0

Disable Autostart:

sudo systemctl disable wg-quick@wg0

Check Status:

sudo systemctl status wg-quick@wg0
sudo wg show

Restart After Config Changes:

sudo wg-quick down wg0 && sudo wg-quick up wg0
7 🔥 Configure Firewall

If using UFW (Ubuntu's default firewall), allow WireGuard port:

sudo ufw allow 51820/udp

Allow forwarding (if acting as server):

sudo nano /etc/ufw/before.rules

Add these lines at the beginning (after the header comments):

# NAT table rules *nat :POSTROUTING ACCEPT [0:0] -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE COMMIT

Also edit UFW's sysctl settings:

sudo nano /etc/ufw/sysctl.conf

Ensure this line is uncommented:

net/ipv4/ip_forward=1

Reload UFW:

sudo ufw reload
🔧 Troubleshooting

Check Logs:

sudo journalctl -xe | grep wireguard

Verify Interface:

ip a show wg0

Test Connectivity:

ping 10.8.0.1

Check Active Connections:

sudo wg show wg0 latest-handshakes

✅ Quick Command Reference

🚀 Start/Stop
wg-quick up wg0
wg-quick down wg0
💾 Auto-start
systemctl enable wg-quick@wg0
systemctl disable wg-quick@wg0
📊 Monitor
wg show
systemctl status wg-quick@wg0
⚙️ Configure
nano /etc/wireguard/wg0.conf
wg-quick down wg0 && wg-quick up wg0
🎉 Setup Complete! Your WireGuard VPN is now configured. Remember to:
  • Keep your private keys secure
  • Regularly update your system
  • Monitor connection logs for unusual activity
  • Document your peer configurations