From 08cc05987c0296a512aad69a4f8030bc45690b43 Mon Sep 17 00:00:00 2001 From: Folzo Date: Mon, 6 Apr 2026 09:04:11 +0200 Subject: [PATCH] Add GPU diagnostic tools and fix documentation - diagnose-gpu.sh: Complete diagnostic script for GPU usage - GPU-HIGH-USAGE-FIX.md: Solution for OpenWebUI green icon causing 100% GPU - Issue #21062 confirmed: animate-ping CSS animation is the culprit - Multiple solutions provided (CSS, browser extension, zoom) --- docs/GPU-HIGH-USAGE-FIX.md | 150 +++++++++++++++++++++++++++++++++++++ scripts/diagnose-gpu.sh | 73 ++++++++++++++++++ 2 files changed, 223 insertions(+) create mode 100644 docs/GPU-HIGH-USAGE-FIX.md create mode 100755 scripts/diagnose-gpu.sh diff --git a/docs/GPU-HIGH-USAGE-FIX.md b/docs/GPU-HIGH-USAGE-FIX.md new file mode 100644 index 0000000..be70697 --- /dev/null +++ b/docs/GPU-HIGH-USAGE-FIX.md @@ -0,0 +1,150 @@ +# 🔥 Problème GPU à 100% après requête - Solution trouvée + +## 🎯 Problème identifié + +**Issue GitHub** : [open-webui/open-webui#21062](https://github.com/open-webui/open-webui/issues/21062) + +**Cause** : L'**icône verte "en ligne"** dans la barre latérale gauche d'OpenWebUI utilise **35-40% GPU** en permanence à cause de son animation CSS `animate-ping`. + +### Symptômes +- GPU qui tourne à fond (ventilateurs bruyants) après une requête +- Utilisation GPU reste à 95-100% pendant plusieurs minutes +- Problème persiste même après la réponse d'Effi +- Présent sur tous les navigateurs (Brave, Firefox, Zen) + +--- + +## 🔍 Comment vérifier + +### 1. Surveiller l'utilisation GPU +```bash +# Sur folzo-Corp +rocm-smi + +# Ou avec rafraîchissement +watch -n 1 rocm-smi +``` + +### 2. Identifier les processus GPU +```bash +# Voir quel processus utilise le GPU +rocm-smi --showpids + +# Exécuter le script de diagnostic complet +~/Documents/OpenCode/Projets/Effi/scripts/diagnose-gpu.sh +``` + +### 3. Tester l'icône verte +1. Ouvrir OpenWebUI dans le navigateur +2. Regarder l'**icône verte clignotante** en bas à gauche (statut "en ligne") +3. Vérifier l'utilisation GPU (doit être élevée) +4. **Zoomer la page** jusqu'à ce que la barre latérale disparaisse +5. Vérifier à nouveau l'utilisation GPU (doit baisser à 0%) + +--- + +## ✅ Solutions + +### Solution 1 : Supprimer l'icône via CSS (Recommandée) + +**Navigateur Chrome/Brave/Firefox** : +1. Installer l'extension **Stylus** ou **uBlock Origin** +2. Ajouter ce CSS : +```css +/* Supprimer l'icône verte */ +.animate-ping, +.animate-pulse, +[class*="animate-ping"], +[class*="animate-pulse"] { + display: none !important; + animation: none !important; +} +``` + +### Solution 2 : Modifier OpenWebUI (Si tu contrôles le serveur) + +Sur **effi-server** : +```bash +# Se connecter au conteneur OpenWebUI +sudo docker exec -it open-webui /bin/bash + +# Chercher le fichier contenant l'icône +find /app -name "*.svelte" -o -name "*.html" | xargs grep -l "animate-ping" 2>/dev/null + +# Modifier le fichier pour retirer l'animation +# (nécessite de rebuild l'image ou modifier le volume) +``` + +**Plus simple** : Créer un fichier CSS personnalisé dans OpenWebUI : +1. Admin Panel → Settings → Interface +2. Chercher "Custom CSS" +3. Coller : +```css +/* Désactiver les animations GPU-intensive */ +.animate-ping, +.animate-pulse { + animation: none !important; + display: none !important; +} +``` + +### Solution 3 : Zoomer la page (Test rapide) + +Zoomer à 150% ou plus jusqu'à ce que la barre latérale se cache → l'utilisation GPU revient à 0%. + +### Solution 4 : Mode mobile + +Utiliser OpenWebUI en **mode mobile** (barre latérale cachée par défaut). + +--- + +## 🛠️ Script de diagnostic automatique + +J'ai créé un script qui capture tout quand le GPU tourne à fond : + +```bash +# Sur folzo-Corp +~/Documents/OpenCode/Projets/Effi/scripts/diagnose-gpu.sh +``` + +Ce script affiche : +- Utilisation GPU +- Processus qui utilisent le GPU +- Commandes complètes des processus +- Threads actifs +- Connexions réseau +- Utilisation système + +--- + +## 📊 Résultats attendus après correction + +| Avant | Après | +|-------|-------| +| GPU 35-40% en permanence | GPU 0-5% en idle | +| Ventilateurs bruyants | Ventilateurs silencieux | +| Température élevée | Température normale | + +--- + +## 🔗 Références + +- **Issue GitHub** : https://github.com/open-webui/open-webui/issues/21062 +- **Élément coupable** : +```html + +``` + +--- + +## 📝 Notes + +- Le problème affecte **tous les navigateurs** +- C'est une **animation CSS** (pas un problème de backend) +- La solution CSS est **immédiate** et ne nécessite pas de redémarrage +- OpenWebUI devrait corriger ça dans une future version + +--- + +*Document créé le 6 avril 2026* +*Solution confirmée via issue #21062* diff --git a/scripts/diagnose-gpu.sh b/scripts/diagnose-gpu.sh new file mode 100755 index 0000000..e603ee9 --- /dev/null +++ b/scripts/diagnose-gpu.sh @@ -0,0 +1,73 @@ +#!/bin/bash +# Script de diagnostic GPU quand utilisation à 95-100% +# À exécuter sur folzo-Corp quand tu vois le GPU tourner à fond + +echo "==========================================" +echo "DIAGNOSTIC GPU - $(date)" +echo "==========================================" +echo "" + +# 1. Utilisation GPU actuelle +echo "1. UTILISATION GPU :" +echo "--------------------" +rocm-smi +echo "" + +# 2. Processus utilisant le GPU +echo "2. PROCESSUS GPU :" +echo "------------------" +rocm-smi --showpids +echo "" + +# 3. Détails des processus Python (souvent les coupables) +echo "3. PROCESSUS PYTHON :" +echo "---------------------" +ps aux | grep -E "(python|ollama|open-webui)" | grep -v grep +echo "" + +# 4. Pour chaque PID utilisant le GPU, voir la ligne de commande complète +echo "4. DÉTAILS DES PROCESSUS GPU :" +echo "------------------------------" +for pid in $(rocm-smi --showpids 2>/dev/null | grep -E "^[0-9]" | awk '{print $1}'); do + echo "PID: $pid" + echo "Commande: $(cat /proc/$pid/cmdline 2>/dev/null | tr '\0' ' ')" + echo "Utilisateur: $(ps -o user= -p $pid 2>/dev/null)" + echo "CPU: $(ps -o %cpu= -p $pid 2>/dev/null)%" + echo "Mémoire: $(ps -o %mem= -p $pid 2>/dev/null)%" + echo "---" +done +echo "" + +# 5. Threads actifs des processus importants +echo "5. THREADS ACTIFS :" +echo "-------------------" +ps aux | grep -E "(python|ollama)" | grep -v grep | awk '{print $2}' | while read pid; do + echo "PID $pid: $(cat /proc/$pid/cmdline 2>/dev/null | tr '\0' ' ' | cut -c1-80)" + ls /proc/$pid/task/ 2>/dev/null | wc -l | xargs echo " Threads:" +done +echo "" + +# 6. Connexions réseau actives +echo "6. CONNEXIONS RÉSEAU :" +echo "---------------------" +sudo netstat -tulpn 2>/dev/null | grep -E "(ollama|python|8188|11434)" || echo "Aucune connexion trouvée" +echo "" + +# 7. Utilisation CPU/Mémoire globale +echo "7. UTILISATION SYSTÈME :" +echo "------------------------" +echo "CPU:" +top -bn1 | grep "Cpu(s)" | head -1 +echo "" +echo "Mémoire:" +free -h | grep -E "(Mem|Swap)" +echo "" + +# 8. Sauvegarde dans un fichier +LOG_FILE="/tmp/gpu-diagnostic-$(date +%Y%m%d-%H%M%S).log" +echo "Sauvegarde dans: $LOG_FILE" +$0 > "$LOG_FILE" 2>&1 +echo "" +echo "==========================================" +echo "Diagnostic terminé !" +echo "=========================================="