From 9d9ac03f5d784caacd0965f0028b0ab65faca26e Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Fri, 10 Aug 2018 08:13:55 +0200 Subject: [PATCH] Update Manual.org and Manual.html --- Manual.html | 2561 +++++++++++++++++++++++++++++++++++---------------- Manual.org | 24 +- 2 files changed, 1781 insertions(+), 804 deletions(-) diff --git a/Manual.html b/Manual.html index 3ce8839..41263e1 100644 --- a/Manual.html +++ b/Manual.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Ansible Playbooks for yaVDR 0.7 @@ -240,260 +240,261 @@ for the JavaScript code in this tag.

Inhaltsverzeichnis

-
-

1 User Stories

+
+

1 User Stories

-
-

1.1 yavdr-full

+
+

1.1 yavdr-full

A User wants to install yaVDR without customization and relies on full automation. @@ -526,22 +527,22 @@ Several roles are used to tie everything together:

-
-

1.1.1 Using vdr, pulseaudio and xorg together

+
+

1.1.1 Using vdr, pulseaudio and xorg together

-
-

2 Introduction

+
+

2 Introduction

One of the major problems we faced with customized Ubuntu ISO files as installation media for prior yaVDR versions has been the limited hardware support and the time consuming process to create and update them. An interesting alternative to this approach is to enable the user to choose the installation medium by himself, so point releases, kernel versions and additional drivers can be chosen deliberately. After the basic setup is complete (and a working internet connection is available), a fully customizable install script completes the yaVDR installation.

-
-

3 Installing and configuring yaVDR with Ansible

+
+

3 Installing and configuring yaVDR with Ansible

This is an experimental feature which allows to set up a yaVDR installation based on a normal Ubuntu Server 16.04.x installation using Ansible. @@ -576,11 +577,11 @@ We use a callback to generate tags for all roles autmatically:

-
-

3.1 Install script for local usage

+
+

3.1 Install script for local usage

-
if (( $EUID != 0 )); then
+
if (( $EUID != 0 )); then
     echo "This script must be run using sudo -H or as root"
     exit
 fi
@@ -598,12 +599,12 @@ ansible-playbook yavdr07.yml -b -i 'localhost_inventory
 
-
-

4 Playbooks

+
+

4 Playbooks

-
-

4.1 yavdr07.yml

+
+

4.1 yavdr07.yml

The yavdr07.yml playbook sets up a fully-featured yaVDR installation: @@ -635,13 +636,14 @@ The yavdr07.yml playbook sets up a fully-featured yaVDR installatio - autoinstall-satip # install vdr-plugin-satip if a Sat>IP server has been found - autoinstall-targavfd # install vdr-plugin-targavfd if display is connected - autoinstall-imonlcd # install vdr-plugin-imonlcd if a matchind display is connected - - autoinstall-pvr350 # install vdr-plugin-pgvr350 if a matching card is detected + - autoinstall-pvr350 # install vdr-plugin-pvr350 if a matching card is detected - autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected - autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device is detected - autoinstall-atric-usb # preconfigure lircd for Atric IR-WakeupUSB receiver - autoinstall-yausbir # preconfigure lircd for yaUsbIR receiver - - autoinstall-dvbsky-firmware # download an install required firmware files for dvbsky cards + - autoinstall-dvbsky-firmware # download and install required firmware files for dvbsky cards + - autoinstall-firmware # download and install firmware files for dvb devices - kodi - dvd # set up packages and a udev rule to allow kodi and other players # to play and eject optical media @@ -654,8 +656,8 @@ The yavdr07.yml playbook sets up a fully-featured yaVDR installatio

-
-

4.2 yavdr07-headless.yml

+
+

4.2 yavdr07-headless.yml

For a headless server installation yavdr07-headless.yml is a good choice @@ -677,7 +679,12 @@ For a headless server installation yavdr07-headless.yml is a good c - samba-config - nfs-server - grub-config - - autoinstall-satip + - autoinstall-satip # install vdr-plugin-satip if a Sat>IP server has been found + - autoinstall-pvr350 # install vdr-plugin-pvr350 if a matching card is detected + - autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found + - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected + - autoinstall-dvbsky-firmware # download and install required firmware files for dvbsky cards + - autoinstall-firmware # download and install firmware files for dvb devices - wakeup tags: - always @@ -688,8 +695,8 @@ For a headless server installation yavdr07-headless.yml is a good c

-
-

5 Hosts

+
+

5 Hosts

This playbook can either be used to run the installation on the localhost or any other PC in the network that can be accessed via ssh. Simply add the host names or IP addresses to the hosts file in the respective section: @@ -703,12 +710,12 @@ This playbook can either be used to run the installation on the localhost or any

-
-

6 Group Variables

+
+

6 Group Variables

-
-

6.1 PPAs

+
+

6.1 PPAs

---
@@ -726,8 +733,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.2 VDR user, directories, special configuration and plugins

+
+

6.2 VDR user, directories, special configuration and plugins

# properties of the user vdr and vdr-related options
@@ -748,14 +755,13 @@ This playbook can either be used to run the installation on the localhost or any
 vdr_plugins:
   - vdr-plugin-devstatus
   - vdr-plugin-markad
-  - vdr-plugin-restfulapi
   - vdr-plugin-softhddevice-vpp
 
-
-

6.3 Media directories

+
+

6.3 Media directories

# dictionary of directories for (shared) files. Automatically exported via NFS and Samba if those roles are enabled
@@ -770,8 +776,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.4 NFS

+
+

6.4 NFS

nfs:
@@ -780,8 +786,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.5 Samba

+
+

6.5 Samba

samba:
@@ -791,8 +797,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.6 Additional packages

+
+

6.6 Additional packages

# additional packages you want to install
@@ -808,8 +814,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.7 System pre-configuration

+
+

6.7 System pre-configuration

frontend: vdr
@@ -824,20 +830,20 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

7 Roles

+
+

7 Roles

-
-

7.1 install-dependencies

+
+

7.1 install-dependencies

-
-

7.1.1 tasks

+
+

7.1.1 tasks

    -
  1. main.yml
    +
  2. main.yml
    ---
    @@ -858,19 +864,19 @@ This playbook can either be used to run the installation on the localhost or any
     
    -
    -

    7.2 nvidia experimental drivers

    +
    +

    7.2 nvidia experimental drivers

    install nvidia-396 from ppa:graphics-drivers/ppa

    -
    -

    7.2.1 tasks

    +
    +

    7.2.1 tasks

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -900,15 +906,15 @@ install nvidia-396 from ppa:graphics-drivers/ppa
       
    -
    -

    7.3 yavdr-common

    +
    +

    7.3 yavdr-common

    This role is used to set up a basic yaVDR installation. It creates the directories, installs the vdr and other useful packages.

    -
    -

    7.3.1 default variables

    +
    +

    7.3.1 default variables

    This section is for reference only, please use the files in global_vars for customizations. @@ -921,7 +927,7 @@ This section is for reference only, please use the files in global_vars

      -
    1. Repositories
      +
    2. Repositories

      You can set a list of package repositories which provide the necessary packages. Feel free to use own PPAs if you need special customization to the VDR and it’s plugins. @@ -938,7 +944,7 @@ You can set a list of package repositories which provide the necessary packages.

  3. -
  4. Drivers
    +
  5. Drivers

    Automatically installed drivers can be very useful, but if you know you need a certain driver, you can simply set it’s value to true. If you don’t want a driver to be installed, set it’s value to false. @@ -951,7 +957,7 @@ Automatically installed drivers can be very useful, but if you know you need a c

-
  • Additional Packages
    +
  • Additional Packages

    Add additional packages you would like to have on your installation to this list @@ -965,7 +971,7 @@ Add additional packages you would like to have on your installation to this list

  • -
  • VDR
    +
  • VDR

    This section allows you to set the recording directory, the user and group that runs the vdr and it’s home directory. @@ -998,15 +1004,15 @@ This section allows you to set the recording directory, the user and group that

  • -
    -

    7.3.2 tasks

    +
    +

    7.3.2 tasks

    yavdr-common executes the following tasks:

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -1023,7 +1029,7 @@ yavdr-common executes the following tasks:
       
        -
      1. Disable default installation of recommended packages
        +
      2. Disable default installation of recommended packages

        This task prevents apt to automatically install all recommended dependencies for packages: @@ -1040,14 +1046,14 @@ This task prevents apt to automatically install all recommended dependencies for

    -
  • Set up package repositories
    +
  • Set up package repositories
    - name: add PPAs
       apt_repository:
           repo: '{{ item }}'
           state: present
    -      update_cache: yes
    +      update_cache: no
       with_items: '{{ repositories }}'
       tags:
         - ppa
    @@ -1060,7 +1066,7 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • Use bash instead of dash
    +
  • Use bash instead of dash
    - name: use bash instead of dash
    @@ -1072,10 +1078,10 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • create user vdr
  • -
  • Disable release-upgrade notifications
    +
  • create user vdr
  • +
  • Disable release-upgrade notifications
      -
    1. SOMEDAY move from lineinfile to template
      +
    2. SOMEDAY move from lineinfile to template
      - name: disable release-upgrade notifications
      @@ -1097,7 +1103,7 @@ This task prevents apt to automatically install all recommended dependencies for
       
  • -
  • Install essential packages
    +
  • Install essential packages
    - name: apt | install basic packages
    @@ -1129,7 +1135,7 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • Install additional packages (user defined)
    +
  • Install additional packages (user defined)
    - name: apt | install extra packages
    @@ -1143,17 +1149,17 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • create directories
  • -
  • create sudoers drop-in for vdr
  • +
  • create directories
  • +
  • create sudoers drop-in for vdr
  • -
    -

    7.3.3 templates

    +
    +

    7.3.3 templates

    -
    {{ ansible_managed | comment('c') }}
    +
    {{ ansible_managed | comment('c') }}
     // Recommends are as of now still abused in many packages
     APT::Install-Recommends "0";
     APT::Install-Suggests "0";
    @@ -1161,14 +1167,14 @@ APT::Install-Suggests "0";
     
      -
    1. yavdr sudoers drop-in
      +
    2. yavdr sudoers drop-in

      Allow the vdr user to restart vdr.service and reboot the system

      -
      {{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block restart vdr.service
      -{{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block reboot
      +
      {{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block restart vdr.service
      +{{ vdr.user }} ALL=NOPASSWD: /bin/systemctl --no-block reboot
       
      @@ -1176,12 +1182,12 @@ Allow the vdr user to restart vdr.service and reboot the system
    -
    -

    7.4 collect facts about the system with custom modules

    +
    +

    7.4 collect facts about the system with custom modules

    -
    -

    7.4.1 variables

    +
    +

    7.4.1 variables

    first_run: False
    @@ -1189,12 +1195,12 @@ Allow the vdr user to restart vdr.service and reboot the system
     
    -
    -

    7.4.2 tasks

    +
    +

    7.4.2 tasks

      -
    1. main.yml
      +
    2. main.yml
      - name: get information about usb and pci hardware and loaded kernel modules
      @@ -1234,16 +1240,16 @@ Allow the vdr user to restart vdr.service and reboot the system
       
    -
    -

    7.5 vdr

    +
    +

    7.5 vdr

    -
    -

    7.5.1 tasks

    +
    +

    7.5.1 tasks

      -
    1. install the basic vdr packages
      +
    2. install the basic vdr packages
      ---
      @@ -1262,7 +1268,7 @@ Allow the vdr user to restart vdr.service and reboot the system
       
    3. -
    4. Add svdrp/svdrp-disc to /etc/services
      +
    5. Add svdrp/svdrp-disc to /etc/services
      - name: add svdrp and svdrp-disc to /etc/services
      @@ -1277,7 +1283,7 @@ Allow the vdr user to restart vdr.service and reboot the system
       
    6. -
    7. Set up the recording directory for the vdr user
      +
    8. Set up the recording directory for the vdr user
      - name: create vdr recdir
      @@ -1312,7 +1318,7 @@ Allow the vdr user to restart vdr.service and reboot the system
       
    9. -
    10. Install additional vdr plugins
      +
    11. Install additional vdr plugins

      The additional plugins to install can be set in the variable {{vdr_plugins}} in the group variables @@ -1330,7 +1336,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins

    -
  • copy vdr configuration files (if they don’t exist yet)
    +
  • copy vdr configuration files (if they don’t exist yet)
    - name: ensure vdr is stopped
    @@ -1361,7 +1367,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
     
  • -
  • start vdr after network-online.target
    +
  • start vdr after network-online.target
    - name: create directory for vdr.service systemd drop-in files
    @@ -1382,8 +1388,8 @@ The additional plugins to install can be set in the variable {{vdr_plugins
     
     
    -
    -

    7.5.2 templates

    +
    +

    7.5.2 templates

    Start after network-online.target @@ -1395,12 +1401,12 @@ Start after network-online.target

    -
    -

    7.5.3 files

    +
    +

    7.5.3 files

      -
    1. remote.conf
      +
    2. remote.conf
      LIRC.Up KEY_UP
      @@ -1535,7 +1541,7 @@ XKeySym.Next       XF86AudioNext
       
    3. -
    4. keymacros.conf
      +
    5. keymacros.conf
      # Remote control key macros for VDR
      @@ -1561,12 +1567,12 @@ User0     @osdteletext
       
    -
    -

    7.6 STARTED yavdr-network

    +
    +

    7.6 STARTED yavdr-network

    -
    -

    7.6.1 default variables

    +
    +

    7.6.1 default variables

    install_avahi: true
    @@ -1574,8 +1580,8 @@ User0     @osdteletext
     
    -
    -

    7.6.2 tasks

    +
    +

    7.6.2 tasks

    ---
    @@ -1645,15 +1651,15 @@ User0     @osdteletext
     
    -
    -

    7.7 nfs-server

    +
    +

    7.7 nfs-server

    -
    -

    7.7.1 TODO avahi-services für NFS beim Stoppen des nfs-kernel-servers depublizieren, beim Start wieder announcen

    +
    +

    7.7.1 TODO avahi-services für NFS beim Stoppen des nfs-kernel-servers depublizieren, beim Start wieder announcen

    -
    -

    7.7.2 tasks

    +
    +

    7.7.2 tasks

    ---
    @@ -1682,12 +1688,12 @@ User0     @osdteletext
     
    -
    -

    7.7.3 templates

    +
    +

    7.7.3 templates

      -
    1. /etc/exports
      +
    2. /etc/exports
      /srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
      @@ -1698,7 +1704,7 @@ User0     @osdteletext
       
    3. -
    4. avahi services
      +
    5. avahi services
      <?xml version="1.0" standalone='no'?>
      @@ -1719,12 +1725,13 @@ User0     @osdteletext
       
    -
    -

    7.8 STARTED yavdr-remote

    + +
    +

    7.8 STARTED yavdr-remote

    -
    -

    7.8.1 default variables

    +
    +

    7.8.1 default variables

    lircd0_socket: /var/run/lirc/lircd0
    @@ -1732,8 +1739,8 @@ User0     @osdteletext
     
    -
    -

    7.8.2 tasks

    +
    +

    7.8.2 tasks

    ---
    @@ -1806,12 +1813,12 @@ User0     @osdteletext
     
    -
    -

    7.8.3 templates

    +
    +

    7.8.3 templates

      -
    1. Systemd Drop-in to start vdr with lirc support
      +
    2. Systemd Drop-in to start vdr with lirc support
      {% if frontend != 'kodi' %}
      @@ -1822,7 +1829,7 @@ User0     @osdteletext
       
    3. -
    4. Systemd Drop-in to start lircd2uinput with lircd
      +
    5. Systemd Drop-in to start lircd2uinput with lircd
      [Service]
      @@ -1832,10 +1839,11 @@ User0     @osdteletext
       
    6. -
    7. create /etc/rc_maps.cfg
      +
    8. create /etc/rc_maps.cfg
      -
      #
      +
      {{ ansible_managed | comment }}
      +#
       # Keymaps table
       #
       # This table creates an association between a keycode file and a kernel
      @@ -2023,17 +2031,17 @@ ati_remote    rc-medion-x10-digitainer   /lib/udev/rc_keymaps/rc-medion-x10-digi
       
    -
    -

    7.8.4 files

    +
    +

    7.8.4 files

    -
    -

    7.9 pulseaudio

    +
    +

    7.9 pulseaudio

    -
    -

    7.9.1 tasks

    +
    +

    7.9.1 tasks

    ---
    @@ -2056,8 +2064,8 @@ ati_remote    rc-medion-x10-digitainer   /lib/udev/rc_keymaps/rc-medion-x10-digi
     
    -
    -

    7.9.2 templates

    +
    +

    7.9.2 templates

    # Use PulseAudio by default
    @@ -2079,12 +2087,13 @@ ati_remote    rc-medion-x10-digitainer   /lib/udev/rc_keymaps/rc-medion-x10-digi
     
    -
    -

    7.10 yavdr-xorg

    + +
    +

    7.10 yavdr-xorg

    -
    -

    7.10.1 About the GUI session

    +
    +

    7.10.1 About the GUI session

    The X-Server is started by using the two systemd units xlogin@.service and x@.service provided by the package xlogin. The former is enabled (and started) for the vdr user - which results (using the default settings for the user vdr with the uid 666) in the activation of xlogin@vdr.service when reaching the graphical.target. To simplify starting and stopping the X-server and the desktop session a yavdr-xorg.service is provided by the package yavdr-xorg, which depends on the two units mentioned before. @@ -2113,8 +2122,8 @@ In order to achive a clean shutdown of the session, x@t7.service is

    -
    -

    7.10.2 default variables

    +
    +

    7.10.2 default variables

    first_run: False
    @@ -2137,12 +2146,12 @@ In order to achive a clean shutdown of the session, x@t7.service is
     
    -
    -

    7.10.3 tasks

    +
    +

    7.10.3 tasks

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -2155,7 +2164,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
       
    3. -
    4. setup-xorg.yml
      +
    5. setup-xorg.yml
      ---
      @@ -2276,7 +2285,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
       
    6. -
    7. detect-xorg.yml
      +
    8. detect-xorg.yml
      ---
      @@ -2432,21 +2441,76 @@ In order to achive a clean shutdown of the session, x@t7.service is
         when:
           - nvidia_detected
       
      +
      +
      +
      +
    9. +
    10. intel.yml
      +
      +

      +KMS drivers (like for intel (i915) and amd (radeon)) require additional configuration beneath a customized xorg.conf - for a „static“ output configuration (which works if the TV or AV receiver is not turned on) we need to force loading the display(s) EDID early during the boot process. +

      + +

      +This task therefore performs the following actions after the xrandr detection has been executed: +

      +
        +
      • create an initramfs-hook to copy the EDID(s) into the initramfs
      • +
      • get the connector names and match them to the ones determined by xrandr
      • +
      • add kernel boot arguments to set EDID and mode (refreshrate and resolution) for all outputs
      • +
      • recreate and update initramfs and grub config
      • +
      + +

      +Please note that rescanning the connected displays works only after removing the forced loading of EDID(s) during boot (call clean-edids) and a reboot. +

      +
      +
      - name: "create initramfs hook to copy EDID files"
      +  copy:
      +    src: files/include-edid-data.sh
      +    dest: '/etc/initramfs-tools/hooks/include-edid-data'
      +    mode: 0755
      +    force: yes
      +
      +- name: "create /lib/firmware/edid"
      +  file:
      +    state: directory
      +    dest: /lib/firmware/edid
      +# TODO:
      +# - write EDID files to /lib/firmware/edid/
      +# - complete template for grub.d
      +name: "add kernel boot parameters for static display configuration"
      +template:
      +  src: templates/grub.d/intel.j2
      +  dest: /etc/grub.d/99_intel
      +  mode: 0755
      +  notify: ['Update Initramfs', 'Update GRUB']
      +
       
    -
    -

    7.10.4 templates

    +
    +

    7.10.4 templates

      -
    1. xorg
      +
    2. grub
      +
      +
      +
      {% set output_flag = 'D' if ("HDMI" in xorg.primary.connector or "DVI" in xorg.primary.connector or "DP" in xorg.primary.connector) else 'e' %} 
      +GRUB_CMDLINE_LINUX+=" video={{ xorg.primary.drm_connector }}:{{ xorg.primary.mode|replace('_', '@') }}{{ output_flag }} drm.edid_firmware={{ xorg.primary.drm_connector }}:edid/edid.bin"
      +# TODO: configure additional monitors (second monitor on, all others off)
      +
      +
      +
      +
    3. +
    4. xorg
        -
      1. x-verbose@.service
        -
        +
      2. x-verbose@.service
        +
        # file: roles/yavdr-xorg/templates/systemd/system/x-verbose@.service.j2
         [Unit]
        @@ -2461,8 +2525,8 @@ In order to achive a clean shutdown of the session, x@t7.service is
         
      3. -
      4. Drop-in snippet for x@.service
        -
        +
      5. Drop-in snippet for x@.service
        +
        [Unit]
         After=plymouth.service
        @@ -2487,8 +2551,8 @@ In order to achive a clean shutdown of the session, x@t7.service is
         
      6. -
      7. Drop-in snippet for vdr.service
        -
        +
      8. Drop-in snippet for vdr.service
        +
        {{ ansible_managed | comment }}
         [Unit]
        @@ -2499,8 +2563,8 @@ In order to achive a clean shutdown of the session, x@t7.service is
         
      9. -
      10. xorg.conf snippets
        -
        +
      11. xorg.conf snippets
        +
        {{ ansible_managed | comment }}
         
        @@ -2513,8 +2577,8 @@ EndSection
         
      12. -
      13. xorg.conf
        -
        +
      14. xorg.conf
        +
        Section "Device"
                 Identifier "nvidia"
        @@ -2640,14 +2704,14 @@ EndSection
         
        -
        {{ ansible_managed | comment }}
        +
        {{ ansible_managed | comment }}
         
         Section "ServerLayout"
             Identifier     "Layout0"
             Screen      0  "Screen0"
        -    {% if xorg.best_tv_mode.secondary is defined %}
        +    {% if xorg.best_tv_mode.secondary is defined %}
             Screen      1  "Screen1" RightOf "Screen0"
        -    {% endif %}
        +    {% endif %}
             InputDevice    "Keyboard0" "CoreKeyboard"
             InputDevice    "Mouse0" "CorePointer"
         EndSection
        @@ -2684,54 +2748,54 @@ Section "Monitor"
             Identifier     "Monitor0"
             VendorName     "Unknown"
             ModelName      "Unknown"
        -{# TODO: VGA2SCART support (if needed)
        -{% if system.x11.display.0.default == "VGA2Scart_4_3" or system.x11.display.0.default == "VGA2Scart_16_9" %}
        +{# TODO: VGA2SCART support (if needed)
        +{% if system.x11.display.0.default == "VGA2Scart_4_3" or system.x11.display.0.default == "VGA2Scart_16_9" %}
             HorizSync       14-17
             VertRefresh     49-61
        -    {% if system.x11.display.0.default == "VGA2Scart_4_3" %}
        +    {% if system.x11.display.0.default == "VGA2Scart_4_3" %}
             Modeline "VGA2Scart_4_3" 13.875 720 744 808 888 576 580 585 625 -HSync -Vsync interlace
        -    {% elif system.x11.display.0.default == "VGA2Scart_16_9" %}
        +    {% elif system.x11.display.0.default == "VGA2Scart_16_9" %}
             Modeline "VGA2Scart_16_9" 19 1024 1032 1120 1216 576 581 586 625 -Hsync -Vsync interlace
        -    {% endif %}
        -{% endif %}
        +    {% endif %}
        +{% endif %}
         #}
             Option         "DPMS"
             Option         "ExactModeTimingsDVI" "True"
         EndSection
         
         
        -{% if xrandr.best_tv_mode.secondary is defined %}
        +{% if xrandr.best_tv_mode.secondary is defined %}
         Section "Monitor"
             Identifier     "Monitor1"
             VendorName     "Unknown"
             ModelName      "Unknown"
        -{#
        -{% if system.x11.display.1.default in ("VGA2Scart_4_3",  "VGA2Scart_16_9") %}
        +{#
        +{% if system.x11.display.1.default in ("VGA2Scart_4_3",  "VGA2Scart_16_9") %}
             HorizSync       14-17
             VertRefresh     49-61
        -    {% if system.x11.display.1.default == "VGA2Scart_4_3" %}
        +    {% if system.x11.display.1.default == "VGA2Scart_4_3" %}
             Modeline "VGA2Scart_4_3" 13.875 720 744 808 888 576 580 585 625 -HSync -Vsync interlace
        -    {% elif system.x11.display.1.default == "VGA2Scart_16_9" %}
        +    {% elif system.x11.display.1.default == "VGA2Scart_16_9" %}
             Modeline "VGA2Scart_16_9" 19 1024 1032 1120 1216 576 581 586 625 -Hsync -Vsync interlace
        -    {% endif %}
        +    {% endif %}
             Option         "DPMS"
             Option         "ExactModeTimingsDVI" "True"
        -{% endif %}
        +{% endif %}
         #}
         EndSection
        -{% endif %}
        +{% endif %}
         
         Section "Device"
             Identifier     "Device0"
        -{% if system.hardware.nvidia.detected %}
        +{% if system.hardware.nvidia.detected %}
             Driver         "nvidia"
             VendorName     "NVIDIA Corporation"
        -{% endif %}
        +{% endif %}
             Screen          0
             Option         "DPI" "100x100"
        -{% if system.hardware.nvidia.busid is defined and system.hardware.busid %}
        +{% if system.hardware.nvidia.busid is defined and system.hardware.busid %}
             BusID          "PCI: {{ system.hardware.nvidia.busid }}"
        -{% endif %}
        +{% endif %}
             Option         "NoLogo" "True"
             Option         "UseEvents" "True"
             Option         "TripleBuffer" "False"
        @@ -2742,17 +2806,17 @@ Section "Device"
             Option         "FlatPanelProperties" "Scaling = Native"
         EndSection
         
        -{% if xrandr.best_tv_mode.secondary is defined %}
        +{% if xrandr.best_tv_mode.secondary is defined %}
         Section "Device"
             Identifier     "Device1"
        -    {% if system.hardware.nvidia.detected %}
        +    {% if system.hardware.nvidia.detected %}
             Driver         "nvidia"
             VendorName     "NVIDIA Corporation"
        -    {% endif %}
        +    {% endif %}
             Screen          1
        -    {% if system.hardware.nvidia.busid is defined and system.hardware.nvidia.busid %}
        +    {% if system.hardware.nvidia.busid is defined and system.hardware.nvidia.busid %}
             BusID          "PCI: {{ system.hardware.nvidia.busid }}"
        -    {% endif %}
        +    {% endif %}
             Option         "NoLogo" "True"
             Option         "UseEvents" "True"
             Option         "TripleBuffer" "False"
        @@ -2760,7 +2824,7 @@ Section "Device"
             Option         "TwinView" "0"
             Option         "DynamicTwinView" "0"
         EndSection
        -{% endif %}
        +{% endif %}
         
         
         Section "Screen"
        @@ -2770,19 +2834,19 @@ Section "Screen"
             DefaultDepth    24
             SubSection     "Display"
                 Depth       24
        -{% if xrandr.best_tv_mode.primary is defined %}
        -        Modes      "{{ xrandr.best_tv_mode.primary.mode }}"{#{% for mode in xrandr %}{% if mode != system.x11.display.0.default %} "{{ mode }}"{% endif %}{% endfor %}#} nvidia-auto-select
        +{% if xrandr.best_tv_mode.primary is defined %}
        +        Modes      "{{ xrandr.best_tv_mode.primary.mode }}"{#{% for mode in xrandr %}{% if mode != system.x11.display.0.default %} "{{ mode }}"{% endif %}{% endfor %}#} nvidia-auto-select
         
        -{% elif system.hardware.nvidia.detected == 1 %}
        +{% elif system.hardware.nvidia.detected == 1 %}
                 Modes      "nvidia-auto-select"
        -{% endif %}
        +{% endif %}
             EndSubSection
        -{% if system.x11.display.0.default or system.x11.default %}
        -    {% if system.x11.display.0.device is definded and system.x11.display.0.device %}
        -    Option         "ConnectedMonitor" {{ system.x11.display.0.device }}
        -    {% else %}
        -    Option         "ConnectedMonitor" {{ system.x11.default }}
        -    {% endif %}
        +{% if system.x11.display.0.default or system.x11.default %}
        +    {% if system.x11.display.0.device is definded and system.x11.display.0.device %}
        +    Option         "ConnectedMonitor" {{ system.x11.display.0.device }}
        +    {% else %}
        +    Option         "ConnectedMonitor" {{ system.x11.default }}
        +    {% endif %}
             #     Option         "ConnectedMonitor" "<?cs if:(?system.x11.display.0.device) ?><?cs call:fix_display_name(system.x11.display.0.device) ?><?cs else ?><?cs var:system.x11.default ?><?cs /if ?><?cs if:(?system.x11.dualhead.enabled && system.x11.dualhead.enabled == 1) ?>, <?cs call:fix_display_name(system.x11.display.1.device) ?><?cs /if ?>"
             #Option         "ConnectedMonitor"
             "<?cs if:(?system.x11.display.0.device) ?>
        @@ -2800,10 +2864,10 @@ Section "Screen"
         #     Option          "MetaModes" "<?cs call:fix_display_name(system.x11.display.0.device) ?>: <?cs var:system.x11.display.0.default ?> { ViewPortIn=<?cs var:system.x11.display.0.viewport.in.x ?>x<?cs var:system.x11.display.0.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.0.viewport.out.x ?>x<?cs var:system.x11.display.0.viewport.out.y ?>+<?cs var:system.x11.display.0.viewport.out.plusx ?>+<?cs var:system.x11.display.0.viewport.out.plusy ?> }"
         # <?cs each:mode = system.x11.display.0.mode ?><?cs if:(mode != system.x11.display.0.default) ?>
         #     Option          "MetaModes" "<?cs call:fix_display_name(system.x11.display.0.device) ?>: <?cs var:mode ?> { ViewPortIn=<?cs var:system.x11.display.0.viewport.in.x ?>x<?cs var:system.x11.display.0.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.0.viewport.out.x ?>x<?cs var:system.x11.display.0.viewport.out.y ?>+<?cs var:system.x11.display.0.viewport.out.plusx ?>+<?cs var:system.x11.display.0.viewport.out.plusy ?> }"<?cs /if ?><?cs /each ?> 
        -{% endif %}
        +{% endif %}
         EndSection
         
        -{% if system.x11.dualhead.enabled == "1" %}
        +{% if system.x11.dualhead.enabled == "1" %}
         Section "Screen"
         
              Identifier     "Screen1"
        @@ -2812,12 +2876,12 @@ Section "Screen"
              DefaultDepth    24
              SubSection     "Display"
                  Depth       24
        -{% if system.x11.display.0.default is defined and system.x11.display.0.default %}
        -         Modes      "{{ system.x11.display.1.default }}"{% for mode in system.x11.display.1.mode %}{% if mode != system.x11.display.1.default %} "{{ mode }}"{% endif %}{% endfor %}
        +{% if system.x11.display.0.default is defined and system.x11.display.0.default %}
        +         Modes      "{{ system.x11.display.1.default }}"{% for mode in system.x11.display.1.mode %}{% if mode != system.x11.display.1.default %} "{{ mode }}"{% endif %}{% endfor %}
         
        -{% elif system.hardware.nvidia.detected == "1" %}
        +{% elif system.hardware.nvidia.detected == "1" %}
                  Modes      "nvidia-auto-select"
        -{% endif %}
        +{% endif %}
               EndSubSection
         
         # <?cs if:(?system.x11.display.1.default && system.x11.display.1.default != "" && system.x11.display.1.default != "disabled") ?>
        @@ -2832,15 +2896,15 @@ Section "Screen"
         #     Option          "MetaModes" "<?cs call:fix_display_name(system.x11.display.1.device) ?>: <?cs var:mode ?> { ViewPortIn=<?cs var:system.x11.display.1.viewport.in.x ?>x<?cs var:system.x11.display.1.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.1.viewport.out.x ?>x<?cs var:system.x11.display.1.viewport.out.y ?>+<?cs var:system.x11.display.1.viewport.out.plusx ?>+<?cs var:system.x11.display.1.viewport.out.plusy ?> }"<?cs /if ?><?cs /each ?>
         # <?cs /if ?>
         EndSection
        -{% endif %}
        +{% endif %}
         
    5. -
    6. vdr
      -
      +
    7. vdr
      +

      Set environment variables for system locale and user session on startup

      @@ -2855,18 +2919,47 @@ Set environment variables for system locale and user session on startup
    +
    +

    7.10.5 files

    +
    +
    +
      +
    1. initramfs EDID hook
      +
      +
      +
      #!/bin/bash
      +# Created by yavdr-ansible.
      +# This hook copies EDID files with the naming scheme "edid.${OUTPUT}.bin" to the initramfs.
      +
      +[ "$1" = "prereqs" ] && { echo "udev"; exit 0; }
      +
      +# load hook helper functions
      +. /usr/share/initramfs-tools/hook-functions
      +
      +rm /lib/firmware/edid/edid.*.bin
      +find "/etc/X11/" -name "edid.*.bin" -type f -exec cp -t "/lib/firmware/edid/" {} +
      +mkdir -p "${DESTDIR}/lib/firmware/edid"
      +find "/etc/X11/" -name "edid.*.bin" -type f -exec cp -t "${DESTDIR}/lib/firmware/edid/" {} +
      +manual_add_modules i915 radeon
      +exit 0
      +
      +
      +
      +
    2. +
    +
    -
    -

    7.11 yavdr-desktop

    +
    +

    7.11 yavdr-desktop

    -
    -

    7.11.1 Tasks

    +
    +

    7.11.1 Tasks

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -2916,6 +3009,14 @@ Set environment variables for system locale and user session on startup
             owner: '{{ vdr.user }}'
             group: '{{ vdr.group }}'
       
      +- name: expand rc2.xml for openbox on second display
      +  template:
      +      src: 'templates/openbox/rc2.xml.j2'
      +      dest: '{{ vdr.home }}/.config/openbox/rc2.xml'
      +      mode: 0644
      +      owner: '{{ vdr.user }}'
      +      group: '{{ vdr.group }}'
      +
       - name: create yavdr-desktop.target for the user session
         template:
             src: 'templates/systemd/user/yavdr-desktop.target.j2'
      @@ -3007,14 +3108,14 @@ Set environment variables for system locale and user session on startup
       
    -
    -

    7.11.2 Templates

    +
    +

    7.11.2 Templates

      -
    1. xorg configuration
      +
    2. xorg configuration
        -
      1. .Xresources
        +
      2. .Xresources
        xterm*background: Black
        @@ -3037,11 +3138,11 @@ XTerm.vt100.font: 7x13
         
      3. -
      4. .xinitrc
        +
      5. .xinitrc
        #!/bin/bash
        -{{ ansible_managed | comment }}
        +{{ ansible_managed | comment }}
         exec openbox-session
         
        @@ -3049,9 +3150,9 @@ XTerm.vt100.font: 7x13
    3. -
    4. openbox
      +
    5. openbox
        -
      1. autostart
        +
      2. autostart
        # forward environment variables to an environment file and the systemd user session
        @@ -3060,12 +3161,12 @@ systemctl --user import-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR DBUS_SESS
         
         feh --bg-center "/usr/share/yavdr/images/yavdr_logo.png"
         
        -enabled_services=(
        +enabled_services=(
             "tmux.service" "detect-second-display.service"
             "openbox-second.service" "osd2web.service"
             "yavdr-frontend.service" "pulseaudio.socket"
        -    "pulseaudio.service" "wm-exit.service" "irexec.service")
        -disabled_services=()
        +    "pulseaudio.service" "wm-exit.service" "irexec.service")
        +disabled_services=()
         
         # enable configured services for the user session
         for service in "${enabled_services[@]}"; do
        @@ -3077,7 +3178,7 @@ feh --bg-center "/usr/share/yavdr/images/yavdr_logo.png
           systemctl --user disable "$service"
         done
         
        -if which dbus-update-activation-environment >/dev/null 2>&1; then
        +if which dbus-update-activation-environment >/dev/null 2>&1; then
                 dbus-update-activation-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR
         fi
         
        @@ -3087,7 +3188,7 @@ systemctl --user isolate yavdr-desktop.target
         
      3. -
      4. rc.xml
        +
      5. rc.xml
        <?xml version="1.0" encoding="UTF-8"?>
        @@ -3903,6 +4004,826 @@ systemctl --user isolate yavdr-desktop.target
           </applications>
         </openbox_config>
         
        +
        +
        +
        +
      6. +
      7. rc2.xml
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<openbox_config xmlns="http://openbox.org/3.4/rc" xmlns:xi="http://www.w3.org/2001/XInclude">
        +<!-- Do not edit this file, it will be overwritten on install.
        +        Copy the file to $HOME/.config/openbox/ instead. -->
        +  <resistance>
        +    <strength>10</strength>
        +    <screen_edge_strength>20</screen_edge_strength>
        +  </resistance>
        +  <focus>
        +    <focusNew>no</focusNew>
        +    <!-- always try to focus new windows when they appear. other rules do
        +       apply -->
        +    <followMouse>no</followMouse>
        +    <!-- move focus to a window when you move the mouse into it -->
        +    <focusLast>yes</focusLast>
        +    <!-- focus the last used window when changing desktops, instead of the one
        +       under the mouse pointer. when followMouse is enabled -->
        +    <underMouse>no</underMouse>
        +    <!-- move focus under the mouse, even when the mouse is not moving -->
        +    <focusDelay>200</focusDelay>
        +    <!-- when followMouse is enabled, the mouse must be inside the window for
        +       this many milliseconds (1000 = 1 sec) before moving focus to it -->
        +    <raiseOnFocus>no</raiseOnFocus>
        +    <!-- when followMouse is enabled, and a window is given focus by moving the
        +       mouse into it, also raise the window -->
        +  </focus>
        +  <placement>
        +    <policy>Smart</policy>
        +    <!-- 'Smart' or 'UnderMouse' -->
        +    <center>yes</center>
        +    <!-- whether to place windows in the center of the free area found or
        +       the top left corner -->
        +    <monitor>Active</monitor>
        +    <!-- with Smart placement on a multi-monitor system, try to place new windows
        +       on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
        +       the active window is, 'Primary' - only on the primary monitor -->
        +    <primaryMonitor>Active</primaryMonitor>
        +    <!-- The monitor where Openbox should place popup dialogs such as the
        +       focus cycling popup, or the desktop switch popup.  It can be an index
        +       from 1, specifying a particular monitor.  Or it can be one of the
        +       following: 'Mouse' - where the mouse is, or
        +                  'Active' - where the active window is -->
        +  </placement>
        +  <theme>
        +    <name>Onyx</name>
        +    <titleLayout>NLIMC</titleLayout>
        +    <!--
        +      available characters are NDSLIMC, each can occur at most once.
        +      N: window icon
        +      L: window label (AKA title).
        +      I: iconify
        +      M: maximize
        +      C: close
        +      S: shade (roll up/down)
        +      D: omnipresent (on all desktops).
        +  -->
        +    <keepBorder>no</keepBorder>
        +    <animateIconify>yes</animateIconify>
        +    <font place="ActiveWindow">
        +      <name>sans</name>
        +      <size>8</size>
        +      <!-- font size in points -->
        +      <weight>bold</weight>
        +      <!-- 'bold' or 'normal' -->
        +      <slant>normal</slant>
        +      <!-- 'italic' or 'normal' -->
        +    </font>
        +    <font place="InactiveWindow">
        +      <name>sans</name>
        +      <size>8</size>
        +      <!-- font size in points -->
        +      <weight>bold</weight>
        +      <!-- 'bold' or 'normal' -->
        +      <slant>normal</slant>
        +      <!-- 'italic' or 'normal' -->
        +    </font>
        +    <font place="MenuHeader">
        +      <name>sans</name>
        +      <size>9</size>
        +      <!-- font size in points -->
        +      <weight>normal</weight>
        +      <!-- 'bold' or 'normal' -->
        +      <slant>normal</slant>
        +      <!-- 'italic' or 'normal' -->
        +    </font>
        +    <font place="MenuItem">
        +      <name>sans</name>
        +      <size>9</size>
        +      <!-- font size in points -->
        +      <weight>normal</weight>
        +      <!-- 'bold' or 'normal' -->
        +      <slant>normal</slant>
        +      <!-- 'italic' or 'normal' -->
        +    </font>
        +    <font place="ActiveOnScreenDisplay">
        +      <name>sans</name>
        +      <size>9</size>
        +      <!-- font size in points -->
        +      <weight>bold</weight>
        +      <!-- 'bold' or 'normal' -->
        +      <slant>normal</slant>
        +      <!-- 'italic' or 'normal' -->
        +    </font>
        +    <font place="InactiveOnScreenDisplay">
        +      <name>sans</name>
        +      <size>9</size>
        +      <!-- font size in points -->
        +      <weight>bold</weight>
        +      <!-- 'bold' or 'normal' -->
        +      <slant>normal</slant>
        +      <!-- 'italic' or 'normal' -->
        +    </font>
        +  </theme>
        +  <desktops>
        +    <!-- this stuff is only used at startup, pagers allow you to change them
        +       during a session
        +
        +       these are default values to use when other ones are not already set
        +       by other applications, or saved in your session
        +
        +       use obconf if you want to change these without having to log out
        +       and back in -->
        +    <number>2</number>
        +    <firstdesk>1</firstdesk>
        +    <names>
        +      <!-- set names up here if you want to, like this:
        +    <name>desktop 1</name>
        +    <name>desktop 2</name>
        +    -->
        +    </names>
        +    <popupTime>875</popupTime>
        +    <!-- The number of milliseconds to show the popup for when switching
        +       desktops.  Set this to 0 to disable the popup. -->
        +  </desktops>
        +  <resize>
        +    <drawContents>yes</drawContents>
        +    <popupShow>Nonpixel</popupShow>
        +    <!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
        +    <popupPosition>Center</popupPosition>
        +    <!-- 'Center', 'Top', or 'Fixed' -->
        +    <popupFixedPosition>
        +      <!-- these are used if popupPosition is set to 'Fixed' -->
        +      <x>10</x>
        +      <!-- positive number for distance from left edge, negative number for
        +         distance from right edge, or 'Center' -->
        +      <y>10</y>
        +      <!-- positive number for distance from top edge, negative number for
        +         distance from bottom edge, or 'Center' -->
        +    </popupFixedPosition>
        +  </resize>
        +  <!-- You can reserve a portion of your screen where windows will not cover when
        +     they are maximized, or when they are initially placed.
        +     Many programs reserve space automatically, but you can use this in other
        +     cases. -->
        +  <margins>
        +    <top>0</top>
        +    <bottom>0</bottom>
        +    <left>0</left>
        +    <right>0</right>
        +  </margins>
        +  <dock>
        +    <position>TopLeft</position>
        +    <!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
        +    <floatingX>0</floatingX>
        +    <floatingY>0</floatingY>
        +    <noStrut>no</noStrut>
        +    <stacking>Above</stacking>
        +    <!-- 'Above', 'Normal', or 'Below' -->
        +    <direction>Vertical</direction>
        +    <!-- 'Vertical' or 'Horizontal' -->
        +    <autoHide>no</autoHide>
        +    <hideDelay>300</hideDelay>
        +    <!-- in milliseconds (1000 = 1 second) -->
        +    <showDelay>300</showDelay>
        +    <!-- in milliseconds (1000 = 1 second) -->
        +    <moveButton>Middle</moveButton>
        +    <!-- 'Left', 'Middle', 'Right' -->
        +  </dock>
        +  <keyboard>
        +    <chainQuitKey>C-g</chainQuitKey>
        +    <!-- Keybindings for desktop switching -->
        +    <keybind key="C-A-Left">
        +      <action name="GoToDesktop">
        +        <to>left</to>
        +        <wrap>no</wrap>
        +      </action>
        +    </keybind>
        +    <keybind key="C-A-Right">
        +      <action name="GoToDesktop">
        +        <to>right</to>
        +        <wrap>no</wrap>
        +      </action>
        +    </keybind>
        +    <keybind key="C-A-Up">
        +      <action name="GoToDesktop">
        +        <to>up</to>
        +        <wrap>no</wrap>
        +      </action>
        +    </keybind>
        +    <keybind key="C-A-Down">
        +      <action name="GoToDesktop">
        +        <to>down</to>
        +        <wrap>no</wrap>
        +      </action>
        +    </keybind>
        +    <keybind key="S-A-Left">
        +      <action name="SendToDesktop">
        +        <to>left</to>
        +        <wrap>no</wrap>
        +      </action>
        +    </keybind>
        +    <keybind key="S-A-Right">
        +      <action name="SendToDesktop">
        +        <to>right</to>
        +        <wrap>no</wrap>
        +      </action>
        +    </keybind>
        +    <keybind key="S-A-Up">
        +      <action name="SendToDesktop">
        +        <to>up</to>
        +        <wrap>no</wrap>
        +      </action>
        +    </keybind>
        +    <keybind key="S-A-Down">
        +      <action name="SendToDesktop">
        +        <to>down</to>
        +        <wrap>no</wrap>
        +      </action>
        +    </keybind>
        +    <keybind key="W-F1">
        +      <action name="GoToDesktop">
        +        <to>1</to>
        +      </action>
        +    </keybind>
        +    <keybind key="W-F2">
        +      <action name="GoToDesktop">
        +        <to>2</to>
        +      </action>
        +    </keybind>
        +    <keybind key="W-F3">
        +      <action name="GoToDesktop">
        +        <to>3</to>
        +      </action>
        +    </keybind>
        +    <keybind key="W-F4">
        +      <action name="GoToDesktop">
        +        <to>4</to>
        +      </action>
        +    </keybind>
        +    <keybind key="W-d">
        +      <action name="ToggleShowDesktop"/>
        +    </keybind>
        +    <!-- Keybindings for windows -->
        +    <keybind key="A-F4">
        +      <action name="Close"/>
        +    </keybind>
        +    <keybind key="A-Escape">
        +      <action name="Lower"/>
        +      <action name="FocusToBottom"/>
        +      <action name="Unfocus"/>
        +    </keybind>
        +    <keybind key="A-space">
        +      <action name="ShowMenu">
        +        <menu>client-menu</menu>
        +      </action>
        +    </keybind>
        +    <!-- Take a screenshot of the current window with scrot when Alt+Print are pressed -->
        +    <keybind key="A-Print">
        +      <action name="Execute">
        +        <command>scrot -s</command>
        +      </action>
        +    </keybind>
        +    <!-- Keybindings for window switching -->
        +    <keybind key="A-Tab">
        +      <action name="NextWindow">
        +        <finalactions>
        +          <action name="Focus"/>
        +          <action name="Raise"/>
        +          <action name="Unshade"/>
        +        </finalactions>
        +      </action>
        +    </keybind>
        +    <keybind key="A-S-Tab">
        +      <action name="PreviousWindow">
        +        <finalactions>
        +          <action name="Focus"/>
        +          <action name="Raise"/>
        +          <action name="Unshade"/>
        +        </finalactions>
        +      </action>
        +    </keybind>
        +    <keybind key="C-A-Tab">
        +      <action name="NextWindow">
        +        <panels>yes</panels>
        +        <desktop>yes</desktop>
        +        <finalactions>
        +          <action name="Focus"/>
        +          <action name="Raise"/>
        +          <action name="Unshade"/>
        +        </finalactions>
        +      </action>
        +    </keybind>
        +    <!-- Keybindings for window switching with the arrow keys -->
        +    <keybind key="W-S-Right">
        +      <action name="DirectionalCycleWindows">
        +        <direction>right</direction>
        +      </action>
        +    </keybind>
        +    <keybind key="W-S-Left">
        +      <action name="DirectionalCycleWindows">
        +        <direction>left</direction>
        +      </action>
        +    </keybind>
        +    <keybind key="W-S-Up">
        +      <action name="DirectionalCycleWindows">
        +        <direction>up</direction>
        +      </action>
        +    </keybind>
        +    <keybind key="W-S-Down">
        +      <action name="DirectionalCycleWindows">
        +        <direction>down</direction>
        +      </action>
        +    </keybind>
        +  </keyboard>
        +  <mouse>
        +    <dragThreshold>1</dragThreshold>
        +    <!-- number of pixels the mouse must move before a drag begins -->
        +    <doubleClickTime>500</doubleClickTime>
        +    <!-- in milliseconds (1000 = 1 second) -->
        +    <screenEdgeWarpTime>400</screenEdgeWarpTime>
        +    <!-- Time before changing desktops when the pointer touches the edge of the
        +       screen while moving a window, in milliseconds (1000 = 1 second).
        +       Set this to 0 to disable warping -->
        +    <screenEdgeWarpMouse>false</screenEdgeWarpMouse>
        +    <!-- Set this to TRUE to move the mouse pointer across the desktop when
        +       switching due to hitting the edge of the screen -->
        +    <context name="Frame">
        +      <mousebind button="A-Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +      </mousebind>
        +      <mousebind button="A-Left" action="Click">
        +        <action name="Unshade"/>
        +      </mousebind>
        +      <mousebind button="A-Left" action="Drag">
        +        <action name="Move"/>
        +      </mousebind>
        +      <mousebind button="A-Right" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="Unshade"/>
        +      </mousebind>
        +      <mousebind button="A-Right" action="Drag">
        +        <action name="Resize"/>
        +      </mousebind>
        +      <mousebind button="A-Middle" action="Press">
        +        <action name="Lower"/>
        +        <action name="FocusToBottom"/>
        +        <action name="Unfocus"/>
        +      </mousebind>
        +      <mousebind button="A-Up" action="Click">
        +        <action name="GoToDesktop">
        +          <to>previous</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="A-Down" action="Click">
        +        <action name="GoToDesktop">
        +          <to>next</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="C-A-Up" action="Click">
        +        <action name="GoToDesktop">
        +          <to>previous</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="C-A-Down" action="Click">
        +        <action name="GoToDesktop">
        +          <to>next</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="A-S-Up" action="Click">
        +        <action name="SendToDesktop">
        +          <to>previous</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="A-S-Down" action="Click">
        +        <action name="SendToDesktop">
        +          <to>next</to>
        +        </action>
        +      </mousebind>
        +    </context>
        +    <context name="Titlebar">
        +      <mousebind button="Left" action="Drag">
        +        <action name="Move"/>
        +      </mousebind>
        +      <mousebind button="Left" action="DoubleClick">
        +        <action name="ToggleMaximize"/>
        +      </mousebind>
        +      <mousebind button="Up" action="Click">
        +        <action name="if">
        +          <shaded>no</shaded>
        +          <then>
        +            <action name="Shade"/>
        +            <action name="FocusToBottom"/>
        +            <action name="Unfocus"/>
        +            <action name="Lower"/>
        +          </then>
        +        </action>
        +      </mousebind>
        +      <mousebind button="Down" action="Click">
        +        <action name="if">
        +          <shaded>yes</shaded>
        +          <then>
        +            <action name="Unshade"/>
        +            <action name="Raise"/>
        +          </then>
        +        </action>
        +      </mousebind>
        +    </context>
        +    <context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
        +      <mousebind button="Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="Unshade"/>
        +      </mousebind>
        +      <mousebind button="Middle" action="Press">
        +        <action name="Lower"/>
        +        <action name="FocusToBottom"/>
        +        <action name="Unfocus"/>
        +      </mousebind>
        +      <mousebind button="Right" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="ShowMenu">
        +          <menu>client-menu</menu>
        +        </action>
        +      </mousebind>
        +    </context>
        +    <context name="Top">
        +      <mousebind button="Left" action="Drag">
        +        <action name="Resize">
        +          <edge>top</edge>
        +        </action>
        +      </mousebind>
        +    </context>
        +    <context name="Left">
        +      <mousebind button="Left" action="Drag">
        +        <action name="Resize">
        +          <edge>left</edge>
        +        </action>
        +      </mousebind>
        +    </context>
        +    <context name="Right">
        +      <mousebind button="Left" action="Drag">
        +        <action name="Resize">
        +          <edge>right</edge>
        +        </action>
        +      </mousebind>
        +    </context>
        +    <context name="Bottom">
        +      <mousebind button="Left" action="Drag">
        +        <action name="Resize">
        +          <edge>bottom</edge>
        +        </action>
        +      </mousebind>
        +      <mousebind button="Right" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="ShowMenu">
        +          <menu>client-menu</menu>
        +        </action>
        +      </mousebind>
        +    </context>
        +    <context name="TRCorner BRCorner TLCorner BLCorner">
        +      <mousebind button="Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="Unshade"/>
        +      </mousebind>
        +      <mousebind button="Left" action="Drag">
        +        <action name="Resize"/>
        +      </mousebind>
        +    </context>
        +    <context name="Client">
        +      <mousebind button="Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +      </mousebind>
        +      <mousebind button="Middle" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +      </mousebind>
        +      <mousebind button="Right" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +      </mousebind>
        +    </context>
        +    <context name="Icon">
        +      <mousebind button="Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="Unshade"/>
        +        <action name="ShowMenu">
        +          <menu>client-menu</menu>
        +        </action>
        +      </mousebind>
        +      <mousebind button="Right" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="ShowMenu">
        +          <menu>client-menu</menu>
        +        </action>
        +      </mousebind>
        +    </context>
        +    <context name="AllDesktops">
        +      <mousebind button="Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="Unshade"/>
        +      </mousebind>
        +      <mousebind button="Left" action="Click">
        +        <action name="ToggleOmnipresent"/>
        +      </mousebind>
        +    </context>
        +    <context name="Shade">
        +      <mousebind button="Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +      </mousebind>
        +      <mousebind button="Left" action="Click">
        +        <action name="ToggleShade"/>
        +      </mousebind>
        +    </context>
        +    <context name="Iconify">
        +      <mousebind button="Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +      </mousebind>
        +      <mousebind button="Left" action="Click">
        +        <action name="Iconify"/>
        +      </mousebind>
        +    </context>
        +    <context name="Maximize">
        +      <mousebind button="Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="Unshade"/>
        +      </mousebind>
        +      <mousebind button="Middle" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="Unshade"/>
        +      </mousebind>
        +      <mousebind button="Right" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="Unshade"/>
        +      </mousebind>
        +      <mousebind button="Left" action="Click">
        +        <action name="ToggleMaximize"/>
        +      </mousebind>
        +      <mousebind button="Middle" action="Click">
        +        <action name="ToggleMaximize">
        +          <direction>vertical</direction>
        +        </action>
        +      </mousebind>
        +      <mousebind button="Right" action="Click">
        +        <action name="ToggleMaximize">
        +          <direction>horizontal</direction>
        +        </action>
        +      </mousebind>
        +    </context>
        +    <context name="Close">
        +      <mousebind button="Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +        <action name="Unshade"/>
        +      </mousebind>
        +      <mousebind button="Left" action="Click">
        +        <action name="Close"/>
        +      </mousebind>
        +    </context>
        +    <context name="Desktop">
        +      <mousebind button="Up" action="Click">
        +        <action name="GoToDesktop">
        +          <to>previous</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="Down" action="Click">
        +        <action name="GoToDesktop">
        +          <to>next</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="A-Up" action="Click">
        +        <action name="GoToDesktop">
        +          <to>previous</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="A-Down" action="Click">
        +        <action name="GoToDesktop">
        +          <to>next</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="C-A-Up" action="Click">
        +        <action name="GoToDesktop">
        +          <to>previous</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="C-A-Down" action="Click">
        +        <action name="GoToDesktop">
        +          <to>next</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="Left" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +      </mousebind>
        +      <mousebind button="Right" action="Press">
        +        <action name="Focus"/>
        +        <action name="Raise"/>
        +      </mousebind>
        +    </context>
        +    <context name="Root">
        +      <!-- Menus -->
        +      <mousebind button="Middle" action="Press">
        +        <action name="ShowMenu">
        +          <menu>client-list-combined-menu</menu>
        +        </action>
        +      </mousebind>
        +      <mousebind button="Right" action="Press">
        +        <action name="ShowMenu">
        +          <menu>root-menu</menu>
        +        </action>
        +      </mousebind>
        +    </context>
        +    <context name="MoveResize">
        +      <mousebind button="Up" action="Click">
        +        <action name="GoToDesktop">
        +          <to>previous</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="Down" action="Click">
        +        <action name="GoToDesktop">
        +          <to>next</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="A-Up" action="Click">
        +        <action name="GoToDesktop">
        +          <to>previous</to>
        +        </action>
        +      </mousebind>
        +      <mousebind button="A-Down" action="Click">
        +        <action name="GoToDesktop">
        +          <to>next</to>
        +        </action>
        +      </mousebind>
        +    </context>
        +  </mouse>
        +  <menu>
        +    <!-- You can specify more than one menu file in here and they are all loaded,
        +       just don't make menu ids clash or, well, it'll be kind of pointless -->
        +    <!-- default menu file (or custom one in $HOME/.config/openbox/) -->
        +    <!-- system menu files on Debian systems -->
        +    <file>/var/lib/openbox/debian-menu.xml</file>
        +    <file>menu.xml</file>
        +    <hideDelay>200</hideDelay>
        +    <!-- if a press-release lasts longer than this setting (in milliseconds), the
        +       menu is hidden again -->
        +    <middle>no</middle>
        +    <!-- center submenus vertically about the parent entry -->
        +    <submenuShowDelay>100</submenuShowDelay>
        +    <!-- time to delay before showing a submenu after hovering over the parent
        +       entry.
        +       if this is a negative value, then the delay is infinite and the
        +       submenu will not be shown until it is clicked on -->
        +    <submenuHideDelay>400</submenuHideDelay>
        +    <!-- time to delay before hiding a submenu when selecting another
        +       entry in parent menu
        +       if this is a negative value, then the delay is infinite and the
        +       submenu will not be hidden until a different submenu is opened -->
        +    <showIcons>yes</showIcons>
        +    <!-- controls if icons appear in the client-list-(combined-)menu -->
        +    <manageDesktops>yes</manageDesktops>
        +    <!-- show the manage desktops section in the client-list-(combined-)menu -->
        +  </menu>
        +    <!--
        +  # this is an example with comments through out. use these to make your
        +  # own rules, but without the comments of course.
        +  # you may use one or more of the name/class/role/title/type rules to specify
        +  # windows to match
        +
        +  <application name="the window's _OB_APP_NAME property (see obxprop)"
        +              class="the window's _OB_APP_CLASS property (see obxprop)"
        +          groupname="the window's _OB_APP_GROUP_NAME property (see obxprop)"
        +         groupclass="the window's _OB_APP_GROUP_CLASS property (see obxprop)"
        +               role="the window's _OB_APP_ROLE property (see obxprop)"
        +              title="the window's _OB_APP_TITLE property (see obxprop)"
        +               type="the window's _OB_APP_TYPE property (see obxprob)..
        +                      (if unspecified, then it is 'dialog' for child windows)">
        +  # you may set only one of name/class/role/title/type, or you may use more
        +  # than one together to restrict your matches.
        +
        +  # the name, class, role, and title use simple wildcard matching such as those
        +  # used by a shell. you can use * to match any characters and ? to match
        +  # any single character.
        +
        +  # the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
        +  #    or desktop
        +
        +  # when multiple rules match a window, they will all be applied, in the
        +  # order that they appear in this list
        +
        +
        +    # each rule element can be left out or set to 'default' to specify to not 
        +    # change that attribute of the window
        +
        +    <decor>yes</decor>
        +    # enable or disable window decorations
        +
        +    <shade>no</shade>
        +    # make the window shaded when it appears, or not
        +
        +    <position force="no">
        +      # the position is only used if both an x and y coordinate are provided
        +      # (and not set to 'default')
        +      # when force is "yes", then the window will be placed here even if it
        +      # says you want it placed elsewhere.  this is to override buggy
        +      # applications who refuse to behave
        +      <x>center</x>
        +      # a number like 50, or 'center' to center on screen. use a negative number
        +      # to start from the right (or bottom for <y>), ie -50 is 50 pixels from
        +      # the right edge (or bottom). use 'default' to specify using value
        +      # provided by the application, or chosen by openbox, instead.
        +      <y>200</y>
        +      <monitor>1</monitor>
        +      # specifies the monitor in a xinerama setup.
        +      # 1 is the first head, or 'mouse' for wherever the mouse is
        +    </position>
        +
        +    <size>
        +      # the size to make the window.
        +      <width>20</width>
        +      # a number like 20, or 'default' to use the size given by the application.
        +      # you can use fractions such as 1/2 or percentages such as 75% in which
        +      # case the value is relative to the size of the monitor that the window
        +      # appears on.
        +      <height>30%</height>
        +    </size>
        +
        +    <focus>yes</focus>
        +    # if the window should try be given focus when it appears. if this is set
        +    # to yes it doesn't guarantee the window will be given focus. some
        +    # restrictions may apply, but Openbox will try to
        +
        +    <desktop>1</desktop>
        +    # 1 is the first desktop, 'all' for all desktops
        +
        +    <layer>normal</layer>
        +    # 'above', 'normal', or 'below'
        +
        +    <iconic>no</iconic>
        +    # make the window iconified when it appears, or not
        +
        +    <skip_pager>no</skip_pager>
        +    # asks to not be shown in pagers
        +
        +    <skip_taskbar>no</skip_taskbar>
        +    # asks to not be shown in taskbars. window cycling actions will also
        +    # skip past such windows
        +
        +    <fullscreen>yes</fullscreen>
        +    # make the window in fullscreen mode when it appears
        +
        +    <maximized>true</maximized>
        +    # 'Horizontal', 'Vertical' or boolean (yes/no)
        +  </application>
        +
        +  # end of the example
        +-->
        +  <applications>
        +    <application title="softhddevice">
        +      <decor>no</decor>
        +      <maximized>yes</maximized>
        +      <!--<skip_pager>yes</skip_pager>-->
        +      <skip_taskbar>no</skip_taskbar>
        +    </application>
        +    <application title="vaapidevice">
        +      <decor>no</decor>
        +      <maximized>yes</maximized>
        +      <!--<skip_pager>yes</skip_pager>-->
        +      <skip_taskbar>no</skip_taskbar>
        +    </application>
        +    <application class="VDR">
        +      <decor>no</decor>
        +      <maximized>yes</maximized>
        +      <!--<skip_pager>yes</skip_pager>-->
        +      <skip_taskbar>no</skip_taskbar>
        +    </application>
        +    <application title="browser">
        +      <decor>no</decor>
        +      <maximized>yes</maximized>
        +      <!--<skip_pager>yes</skip_pager>-->
        +      <skip_taskbar>no</skip_taskbar>
        +    </application>
        +    <application title="osd2Web">
        +      <decor>no</decor>
        +      <maximized>yes</maximized>
        +      <!--<skip_pager>yes</skip_pager>-->
        +      <skip_taskbar>no</skip_taskbar>
        +    </application>
        +  </applications>
        +</openbox_config>
        +
         
        @@ -3910,12 +4831,12 @@ systemctl --user isolate yavdr-desktop.target
    6. -
    7. Systemd User Session
      +
    8. Systemd User Session
        -
      1. yavdr-desktop.target
        +
      2. yavdr-desktop.target
        -
        [Unit]
        +
        [Unit]
         Description=yaVDR Desktop
         Requires=default.target
         After=default.target pulseaudio.service
        @@ -3925,7 +4846,7 @@ systemctl --user isolate yavdr-desktop.target
         
      3. -
      4. detect-second-display
        +
      5. detect-second-display
        [Unit]
        @@ -3941,7 +4862,7 @@ systemctl --user isolate yavdr-desktop.target
         
      6. -
      7. openbox-second.service
        +
      8. openbox-second.service
        [Unit]
        @@ -3953,7 +4874,7 @@ systemctl --user isolate yavdr-desktop.target
         
         [Service]
         EnvironmentFile=%h/.second_display
        -ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml
        +ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc2.xml
         ExecStartPost=/usr/bin/xset -dpms s off -display $DISPLAY
         ExecStartPost=/bin/bash %h/.fehbg
         
        @@ -3963,7 +4884,7 @@ systemctl --user isolate yavdr-desktop.target
         
      9. -
      10. osd2web.service
        +
      11. osd2web.service
        [Unit]
        @@ -3986,7 +4907,7 @@ systemctl --user isolate yavdr-desktop.target
         
      12. -
      13. tmux.service
        +
      14. tmux.service
        [Unit]
        @@ -4005,7 +4926,7 @@ systemctl --user isolate yavdr-desktop.target
         
      15. -
      16. wm-exit.service
        +
      17. wm-exit.service
        [Unit]
        @@ -4024,20 +4945,20 @@ systemctl --user isolate yavdr-desktop.target
         
    9. -
    10. irexec
      +
    11. irexec

      irexec.service starts irexec for the user session

      -
      [Unit]
      +
      [Unit]
       Description=LIRC command handler
       
      -[Service]
      +[Service]
       Type=simple
       ExecStart=/usr/bin/irexec %h/.lircrc
       
      -[Install]
      +[Install]
       WantedBy=yavdr-desktop.target
       
      @@ -4046,9 +4967,9 @@ irexec.service starts irexec for the user session

      begin
      -    prog = irexec
      -    button = KEY_HOME
      -    config = frontend-dbus-send switchbetween kodi vdr
      +    prog = irexec
      +    button = KEY_HOME
      +    config = frontend-dbus-send switchbetween kodi vdr
       end
       
      @@ -4058,12 +4979,12 @@ end
    -
    -

    7.12 samba-install

    +
    +

    7.12 samba-install

    -
    -

    7.12.1 tasks

    +
    +

    7.12.1 tasks

    ---
    @@ -4085,12 +5006,12 @@ end
     
    -
    -

    7.13 samba-config

    +
    +

    7.13 samba-config

    -
    -

    7.13.1 tasks

    +
    +

    7.13.1 tasks

    ---
    @@ -4115,14 +5036,14 @@ end
     
    -
    -

    7.13.2 templates

    +
    +

    7.13.2 templates

      -
    1. smb.conf
      +
    2. smb.conf
        -
      1. global settings
        +
      2. global settings
        {{ ansible_managed | comment }}
        @@ -4208,7 +5129,7 @@ end
         
      3. -
      4. media directories
        +
      5. media directories
        {% for name, path in media_dirs.iteritems() %}
        @@ -4230,7 +5151,7 @@ end
         
      6. -
      7. include custom samba exports
        +
      8. include custom samba exports
        include = /etc/samba/smb.conf.custom
        @@ -4243,15 +5164,15 @@ end
         
    -
    -

    7.14 STARTED autoinstall-drivers

    +
    +

    7.14 STARTED autoinstall-drivers

    It would be nice to be able to detect if it is suitable to install those drivers:

    -
    -

    7.14.1 TODO sundtek for Sundtek devices (local or network connection)

    +
    +

    7.14.1 TODO sundtek for Sundtek devices (local or network connection)

    Vendor-IDs: @@ -4261,9 +5182,20 @@ Vendor-IDs:

  • 2659:* (neuere Sticks)
  • +
      +
    1. planned packages
      +
      +
        +
      • yavdr-hardware-sundtek
      • +
      • python3-sundtek
      • +
      • yavdr-backend-sundtek
      • +
      -
      -

      7.14.2 TODO drivers for TT S2-6400 FF

      +
    2. +
    +
    +
    +

    7.14.2 TODO drivers for TT S2-6400 FF

    https://github.com/s-moch/linux-saa716x - kann man den relevanten Teil als dkms-Paket bauen? @@ -4271,15 +5203,15 @@ Vendor-IDs:

    -
    -

    7.15 autoinstall-ubuntu-drivers

    +
    +

    7.15 autoinstall-ubuntu-drivers

    The tool ubuntu-drivers is used to install the matching driver version for nvidia graphics cards, virtualbox guest additions and Intel and AMD microcode updates.

    -
    -

    7.15.1 tasks

    +
    +

    7.15.1 tasks

    ---
    @@ -4302,8 +5234,8 @@ The tool ubuntu-drivers is used to install the matching driver version for nvidi
     
    -
    -

    7.16 autoinstall-virtualbox-guest

    +
    +

    7.16 autoinstall-virtualbox-guest

    This role installs the guest additions for virtualbox guests on Ubuntu 16.04 @@ -4354,12 +5286,12 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04

    -
    -

    7.17 autoinstall-atric-usb

    +
    +

    7.17 autoinstall-atric-usb

    -
    -

    7.17.1 dependencies

    +
    +

    7.17.1 dependencies

    ---
    @@ -4371,8 +5303,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.17.2 tasks

    +
    +

    7.17.2 tasks

    ---
    @@ -4414,8 +5346,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.17.3 templates

    +
    +

    7.17.3 templates

    {{ ansible_managed | comment }}
    @@ -4444,12 +5376,12 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.18 autoinstall-yausbir

    +
    +

    7.18 autoinstall-yausbir

    -
    -

    7.18.1 dependencies

    +
    +

    7.18.1 dependencies

    ---
    @@ -4460,8 +5392,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.18.2 tasks

    +
    +

    7.18.2 tasks

    ---
    @@ -4503,8 +5435,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.18.3 templates

    +
    +

    7.18.3 templates

    {{ ansible_managed | comment }}
    @@ -4532,15 +5464,15 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.19 autoinstall-satip

    +
    +

    7.19 autoinstall-satip

    If a Sat>IP Server responds to a discovery request, the package vdr-plugin-satip is installed.

    -
    -

    7.19.1 tasks

    +
    +

    7.19.1 tasks

    ---
    @@ -4565,12 +5497,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.20 autoinstall-targavfd

    +
    +

    7.20 autoinstall-targavfd

    -
    -

    7.20.1 tasks

    +
    +

    7.20.1 tasks

    ---
    @@ -4586,12 +5518,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.21 autoinstall-imonlcd

    +
    +

    7.21 autoinstall-imonlcd

    -
    -

    7.21.1 tasks

    +
    +

    7.21.1 tasks

    ---
    @@ -4607,12 +5539,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.22 autoinstall-libcecdaemon

    +
    +

    7.22 autoinstall-libcecdaemon

    -
    -

    7.22.1 tasks

    +
    +

    7.22.1 tasks

    ---
    @@ -4628,12 +5560,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.23 autoinstall-pvr350

    +
    +

    7.23 autoinstall-pvr350

    -
    -

    7.23.1 tasks

    +
    +

    7.23.1 tasks

    ---
    @@ -4649,8 +5581,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.24 autoinstall-hauppauge-pvr

    +
    +

    7.24 autoinstall-hauppauge-pvr

    ---
    @@ -4665,12 +5597,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.25 autoinstall-firmware

    +
    +

    7.25 autoinstall-firmware

    -
    -

    7.25.1 dependencies

    +
    +

    7.25.1 dependencies

    ---
    @@ -4681,38 +5613,54 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.25.2 tasks

    +
    +

    7.25.2 tasks

    ---
     
     # This role provides easyily downloadable firmware files
     
    -- name: Firmware for Hauppauge WinTV HD Solo/Duo, PCTV 292e
    +- name: Firmware dvb-demod-si2168-b40-01.fw for Hauppauge WinTV HD Solo/Duo, PCTV 292e
       get_url:
         url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-demod-si2168-b40-01.fw
         checksum: sha256:8507536630d75a316d0719d6b95c04b90c36baa5b457ad457c9bacadafcef134
         dest: /lib/firmware/dvb-demod-si2168-b40-01.fw
       when: '"2040:0264" in usb or "2013:025f" in usb'
     
    -- name: Firmware for Hauppauge WinTV-HVR-930C
    +- name: Firmware dvb-fe-xc5000-1.6.114.fw for Hauppauge WinTV-HVR-930C
       get_url:
         url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-fe-xc5000-1.6.114.fw
         checksum: sha256:7104bda8df301fe1bd4c09de1708aeb6d0d8e1f9d55505449fecfad82639235f
         dest: /lib/firmware/dvb-fe-xc5000-1.6.114.fw
       when: '"2040:1605" in usb'
    +
    +- name: Firmware ngenge_18.fw for ngene cards
    +  get_url:
    +    url: http://l4m-daten.de/downloads/firmware/dvb-s2/linux/all/ngene_18.fw
    +    checksum: sha256:213d98ec2cd575eba15d82ee79fed7098e670de43792f8aa773a95cfb7c32060
    +    dest: /lib/firmware/ngene_18.fw
    +  when: '"ngene" in modules'
    +  notify: reboot required
    +
    +- name: Firmware drxk_a3.mc for drxk
    +  get_url:
    +     url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/drxk_a3.mc
    +     checksum: sha256:f8956ad6f92a4ce90a6ab94ed23e2f9a27e9317e936fd3e0119778dd28e7e294
    +     dest: /lib/firmware/drxk_a3.mc
    +  when: '"ngene" in modules or "drxk" in modules'
    +  notify: reboot required
     
    -
    -

    7.26 autoinstall-dvbsky-firmware

    +
    +

    7.26 autoinstall-dvbsky-firmware

    -
    -

    7.26.1 dependencies

    +
    +

    7.26.1 dependencies

    ---
    @@ -4723,8 +5671,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.26.2 defaults

    +
    +

    7.26.2 defaults

    ---
    @@ -4734,8 +5682,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.26.3 tasks

    +
    +

    7.26.3 tasks

    ---
    @@ -4785,15 +5733,15 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.27 TODO autoinstall-dvbhddevice

    +
    +

    7.27 TODO autoinstall-dvbhddevice

    Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware sollte in yavdr-firmware stecken

    -
    -

    7.27.1 dependencies

    +
    +

    7.27.1 dependencies

    ---
    @@ -4804,8 +5752,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.27.2 tasks

    +
    +

    7.27.2 tasks

    ---
    @@ -4822,12 +5770,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.28 autoinstall-dvbsddevice

    +
    +

    7.28 autoinstall-dvbsddevice

    -
    -

    7.28.1 dependencies

    +
    +

    7.28.1 dependencies

    ---
    @@ -4838,8 +5786,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.28.2 tasks

    +
    +

    7.28.2 tasks

    ---
    @@ -4857,12 +5805,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.29 autoinstall-hardware-irmp

    +
    +

    7.29 autoinstall-hardware-irmp

    -
    -

    7.29.1 dependencies

    +
    +

    7.29.1 dependencies

    ---
    @@ -4873,8 +5821,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.29.2 tasks

    +
    +

    7.29.2 tasks

    ---
    @@ -4890,19 +5838,19 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.30 kodi

    +
    +

    7.30 kodi

    -
    -

    7.30.1 tasks

    +
    +

    7.30.1 tasks

      -
    1. Install KODI
      +
    2. Install KODI
        -
      • main.yml
        -
        +
      • main.yml
        +
        - import_tasks: install-kodi.yml tags=install,update,kodi:install
         - import_tasks: configure-kodi.yml tags=install,update,kodi:configure
        @@ -4910,7 +5858,7 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
         
      • -
      • install-kodi.yml
        +
      • install-kodi.yml
        ---
        @@ -4928,7 +5876,7 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
         
      • -
      • configure-kodi.yml
        +
      • configure-kodi.yml
        - name: create kodi.service for the user session
        @@ -4977,12 +5925,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
         
    -
    -

    7.30.2 templates

    +
    +

    7.30.2 templates

      -
    1. kodi.service
      +
    2. kodi.service

      This systemd unit for the user session starts (and stops) kodi. @@ -5007,15 +5955,15 @@ This systemd unit for the user session starts (and stops) kodi.

    -
    -

    7.30.3 files

    +
    +

    7.30.3 files

    Those configuration files provide a preconfiguration for kodi which overrides the system wide configuration

      -
    1. Lircmap.xml
      +
    2. Lircmap.xml

      This file allows to map keys sent by remotes via eventlircd (which uses the name devinput) to kodi key names. @@ -5086,14 +6034,14 @@ This file allows to map keys sent by remotes via eventlircd (which uses the name

    -
  • keymaps
    +
  • keymaps

    This file maps the keys defined in Lircmap.xml to actions within kodi.

      -
    1. remote.xml
      +
    2. remote.xml
      <?xml version="1.0" encoding="UTF-8"?>
      @@ -5645,17 +6593,17 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
       
  • -
    -

    7.31 dvd

    +
    +

    7.31 dvd

    -
    -

    7.31.1 tasks

    +
    +

    7.31.1 tasks

      -
    • install libdvd-pkg, allow programs to eject optical media
      -
      +
    • install libdvd-pkg, allow programs to eject optical media
      +
      ---
       # file: roles/dvd/tasks/main.yml
      @@ -5695,15 +6643,15 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
       
    -
    -

    7.32 install-sundtek

    +
    +

    7.32 install-sundtek

    -
    -

    7.32.1 variables

    +
    +

    7.32.1 variables

    -
    -

    7.32.2 tasks

    +
    +

    7.32.2 tasks

    ---
    @@ -5752,8 +6700,8 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
     
    -
    -

    7.32.3 templates

    +
    +

    7.32.3 templates

    # ----- GLOBAL SECTION -----
    @@ -5859,8 +6807,8 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
     
    -
    -

    7.33 template-test

    +
    +

    7.33 template-test

    ---
    @@ -5876,14 +6824,14 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
     
    -
    {{ ansible_managed | comment }}
    +
    {{ ansible_managed | comment }}
     
     Section "ServerLayout"
         Identifier     "Layout0"
         Screen      0  "Screen0"
    -    {% if system.x11.dualhead.enabled %}
    +    {% if system.x11.dualhead.enabled %}
         Screen      1  "Screen1" RightOf "Screen0"
    -    {% endif %}
    +    {% endif %}
         InputDevice    "Keyboard0" "CoreKeyboard"
         InputDevice    "Mouse0" "CorePointer"
     EndSection
    @@ -5920,50 +6868,50 @@ Section "Monitor"
         Identifier     "Monitor0"
         VendorName     "Unknown"
         ModelName      "Unknown"
    -{% if system.x11.display.0.default == "VGA2Scart_4_3" or system.x11.display.0.default == "VGA2Scart_16_9" %}
    +{% if system.x11.display.0.default == "VGA2Scart_4_3" or system.x11.display.0.default == "VGA2Scart_16_9" %}
         HorizSync       14-17
         VertRefresh     49-61
    -    {% if system.x11.display.0.default == "VGA2Scart_4_3" %}
    +    {% if system.x11.display.0.default == "VGA2Scart_4_3" %}
         Modeline "VGA2Scart_4_3" 13.875 720 744 808 888 576 580 585 625 -HSync -Vsync interlace
    -    {% elif system.x11.display.0.default == "VGA2Scart_16_9" %}
    +    {% elif system.x11.display.0.default == "VGA2Scart_16_9" %}
         Modeline "VGA2Scart_16_9" 19 1024 1032 1120 1216 576 581 586 625 -Hsync -Vsync interlace
    -    {% endif %}
    -{% endif %}
    +    {% endif %}
    +{% endif %}
         Option         "DPMS"
         Option         "ExactModeTimingsDVI" "True"
     EndSection
     
     
    -{% if system.x11.dualhead.enabled == "1" %}
    +{% if system.x11.dualhead.enabled == "1" %}
     Section "Monitor"
         Identifier     "Monitor1"
         VendorName     "Unknown"
         ModelName      "Unknown"
    -{% if system.x11.display.1.default in ("VGA2Scart_4_3",  "VGA2Scart_16_9") %}
    +{% if system.x11.display.1.default in ("VGA2Scart_4_3",  "VGA2Scart_16_9") %}
         HorizSync       14-17
         VertRefresh     49-61
    -    {% if system.x11.display.1.default == "VGA2Scart_4_3" %}
    +    {% if system.x11.display.1.default == "VGA2Scart_4_3" %}
         Modeline "VGA2Scart_4_3" 13.875 720 744 808 888 576 580 585 625 -HSync -Vsync interlace
    -    {% elif system.x11.display.1.default == "VGA2Scart_16_9" %}
    +    {% elif system.x11.display.1.default == "VGA2Scart_16_9" %}
         Modeline "VGA2Scart_16_9" 19 1024 1032 1120 1216 576 581 586 625 -Hsync -Vsync interlace
    -    {% endif %}
    +    {% endif %}
         Option         "DPMS"
         Option         "ExactModeTimingsDVI" "True"
    -{% endif %}
    +{% endif %}
     EndSection
    -{% endif %}
    +{% endif %}
     
     Section "Device"
         Identifier     "Device0"
    -{% if system.hardware.nvidia.detected %}
    +{% if system.hardware.nvidia.detected %}
         Driver         "nvidia"
         VendorName     "NVIDIA Corporation"
    -{% endif %}
    +{% endif %}
         Screen          0
         Option         "DPI" "100x100"
    -{% if system.hardware.nvidia.busid %}
    +{% if system.hardware.nvidia.busid %}
         BusID          "PCI: {{ system.hardware.nvidia.busid }}"
    -{% endif %}
    +{% endif %}
         Option         "NoLogo" "True"
         Option         "UseEvents" "True"
         Option         "TripleBuffer" "False"
    @@ -5974,17 +6922,17 @@ Section "Device"
         Option         "FlatPanelProperties" "Scaling = Native"
     EndSection
     
    -{% if system.x11.dualhead.enabled == "1" %}
    +{% if system.x11.dualhead.enabled == "1" %}
     Section "Device"
         Identifier     "Device1"
    -    {% if system.hardware.nvidia.detected %}
    +    {% if system.hardware.nvidia.detected %}
         Driver         "nvidia"
         VendorName     "NVIDIA Corporation"
    -    {% endif %}
    +    {% endif %}
         Screen          1
    -    {% if system.hardware.nvidia.busid %}
    +    {% if system.hardware.nvidia.busid %}
         BusID          "PCI: {{ system.hardware.nvidia.busid }}"
    -    {% endif %}
    +    {% endif %}
         Option         "NoLogo" "True"
         Option         "UseEvents" "True"
         Option         "TripleBuffer" "False"
    @@ -5992,7 +6940,7 @@ Section "Device"
         Option         "TwinView" "0"
         Option         "DynamicTwinView" "0"
     EndSection
    -{% endif %}
    +{% endif %}
     
     
     Section "Screen"
    @@ -6002,19 +6950,19 @@ Section "Screen"
         DefaultDepth    24
         SubSection     "Display"
             Depth       24
    -{% if system.x11.display.0.default is defined and system.x11.display.0.default %}
    -        Modes      "{{ system.x11.display.0.default }}"{% for mode in system.x11.display.0.mode %}{% if mode != system.x11.display.0.default %} "{{ mode }}"{% endif %}{% endfor %}
    +{% if system.x11.display.0.default is defined and system.x11.display.0.default %}
    +        Modes      "{{ system.x11.display.0.default }}"{% for mode in system.x11.display.0.mode %}{% if mode != system.x11.display.0.default %} "{{ mode }}"{% endif %}{% endfor %}
     
    -{% elif system.hardware.nvidia.detected == 1 %}
    +{% elif system.hardware.nvidia.detected == 1 %}
             Modes      "nvidia-auto-select"
    -{% endif %}
    +{% endif %}
         EndSubSection
    -{% if system.x11.display.0.default or system.x11.default %}
    -    {% if system.x11.display.0.device is definded and system.x11.display.0.device %}
    -    Option         "ConnectedMonitor" {{ system.x11.display.0.device }}
    -    {% else %}
    -    Option         "ConnectedMonitor" {{ system.x11.default }}
    -    {% endif %}
    +{% if system.x11.display.0.default or system.x11.default %}
    +    {% if system.x11.display.0.device is definded and system.x11.display.0.device %}
    +    Option         "ConnectedMonitor" {{ system.x11.display.0.device }}
    +    {% else %}
    +    Option         "ConnectedMonitor" {{ system.x11.default }}
    +    {% endif %}
         #     Option         "ConnectedMonitor" "<?cs if:(?system.x11.display.0.device) ?><?cs call:fix_display_name(system.x11.display.0.device) ?><?cs else ?><?cs var:system.x11.default ?><?cs /if ?><?cs if:(?system.x11.dualhead.enabled && system.x11.dualhead.enabled == 1) ?>, <?cs call:fix_display_name(system.x11.display.1.device) ?><?cs /if ?>"
         #Option         "ConnectedMonitor"
         "<?cs if:(?system.x11.display.0.device) ?>
    @@ -6032,10 +6980,10 @@ Section "Screen"
     #     Option          "MetaModes" "<?cs call:fix_display_name(system.x11.display.0.device) ?>: <?cs var:system.x11.display.0.default ?> { ViewPortIn=<?cs var:system.x11.display.0.viewport.in.x ?>x<?cs var:system.x11.display.0.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.0.viewport.out.x ?>x<?cs var:system.x11.display.0.viewport.out.y ?>+<?cs var:system.x11.display.0.viewport.out.plusx ?>+<?cs var:system.x11.display.0.viewport.out.plusy ?> }"
     # <?cs each:mode = system.x11.display.0.mode ?><?cs if:(mode != system.x11.display.0.default) ?>
     #     Option          "MetaModes" "<?cs call:fix_display_name(system.x11.display.0.device) ?>: <?cs var:mode ?> { ViewPortIn=<?cs var:system.x11.display.0.viewport.in.x ?>x<?cs var:system.x11.display.0.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.0.viewport.out.x ?>x<?cs var:system.x11.display.0.viewport.out.y ?>+<?cs var:system.x11.display.0.viewport.out.plusx ?>+<?cs var:system.x11.display.0.viewport.out.plusy ?> }"<?cs /if ?><?cs /each ?> 
    -{% endif %}
    +{% endif %}
     EndSection
     
    -{% if system.x11.dualhead.enabled == "1" %}
    +{% if system.x11.dualhead.enabled == "1" %}
     Section "Screen"
     
          Identifier     "Screen1"
    @@ -6044,12 +6992,12 @@ Section "Screen"
          DefaultDepth    24
          SubSection     "Display"
              Depth       24
    -{% if system.x11.display.0.default is defined and system.x11.display.0.default %}
    -         Modes      "{{ system.x11.display.1.default }}"{% for mode in system.x11.display.1.mode %}{% if mode != system.x11.display.1.default %} "{{ mode }}"{% endif %}{% endfor %}
    +{% if system.x11.display.0.default is defined and system.x11.display.0.default %}
    +         Modes      "{{ system.x11.display.1.default }}"{% for mode in system.x11.display.1.mode %}{% if mode != system.x11.display.1.default %} "{{ mode }}"{% endif %}{% endfor %}
     
    -{% elif system.hardware.nvidia.detected == "1" %}
    +{% elif system.hardware.nvidia.detected == "1" %}
              Modes      "nvidia-auto-select"
    -{% endif %}
    +{% endif %}
           EndSubSection
     
     # <?cs if:(?system.x11.display.1.default && system.x11.display.1.default != "" && system.x11.display.1.default != "disabled") ?>
    @@ -6064,14 +7012,14 @@ Section "Screen"
     #     Option          "MetaModes" "<?cs call:fix_display_name(system.x11.display.1.device) ?>: <?cs var:mode ?> { ViewPortIn=<?cs var:system.x11.display.1.viewport.in.x ?>x<?cs var:system.x11.display.1.viewport.in.y ?>, ViewPortOut=<?cs var:system.x11.display.1.viewport.out.x ?>x<?cs var:system.x11.display.1.viewport.out.y ?>+<?cs var:system.x11.display.1.viewport.out.plusx ?>+<?cs var:system.x11.display.1.viewport.out.plusy ?> }"<?cs /if ?><?cs /each ?>
     # <?cs /if ?>
     EndSection
    -{% endif %}
    +{% endif %}
     
    -{% if not system.x11.use_compositing %}
    +{% if not system.x11.use_compositing %}
     Section "Extensions"
     # if not open-gl OSD is needed (e.g. for vdr-sxfe):
         Option         "Composite" "Disable"
     EndSection
    -{% endif %}
    +{% endif %}
     
    @@ -6101,12 +7049,12 @@ EndSection
    -
    -

    7.34 wakeup

    +
    +

    7.34 wakeup

    -
    -

    7.34.1 defaults

    +
    +

    7.34.1 defaults

    ---
    @@ -6116,8 +7064,8 @@ EndSection
     
    -
    -

    7.34.2 tasks

    +
    +

    7.34.2 tasks

    ---
    @@ -6138,8 +7086,8 @@ EndSection
     
    -
    -

    7.34.3 templates

    +
    +

    7.34.3 templates

    {{ ansible_managed | comment }}
    @@ -6165,12 +7113,12 @@ ACPI_START_AHEAD=5
     
    -
    -

    7.35 grub-config

    +
    +

    7.35 grub-config

    -
    -

    7.35.1 default variables

    +
    +

    7.35.1 default variables

    system:
    @@ -6182,8 +7130,8 @@ ACPI_START_AHEAD=5
     
    -
    -

    7.35.2 tasks

    +
    +

    7.35.2 tasks

    ---
    @@ -6208,8 +7156,8 @@ ACPI_START_AHEAD=5
     
    -
    -

    7.35.3 templates

    +
    +

    7.35.3 templates

    #!/bin/sh
    @@ -6217,27 +7165,32 @@ ACPI_START_AHEAD=5
     
     # This file is configured by the ansible configuration for yaVDR
     
    -{% if system.shutdown is defined and system.shutdown == 'reboot' %}
    -menuentry "PowerOff" {
    +{% if system.shutdown is defined and system.shutdown == 'reboot' %}
    +menuentry "PowerOff" {
         halt
    -}
    -{% endif %}
    +}
    +{% endif %}
     
    -if [ "${recordfail}" = 1 ]; then
    -    set timeout={{ 3 if grub.timeout < 3 else grub.timeout }}
    +if [ "${recordfail}" = 1 ]; then
    +    set timeout={{ 3 if grub.timeout < 3 else grub.timeout }}
     else
    -    set timeout={{ grub.timeout if grub.timeout is defined else 0 }}
    +    set timeout={{ grub.timeout if grub.timeout is defined else 0 }}
     fi
     
    -
    -

    7.35.4 handlers

    +
    +

    7.35.4 handlers

    ---
     
    +- name: Update Initramfs
    +  command: "update-initramfs -u"
    +  failed_when: ('error' in initramfs_register_update.stderr)
    +  register: initramfs_register_update
    +
     - name: Update GRUB
       command: update-grub
       failed_when: ('error' in grub_register_update.stderr)
    @@ -6251,15 +7204,15 @@ menuentry "PowerOff" {
     
    -
    -

    8 Modules

    +
    +

    8 Modules

    This section contains custom modules for the yaVDR Playbooks. They are used to collect facts about the system and configure applications and daemons.

    -
    -

    8.1 hardware_facts.py

    +
    +

    8.1 hardware_facts.py

    # This Module collects the vendor- and device ids for USB- and PCI(e)-devices and currently loaded kernel modules.
    @@ -6335,110 +7288,110 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
     from ansible.module_utils.basic import *
     
     
    -PCIDevice = namedtuple("PCIDevice", 'idVendor idProduct idClass pciPath')
    +PCIDevice = namedtuple("PCIDevice", 'idVendor idProduct idClass pciPath')
     
    -vendor_dict = {
    +vendor_dict = {
         0x10de: 'nvidia',
         0x8086: 'intel',
         0x1002: 'amd',
         0x80ee: 'virtualbox',
    -    }
    +    }
     
    -def get_pci_devices():
    -    for device in chain(glob.glob('/sys/devices/pci*/*:*:*/'), glob.glob('/sys/devices/pci*/*:*:*/*:*:*/')):
    +def get_pci_devices():
    +    for device in chain(glob.glob('/sys/devices/pci*/*:*:*/'), glob.glob('/sys/devices/pci*/*:*:*/*:*:*/')):
             try:
    -            with open(os.path.join(device, 'device')) as d:
    -                product_id = int(d.read().strip(), 16)
    -            with open(os.path.join(device, 'vendor')) as d:
    -                vendor_id = int(d.read().strip(), 16)
    -            with open(os.path.join(device, 'class')) as d:
    -                class_id = int(d.read().strip(), 16)
    -            yield PCIDevice(idVendor=vendor_id, idProduct=product_id, idClass=class_id, pciPath=device)
    +            with open(os.path.join(device, 'device')) as d:
    +                product_id = int(d.read().strip(), 16)
    +            with open(os.path.join(device, 'vendor')) as d:
    +                vendor_id = int(d.read().strip(), 16)
    +            with open(os.path.join(device, 'class')) as d:
    +                class_id = int(d.read().strip(), 16)
    +            yield PCIDevice(idVendor=vendor_id, idProduct=product_id, idClass=class_id, pciPath=device)
             except IOError:
                 pass
     
    -def format_device_list(iterator):
    -    return ["{:04x}:{:04x}".format(d.idVendor, d.idProduct) for d in iterator]
    +def format_device_list(iterator):
    +    return ["{:04x}:{:04x}".format(d.idVendor, d.idProduct) for d in iterator]
     
    -def format_gpu_device_list(iterator):
    -    def get_entries(iterator):
    +def format_gpu_device_list(iterator):
    +    def get_entries(iterator):
             for d in iterator:
                 if d.idClass == 0x030000:
    -                yield {"VendorName": vendor_dict.get(d.idVendor, "unknown"),
    -                       "VendorID": d.idVendor, "ProductID": d.idProduct}
    -    return [entry for entry in get_entries(iterator)]
    +                yield {"VendorName": vendor_dict.get(d.idVendor, "unknown"),
    +                       "VendorID": d.idVendor, "ProductID": d.idProduct}
    +    return [entry for entry in get_entries(iterator)]
     
    -def list_acpi_power_modes():
    -    acpi_power_modes = []
    +def list_acpi_power_modes():
    +    acpi_power_modes = []
         try:
    -        with open('/sys/power/state') as f:
    -            acpi_power_modes = [l for l in f.readline().split()]
    +        with open('/sys/power/state') as f:
    +            acpi_power_modes = [l for l in f.readline().split()]
         except IOError:
             pass
         return acpi_power_modes
     
    -arg_specs = {
    -    'usb': dict(default=True, type='bool', required=False),
    -    'pci': dict(default=True, type='bool', required=False),
    -    'modules': dict(default=True, type='bool', required=False),
    -    'gpus': dict(default=True, type='bool', required=False),
    -    'acpi_power_modes': dict(default=True, type='bool', required=False),
    -    }
    +arg_specs = {
    +    'usb': dict(default=True, type='bool', required=False),
    +    'pci': dict(default=True, type='bool', required=False),
    +    'modules': dict(default=True, type='bool', required=False),
    +    'gpus': dict(default=True, type='bool', required=False),
    +    'acpi_power_modes': dict(default=True, type='bool', required=False),
    +    }
     
     
    -def main():
    -    module = AnsibleModule(argument_spec=arg_specs, supports_check_mode=True,)
    -    collect_usb = module.params['usb']
    -    collect_pci = module.params['pci']
    -    collect_modules = module.params['modules']
    -    collect_gpus = module.params['gpus']
    -    collect_acpi_power_modes = module.params['acpi_power_modes']
    +def main():
    +    module = AnsibleModule(argument_spec=arg_specs, supports_check_mode=True,)
    +    collect_usb = module.params['usb']
    +    collect_pci = module.params['pci']
    +    collect_modules = module.params['modules']
    +    collect_gpus = module.params['gpus']
    +    collect_acpi_power_modes = module.params['acpi_power_modes']
     
    -    usb_devices = []
    -    pci_devices = []
    -    modules = []
    -    gpus = []
    +    usb_devices = []
    +    pci_devices = []
    +    modules = []
    +    gpus = []
         nvidia_detected = False
         intel_detected = False
         amd_detected = False
         virtualbox_detected = False
    -    acpi_power_modes = []
    +    acpi_power_modes = []
     
         if collect_usb:
    -        usb_devices = format_device_list(usb.core.find(find_all=True))
    +        usb_devices = format_device_list(usb.core.find(find_all=True))
     
         if collect_pci:
    -        pci_devices = format_device_list(get_pci_devices())
    +        pci_devices = format_device_list(get_pci_devices())
     
         if collect_modules:
    -        k = kmodpy.Kmod()
    -        modules = [m[0] for m in k.loaded()]
    +        k = kmodpy.Kmod()
    +        modules = [m[0] for m in k.loaded()]
     
         if collect_gpus:
    -        gpus = format_gpu_device_list(get_pci_devices())
    -        nvidia_detected = any((True for gpu in gpus if gpu['VendorName'] == 'nvidia'))
    -        intel_detected = any((True for gpu in gpus if gpu['VendorName'] == 'intel'))
    -        amd_detected = any((True for gpu in gpus if gpu['VendorName'] == 'amd'))
    -        virtualbox_detected = any((True for gpu in gpus if gpu['VendorName'] == 'virtualbox'))
    +        gpus = format_gpu_device_list(get_pci_devices())
    +        nvidia_detected = any((True for gpu in gpus if gpu['VendorName'] == 'nvidia'))
    +        intel_detected = any((True for gpu in gpus if gpu['VendorName'] == 'intel'))
    +        amd_detected = any((True for gpu in gpus if gpu['VendorName'] == 'amd'))
    +        virtualbox_detected = any((True for gpu in gpus if gpu['VendorName'] == 'virtualbox'))
     
         if collect_acpi_power_modes:
    -        acpi_power_modes = list_acpi_power_modes()
    +        acpi_power_modes = list_acpi_power_modes()
     
    -    data = {'usb': usb_devices, 'pci': pci_devices, 'modules': modules, 'gpus': gpus,
    +    data = {'usb': usb_devices, 'pci': pci_devices, 'modules': modules, 'gpus': gpus,
                 'acpi_power_modes': acpi_power_modes, 'nvidia_detected': nvidia_detected,
                 'intel_detected': intel_detected, 'amd_detected': amd_detected,
    -            'virtualbox_detected': virtualbox_detected}
    -    module.exit_json(changed=False, ansible_facts=data, msg=data)
    +            'virtualbox_detected': virtualbox_detected}
    +    module.exit_json(changed=False, ansible_facts=data, msg=data)
     
     
     if __name__ == '__main__':  
    -    main()
    +    main()
     
    -
    -

    8.2 satip_facts.py

    +
    +

    8.2 satip_facts.py

    DOCUMENTATION = '''
    @@ -6474,96 +7427,96 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
     SSDP_MX = 2
     SSDP_ST = "urn:ses-com:device:SatIPServer:1"
     
    -ssdpRequest = "\r\n".join((
    +ssdpRequest = "\r\n".join((
         "M-SEARCH * HTTP/1.1",
    -    "HOST: %s:%d" % (SSDP_ADDR, SSDP_PORT),
    +    "HOST: %s:%d" % (SSDP_ADDR, SSDP_PORT),
         "MAN: \"ssdp:discover\"",
    -    "MX: %d" % (SSDP_MX),
    -    "ST: %s" % (SSDP_ST),
    -    "\r\n"))
    +    "MX: %d" % (SSDP_MX),
    +    "ST: %s" % (SSDP_ST),
    +    "\r\n"))
     
     @contextmanager
    -def socket_manager(*args, **kwargs):
    +def socket_manager(*args, **kwargs):
         """provide a context manager for socket"""
    -    sock = socket.socket(*args, **kwargs)
    -    sock.setblocking(False)
    -    sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
    -    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    +    sock = socket.socket(*args, **kwargs)
    +    sock.setblocking(False)
    +    sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)
    +    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
         try:
    -        sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
    +        sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
         except socket.error:
             pass
    -    sock.settimeout(SSDP_MX + 0.5)
    -    sock.bind((SSDP_BIND, SSDP_PORT))
    +    sock.settimeout(SSDP_MX + 0.5)
    +    sock.bind((SSDP_BIND, SSDP_PORT))
         try:
             yield sock
         finally:
    -        sock.close()
    +        sock.close()
     
     
    -def parse_satip_xml(data):
    +def parse_satip_xml(data):
         """ Parse SAT>IP XML data.
         Args:
             data (str): XML input data..
         Returns:
             dict: Parsed SAT>IP device name and frontend information.
         """
    -    result = {'name': '', 'frontends': {}}
    +    result = {'name': '', 'frontends': {}}
         if data:
    -        root = ET.fromstring(data)
    -        name = root.find('.//*/{urn:schemas-upnp-org:device-1-0}friendlyName')
    -        result['name'] = name.text
    -        satipcap = root.find('.//*/{urn:ses-com:satip}X_SATIPCAP')
    +        root = ET.fromstring(data)
    +        name = root.find('.//*/{urn:schemas-upnp-org:device-1-0}friendlyName')
    +        result['name'] = name.text
    +        satipcap = root.find('.//*/{urn:ses-com:satip}X_SATIPCAP')
             if satipcap is None:
    -            raise ValueError("Invalid SAT>IP device description")
    -        caps = {}
    -        for system in satipcap.text.split(","):
    -            cap = system.split("-")
    +            raise ValueError("Invalid SAT>IP device description")
    +        caps = {}
    +        for system in satipcap.text.split(","):
    +            cap = system.split("-")
                 if cap:
    -                count = int(cap[1])
    -                if cap[0] in caps:
    -                    count = count + caps[cap[0]]
    -                caps[cap[0]] = count
    -        result['frontends'] = caps
    +                count = int(cap[1])
    +                if cap[0] in caps:
    +                    count = count + caps[cap[0]]
    +                caps[cap[0]] = count
    +        result['frontends'] = caps
         return result
     
     
    -def main():
    -    description_urls = []
    -    device_list = []
    -    module = AnsibleModule(argument_spec={}, supports_check_mode=True,)
    -    with socket_manager(socket.AF_INET, socket.SOCK_DGRAM) as sock:
    +def main():
    +    description_urls = []
    +    device_list = []
    +    module = AnsibleModule(argument_spec={}, supports_check_mode=True,)
    +    with socket_manager(socket.AF_INET, socket.SOCK_DGRAM) as sock:
             # according to Sat>IP Specification 1.2.2, p. 20
             # a client should send three requests within 100 ms with a ttl of 2
     
    -        for _ in range(3):
    -            sock.sendto(ssdpRequest, (SSDP_ADDR, SSDP_PORT))
    -            time.sleep(0.03)
    +        for _ in range(3):
    +            sock.sendto(ssdpRequest, (SSDP_ADDR, SSDP_PORT))
    +            time.sleep(0.03)
             try:
    -            response = sock.recv(1024)
    +            response = sock.recv(1024)
                 if response and "SERVER:" in response:
    -                for line in response.splitlines():
    +                for line in response.splitlines():
                         if "LOCATION" in line:
    -                        url = line.split()[-1].strip()
    +                        url = line.split()[-1].strip()
                             if url not in description_urls:
    -                            description_urls.append(url)
    -                            info = requests.get(url, timeout=2)
    -                            device_list.append(parse_satip_xml(info.text))
    +                            description_urls.append(url)
    +                            info = requests.get(url, timeout=2)
    +                            device_list.append(parse_satip_xml(info.text))
                 else:
    -                raise ValueError('No satip server detected')
    -        except (socket.timeout, ValueError, ET.ParseError):
    +                raise ValueError('No satip server detected')
    +        except (socket.timeout, ValueError, ET.ParseError):
                 pass
     
    -    module.exit_json(changed=False, ansible_facts={'satip_devices': device_list})
    +    module.exit_json(changed=False, ansible_facts={'satip_devices': device_list})
     
     if __name__ == '__main__':
    -    main()
    +    main()
     
    -
    -

    8.3 xrandr_facts.py

    +
    +

    8.3 xrandr_facts.py

    • [ ] support multiple screens (-d :0.0 .. :0.n)
    • @@ -6627,139 +7580,139 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c var: xorg ''' -ARG_SPECS = { - 'display': dict(default=":0", type='str', required=False), - 'preferred_outputs': dict( - default=["HDMI", "DP", "DVI", "VGA", "TV"], type='list', required=False), - 'preferred_refreshrates': dict( - default=[50, 60, 75, 30, 25], type='list', required=False), - 'preferred_resolutions': dict( - default=[ - "7680x4320", "3840x2160", "1920x1080", "1280x720", "720x576"], - type='list', required=False), - 'write_edids': dict(default=True, type='bool', required=False), - } +ARG_SPECS = { + 'display': dict(default=":0", type='str', required=False), + 'preferred_outputs': dict( + default=["HDMI", "DP", "DVI", "VGA", "TV"], type='list', required=False), + 'preferred_refreshrates': dict( + default=[50, 60, 75, 30, 25], type='list', required=False), + 'preferred_resolutions': dict( + default=[ + "7680x4320", "3840x2160", "1920x1080", "1280x720", "720x576"], + type='list', required=False), + 'write_edids': dict(default=True, type='bool', required=False), + } -SCREEN_REGEX = re.compile("^(?P<screen>Screen\s\d+:)(?:.*)") -CONNECTOR_REGEX = re.compile( - "^(?P<connector>.*-\d+)\s(?P<connection_state>connected|disconnected)\s(?P<primary>primary)?") -MODE_REGEX = re.compile("^\s+(?P<resolution>\d{3,}x\d{3,}).*") +SCREEN_REGEX = re.compile("^(?P<screen>Screen\s\d+:)(?:.*)") +CONNECTOR_REGEX = re.compile( + "^(?P<connector>.*-\d+)\s(?P<connection_state>connected|disconnected)\s(?P<primary>primary)?") +MODE_REGEX = re.compile("^\s+(?P<resolution>\d{3,}x\d{3,}).*") -Mode = namedtuple('Mode', ['connection', 'resolution', 'refreshrate']) +Mode = namedtuple('Mode', ['connection', 'resolution', 'refreshrate']) -def check_for_screen(line): +def check_for_screen(line): """check line for screen information""" - match = re.match(SCREEN_REGEX, line) + match = re.match(SCREEN_REGEX, line) if match: - return match.groupdict()['screen'] + return match.groupdict()['screen'] -def check_for_connection(line): +def check_for_connection(line): """check line for connection name and state""" - match = re.match(CONNECTOR_REGEX, line) + match = re.match(CONNECTOR_REGEX, line) connector = None is_connected = False if match: - match = match.groupdict() - connector = match['connector'] - is_connected = True if match['connection_state'] == 'connected' else False + match = match.groupdict() + connector = match['connector'] + is_connected = True if match['connection_state'] == 'connected' else False return connector, is_connected -def get_indentation(line): +def get_indentation(line): """return the number of leading whitespace characters""" - return len(line) - len(line.lstrip()) + return len(line) - len(line.lstrip()) -def sort_mode(mode): +def sort_mode(mode): """rate modes by several criteria""" connection_score = 0 rrate_score = 0 resolution_score = 0 - preferred_rrates = module.params['preferred_refreshrates'] + preferred_rrates = module.params['preferred_refreshrates'] # [50, 60] - preferred_resolutions = module.params['preferred_resolutions'] + preferred_resolutions = module.params['preferred_resolutions'] # ["7680x4320", "3840x2160", "1920x1080", "1280x720", "720x576"] - preferred_outputs = module.params['preferred_outputs'] + preferred_outputs = module.params['preferred_outputs'] # ["HDMI", "DP", "DVI", "VGA"] if mode.refreshrate in preferred_rrates: - rrate_score = len(preferred_rrates) - preferred_rrates.index(mode.refreshrate) + rrate_score = len(preferred_rrates) - preferred_rrates.index(mode.refreshrate) if mode.resolution in preferred_resolutions: - resolution_score = len(preferred_resolutions) - preferred_resolutions.index(mode.resolution) - x_resolution, y_resolution = (int(n) for n in mode.resolution.split('x')) - connection = mode.connection.split('-')[0] + resolution_score = len(preferred_resolutions) - preferred_resolutions.index(mode.resolution) + x_resolution, y_resolution = (int(n) for n in mode.resolution.split('x')) + connection = mode.connection.split('-')[0] if connection in preferred_outputs: - connection_score = len(preferred_outputs) - preferred_outputs.index(connection) - return (rrate_score, resolution_score, x_resolution, y_resolution, connection_score) + connection_score = len(preferred_outputs) - preferred_outputs.index(connection) + return (rrate_score, resolution_score, x_resolution, y_resolution, connection_score) -def parse_xrandr_verbose(iterator): +def parse_xrandr_verbose(iterator): """parse the output of xrandr --verbose using an iterator delivering single lines""" - xorg = {} + xorg = {} is_connected = False for line in iterator: - if line.startswith('Screen'): - screen = check_for_screen(line) - xorg[screen] = {} + if line.startswith('Screen'): + screen = check_for_screen(line) + xorg[screen] = {} elif 'connected' in line: - connector, is_connected = check_for_connection(line) - xorg[screen][connector] = { + connector, is_connected = check_for_connection(line) + xorg[screen][connector] = { 'is_connected': is_connected, 'EDID': '', - 'modes': {}, + 'modes': {}, 'preferred': '', 'current': '', 'auto': '', - } + } elif is_connected and 'EDID:' in line: edid_str = "" - outer_indentation = get_indentation(line) + outer_indentation = get_indentation(line) while True: - line = next(iterator) - if get_indentation(line) > outer_indentation: - edid_str += line.strip() + line = next(iterator) + if get_indentation(line) > outer_indentation: + edid_str += line.strip() else: break - xorg[screen][connector]['EDID'] = edid_str + xorg[screen][connector]['EDID'] = edid_str elif is_connected and "MHz" in line and not "Interlace" in line: - match = re.match(MODE_REGEX, line) + match = re.match(MODE_REGEX, line) if match: - match = match.groupdict() - preferred = bool("+preferred" in line) - current = bool("*current" in line) + match = match.groupdict() + preferred = bool("+preferred" in line) + current = bool("*current" in line) while True: - line = next(iterator) - if line.strip().startswith('v:'): - refresh_rate = ast.literal_eval(line.split()[-1][:-2]) - rrate = int(round(refresh_rate)) - if xorg[screen][connector]['modes'].get(match['resolution']) is None: - xorg[screen][connector]['modes'][match['resolution']] = [] - if rrate not in xorg[screen][connector]['modes'][match['resolution']]: - xorg[screen][connector]['modes'][match['resolution']].append(rrate) + line = next(iterator) + if line.strip().startswith('v:'): + refresh_rate = ast.literal_eval(line.split()[-1][:-2]) + rrate = int(round(refresh_rate)) + if xorg[screen][connector]['modes'].get(match['resolution']) is None: + xorg[screen][connector]['modes'][match['resolution']] = [] + if rrate not in xorg[screen][connector]['modes'][match['resolution']]: + xorg[screen][connector]['modes'][match['resolution']].append(rrate) if preferred: - xorg[screen][connector]['preferred'] = "{}_{}".format( - match['resolution'], rrate) + xorg[screen][connector]['preferred'] = "{}_{}".format( + match['resolution'], rrate) if current: - xorg[screen][connector]['current'] = "{}_{}".format( - match['resolution'], rrate) + xorg[screen][connector]['current'] = "{}_{}".format( + match['resolution'], rrate) break return xorg -def parse_edid_data(edid): +def parse_edid_data(edid): vendor = "Unknown" model = "Unknown" try: - data = subprocess.check_output("parse-edid < {}".format(edid), - shell=True, universal_newlines=True) + data = subprocess.check_output("parse-edid < {}".format(edid), + shell=True, universal_newlines=True) except subprocess.CalledProcessError: pass else: - for line in data.splitlines(): + for line in data.splitlines(): if "VendorName" in line: - vendor = line.strip().split('"')[1] + vendor = line.strip().split('"')[1] if "ModelName" in line: - model = line.strip().split('"')[1] + model = line.strip().split('"')[1] return vendor, model -def collect_nvidia_data(): - BusID_RE = re.compile(( +def collect_nvidia_data(): + BusID_RE = re.compile(( '(?P<domain>[0-9a-fA-F]+)' ':' '(?P<bus>[0-9a-fA-F]+)' @@ -6767,91 +7720,91 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c '(?P<device>[0-9a-fA-F]+)' '\.' '(?P<function>[0-9a-fA-F]+)' - )) + )) try: - data = subprocess.check_output(["nvidia-smi", "--query-gpu=name,pci.bus_id", "--format=csv", "-i0"], - universal_newlines=True) + data = subprocess.check_output(["nvidia-smi", "--query-gpu=name,pci.bus_id", "--format=csv", "-i0"], + universal_newlines=True) except subprocess.CalledProcessError: pass except OSError: # nvidia-smi is not installed pass else: - for row in csv.DictReader(data.splitlines(), delimiter=',', skipinitialspace=True): - name = row['name'] - bus_id = row['pci.bus_id'] + for row in csv.DictReader(data.splitlines(), delimiter=',', skipinitialspace=True): + name = row['name'] + bus_id = row['pci.bus_id'] # pci.bus_id structure as reported by nvidia-smi: "domain:bus:device.function", in hex. - match = BusID_RE.search(bus_id) + match = BusID_RE.search(bus_id) if match: - domain, bus, device, function = (int(n, 16) for n in match.groups()) - bus_id = "PCI:{:d}@{:d}:{:d}:{:d}".format(bus, domain, device, function) + domain, bus, device, function = (int(n, 16) for n in match.groups()) + bus_id = "PCI:{:d}@{:d}:{:d}:{:d}".format(bus, domain, device, function) return name, bus_id raise ValueError -def output_data(data, write_edids=True): +def output_data(data, write_edids=True): if data: - modes = [] - for _, screen_data in data.items(): - for connector, connection_data in screen_data.items(): - if connection_data.get('EDID') and write_edids: - with open('/etc/X11/edid.{}.bin'.format(connector), 'wb') as edid: - edid.write(binascii.a2b_hex(connection_data['EDID'])) - for resolution, refreshrates in connection_data['modes'].items(): + modes = [] + for _, screen_data in data.items(): + for connector, connection_data in screen_data.items(): + if connection_data.get('EDID') and write_edids: + with open('/etc/X11/edid.{}.bin'.format(connector), 'wb') as edid: + edid.write(binascii.a2b_hex(connection_data['EDID'])) + for resolution, refreshrates in connection_data['modes'].items(): for refreshrate in refreshrates: - modes.append(Mode(connector, resolution, refreshrate)) + modes.append(Mode(connector, resolution, refreshrate)) if modes: - result = {} + result = {} try: - gpu_name, bus_id = collect_nvidia_data() + gpu_name, bus_id = collect_nvidia_data() except ValueError: gpu_name = None bus_id = None - def create_entry(my_dict, name, connector, resolution, refreshrate, vendor, model): - my_dict[name] = { + def create_entry(my_dict, name, connector, resolution, refreshrate, vendor, model): + my_dict[name] = { 'connector': connector, 'resolution': resolution, 'refreshrate': refreshrate, - 'edid': '/etc/X11/edid.{}.bin'.format(connector), - 'mode': "{}_{}".format(resolution, refreshrate), + 'edid': '/etc/X11/edid.{}.bin'.format(connector), + 'mode': "{}_{}".format(resolution, refreshrate), 'vendor': vendor, 'model': model, - } + } if gpu_name and bus_id: - result[name]['gpu_name'] = gpu_name - result[name]['bus_id'] = bus_id + result[name]['gpu_name'] = gpu_name + result[name]['bus_id'] = bus_id - connector_0, resolution_0, refreshrate_0 = max(modes, key=sort_mode)[:3] - vendor_0, model_0 = parse_edid_data('/etc/X11/edid.{}.bin'.format(connector_0)) - create_entry(result, 'primary', connector_0, resolution_0, refreshrate_0, vendor_0, model_0) + connector_0, resolution_0, refreshrate_0 = max(modes, key=sort_mode)[:3] + vendor_0, model_0 = parse_edid_data('/etc/X11/edid.{}.bin'.format(connector_0)) + create_entry(result, 'primary', connector_0, resolution_0, refreshrate_0, vendor_0, model_0) # check if additional monitors exist - other_modes = [mode for mode in modes if mode[0] != connector_0] + other_modes = [mode for mode in modes if mode[0] != connector_0] if other_modes: - connector_1, resolution_1, refreshrate_1 = max(other_modes, key=sort_mode)[:3] - vendor_1, model_1 = parse_edid_data('/etc/X11/edid.{}.bin'.format(connector_1)) - create_entry(result, 'secondary', connector_1, resolution_1, refreshrate_1, vendor_1, model_1) + connector_1, resolution_1, refreshrate_1 = max(other_modes, key=sort_mode)[:3] + vendor_1, model_1 = parse_edid_data('/etc/X11/edid.{}.bin'.format(connector_1)) + create_entry(result, 'secondary', connector_1, resolution_1, refreshrate_1, vendor_1, model_1) #print(json.dumps(data, sort_keys=True, indent=4)) - module.exit_json(changed=True if write_edids else False, ansible_facts={'xrandr': data, 'xorg': result}) + module.exit_json(changed=True if write_edids else False, ansible_facts={'xrandr': data, 'xorg': result}) if __name__ == '__main__': - module = AnsibleModule(argument_spec=ARG_SPECS, supports_check_mode=False,) + module = AnsibleModule(argument_spec=ARG_SPECS, supports_check_mode=False,) try: - d = subprocess.check_output(['xrandr', '-d', module.params['display'], '--verbose'], universal_newlines=True).splitlines() + d = subprocess.check_output(['xrandr', '-d', module.params['display'], '--verbose'], universal_newlines=True).splitlines() except subprocess.CalledProcessError: - xorg_data = {} + xorg_data = {} else: - xorg_data = parse_xrandr_verbose(iter(d)) - output_data(xorg_data, module.params['write_edids']) + xorg_data = parse_xrandr_verbose(iter(d)) + output_data(xorg_data, module.params['write_edids'])
    -
    -

    9 Handlers

    +
    +

    9 Handlers

    - name: Reconfigure unattended upgrades with dpkg
    @@ -6933,6 +7886,10 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
         name: x@vt7.service
         state: stopped
       register: x_stop
    +
    +- name: reboot required
    +  debug:
    +    msg: PLEASE REBOOT YOUR SYSTEM.
     
    @@ -6940,7 +7897,7 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c

    Autor: Alexander Grothe <seahawk1986@gmx.de>

    -

    Created: 2018-06-02 Sa 20:04

    +

    Created: 2018-08-10 Fr 08:10

    Validate

    diff --git a/Manual.org b/Manual.org index 37bc587..dd139f6 100644 --- a/Manual.org +++ b/Manual.org @@ -4879,19 +4879,35 @@ dependencies: # This role provides easyily downloadable firmware files -- name: Firmware for Hauppauge WinTV HD Solo/Duo, PCTV 292e +- name: Firmware dvb-demod-si2168-b40-01.fw for Hauppauge WinTV HD Solo/Duo, PCTV 292e get_url: url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-demod-si2168-b40-01.fw checksum: sha256:8507536630d75a316d0719d6b95c04b90c36baa5b457ad457c9bacadafcef134 dest: /lib/firmware/dvb-demod-si2168-b40-01.fw when: '"2040:0264" in usb or "2013:025f" in usb' -- name: Firmware for Hauppauge WinTV-HVR-930C +- name: Firmware dvb-fe-xc5000-1.6.114.fw for Hauppauge WinTV-HVR-930C get_url: url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-fe-xc5000-1.6.114.fw checksum: sha256:7104bda8df301fe1bd4c09de1708aeb6d0d8e1f9d55505449fecfad82639235f dest: /lib/firmware/dvb-fe-xc5000-1.6.114.fw when: '"2040:1605" in usb' + +- name: Firmware ngenge_18.fw for ngene cards + get_url: + url: http://l4m-daten.de/downloads/firmware/dvb-s2/linux/all/ngene_18.fw + checksum: sha256:213d98ec2cd575eba15d82ee79fed7098e670de43792f8aa773a95cfb7c32060 + dest: /lib/firmware/ngene_18.fw + when: '"ngene" in modules' + notify: reboot required + +- name: Firmware drxk_a3.mc for drxk + get_url: + url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/drxk_a3.mc + checksum: sha256:f8956ad6f92a4ce90a6ab94ed23e2f9a27e9317e936fd3e0119778dd28e7e294 + dest: /lib/firmware/drxk_a3.mc + when: '"ngene" in modules or "drxk" in modules' + notify: reboot required #+END_SRC ** autoinstall-dvbsky-firmware *** dependencies @@ -6153,4 +6169,8 @@ if __name__ == '__main__': name: x@vt7.service state: stopped register: x_stop + +- name: reboot required + debug: + msg: PLEASE REBOOT YOUR SYSTEM. #+END_SRC