LINUX.ORG.RU

История изменений

Исправление KOT040188, (текущая версия) :

Долго и упорно вкуривал гугла и пришёл к такому скрипту:

[Unit]
 Before=hibernate.target
 Before=hybrid-sleep.target
 Before=suspend.target
 Before=shutdown.target
   
[Service]
 Type=oneshot
 ExecStart=/usr/bin/ddccontrol -r 0xe1 -w 0 dev:/dev/i2c-1
 RemainAfterExit=yes

[Install]
WantedBy=shutdown.target

kot@kot-MS-7930:~$ systemctl status monitor.service
● monitor.service
   Loaded: loaded (/etc/systemd/system/monitor.service; enabled; vendor preset: enabled)
   Active: active (exited) since Чцв 2016-07-21 00:52:33 MSK; 42s ago
 Main PID: 1846 (code=exited, status=0/SUCCESS)

Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: using a basic generic profile. Many controls will not be supported, and
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: some controls may not work as expected.
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Please update ddccontrol-db, or, if you are already using the latest
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: version, please send the output of the following command to
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: ddccontrol-users@lists.sourceforge.net:
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: LANG= LC_ALL= ddccontrol -p -c -d
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Thank you.
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: =============================== WARNING ===============================
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Записываю 0xe1, 0x00(0)...
Ліп 21 00:52:33 kot-MS-7930 systemd[1]: Started monitor.service.

Но монитор так и не выключается… У меня сомнения по поводу последней секции… Причём sudo systemctl restart monitor.service выключает монитор.

Исправление KOT040188, :

Долго и упорно вкуривал гугла и пришёл к такому скрипту:

[Unit]
 Before=hibernate.target
 Before=hybrid-sleep.target
 Before=suspend.target
 Before=shutdown.target
   
[Service]
 Type=oneshot
 ExecStart=/usr/bin/ddccontrol -r 0xe1 -w 0 dev:/dev/i2c-1
 RemainAfterExit=yes

[Install]
WantedBy=shutdown.target

kot@kot-MS-7930:~$ systemctl status monitor.service
● monitor.service
   Loaded: loaded (/etc/systemd/system/monitor.service; enabled; vendor preset: enabled)
   Active: active (exited) since Чцв 2016-07-21 00:52:33 MSK; 42s ago
 Main PID: 1846 (code=exited, status=0/SUCCESS)

Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: using a basic generic profile. Many controls will not be supported, and
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: some controls may not work as expected.
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Please update ddccontrol-db, or, if you are already using the latest
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: version, please send the output of the following command to
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: ddccontrol-users@lists.sourceforge.net:
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: LANG= LC_ALL= ddccontrol -p -c -d
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Thank you.
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: =============================== WARNING ===============================
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Записываю 0xe1, 0x00(0)...
Ліп 21 00:52:33 kot-MS-7930 systemd[1]: Started monitor.service.

Но монитор так и не выключается… У меня сомнения по поводу последней секции…

Исправление KOT040188, :

Долго и упорно вкуривал гугла и пришёл к такому скрипту:

[Unit]
 Before=hibernate.target
 Before=hybrid-sleep.target
 Before=suspend.target
 Before=shutdown.target
   
[Service]
 Type=oneshot
 ExecStart=/usr/bin/ddccontrol -r 0xe1 -w 0 dev:/dev/i2c-1
 RemainAfterExit=yes

[Install]
WantedBy=shutdown.target

kot@kot-MS-7930:~$ systemctl status monitor.service
● monitor.service
   Loaded: loaded (/etc/systemd/system/monitor.service; enabled; vendor preset: enabled)
   Active: active (exited) since Чцв 2016-07-21 00:52:33 MSK; 42s ago
 Main PID: 1846 (code=exited, status=0/SUCCESS)

Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: using a basic generic profile. Many controls will not be supported, and
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: some controls may not work as expected.
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Please update ddccontrol-db, or, if you are already using the latest
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: version, please send the output of the following command to
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: ddccontrol-users@lists.sourceforge.net:
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: LANG= LC_ALL= ddccontrol -p -c -d
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Thank you.
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: =============================== WARNING ===============================
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Записываю 0xe1, 0x00(0)...
Ліп 21 00:52:33 kot-MS-7930 systemd[1]: Started monitor.service.

Но монитор так и не выключается…

Исходная версия KOT040188, :

Долго и упорно вкуривал гугла и пришёл к такому скрипту:

[Unit]
 Before=hibernate.target
 Before=hybrid-sleep.target
 Before=suspend.target
 Before=shutdown.target
   
[Service]
 Type=oneshot
 ExecStart=/usr/bin/ddccontrol -r 0xe1 -w 0 dev:/dev/i2c-1
 RemainAfterExit=yes

[Install]
WantedBy=shutdown.target

kot@kot-MS-7930:~$ systemctl status monitor.service
● monitor.service
   Loaded: loaded (/etc/systemd/system/monitor.service; enabled; vendor preset: enabled)
   Active: active (exited) since Чцв 2016-07-21 00:52:33 MSK; 42s ago
 Main PID: 1846 (code=exited, status=0/SUCCESS)

Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: using a basic generic profile. Many controls will not be supported, and
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: some controls may not work as expected.
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Please update ddccontrol-db, or, if you are already using the latest
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: version, please send the output of the following command to
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: ddccontrol-users@lists.sourceforge.net:
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: LANG= LC_ALL= ddccontrol -p -c -d
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Thank you.
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: =============================== WARNING ===============================
Ліп 21 00:52:33 kot-MS-7930 ddccontrol[1846]: Записываю 0xe1, 0x00(0)...
Ліп 21 00:52:33 kot-MS-7930 systemd[1]: Started monitor.service.