Outils pour utilisateurs

Outils du site


tech:notes_linux_graphique_ecran

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
tech:notes_linux_graphique_ecran [2025/12/07 17:54] Jean-Baptistetech:notes_linux_graphique_ecran [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Graphique}}
 +
 +# Notes Linux graphique écran
 +
 +Voir **arandr** l'outil graphique pour configurer **xrandr**
 +
 +Pour connaître le dpi d’un écran, il suffit de taper : 
 +
 +~~~bash
 +xdpyinfo | grep resolution
 +xrandr
 +~~~
 +
 +Test graphique
 +~~~bash
 +apt-get install mesa-utils
 +glxgears
 +__GL_SYNC_TO_VBLANK=0 glxgears
 +~~~
 +
 +Voir 
 +* http://us.download.nvidia.com/XFree86/Linux-x86/367.57/README/openglenvvariables.html
 +* https://www.pcsuggest.com/gpu-benchmarking-and-stress-testing-in-linux/
 +
 +Avez-vous l'accélération 3D 
 +~~~bash
 +glxinfo | grep  direct
 +direct rendering: Yes
 +~~~
 +
 +Sous Ubuntu
 +~~~bash
 +/usr/lib/nux/unity_support_test -p
 +~~~
 +
 +A cause de grsecurity ?
 +apt-get install xresprobe
 +ddcprobe 
 +Erreur de segmentation
 +echo $?
 +139
 +
 +xrandr 
 +Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192
 +VGA-0 disconnected (normal left inverted right x axis y axis)
 +HDMI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
 +   1920x1080     60.00*+
 +   1680x1050     59.95  
 +   1280x1024     75.02    60.02  
 +   1152x864      75.00  
 +   1024x768      75.08    60.00  
 +   800x600       75.00    60.32  
 +   640x480       75.00    60.00  
 +   720x400       70.08  
 +
 +http://doc.ubuntu-fr.org/xrandr
 +
 +
 +### Écran
 +
 +
 +Voir : brightnessctl
 +
 +ou 
 +
 +Portable :
 +
 +Changer la luminosité de l'écran
 +~~~bash
 +# basename -a $(find /sys/devices/pci* -type f -name "*brightness" -not \( -wholename '*/backlight/*' -o  -wholename '*/leds/*' \) )
 +brightness
 +max_brightness
 +actual_brightness
 +# cat $(find /sys/devices/pci* -type f -name "*brightness" -not \( -wholename '*/backlight/*' -o  -wholename '*/leds/*' \) )
 +70
 +255
 +51
 +# dirname $(find /sys/devices/pci* -type f -name "*brightness" -not \( -wholename '*/backlight/*' -o  -wholename '*/leds/*' \) ) | uniq
 +/sys/devices/pci0000:00/0000:00:01.0/drm/card0/card0-LVDS-1/radeon_bl0
 +# echo 40 > /sys/devices/pci0000:00/0000:00:01.0/drm/card0/card0-LVDS-1/radeon_bl0/brightness
 +~~~
 +
 +A titre d'exemple sur mon portable :
 +
 +`/etc/rc.local`
 +~~~bash
 +#!/bin/sh -e
 +
 +sleep 20 && echo 70 > /sys/devices/pci0000:00/0000:00:01.0/drm/card0/card0-LVDS-1/radeon_bl0/brightness
 +exit 0
 +~~~
 +
 +!! Attention : rc.local n'est pas lancé par défaut avec systemd
 +
 +
 +
 +## Autres
 +
 +écran EDID
 +~~~bash
 +apt-get install read-edid
 +get-edid | parse-edid
 +~~~
 +
 +https://wiki.ubuntu.com/X/Config/Resolution
 +~~~bash
 +OUTPUT=$(xrandr 2>&1 | grep --color ' connected primary' | awk '{print $1}')
 +xrandr --output $OUTPUT --mode 1024x768
 +#xrandr --output $OUTPUT --orientation right --mode 768x1024
 +~~~
 +Voir arandr
 +
 +Désactiver / Réactiver la mise en veille après x minutes
 +~~~bash
 +xset s off
 +xset s activate
 +~~~
 +
 +~~~bash
 +discover --vendor-id --model-id pci | uniq
 +~~~
 +
 +Résolution
 +~~~bash
 +xrandr -s 1024x768
 +~~~
 +Voir aussi arandr
 +
 +A tester \\
 +Source https://gist.github.com/waiting-for-dev/9487493
 +~~~bash
 +# Put in /etc/gdm3/Init/Default or ~/.xprofile
 +
 +cvt 1280 720 60
 +xrandr --newmode "1280x720_60.00"   74.50  1280 1344 1472 1664  720 723 728 748 -hsync +vsync
 +xrandr --addmode VGA-0 1280x720_60.00
 +~~~
 +Voir aussi arandr
 +
 +
 +### Limineusité Ecran
 +
 +~~~bash
 +find /sys/devices/pci* -type f -name "*brightness"
 +~~~
 +
 +
 +### Rotation
 +
 +
 +#### Rotation automatique au démarrage sous Gnome
 +
 +Normalement c'est dans 
 +
 +Voir http://bernaerts.dyndns.org/linux/74-ubuntu/309-ubuntu-dual-display-monitor-position-lost
 +
 +NOTE : le fichier pourrait est placé ici : /etc/gnome-settings-daemon/xrandr/monitors.xml
 +
 +`~/.config/monitors.xml`
 +~~~xml
 +<monitors version="1">
 +  <configuration>
 +    <clone>no</clone>
 +    <output name="DVI-I-0">
 +      <vendor>ELO</vendor>
 +      <product>ET1515L-2UWC</product>
 +      <serial>0x000084d6</serial>
 +      <width>768</width>
 +      <height>1024</height>
 +      <rate>60.003841400146484</rate>
 +      <x>0</x>
 +      <y>0</y>
 +      <rotation>right</rotation>
 +      <reflect_x>no</reflect_x>
 +      <reflect_y>no</reflect_y>
 +      <primary>yes</primary>
 +      <presentation>no</presentation>
 +    </output>
 +  </configuration>
 +</monitors>
 +~~~
 +
 +Le "OUTPUT" peut être trouvée grâce à 
 +~~~bash
 +DISPLAY=:0 xrandr 2>&1 | grep ' connected primary' | awk '{print $1}'
 +~~~
 +
 +Une solution pour les PC en UEFI :
 +
 +Passer au grub :
 +~~~
 +video=efifb fbcon=rotate:1
 +~~~
 +
 +
 +##### Solution 
 +
 +Install xrandr
 +~~~bash
 +apt-get x11-xserver-utils
 +~~~
 +
 +`/usr/local/bin/screenrotated.sh`
 +~~~bash
 +#! /bin/bash
 +
 +if [ ! -e /home/user/.config/monitors.xml ]
 +then
 +    env DISPLAY=:0 xrandr -o right
 +fi
 +~~~
 +
 +~~~bash
 +chmod +x /usr/local/bin/screenrotated.sh
 +~~~
 +
 +`/etc/xdg/autostart/display-rotated.desktop`
 +~~~ini
 +[Desktop Entry]
 +Type=Application
 +Name=Hack Display rotated
 +Comment=Display rotated pi/2
 +#Exec=env DISPLAY=':0' xrandr -o right
 +Exec=/usr/local/bin/screenrotated.sh
 +X-GNOME-Autostart-Phase=Desktop
 +X-GNOME-AutoRestart=false
 +X-GNOME-Autostart-Notify=true
 +~~~
 +
 +
 +#### Autres notes rotation d'écrans
 +
 +~~~bash
 +echo 1 | sudo tee /sys/class/graphics/fbcon/rotate
 +
 +# Rotate all virtual framebuffers:
 +echo 1 | sudo tee /sys/class/graphics/fbcon/rotate_all
 +~~~
 +
 +
 +## Autres
 +
 +`~/.config/autostart/lxrandr-autostart.desktop`
 +~~~ini
 +[Desktop Entry]
 +Type=Application
 +Name=Démarrage automatique de LXRandR
 +Comment=Démarrer xrandr avec les paramètres configurés dans LXRandR
 +Exec=sh -c 'xrandr --output HDMI-0 --auto --left-of LVDS --output LVDS --mode 1366x768 --rate 60.00'
 +OnlyShowIn=LXDE
 +~~~
 +
 +Ou
 +
 +`~/.config/autostart/lxqt-config-monitor-autostart.desktop`
 +~~~ini
 +[Desktop Entry]
 +Comment=Autostart monitor settings for LXQt-config-monitor
 +Exec=lxqt-config-monitor -l
 +Name=lxqt-config-monitor-autostart
 +OnlyShowIn=LXQt
 +Type=Application
 +Version=1.0
 +~~~
 +
 +Conf ici :
 +`~/.config/lxqt/lxqt-config-monitor.conf`
 +
 +
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki