Fix primary screen for class room PCs with projector

Fixed EDID modes are set on the HDMI switch (ACER 120Hz problem).
This means that the affected PCs always see a second screen, even if beamer is off.

To avoid confusion, it must be ensured that no information is displayed on invisible devices:
- set primary screen for login dialog
- set primary screen after login
- clone screen
If the primary screen deviates from the standard, this information is maintained via inventory.

In addition, some PCs have different audio autputs than HDMI (or they have multiple HDMI outputs).
It is therefore possible to specify the audio device in the inventory.
This commit is contained in:
Raphael Dannecker 2024-10-14 14:49:25 +02:00
parent b8afbcde08
commit c068e85339
3 changed files with 391 additions and 293 deletions

View file

@ -229,10 +229,12 @@
- name: Fix primary screen for class room PCs with projector
block:
- name: Switch projector off for login
lineinfile:
dest: /usr/share/sddm/scripts/Xsetup
line: 'xrandr --output {{ dual_screen[0] }} --off'
- name: Set primary screen for login
blockinfile:
path: /usr/share/sddm/scripts/Xsetup
block: |
xrandr --output {{ dual_screen[0] }} --primary
when: dual_screen is defined
- name: Deploy fix-screen script
ansible.builtin.template:
src: lmn-fix-screen.j2
@ -247,7 +249,7 @@
Exec=lmn-fix-screen
Type=Application
NoDisplay=true
when: dual_screen is defined
when: groups.CloneScreen is defined and inventory_hostname in groups.CloneScreen
#- name: Avoid starting kscreen (confusing autodetection)
# ansible.builtin.copy: