191 lines
7.2 KiB
HTML
191 lines
7.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="es">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Fix Screen Tear x11</title>
|
|
<link rel="stylesheet" href="/css/main.css">
|
|
<link rel="stylesheet" href="/css/styles.css">
|
|
|
|
|
|
</head>
|
|
<body>
|
|
<main>
|
|
|
|
<nav class="bg-gray-800 fixed w-full top-0 z-1">
|
|
<div class="mx-auto px-4">
|
|
<div class="flex items-center justify-between h-16">
|
|
<div class="flex items-center">
|
|
<a href="/" class="text-white font-bold text-xl"
|
|
>Fede Landing Site</a
|
|
>
|
|
</div>
|
|
|
|
<div class="hidden md:flex">
|
|
<a
|
|
href="/git"
|
|
target="_blank"
|
|
class="text-gray-300 hover:text-white px-3 py-2"
|
|
>Git</a
|
|
>
|
|
<a
|
|
class="text-gray-300 hover:text-white px-3 py-2 muted"
|
|
title="Under Construction 🚧👷♂️🏗️"
|
|
target="_blank"
|
|
>CV</a
|
|
>
|
|
<a
|
|
href="https://github.com/fedpo2"
|
|
target="_blank"
|
|
class="text-gray-300 hover:text-white px-3 py-2"
|
|
>GitHub</a
|
|
>
|
|
<a
|
|
href="mailto:federico.nicolas.polidoro@gmail.com"
|
|
target="_blank"
|
|
class="text-gray-300 hover:text-white px-3 py-2"
|
|
>Email</a
|
|
>
|
|
<a
|
|
href="https://www.linkedin.com/in/federico-polidoro-40137a25b/"
|
|
target="_blank"
|
|
class="text-gray-300 hover:text-white px-3 py-2"
|
|
>LinkedIn</a
|
|
>
|
|
</div>
|
|
|
|
<div class="md:hidden cursor-context-menu">
|
|
<button
|
|
onclick="toggleOffCanvas()"
|
|
class="border px-2 py-1 rounded text-white"
|
|
>
|
|
<svg
|
|
class="h-6 w-6"
|
|
fill="none"
|
|
viewBox="0 0 24 24"
|
|
stroke="currentColor"
|
|
>
|
|
<path
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
stroke-width="2"
|
|
d="M0 6h25M0 12h25M0 18h25"
|
|
/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div
|
|
id="offCanvas"
|
|
class="fixed top-16 right-0 w-64 h-screen bg-gray-800 transform translate-x-full transition-transform duration-200 ease-in-out"
|
|
>
|
|
<div class="flex flex-col p-4">
|
|
<a
|
|
href="/git"
|
|
target="_blank"
|
|
class="text-gray-300 hover:text-white px-3 py-2"
|
|
>Git</a
|
|
>
|
|
<a
|
|
class="text-gray-300 hover:text-white px-3 py-2 muted"
|
|
title="Under Construction 🚧👷♂️🏗️"
|
|
target="_blank"
|
|
>CV</a
|
|
>
|
|
<a
|
|
href="https://github.com/fedpo2"
|
|
target="_blank"
|
|
class="text-gray-300 hover:text-white px-3 py-2"
|
|
>GitHub</a
|
|
>
|
|
<a
|
|
href="mailto:federico.nicolas.polidoro@gmail.com"
|
|
target="_blank"
|
|
class="text-gray-300 hover:text-white px-3 py-2"
|
|
>Email</a
|
|
>
|
|
<a
|
|
href="https://www.linkedin.com/in/federico-polidoro-40137a25b/"
|
|
target="_blank"
|
|
class="text-gray-300 hover:text-white px-3 py-2"
|
|
>LinkedIn</a
|
|
>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<script>
|
|
function toggleOffCanvas() {
|
|
const offCanvas = document.getElementById("offCanvas");
|
|
offCanvas.classList.toggle("translate-x-full");
|
|
}
|
|
</script>
|
|
|
|
<div class="pt-16 shadow-md">
|
|
|
|
<img alt="" src="/cover.jpg"
|
|
style="object-fit: cover;"
|
|
class="w-screen h-80 object-cover"
|
|
/>
|
|
|
|
<div class="flex pt-4 gap-2 md-4 text-center flex-col bg-slate-800 text-white">
|
|
<h1 class="font-bold text-6xl antialiased underline font-sans">Fix Screen Tear x11</h1>
|
|
<p class="text-xl font-thin italic">Fecha: 09 Nov 2024</p>
|
|
</div>
|
|
</div>
|
|
<article class=" sm:px-2 md:px-16 lg:px-32">
|
|
<div><h1 id="que-es-el-screen-tear">¿Que es el screen tear?</h1>
|
|
<p>buenas, Si alguna vez instalaron un wm liviano en linux que no use wayland seguramente habrán notado que al momento de mover una ventana en el escritorio o ver un video sucede algo de este estilo.</p>
|
|
<p><img src="https://qph.cf2.quoracdn.net/main-qimg-4994dca8fc9979e8a10d3422cb5f7bcb" alt="Imagen sacada de google donde se demuestra el screen tear"></p>
|
|
<p>Donde la imagen se ve recortada por algunos milisegundos. A mi se me hace muy molesto a la vista cuando estoy mucho tiempo (relativamente) delante de la pantalla.</p>
|
|
<h1 id="solucion">Solucion</h1>
|
|
<p>Esto Parece suceder porque muchos <a href="https://en.wikipedia.org/wiki/X_window_manager">WindowManagers</a> de linux muestran un frame nuevo independientemente de si la gpu logró terminar de dibujar el proximo frame(buffer).</p>
|
|
<p>Encontré un parametro que se le puede pasar al X11 para evitar que se muestre un frame que la gpu aun no termino de actualizar.</p>
|
|
<h2 id="cosas-que-necesitamos">Cosas que necesitamos</h2>
|
|
<ol>
|
|
<li>Tener <code>inxi</code> instalado</li>
|
|
</ol>
|
|
<p>En Arch se puede instalar con un</p>
|
|
<pre tabindex="0"><code>sudo pacman -S inxi
|
|
</code></pre><p>y supongo que lo mismo pero reemplazando <code>pacman -S</code> por <code>apt install</code> en distros debian-base.</p>
|
|
<ol start="2">
|
|
<li>Necesitamos editar uno(o dos) archivos en el <strong>/usr/share/</strong></li>
|
|
</ol>
|
|
<p>Asi que verifica que tengas permisos para poder escribir en ese path.</p>
|
|
<h2 id="paso-a-paso">Paso a Paso</h2>
|
|
<ol>
|
|
<li>Executamos <code>inxi -G</code>.</li>
|
|
</ol>
|
|
<p>Con esto nos daremos cuenta de que tipo de grafica tenemos. En mi caso es una integrada amd</p>
|
|
<pre tabindex="0"><code>i ➜ ~ inxi -G
|
|
Graphics:
|
|
Device-1: Advanced Micro Devices [AMD/ATI] Lucienne driver: amdgpu v: kernel
|
|
</code></pre><p>Por lo que el archivo que tengo que editar es “/usr/share/X11/xorg.conf.d/10-amdgpu.conf”</p>
|
|
<pre tabindex="0"><code>Section "OutputClass"
|
|
Identifier "AMDgpu"
|
|
MatchDriver "amdgpu"
|
|
Driver "amdgpu"
|
|
Option "HotplugDriver" "amdgpu"
|
|
EndSection
|
|
</code></pre><p>Donde añado la opcion “TearFree” “on”</p>
|
|
<pre tabindex="0"><code>Section "OutputClass"
|
|
Identifier "AMDgpu"
|
|
MatchDriver "amdgpu"
|
|
Driver "amdgpu"
|
|
Option "HotplugDriver" "amdgpu"
|
|
Option "TearFree" "on"
|
|
EndSection
|
|
</code></pre><p>Demostracion de como queda</p>
|
|
<p><img src="./tear.gif" alt="demo tear resuelto"></p>
|
|
</div>
|
|
</article>
|
|
|
|
</main>
|
|
<br>
|
|
<footer class="text-center text-sm text-gray-500 mt-12 py-6 border-t">
|
|
© 2025 Federico Polidoro
|
|
</footer>
|
|
</body>
|
|
</html>
|