diff --git a/Manual.html b/Manual.html index 983d09f..fd2df42 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 @@ -253,279 +253,279 @@ 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. @@ -561,16 +561,16 @@ Several roles are used to tie everything 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. @@ -605,8 +605,8 @@ We use a callback to generate tags for all roles autmatically:

-
-

3.1 Install scripts for local usage

+
+

3.1 Install scripts for local usage

set -e
@@ -650,12 +650,12 @@ ansible-playbook yavdr07-headless.yml -b -i 'localhost_
 
-
-

4 Playbooks

+
+

4 Playbooks

-
-

4.1 yavdr07.yml

+
+

4.1 yavdr07.yml

The yavdr07.yml playbook sets up a fully-featured yaVDR installation: @@ -709,8 +709,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 @@ -749,8 +749,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: @@ -764,12 +764,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

---
@@ -787,8 +787,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
@@ -799,17 +799,13 @@ This playbook can either be used to run the installation on the localhost or any
   uid: 666
   gid: 666
   home: /var/lib/vdr
+  etc_confdir: /etc/vdr
   confdir: /var/lib/vdr
   recdir: /srv/vdr/video
   hide_first_recording_level: false
   safe_dirnames: true  # escape characters (useful for windows clients and FAT/NTFS file systems)
   override_vdr_charset: false
 
-# optional additional hosts and subnets for svdrphosts.conf
-#
-# vdr_svdrphosts:
-#   - 192.168.0.0/24
-
 # copy channels.conf from a local file
 # vdr_channels_conf: /path/to/channels.conf
 
@@ -821,12 +817,32 @@ This playbook can either be used to run the installation on the localhost or any
   - vdr-plugin-devstatus
   - vdr-plugin-markad
   - vdr-plugin-softhddevice-vpp
+
+# IP (range) filter for vdr and plugins (this must be an array):
+# vdr_allowed_hosts:
+#   - 192.168.0.0/24
+#
+# hosts and subnets for svdrphosts.conf (overrides vdr_allowed_hosts):
+# vdr_svdrphosts:
+#   - 192.168.0.0/24
+#
+# hosts and subnets for allowed_hosts.conf of xineliboutput (overrides vdr_allowed_hosts):
+# xineliboutput_allowed_hosts:
+#   - 192.168.0.0/24
+#
+# hosts and subnets for allowed_hosts.conf of vnsiserver (overrides vdr_allowed_hosts):
+# vnsiserver_allowed_hosts:
+#   - 192.168.0.0/24
+#
+# hosts and subnets for streamdevhosts.conf (overrides vdr_allowed_hosts):
+# streamdev_server_allowed_hosts:
+#   - 192.168.0.0/24
 
-
-

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
@@ -841,8 +857,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.4 NFS

+
+

6.4 NFS

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

6.5 Samba

+
+

6.5 Samba

samba:
@@ -862,8 +878,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
@@ -882,8 +898,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
@@ -902,8 +918,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.8 Serial IR

+
+

6.8 Serial IR

# Serial device to configure for a homebrew receiver.
@@ -915,20 +931,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
    ---
    @@ -946,19 +962,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
    ---
    @@ -987,15 +1003,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. @@ -1008,7 +1024,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. @@ -1025,7 +1041,7 @@ You can set a list of package repositories which provide the necessary packages.

-
  • Drivers
    +
  • 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. @@ -1038,7 +1054,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 @@ -1052,7 +1068,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. @@ -1086,15 +1102,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
      ---
      @@ -1112,7 +1128,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: @@ -1129,7 +1145,7 @@ This task prevents apt to automatically install all recommended dependencies for

    -
  • Set up package repositories
    +
  • Set up package repositories
    - name: add PPAs
    @@ -1149,7 +1165,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
    @@ -1161,15 +1177,15 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • create user vdr
    +
  • create user vdr
  • -
  • Disable release-upgrade notifications
    +
  • Disable release-upgrade notifications
      -
    1. SOMEDAY move from lineinfile to template
      +
    2. SOMEDAY move from lineinfile to template
      - name: disable release-upgrade notifications
      @@ -1191,7 +1207,7 @@ This task prevents apt to automatically install all recommended dependencies for
       
  • -
  • Install essential packages
    +
  • Install essential packages
    - name: apt | install basic packages
    @@ -1223,7 +1239,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
    @@ -1236,15 +1252,15 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • create directories
    +
  • create directories
  • -
  • create sudoers drop-in for vdr
    +
  • create sudoers drop-in for vdr
  • -
  • basic scripts for standby support
    +
  • basic scripts for standby support

    Stop vdr before entering suspend and unload dvb modules, reverse this operation on resume @@ -1255,8 +1271,8 @@ Stop vdr before entering suspend and unload dvb modules, reverse this operation

  • -
    -

    7.3.3 templates

    +
    +

    7.3.3 templates

    {{ ansible_managed | comment('c') }}
    @@ -1267,7 +1283,7 @@ 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 @@ -1279,7 +1295,7 @@ Allow the vdr user to restart vdr.service and reboot the system

    -
  • suspend hooks
    +
  • suspend hooks
    #!/bin/bash
    @@ -1308,7 +1324,7 @@ Allow the vdr user to restart vdr.service and reboot the system
     
  • -
  • module-helper
    +
  • module-helper
    #!/usr/bin/env python3
    @@ -1395,12 +1411,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
    @@ -1408,12 +1424,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
      @@ -1462,16 +1478,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
      ---
      @@ -1489,7 +1505,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
      @@ -1504,7 +1520,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
      @@ -1539,7 +1555,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 @@ -1555,7 +1571,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
    @@ -1573,10 +1589,10 @@ The additional plugins to install can be set in the variable {{vdr_plugins
         mode: 0644
         force: no
     
    -- name: "vdr configuration | copy keymacros.conf if it doesn't exist yet"
    +- name: "vdr configuration | copy keymacros.conf"
       copy:
         src: files/keymacros.conf
    -    dest: '{{ vdr.confdir }}/keymacros.conf'
    +    dest: '{{ vdr.etc_confdir }}/keymacros.conf'
         owner: '{{ vdr.user }}'
         group: '{{ vdr.group }}'
         mode: 0644
    @@ -1605,7 +1621,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
     - name: "vdr configuration | svdrphosts.conf"
       template:
         src: templates/svdrphosts.conf.j2
    -    dest: '/etc/vdr/svdrphosts.conf'
    +    dest: '{{ vdr.etc_confdir }}/svdrphosts.conf'
         mode: 0644
       vars:
         svdrphosts: '{{ vdr_svdrphosts | default(vdr_allowed_hosts) }}'
    @@ -1619,10 +1635,14 @@ The additional plugins to install can be set in the variable {{vdr_plugins
     
  • - -
  • plugin preconfiguration
    +
  • plugin preconfiguration
    +
    +

    +Set up IP resp. IP range based access for VDR plugins +

    +
      -
    1. xineliboutput
      +
    2. xineliboutput
      - name: ensure directory '/etc/vdr/xineliboutput' exists
      @@ -1647,12 +1667,12 @@ The additional plugins to install can be set in the variable {{vdr_plugins
           mode: 0644
         vars:
           allowed_hosts: '{{ xineliboutput_allowed_hosts | default(vdr_allowed_hosts) }}'
      -    
      +
       
    3. -
    4. vnsiserver
      +
    5. vnsiserver
      - name: ensure directory '/etc/vdr/plugins/vnsiserver' exists
      @@ -1674,8 +1694,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
       
    6. - -
    7. streamdev-server
      +
    8. streamdev-server
      - name: ensure directory '/etc/vdr/plugins' exists
      @@ -1699,8 +1718,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
    @@ -1721,12 +1739,12 @@ The additional plugins to install can be set in the variable {{vdr_plugins
     
  • -
    -

    7.5.2 templates

    +
    +

    7.5.2 templates

      -
    1. Start vdr.service after network-online.target
      +
    2. Systemd Drop-in to start vdr.service after network-online.target
      {{ansible_managed | comment }}
      @@ -1736,8 +1754,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
       
    3. - -
    4. /etc/default/vdr
      +
    5. /etc/default/vdr
      {{ ansible_managed | comment }}
      @@ -1751,7 +1768,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
       
    6. -
    7. svdrphosts.conf
      +
    8. svdrphosts.conf
      {{ ansible_managed | comment }}
      @@ -1777,7 +1794,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
       
    9. -
    10. allowed_hosts.conf style template
      +
    11. allowed_hosts.conf style template
      {{ ansible_managed | comment }}
      @@ -1806,7 +1823,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
       
    12. -
    13. xineliboutput.conf template
      +
    14. xineliboutput.conf template
      #
      @@ -1828,12 +1845,12 @@ The additional plugins to install can be set in the variable {{vdr_plugins
       
    -
    -

    7.5.3 files

    +
    +

    7.5.3 files

      -
    1. remote.conf
      +
    2. remote.conf
      LIRC.Up KEY_UP
      @@ -1968,7 +1985,7 @@ XKeySym.Next       XF86AudioNext
       
    3. -
    4. keymacros.conf
      +
    5. keymacros.conf
      # Remote control key macros for VDR
      @@ -1994,12 +2011,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
    @@ -2007,8 +2024,8 @@ User0     @osdteletext
     
    -
    -

    7.6.2 tasks

    +
    +

    7.6.2 tasks

    ---
    @@ -2076,12 +2093,12 @@ User0     @osdteletext
     
    -
    -

    7.7 vdr-plugin-menuorg

    +
    +

    7.7 vdr-plugin-menuorg

    -
    -

    7.7.1 tasks

    +
    +

    7.7.1 tasks

    ---
    @@ -2103,8 +2120,8 @@ User0     @osdteletext
     
    -
    -

    7.7.2 templates

    +
    +

    7.7.2 templates

    <?xml version="1.0" encoding="UTF-8"?>                                                                                                                      
    @@ -2163,17 +2180,17 @@ User0     @osdteletext
     
    -
    -

    7.8 nfs-server

    +
    +

    7.8 nfs-server

    -
    -

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

    +
    +

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

    -
    -

    7.8.2 tasks

    +
    +

    7.8.2 tasks

    ---
    @@ -2201,12 +2218,12 @@ User0     @osdteletext
     
    -
    -

    7.8.3 templates

    +
    +

    7.8.3 templates

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

    7.9 yavdr-remote

    +
    +

    7.9 yavdr-remote

    The role yavdr-remote sets up the foundation for using eventlircd, lircd2uinput and the pre-configuration for remote receivers which can be detected by udev.

    -
    -

    7.9.1 default variables

    +
    +

    7.9.1 default variables

    lircd0_socket: /var/run/lirc/lircd0
    @@ -2254,8 +2271,8 @@ The role yavdr-remote sets up the foundation for using eventlircd,
     
    -
    -

    7.9.2 tasks

    +
    +

    7.9.2 tasks

    ---
    @@ -2326,12 +2343,12 @@ The role yavdr-remote sets up the foundation for using eventlircd,
     
    -
    -

    7.9.3 templates

    +
    +

    7.9.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' %}
      @@ -2342,7 +2359,7 @@ The role yavdr-remote sets up the foundation for using eventlircd,
       
    3. -
    4. Systemd Drop-in to start lircd2uinput with lircd
      +
    5. Systemd Drop-in to start lircd2uinput with lircd
      [Service]
      @@ -2352,7 +2369,7 @@ The role yavdr-remote sets up the foundation for using eventlircd,
       
    6. -
    7. create /etc/rc_maps.cfg
      +
    8. create /etc/rc_maps.cfg
      {{ ansible_managed | comment }}
      @@ -2544,12 +2561,12 @@ ati_remote    rc-medion-x10-digitainer   /lib/udev/rc_keymaps/rc-medion-x10-digi
       
    -
    -

    7.10 pulseaudio

    +
    +

    7.10 pulseaudio

    -
    -

    7.10.1 tasks

    +
    +

    7.10.1 tasks

    ---
    @@ -2571,8 +2588,8 @@ ati_remote    rc-medion-x10-digitainer   /lib/udev/rc_keymaps/rc-medion-x10-digi
     
    -
    -

    7.10.2 templates

    +
    +

    7.10.2 templates

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

    7.11 yavdr-xorg

    +
    +

    7.11 yavdr-xorg

    -
    -

    7.11.1 About the GUI session

    +
    +

    7.11.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. @@ -2628,8 +2645,8 @@ In order to achive a clean shutdown of the session, x@t7.service is

    -
    -

    7.11.2 default variables

    +
    +

    7.11.2 default variables

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

    7.11.3 tasks

    +
    +

    7.11.3 tasks

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -2670,7 +2687,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
       
    3. -
    4. setup-xorg.yml
      +
    5. setup-xorg.yml
      ---
      @@ -2723,7 +2740,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
         lineinfile:
           path: /etc/vdr/conf.avail/softhddevice.conf
           line: '-v va-api'
      -    state: '{{ "present" if intel_detected else "absent" }}'
      +    state: '{{ "present" if (not nvidia_detected and intel_detected) else "absent" }}'
       
       - name: add a login shell for the user vdr
         user:
      @@ -2759,7 +2776,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
             - xserver-xorg-video-intel
             - i965-va-driver-shaders
           state: present
      -  when: intel_detected
      +  when: intel_detected and not nvidia_detected
       
       - name: Install yaVDR Media (e.g. Backgrounds)
         apt:
      @@ -2788,7 +2805,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
       
    6. -
    7. detect-xorg.yml
      +
    8. detect-xorg.yml
      ---
      @@ -2834,42 +2851,86 @@ In order to achive a clean shutdown of the session, x@t7.service is
           name: x@vt7.service
           state: stopped
       
      -- name: Workaround for wrong connector names on first run
      +- name: check if a nvidia driver has been installed
      +  set_fact:
      +    nvidia_driver_installed: '{{ "nvidia" in lookup("file", "/etc/yavdr/autoinstalled") }}'
      +
      +- name: unload nouveau driver, replace with nvidia
         block:
      -    - name: "wait a little bit before starting x-verbose@vt7.service (needed?)"
      +    - name: unbind vconsole
      +      shell: echo 0 > /sys/class/vtconsole/vtcon1/bind
      +
      +    - name: "wait a little, so noveau isn't used anymore"
             wait_for:
      -        timeout: 10
      -    
      -    - name: "start x-verbose@.service"
      -      systemd:
      -          name: "x-verbose@vt7.service"
      -          state: started
      -          enabled: false
      -          masked: false
      -          daemon_reload: true
      -    
      -    - name: "wait a little bit, so X has some time to start up (needed?)"
      +        timeout: 1
      +
      +    # unloading the drivers using the modprobe module does not work for some strange reason...
      +    - name: unload kms drivers
      +      command: rmmod '{{ item }}'
      +      loop:
      +        - nouveau
      +        - ttm
      +        - drm_kms_helper
      +        - drm
      +      ignore_errors: yes
      +
      +    - name: load nvidia driver
      +      modprobe:
      +        name: "nvidia"
      +        state: present
      +
      +    - name: "wait a little before starting nvidia-persistenced"
             wait_for:
      -        timeout: 3
      -    
      -    - name: "stop x-verbose@vt7.service"
      +        timeout: 1
      +
      +    - name: start nvidia-persistenced
             systemd:
      -        name: "x-verbose@vt7.service"
      -        state: stopped
      -        enabled: false
      -        masked: true
      -  when: first_run
      +        name: "nvidia-persistenced"
      +        state: started
      +        enabled: true
      +        masked: false
      +        daemon_reload: true
      +  when:
      +    - nvidia_detected
      +    - nvidia_driver_installed
      +    - '"nouveau" in modules'
       
      -- name: "wait a little bit, so X has some time to shut down (needed?)"
      -  wait_for:
      -    timeout: 3
      +#- name: Workaround for wrong connector names on first run
      +#  block:
      +#    - name: "wait a little bit before starting x-verbose@vt7.service (needed?)"
      +#      wait_for:
      +#        timeout: 10
      +#    
      +#    - name: "start x-verbose@.service"
      +#      systemd:
      +#          name: "x-verbose@vt7.service"
      +#          state: started
      +#          enabled: false
      +#          masked: false
      +#          daemon_reload: true
      +#    
      +#    - name: "wait a little bit, so X has some time to start up (needed?)"
      +#      wait_for:
      +#        timeout: 3
      +#    
      +#    - name: "stop x-verbose@vt7.service"
      +#      systemd:
      +#        name: "x-verbose@vt7.service"
      +#        state: stopped
      +#        enabled: false
      +#        masked: true
      +#  when: first_run
       
      -- name: "trigger udevadm reload"
      -  command: 'udevadm trigger '
      -
      -- name: "wait a little bit, so udev has some time to reapply rules (needed?)"
      -  wait_for:
      -    timeout: 3
      +#- name: "wait a little bit, so X has some time to shut down (needed?)"
      +#  wait_for:
      +#    timeout: 3
      +#
      +#- name: "trigger udevadm reload"
      +#  command: 'udevadm trigger '
      +#
      +#- name: "wait a little bit, so udev has some time to reapply rules (needed?)"
      +#  wait_for:
      +#    timeout: 3
       
       - name: "start x-verbose@.service"
         systemd:
      @@ -2879,7 +2940,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
           masked: false
           daemon_reload: true
       
      -- name: "wait a little bit, so X has some time to start up (needed?)"
      +- name: "wait a little, so X has some time to start up"
         wait_for:
           timeout: 3
       
      @@ -2907,9 +2968,9 @@ In order to achive a clean shutdown of the session, x@t7.service is
           enabled: false
           masked: true
       
      -- name: "wait a little bit, so X has some time to shut down (needed?)"
      -  wait_for:
      -    timeout: 3
      +#- name: "wait a little bit, so X has some time to shut down (needed?)"
      +#  wait_for:
      +#    timeout: 3
       
       - name: save results
         block:
      @@ -2966,7 +3027,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
           src: templates/20-intel.conf.j2
           dest: /etc/X11/xorg.conf.d/20-intel.conf
         when:
      -    - intel_detected
      +    - intel_detected and not nvidia_detected
       
       - name: server flags config snippet to disable screen blanking
         template:
      @@ -2976,7 +3037,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
       
    9. -
    10. intel.yml
      +
    11. intel.yml

      KMS drivers (like for intel (i915) and amd (radeon)) require additional configuration besides 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. @@ -3024,12 +3085,12 @@ Please note that rescanning the connected displays works only after removing the

    -
    -

    7.11.4 templates

    +
    +

    7.11.4 templates

      -
    1. grub
      +
    2. grub
      {{ ansible_managed | comment }}
      @@ -3039,11 +3100,11 @@ Please note that rescanning the connected displays works only after removing the
       
    3. -
    4. xorg
      +
    5. xorg
        -
      1. x-verbose@.service
        +
      2. x-verbose@.service
        # file: roles/yavdr-xorg/templates/systemd/system/x-verbose@.service.j2
        @@ -3059,7 +3120,7 @@ Please note that rescanning the connected displays works only after removing the
         
      3. -
      4. Drop-in snippet for x@.service
        +
      5. Drop-in snippet for x@.service
        [Unit]
        @@ -3085,7 +3146,7 @@ Please note that rescanning the connected displays works only after removing the
         
      6. -
      7. Drop-in snippet for vdr.service
        +
      8. Drop-in snippet for vdr.service
        {{ ansible_managed | comment }}
        @@ -3097,7 +3158,7 @@ Please note that rescanning the connected displays works only after removing the
         
      9. -
      10. xorg.conf snippets
        +
      11. xorg.conf snippets
        {{ ansible_managed | comment }}
        @@ -3112,7 +3173,7 @@ EndSection
         
      12. -
      13. intel graphics xorg.conf snippet
        +
      14. intel graphics xorg.conf snippet
        {{ ansible_managed | comment }}
        @@ -3220,7 +3281,7 @@ EndSection
         
      15. -
      16. xorg.conf
        +
      17. xorg.conf
        {{ ansible_managed | comment }}
        @@ -3546,7 +3607,7 @@ EndSection
         
      18. -
      19. snippet to disable screen blanking
        +
      20. snippet to disable screen blanking
        {{ ansible_managed | comment }}
        @@ -3563,7 +3624,7 @@ EndSection
         
    6. -
    7. vdr
      +
    8. vdr

      Set environment variables for system locale and user session on startup @@ -3579,12 +3640,12 @@ Set environment variables for system locale and user session on startup

    -
    -

    7.11.5 files

    +
    +

    7.11.5 files

      -
    1. initramfs EDID hook
      +
    2. initramfs EDID hook
      #!/bin/bash
      @@ -3609,16 +3670,16 @@ exit 0
       
    -
    -

    7.12 yavdr-desktop

    +
    +

    7.12 yavdr-desktop

    -
    -

    7.12.1 Tasks

    +
    +

    7.12.1 Tasks

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -3784,16 +3845,16 @@ exit 0
       
    -
    -

    7.12.2 Templates

    +
    +

    7.12.2 Templates

      -
    1. xorg configuration
      +
    2. xorg configuration
        -
      1. .Xresources
        +
      2. .Xresources
        xterm*background: Black
        @@ -3816,7 +3877,7 @@ XTerm.vt100.font: 7x13
         
      3. -
      4. .xinitrc
        +
      5. .xinitrc
        #!/bin/bash
        @@ -3828,11 +3889,11 @@ 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
        @@ -3868,7 +3929,7 @@ systemctl --user isolate yavdr-desktop.target
         
      3. -
      4. rc.xml
        +
      5. rc.xml
        <?xml version="1.0" encoding="UTF-8"?>
        @@ -4715,7 +4776,7 @@ systemctl --user isolate yavdr-desktop.target
         
      6. -
      7. rc2.xml
        +
      8. rc2.xml
        <?xml version="1.0" encoding="UTF-8"?>
        @@ -5544,11 +5605,11 @@ systemctl --user isolate yavdr-desktop.target
         
    6. -
    7. Systemd User Session
      +
    8. Systemd User Session
        -
      1. yavdr-desktop.target
        +
      2. yavdr-desktop.target
        [Unit]
        @@ -5561,7 +5622,7 @@ systemctl --user isolate yavdr-desktop.target
         
      3. -
      4. detect-second-display
        +
      5. detect-second-display
        #!/bin/bash
        @@ -5590,7 +5651,7 @@ systemctl --user isolate yavdr-desktop.target
         
      6. -
      7. switch-displays
        +
      8. switch-displays

        This script exchanges the primary and secondary screen. It needs access to the systemd user session. @@ -5609,7 +5670,7 @@ frontend-dbus-send start

    -
  • openbox-second.service
    +
  • openbox-second.service
    [Unit]
    @@ -5631,7 +5692,7 @@ frontend-dbus-send start
     
  • -
  • osd2web.service
    +
  • osd2web.service
    [Unit]
    @@ -5654,7 +5715,7 @@ frontend-dbus-send start
     
  • -
  • tmux.service
    +
  • tmux.service
    [Unit]
    @@ -5673,7 +5734,7 @@ frontend-dbus-send start
     
  • -
  • wm-exit.service
    +
  • wm-exit.service
    [Unit]
    @@ -5692,7 +5753,7 @@ frontend-dbus-send start
     
  • -
  • irexec
    +
  • irexec

    irexec.service starts irexec for the user session @@ -5725,12 +5786,12 @@ end

  • -
    -

    7.13 samba-install

    +
    +

    7.13 samba-install

    -
    -

    7.13.1 tasks

    +
    +

    7.13.1 tasks

    ---
    @@ -5751,12 +5812,12 @@ end
     
    -
    -

    7.14 samba-config

    +
    +

    7.14 samba-config

    -
    -

    7.14.1 tasks

    +
    +

    7.14.1 tasks

    ---
    @@ -5781,16 +5842,16 @@ end
     
    -
    -

    7.14.2 templates

    +
    +

    7.14.2 templates

      -
    1. smb.conf
      +
    2. smb.conf
        -
      1. global settings
        +
      2. global settings
        {{ ansible_managed | comment }}
        @@ -5877,7 +5938,7 @@ end
         
      3. -
      4. media directories
        +
      5. media directories
        {% for name, path in media_dirs.items() | list %}
        @@ -5899,7 +5960,7 @@ end
         
      6. -
      7. include custom samba exports
        +
      8. include custom samba exports
        include = /etc/samba/smb.conf.custom
        @@ -5912,15 +5973,15 @@ end
         
    -
    -

    7.15 STARTED autoinstall-drivers

    +
    +

    7.15 STARTED autoinstall-drivers

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

    -
    -

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

    +
    +

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

    For now we have the role install-sundtek, in the future we could do a little better: @@ -5940,7 +6001,7 @@ Vendor-IDs:

      -
    1. planned packages
      +
    2. planned packages
      • yavdr-hardware-sundtek (basic configuration files and scripts, sundtek-avahi-mounter)
      • @@ -5951,8 +6012,8 @@ Vendor-IDs:
    -
    -

    7.15.2 TODO drivers for TT S2-6400 FF

    +
    +

    7.15.2 TODO drivers for TT S2-6400 FF

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

    -
    -

    7.16 autoinstall-ubuntu-drivers

    +
    +

    7.16 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.16.1 tasks

    +
    +

    7.16.1 tasks

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

    7.17 autoinstall-virtualbox-guest

    +
    +

    7.17 autoinstall-virtualbox-guest

    This role installs the guest additions for virtualbox guests on Ubuntu 18.04 @@ -6039,18 +6100,18 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04 - vdrctl enable xineliboutput ignore_errors: yes when: - - ansible_virtualization_type == "virtualbox" or ansible_virtualization_type == "VMware" + - ansible_virtualization_type in ["virtualbox", "VirtualPC", "VMware"] - ansible_virtualization_role == "guest"

    -
    -

    7.18 autoinstall-atric-usb

    +
    +

    7.18 autoinstall-atric-usb

    -
    -

    7.18.1 dependencies

    +
    +

    7.18.1 dependencies

    ---
    @@ -6062,8 +6123,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.18.2 tasks

    +
    +

    7.18.2 tasks

    ---
    @@ -6105,8 +6166,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.18.3 templates

    +
    +

    7.18.3 templates

    {{ ansible_managed | comment }}
    @@ -6135,12 +6196,12 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.19 autoinstall-yausbir

    +
    +

    7.19 autoinstall-yausbir

    -
    -

    7.19.1 dependencies

    +
    +

    7.19.1 dependencies

    ---
    @@ -6151,8 +6212,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.19.2 tasks

    +
    +

    7.19.2 tasks

    ---
    @@ -6194,8 +6255,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.19.3 templates

    +
    +

    7.19.3 templates

    {{ ansible_managed | comment }}
    @@ -6223,15 +6284,15 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.20 autoinstall-satip

    +
    +

    7.20 autoinstall-satip

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

    -
    -

    7.20.1 tasks

    +
    +

    7.20.1 tasks

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

    7.21 autoinstall-targavfd

    +
    +

    7.21 autoinstall-targavfd

    -
    -

    7.21.1 tasks

    +
    +

    7.21.1 tasks

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

    7.22 autoinstall-imonlcd

    +
    +

    7.22 autoinstall-imonlcd

    -
    -

    7.22.1 tasks

    +
    +

    7.22.1 tasks

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

    7.23 autoinstall-libcecdaemon

    +
    +

    7.23 autoinstall-libcecdaemon

    -
    -

    7.23.1 tasks

    +
    +

    7.23.1 tasks

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

    7.24 autoinstall-pvr350

    +
    +

    7.24 autoinstall-pvr350

    -
    -

    7.24.1 tasks

    +
    +

    7.24.1 tasks

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

    7.25 autoinstall-hauppauge-pvr

    +
    +

    7.25 autoinstall-hauppauge-pvr

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

    7.26 autoinstall-firmware

    +
    +

    7.26 autoinstall-firmware

    -
    -

    7.26.1 dependencies

    +
    +

    7.26.1 dependencies

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

    7.26.2 tasks

    +
    +

    7.26.2 tasks

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

    7.27 autoinstall-dvbsky-firmware

    +
    +

    7.27 autoinstall-dvbsky-firmware

    -
    -

    7.27.1 dependencies

    +
    +

    7.27.1 dependencies

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

    7.27.2 defaults

    +
    +

    7.27.2 defaults

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

    7.27.3 tasks

    +
    +

    7.27.3 tasks

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

    7.28 TODO autoinstall-dvbhddevice

    +
    +

    7.28 TODO autoinstall-dvbhddevice

    How to get a driver for the TT-6400 FF card? Needed firmware files are in the yavdr-firmware package.

    -
    -

    7.28.1 dependencies

    +
    +

    7.28.1 dependencies

    ---
    @@ -6510,8 +6571,8 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.28.2 tasks

    +
    +

    7.28.2 tasks

    ---
    @@ -6529,12 +6590,12 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.29 TODO autoinstall-dvbsddevice

    +
    +

    7.29 TODO autoinstall-dvbsddevice

    -
    -

    7.29.1 dependencies

    +
    +

    7.29.1 dependencies

    ---
    @@ -6545,8 +6606,8 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.29.2 tasks

    +
    +

    7.29.2 tasks

    ---
    @@ -6566,12 +6627,12 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.30 autoinstall-hardware-irmp

    +
    +

    7.30 autoinstall-hardware-irmp

    -
    -

    7.30.1 dependencies

    +
    +

    7.30.1 dependencies

    ---
    @@ -6582,8 +6643,8 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.30.2 tasks

    +
    +

    7.30.2 tasks

    ---
    @@ -6599,19 +6660,19 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.31 Serial IR Receivers

    +
    +

    7.31 Serial IR Receivers

    This role preconfigures the system for serial „homebrew“ receivers. Newer kernel versions provide serial_ir which acts as a rc-core driver, so we don’t need lircd - eventlircd can use the device directly.

    -As configured in the role yavdr-remote (/etc/rc_maps.cfg) a keytable for a RC-6 MCE remote is loaded by default. You can choose a different keymap which may also use another ir-protocol. +As configured in the role yavdr-remote (/etc/rc_maps.cfg) a keytable for a RC-6 MCE remote is loaded by default. You can choose a different keymap which may also use another ir-protocol.

    -
    -

    7.31.1 defaults

    +
    +

    7.31.1 defaults

    --- 
    @@ -6622,8 +6683,8 @@ As configured in the role yavdr-remote (/etc/rc_maps.cfg
     
    -
    -

    7.31.2 tasks

    +
    +

    7.31.2 tasks

    -
    -

    7.31.3 templates

    +
    +

    7.31.3 templates

      -
    1. load serial_ir on startup
      +
    2. load serial_ir on startup
      {{ ansible_managed | comment }}
      @@ -6666,7 +6727,7 @@ serial_ir
       
    3. -
    4. serial_ir module options
      +
    5. serial_ir module options
      {{ ansible_managed | comment }}
      @@ -6685,7 +6746,7 @@ install serial_ir setserial /dev/{{setserial options
      +
    6. setserial options
      {{ ansible_managed | comment }}
      @@ -6704,21 +6765,21 @@ install serial_ir setserial /dev/{{
      -

      7.32 kodi

      +
      +

      7.32 kodi

      -
      -

      7.32.1 tasks

      +
      +

      7.32.1 tasks

        -
      1. Install KODI
        +
      2. Install KODI
          -
        • main.yml
          -
          +
        • main.yml
          +
          - import_tasks: install-kodi.yml
             tags:
          @@ -6734,7 +6795,7 @@ install serial_ir setserial /dev/{{install-kodi.yml
          +
        • install-kodi.yml
          ---
          @@ -6766,7 +6827,7 @@ install serial_ir setserial /dev/{{configure-kodi.yml
          +
        • configure-kodi.yml
          - name: create kodi.service for the user session
          @@ -6820,12 +6881,12 @@ install serial_ir setserial /dev/{{
          -

          7.32.2 templates

          +
          +

          7.32.2 templates

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

            This systemd unit for the user session starts (and stops) kodi. @@ -6847,7 +6908,7 @@ This systemd unit for the user session starts (and stops) kodi.

        • -
        • set-kodi-diplay
          +
        • set-kodi-diplay

          This is a version-dependent script to force KODI to use the display set by the environment variable DISPLAY. The following Version is intended for KODI 18. @@ -6976,15 +7037,15 @@ This is a version-dependent script to force KODI to use the display set by the e

      -
      -

      7.32.3 files

      +
      +

      7.32.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. @@ -7055,14 +7116,14 @@ This file allows to map keys sent by remotes via eventlircd (which uses the name

    7. -
    8. keymaps
      +
    9. 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"?>
        @@ -7614,17 +7675,17 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
         
    10. -
      -

      7.33 dvd

      +
      +

      7.33 dvd

      -
      -

      7.33.1 tasks

      +
      +

      7.33.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
        @@ -7661,15 +7722,15 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
         
        -
        -

        7.34 vdr-epg-daemon

        +
        +

        7.34 vdr-epg-daemon

        This role installs the vdr-epg-daemon

        -
        -

        7.34.1 defaults

        +
        +

        7.34.1 defaults

        ---
        @@ -7717,8 +7778,8 @@ This role installs the vdr-epg-daemon
         
        -
        -

        7.34.2 tasks

        +
        +

        7.34.2 tasks

        ---
        @@ -7824,12 +7885,12 @@ This role installs the vdr-epg-daemon
         
        -
        -

        7.34.3 templates

        +
        +

        7.34.3 templates

          -
        1. Template for /etc/mysql/mariadb.conf.d/99-epgd.cnf
          +
        2. Template for /etc/mysql/mariadb.conf.d/99-epgd.cnf

          to allow Database access from all hosts on network @@ -7843,7 +7904,7 @@ bind-address = 0.0.0.0

      • -
      • template for /root/.ssh/mysqlpasswd so epgd-tool is happy
        +
      • template for /root/.ssh/mysqlpasswd so epgd-tool is happy

        file: roles/epgd/templates/root_.ssh_mysqlpasswd.j2 @@ -7855,7 +7916,7 @@ PASSWORD=NONE

    11. -
    12. template for /etc/epgd/epgd.conf
      +
    13. template for /etc/epgd/epgd.conf

      file: roles/epgd/templates/etc_epgd_epgd.conf.j2 @@ -7943,12 +8004,12 @@ epgdata.timeout = {{ -

      7.35 install-sundtek

      +
      +

      7.35 install-sundtek

      -
      -

      7.35.1 dependencies

      +
      +

      7.35.1 dependencies

      ---
      @@ -7959,8 +8020,8 @@ epgdata.timeout = {{ 
      -

      7.35.2 defaults

      +
      +

      7.35.2 defaults

      --- 
      @@ -7975,8 +8036,8 @@ epgdata.timeout = {{ 
      -

      7.35.3 tasks

      +
      +

      7.35.3 tasks

      ---
      @@ -8054,12 +8115,12 @@ epgdata.timeout = {{ 
      -

      7.35.4 templates

      +
      +

      7.35.4 templates

        -
      1. LD_PRELOAD for vdr.service
        +
      2. LD_PRELOAD for vdr.service
        {{ ansible_managed | comment }}
        @@ -8073,7 +8134,7 @@ epgdata.timeout = {{ /etc/systemd/system/sundtek.service
        +
      3. /etc/systemd/system/sundtek.service
        {{ ansible_managed | comment }}
        @@ -8096,7 +8157,7 @@ epgdata.timeout = {{ /etc/sundtek.conf
        +
      4. /etc/sundtek.conf
        {{ ansible_managed | comment }}
        @@ -8207,8 +8268,8 @@ disable_analogtv=1                                      #disable initialization
         
      -
      -

      7.36 template-test

      +
      +

      7.36 template-test

      ---
      @@ -8449,12 +8510,12 @@ EndSection
       
      -
      -

      7.37 wakeup

      +
      +

      7.37 wakeup

      -
      -

      7.37.1 defaults

      +
      +

      7.37.1 defaults

      ---
      @@ -8464,8 +8525,8 @@ EndSection
       
      -
      -

      7.37.2 tasks

      +
      +

      7.37.2 tasks

      ---
      @@ -8486,8 +8547,8 @@ EndSection
       
      -
      -

      7.37.3 templates

      +
      +

      7.37.3 templates

      {{ ansible_managed | comment }}
      @@ -8513,12 +8574,12 @@ ACPI_START_AHEAD=5
       
      -
      -

      7.38 grub-config

      +
      +

      7.38 grub-config

      -
      -

      7.38.1 default variables

      +
      +

      7.38.1 default variables

      system:
      @@ -8530,8 +8591,8 @@ ACPI_START_AHEAD=5
       
      -
      -

      7.38.2 tasks

      +
      +

      7.38.2 tasks

      ---
      @@ -8556,8 +8617,8 @@ ACPI_START_AHEAD=5
       
      -
      -

      7.38.3 templates

      +
      +

      7.38.3 templates

      #!/bin/sh
      @@ -8580,8 +8641,8 @@ fi
       
      -
      -

      7.38.4 handlers

      +
      +

      7.38.4 handlers

      ---
      @@ -8604,15 +8665,15 @@ fi
       
      -
      -

      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.
      @@ -8790,8 +8851,8 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
       
      -
      -

      8.2 pci_facts.py

      +
      +

      8.2 pci_facts.py

      @@ -8867,8 +8928,8 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
       
      -
      -

      8.3 satip_facts.py

      +
      +

      8.3 satip_facts.py

      DOCUMENTATION = '''
      @@ -8992,8 +9053,8 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
       
      -
      -

      8.4 xrandr_facts.py

      +
      +

      8.4 xrandr_facts.py

      • [ ] support multiple screens (-d :0.0 .. :0.n)
      • @@ -9213,7 +9274,14 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c if "Modeline" in line: print(line) _, _, line = line.split('"', 2) - FF, H1, H2, H3, H4, V1, V2, V3, V4, FLAGS = line.split(None, 9) + if not line: + print("no timing information") + continue + try: + FF, H1, H2, H3, H4, V1, V2, V3, V4, FLAGS = line.split(None, 9) + except ValueError: + print("invalid timing information") + continue print(FF, H1, H2, H3, H4, V1, V2, V3, V4, FLAGS) refresh = round(float(FF) * 1E6 / (float(H4) * float(V4))) interlaced = "interlaced" in FLAGS @@ -9398,8 +9466,8 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
      -
      -

      9 Handlers

      +
      +

      9 Handlers

      - name: Reconfigure unattended upgrades with dpkg
      @@ -9492,7 +9560,7 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
       

      Autor: Alexander Grothe <seahawk1986@gmx.de>

      -

      Created: 2019-03-26 Di 14:26

      +

      Created: 2019-05-06 Mo 18:21

      Validate

      diff --git a/Manual.org b/Manual.org index 6084a34..9f164b7 100644 --- a/Manual.org +++ b/Manual.org @@ -2688,42 +2688,86 @@ preferred_refreshrates: name: x@vt7.service state: stopped -- name: Workaround for wrong connector names on first run +- name: check if a nvidia driver has been installed + set_fact: + nvidia_driver_installed: '{{ "nvidia" in lookup("file", "/etc/yavdr/autoinstalled") }}' + +- name: unload nouveau driver, replace with nvidia block: - - name: "wait a little bit before starting x-verbose@vt7.service (needed?)" + - name: unbind vconsole + shell: echo 0 > /sys/class/vtconsole/vtcon1/bind + + - name: "wait a little, so noveau isn't used anymore" wait_for: - timeout: 10 - - - name: "start x-verbose@.service" - systemd: - name: "x-verbose@vt7.service" - state: started - enabled: false - masked: false - daemon_reload: true - - - name: "wait a little bit, so X has some time to start up (needed?)" + timeout: 1 + + # unloading the drivers using the modprobe module does not work for some strange reason... + - name: unload kms drivers + command: rmmod '{{ item }}' + loop: + - nouveau + - ttm + - drm_kms_helper + - drm + ignore_errors: yes + + - name: load nvidia driver + modprobe: + name: "nvidia" + state: present + + - name: "wait a little before starting nvidia-persistenced" wait_for: - timeout: 3 - - - name: "stop x-verbose@vt7.service" + timeout: 1 + + - name: start nvidia-persistenced systemd: - name: "x-verbose@vt7.service" - state: stopped - enabled: false - masked: true - when: first_run + name: "nvidia-persistenced" + state: started + enabled: true + masked: false + daemon_reload: true + when: + - nvidia_detected + - nvidia_driver_installed + - '"nouveau" in modules' -- name: "wait a little bit, so X has some time to shut down (needed?)" - wait_for: - timeout: 3 +#- name: Workaround for wrong connector names on first run +# block: +# - name: "wait a little bit before starting x-verbose@vt7.service (needed?)" +# wait_for: +# timeout: 10 +# +# - name: "start x-verbose@.service" +# systemd: +# name: "x-verbose@vt7.service" +# state: started +# enabled: false +# masked: false +# daemon_reload: true +# +# - name: "wait a little bit, so X has some time to start up (needed?)" +# wait_for: +# timeout: 3 +# +# - name: "stop x-verbose@vt7.service" +# systemd: +# name: "x-verbose@vt7.service" +# state: stopped +# enabled: false +# masked: true +# when: first_run -- name: "trigger udevadm reload" - command: 'udevadm trigger ' - -- name: "wait a little bit, so udev has some time to reapply rules (needed?)" - wait_for: - timeout: 3 +#- name: "wait a little bit, so X has some time to shut down (needed?)" +# wait_for: +# timeout: 3 +# +#- name: "trigger udevadm reload" +# command: 'udevadm trigger ' +# +#- name: "wait a little bit, so udev has some time to reapply rules (needed?)" +# wait_for: +# timeout: 3 - name: "start x-verbose@.service" systemd: @@ -2733,7 +2777,7 @@ preferred_refreshrates: masked: false daemon_reload: true -- name: "wait a little bit, so X has some time to start up (needed?)" +- name: "wait a little, so X has some time to start up" wait_for: timeout: 3 @@ -2761,9 +2805,9 @@ preferred_refreshrates: enabled: false masked: true -- name: "wait a little bit, so X has some time to shut down (needed?)" - wait_for: - timeout: 3 +#- name: "wait a little bit, so X has some time to shut down (needed?)" +# wait_for: +# timeout: 3 - name: save results block: diff --git a/roles/yavdr-xorg/tasks/detect-xorg.yml b/roles/yavdr-xorg/tasks/detect-xorg.yml index c094a6c..2fe8fe7 100644 --- a/roles/yavdr-xorg/tasks/detect-xorg.yml +++ b/roles/yavdr-xorg/tasks/detect-xorg.yml @@ -41,42 +41,86 @@ name: x@vt7.service state: stopped -- name: Workaround for wrong connector names on first run +- name: check if a nvidia driver has been installed + set_fact: + nvidia_driver_installed: '{{ "nvidia" in lookup("file", "/etc/yavdr/autoinstalled") }}' + +- name: unload nouveau driver, replace with nvidia block: - - name: "wait a little bit before starting x-verbose@vt7.service (needed?)" + - name: unbind vconsole + shell: echo 0 > /sys/class/vtconsole/vtcon1/bind + + - name: "wait a little, so noveau isn't used anymore" wait_for: - timeout: 10 - - - name: "start x-verbose@.service" - systemd: - name: "x-verbose@vt7.service" - state: started - enabled: false - masked: false - daemon_reload: true - - - name: "wait a little bit, so X has some time to start up (needed?)" + timeout: 1 + + # unloading the drivers using the modprobe module does not work for some strange reason... + - name: unload kms drivers + command: rmmod '{{ item }}' + loop: + - nouveau + - ttm + - drm_kms_helper + - drm + ignore_errors: yes + + - name: load nvidia driver + modprobe: + name: "nvidia" + state: present + + - name: "wait a little before starting nvidia-persistenced" wait_for: - timeout: 3 - - - name: "stop x-verbose@vt7.service" + timeout: 1 + + - name: start nvidia-persistenced systemd: - name: "x-verbose@vt7.service" - state: stopped - enabled: false - masked: true - when: first_run + name: "nvidia-persistenced" + state: started + enabled: true + masked: false + daemon_reload: true + when: + - nvidia_detected + - nvidia_driver_installed + - '"nouveau" in modules' -- name: "wait a little bit, so X has some time to shut down (needed?)" - wait_for: - timeout: 3 +#- name: Workaround for wrong connector names on first run +# block: +# - name: "wait a little bit before starting x-verbose@vt7.service (needed?)" +# wait_for: +# timeout: 10 +# +# - name: "start x-verbose@.service" +# systemd: +# name: "x-verbose@vt7.service" +# state: started +# enabled: false +# masked: false +# daemon_reload: true +# +# - name: "wait a little bit, so X has some time to start up (needed?)" +# wait_for: +# timeout: 3 +# +# - name: "stop x-verbose@vt7.service" +# systemd: +# name: "x-verbose@vt7.service" +# state: stopped +# enabled: false +# masked: true +# when: first_run -- name: "trigger udevadm reload" - command: 'udevadm trigger ' - -- name: "wait a little bit, so udev has some time to reapply rules (needed?)" - wait_for: - timeout: 3 +#- name: "wait a little bit, so X has some time to shut down (needed?)" +# wait_for: +# timeout: 3 +# +#- name: "trigger udevadm reload" +# command: 'udevadm trigger ' +# +#- name: "wait a little bit, so udev has some time to reapply rules (needed?)" +# wait_for: +# timeout: 3 - name: "start x-verbose@.service" systemd: @@ -86,7 +130,7 @@ masked: false daemon_reload: true -- name: "wait a little bit, so X has some time to start up (needed?)" +- name: "wait a little, so X has some time to start up" wait_for: timeout: 3 @@ -114,9 +158,9 @@ enabled: false masked: true -- name: "wait a little bit, so X has some time to shut down (needed?)" - wait_for: - timeout: 3 +#- name: "wait a little bit, so X has some time to shut down (needed?)" +# wait_for: +# timeout: 3 - name: save results block: