summaryrefslogtreecommitdiff
path: root/article/x240-debian-jessie.html
blob: ef6c90508b79a5e0556e57729d8a612651089fcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
---
title: Debian Jessie on Thinkpad X240
categories: [article]
---
<!DOCTYPE html>
<html>
<head>
<title>Debian Jessie on Thinkpad X240</title>
<!-- 2014-08-07 Thu 08:58 -->
<meta  charset="utf-8">
<meta  name="generator" content="Org-mode">
<meta  name="author" content="Carlos Sosa">
<style type="text/css">
 <!--/*--><![CDATA[/*><!--*/
  .title  { text-align: center; }
  .todo   { font-family: monospace; color: red; }
  .done   { color: green; }
  .tag    { background-color: #eee; font-family: monospace;
            padding: 2px; font-size: 80%; font-weight: normal; }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  .right  { margin-left: auto; margin-right: 0px;  text-align: right; }
  .left   { margin-left: 0px;  margin-right: auto; text-align: left; }
  .center { margin-left: auto; margin-right: auto; text-align: center; }
  .underline { text-decoration: underline; }
  #postamble p, #preamble p { font-size: 90%; margin: .2em; }
  p.verse { margin-left: 3%; }
  pre {
    border: 1px solid #ccc;
    box-shadow: 3px 3px 3px #eee;
    padding: 8pt;
    font-family: monospace;
    overflow: auto;
    margin: 1.2em;
  }
  pre.src {
    position: relative;
    overflow: visible;
    padding-top: 1.2em;
  }
  pre.src:before {
    display: none;
    position: absolute;
    background-color: white;
    top: -10px;
    right: 10px;
    padding: 3px;
    border: 1px solid black;
  }
  pre.src:hover:before { display: inline;}
  pre.src-sh:before    { content: 'sh'; }
  pre.src-bash:before  { content: 'sh'; }
  pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
  pre.src-R:before     { content: 'R'; }
  pre.src-perl:before  { content: 'Perl'; }
  pre.src-java:before  { content: 'Java'; }
  pre.src-sql:before   { content: 'SQL'; }

  table { border-collapse:collapse; }
  caption.t-above { caption-side: top; }
  caption.t-bottom { caption-side: bottom; }
  td, th { vertical-align:top;  }
  th.right  { text-align: center;  }
  th.left   { text-align: center;   }
  th.center { text-align: center; }
  td.right  { text-align: right;  }
  td.left   { text-align: left;   }
  td.center { text-align: center; }
  dt { font-weight: bold; }
  .footpara:nth-child(2) { display: inline; }
  .footpara { display: block; }
  .footdef  { margin-bottom: 1em; }
  .figure { padding: 1em; }
  .figure p { text-align: center; }
  .inlinetask {
    padding: 10px;
    border: 2px solid gray;
    margin: 10px;
    background: #ffffcc;
  }
  #org-div-home-and-up
   { text-align: right; font-size: 70%; white-space: nowrap; }
  textarea { overflow-x: auto; }
  .linenr { font-size: smaller }
  .code-highlighted { background-color: #ffff00; }
  .org-info-js_info-navigation { border-style: none; }
  #org-info-js_console-label
    { font-size: 10px; font-weight: bold; white-space: nowrap; }
  .org-info-js_search-highlight
    { background-color: #ffff00; color: #000000; font-weight: bold; }
  /*]]>*/-->
</style>
<link rel="stylesheet" type="text/css" href="/css/notebook.css" />

<script type="text/javascript" src="http://orgmode.org/org-info.js">
/**
 *
 * @source: http://orgmode.org/org-info.js
 *
 * @licstart  The following is the entire license notice for the
 *  JavaScript code in http://orgmode.org/org-info.js.
 *
 * Copyright (C) 2012-2013 Free Software Foundation, Inc.
 *
 *
 * The JavaScript code in this tag is free software: you can
 * redistribute it and/or modify it under the terms of the GNU
 * General Public License (GNU GPL) as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option)
 * any later version.  The code is distributed WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.
 *
 * As additional permission under GNU GPL version 3 section 7, you
 * may distribute non-source (e.g., minimized or compacted) forms of
 * that code without the copy of the GNU GPL normally required by
 * section 4, provided you include this license notice and a URL
 * through which recipients can access the Corresponding Source.
 *
 * @licend  The above is the entire license notice
 * for the JavaScript code in http://orgmode.org/org-info.js.
 *
 */
</script>

<script type="text/javascript">

/*
@licstart  The following is the entire license notice for the
JavaScript code in this tag.

Copyright (C) 2012-2013 Free Software Foundation, Inc.

The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version.  The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.

As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.


@licend  The above is the entire license notice
for the JavaScript code in this tag.
*/

<!--/*--><![CDATA[/*><!--*/
org_html_manager.set("TOC_DEPTH", "3");
org_html_manager.set("LINK_HOME", "");
org_html_manager.set("LINK_UP", "");
org_html_manager.set("LOCAL_TOC", "1");
org_html_manager.set("VIEW_BUTTONS", "0");
org_html_manager.set("MOUSE_HINT", "underline");
org_html_manager.set("FIXED_TOC", "0");
org_html_manager.set("TOC", "1");
org_html_manager.set("VIEW", "showall");
org_html_manager.setup();  // activate after the parameters are set
/*]]>*///-->
</script>
<script type="text/javascript">
/*
@licstart  The following is the entire license notice for the
JavaScript code in this tag.

Copyright (C) 2012-2013 Free Software Foundation, Inc.

The JavaScript code in this tag is free software: you can
redistribute it and/or modify it under the terms of the GNU
General Public License (GNU GPL) as published by the Free Software
Foundation, either version 3 of the License, or (at your option)
any later version.  The code is distributed WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.  See the GNU GPL for more details.

As additional permission under GNU GPL version 3 section 7, you
may distribute non-source (e.g., minimized or compacted) forms of
that code without the copy of the GNU GPL normally required by
section 4, provided you include this license notice and a URL
through which recipients can access the Corresponding Source.


@licend  The above is the entire license notice
for the JavaScript code in this tag.
*/
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target = document.getElementById(id);
   if(null != target) {
     elem.cacheClassElem = elem.className;
     elem.cacheClassTarget = target.className;
     target.className = "code-highlighted";
     elem.className   = "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target = document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className = elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className = elem.cacheClassTarget;
 }
/*]]>*///-->
</script>
</head>
<body>
<div id="content">
  <h1 class="title">Debian Jessie on Thinkpad X240</h1>
<nav id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">Why not Debian Wheezy?</a></li>
<li><a href="#sec-2">Hardware</a>
<ul>
<li><a href="#sec-2-1">Kernel</a></li>
<li><a href="#sec-2-2">Brightness Controls</a></li>
<li><a href="#sec-2-3">Intel Graphics</a></li>
<li><a href="#sec-2-4">Power Saving</a>
<ul>
<li><a href="#sec-2-4-1">Powertop</a></li>
<li><a href="#sec-2-4-2">RC6 Kernel Settings</a></li>
<li><a href="#sec-2-4-3">TLP</a></li>
</ul>
</li>
<li><a href="#sec-2-5">Touchpad</a></li>
</ul>
</li>
<li><a href="#sec-3">System</a>
<ul>
<li><a href="#sec-3-1">systemd</a>
<ul>
<li><a href="#sec-3-1-1">systemd for Debian</a></li>
<li><a href="#sec-3-1-2">journalctl</a></li>
<li><a href="#sec-3-1-3">NetworkManager</a></li>
<li><a href="#sec-3-1-4">MySQL</a></li>
<li><a href="#sec-3-1-5">TLP</a></li>
<li><a href="#sec-3-1-6">acpid</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</nav>


<div id="outline-container-sec-1" class="outline-2">
<h2 id="sec-1">Why not Debian Wheezy?</h2>
<div class="outline-text-2" id="text-1">
<p>
I've tried really hard to get the X240 running on <b>Debian Wheezy</b> (Stable),
but after investing days trying to fix basic hardware failures I decided to
move to <b>Debian Jessie</b> (testing).
</p>
</div>
</div>

<div id="outline-container-sec-2" class="outline-2">
<h2 id="sec-2">Hardware</h2>
<div class="outline-text-2" id="text-2">
</div><div id="outline-container-sec-2-1" class="outline-3">
<h3 id="sec-2-1">Kernel</h3>
<div class="outline-text-3" id="text-2-1">
<p>
Before you do anything you should get the hardware working correctly.
In order to do that, any Linux kernel image from the
<i>testing/unstable/experimental</i> repositories will work great.
</p>

<p>
It's known that most hardware components will work properly starting <i>kernel
version</i> <b>3.12</b>.<br >
<b>3.13.x</b> and <b>3.14.x</b> <i>versions</i> only worked for me.
</p>

<div class="org-src-container">

<pre class="src src-sh">uname -a
</pre>
</div>

<pre class="example">
Linux raiser 3.14-1-amd64 #1 SMP Debian 3.14.7-1 (2014-06-16) x86_64 GNU/Linux
</pre>

<p>
This is how your output of lspci should look like.
</p>

<div class="org-src-container">

<pre class="src src-sh">lspci
</pre>
</div>

<pre class="example">
00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 0b)
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 0b)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 0b)
00:14.0 USB controller: Intel Corporation Lynx Point-LP USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation Lynx Point-LP HECI #0 (rev 04)
00:16.3 Serial controller: Intel Corporation Lynx Point-LP HECI KT (rev 04)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I218-LM (rev 04)
00:1b.0 Audio device: Intel Corporation Lynx Point-LP HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 6 (rev e4)
00:1c.1 PCI bridge: Intel Corporation Lynx Point-LP PCI Express Root Port 3 (rev e4)
00:1d.0 USB controller: Intel Corporation Lynx Point-LP USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Lynx Point-LP LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation Lynx Point-LP SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation Lynx Point-LP SMBus Controller (rev 04)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)
03:00.0 Network controller: Intel Corporation Wireless 7260 (rev 83)
</pre>
</div>
</div>

<div id="outline-container-sec-2-2" class="outline-3">
<h3 id="sec-2-2">Brightness Controls</h3>
<div class="outline-text-3" id="text-2-2">
<p>
By default, the brightness keys will control stages of the brightness
level. To change that behavior to gradually change the brightness, add
the following line to your <code>/etc/default/grub</code>:
</p>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/default/grub | grep GRUB_CMDLINE_LINUX_DEFAULT
</pre>
</div>

<pre class="example">
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor"
</pre>

<p>
Next update GRUB:
</p>

<div class="org-src-container">

<pre class="src src-sh">update-grub
</pre>
</div>
</div>
</div>

<div id="outline-container-sec-2-3" class="outline-3">
<h3 id="sec-2-3">Intel Graphics</h3>
<div class="outline-text-3" id="text-2-3">
<p>
By default, X server will enable the hardware acceleration, DRI, and
other GL settings. To enable SNA acceleration for the Intel GPU,
create a configuration file in <code>/etc/X11/xorg.conf.d/</code> with the
following:
</p>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/X11/xorg.conf.d/20-intel.conf
</pre>
</div>

<pre class="example">
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod"  "sna"
EndSection
</pre>
</div>
</div>

<div id="outline-container-sec-2-4" class="outline-3">
<h3 id="sec-2-4">Power Saving</h3>
<div class="outline-text-3" id="text-2-4">
</div><div id="outline-container-sec-2-4-1" class="outline-4">
<h4 id="sec-2-4-1">Powertop</h4>
<div class="outline-text-4" id="text-2-4-1">
<p>
<b>Powertop</b> is a tool that will output the current usage of electricity
by each hardware component, and how it's been managed.
</p>

<p>
The best feature from <b>Powertop</b> is the <i>Tunables</i> section. In this
section, you're able to fine tune the available power saving modes of
your hardware components.
</p>

<p>
Start <b>Powertop</b>
</p>

<div class="org-src-container">

<pre class="src src-sh">sudo powertop
</pre>
</div>

<p>
Hit the key &lt;TAB&gt; to browse, and select from a range of tunable
options. <b>Powertop</b> tells you which to change with a description of
<i>Bad</i>.
</p>
</div>
</div>

<div id="outline-container-sec-2-4-2" class="outline-4">
<h4 id="sec-2-4-2">RC6 Kernel Settings</h4>
<div class="outline-text-4" id="text-2-4-2">
<p>
The <i>Intel i915</i> RC6 triggers a lower power state during the GPUs idle
state.
</p>

<p>
To enable RC6, you need to add the GRUB boot flag:
</p>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/default/grub | grep GRUB_CMDLINE_LINUX_DEFAULT
</pre>
</div>

<pre class="example">
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.i915_enable_rc6=1"
</pre>

<p>
Next update GRUB:
</p>

<div class="org-src-container">

<pre class="src src-sh">update-grub
</pre>
</div>

<p>
This will enable it on boot, but usually <b>TLP</b> handles RC6 switching
on <i>suspend/hibernation/resume</i> modes.
</p>

<p>
For more information on <i>Intel i915</i> power saving settings, see
<a href="https://wiki.ubuntu.com/Kernel/PowerManagement/PowerSavingTweaks">Ubuntu's Power Saving Tweaks</a>.
</p>
</div>
</div>

<div id="outline-container-sec-2-4-3" class="outline-4">
<h4 id="sec-2-4-3">TLP</h4>
<div class="outline-text-4" id="text-2-4-3">
<p>
Everybody in the community recommends <b>TLP</b> for controlling power
usage, and triggering the power saving capabilities of multiple
hardware devices. <b>TLP</b> works well with <b>systemd</b>, and it provides
specific modules for modern <b>Lenovo Thinkpads</b>.
</p>
</div>

<ul class="org-ul"><li>Installation<br ><div class="outline-text-5" id="text-2-4-3-1">
<p>
Create a <code>tlp.list</code> file for the <b>tlp</b> repositories in
<code>/etc/apt/sources.list.d/</code> that contains the following line:
</p>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/apt/sources.list.d/tlp.list
</pre>
</div>

<pre class="example">
deb http://ppa.launchpad.net/linrunner/tlp/ubuntu lucid main 
</pre>

<p>
Add <b>TLP</b>'s keys to the apt keyring with the following command:
</p>

<div class="org-src-container">

<pre class="src src-sh">apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 02D65EFF
</pre>
</div>

<p>
Re-synchronize the packages index and install the <b>TLP</b>'s packages:
</p>

<div class="org-src-container">

<pre class="src src-sh">apt-get update
</pre>
</div>

<div class="org-src-container">

<pre class="src src-sh">apt-get install tlp tlp-rdw tp-smapi-dkms acpi-call-tools
</pre>
</div>

<p>
For more information about the installation process, see <a href="http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html#installation">TLP's
installation section</a>.
</p>
</div>
</li>

<li>Configuration<br ><div class="outline-text-5" id="text-2-4-3-2">
<p>
My <b>TLP</b> configuration:
</p>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/default/tlp
</pre>
</div>

<pre class="example">
# ------------------------------------------------------------------------------
# tlp - Parameters for power save

# Hint: some features are disabled by default, remove the leading # to enable them

# Set to 0 to disable/1 to enable TLP
TLP_ENABLE=1

# Seconds laptop mode has to to wait after the disk goes idle before doing a sync.
# Non-zero value enables, zero disables laptop mode.
DISK_IDLE_SECS_ON_AC=0
DISK_IDLE_SECS_ON_BAT=2

# Dirty page values (timeouts in secs).
MAX_LOST_WORK_SECS_ON_AC=15
MAX_LOST_WORK_SECS_ON_BAT=60

# Select a cpu frequency scaling governor: ondemand/powersave/performance/conservative
# Important:
# - You *must* disable your distribution's governor settings or conflicts will occur
# - ondemand is sufficient for *almost all* workloads, you should know what you're doing!
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=ondemand

# Set the min/max frequency available for the scaling governor.
# Possible values strongly depend on your cpu. For available frequencies see
# tlp-stat output, Section "+++ Processor".
# Hint: Parameters are disabled by default, remove the leading # to enable them,
#       otherwise kernel default values are used.
#CPU_SCALING_MIN_FREQ_ON_AC=0
#CPU_SCALING_MAX_FREQ_ON_AC=0
#CPU_SCALING_MIN_FREQ_ON_BAT=0
#CPU_SCALING_MAX_FREQ_ON_BAT=0

# Set the cpu "turbo boost" feature: 0=disable / 1=allow
# Requires an Intel Core i processor and kernel 3.7 or later.
# Important:
# - This may conflict with your distribution's governor settings
# - A value of 1 does *not* activate boosting, it just allows it
CPU_BOOST_ON_AC=1
CPU_BOOST_ON_BAT=0

# Minimize number of used cpu cores/hyper-threads under light load conditions
SCHED_POWERSAVE_ON_AC=0
SCHED_POWERSAVE_ON_BAT=1

# Kernel NMI Watchdog
# 0=disable (default, saves power) / 1=enable (for kernel debugging only)
NMI_WATCHDOG=0

# Change CPU voltages aka "undervolting" - Kernel with PHC patch required
# Freq:voltage pairs are written to /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
# CAUTION: only use this, if you thoroughly understand what you are doing!
#PHC_CONTROLS="F:V F:V F:V F:V"

# Hard disk devices, separate multiple devices with spaces (default: sda).
# Devices can be specified by disk id too (lookup with: tlp diskid).
DISK_DEVICES="sda sdb"

# Hard disk advanced power management level: 1(max saving)..254(off)
# Levels 1..127 may spin down the disk.
# Separate values for multiple devices with spaces.
DISK_APM_LEVEL_ON_AC="254 254"
DISK_APM_LEVEL_ON_BAT="128 128"

# Hard disk spin down timeout:
# 0:        spin down disabled
# 1..240:   timeouts from 5s to 20min (in units of 5s)
# 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
# (see 'man hdparm' for details)
#DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
#DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"

# Select io scheduler for the disk devices: noop/deadline/cfq (Default: cfq)
# Separate values for multiple devices with spaces.
#DISK_IOSCHED="cfq cfq"

# SATA aggressive link power management (ALPM):
# min_power/medium_power/max_performance
SATA_LINKPWR_ON_AC=max_performance
SATA_LINKPWR_ON_BAT=medium_power

# PCI Express Active State Power Management (PCIe ASPM):
# default/performance/powersave
# Hint: needs kernel boot option pcie_aspm=force on some machines
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave

# Radeon graphics clock speed (profile method): low/mid/high/auto/default
# auto = mid on BAT, high on AC; default = use hardware defaults
# (Kernel &gt;= 2.6.35 only, not with fglrx driver!)
RADEON_POWER_PROFILE_ON_AC=high
RADEON_POWER_PROFILE_ON_BAT=low

# New radeon dynamic power management method (dpm): battery/performance
# (Kernel &gt;= 3.11 only, requires boot option radeon.dpm=1)
RADEON_DPM_STATE_ON_AC=performance
RADEON_DPM_STATE_ON_BAT=battery

# New radeon dpm performance level: auto/low/high (auto is recommended)
RADEON_DPM_PERF_LEVEL_ON_AC=auto
RADEON_DPM_PERF_LEVEL_ON_BAT=auto

# WiFi power saving mode: 1=disable/5=enable
# (Linux 2.6.32 and later, some adapters only!)
WIFI_PWR_ON_AC=1
WIFI_PWR_ON_BAT=5

# Disable wake on lan: Y/N
WOL_DISABLE=Y

# Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
# A value of 0 disables / &gt;=1 enables power save.
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=1

# Disable controller too (HDA only): Y/N
SOUND_POWER_SAVE_CONTROLLER=Y

# Set to 1 to power off optical drive in UltraBay (ThinkPads only)
# when running on battery. A value of 0 disables this Feature (Default).
# Drive can be powered on again by releasing (and reinserting) the
# eject lever or by pressing the disc eject button on newer models.
# Note: an UltraBay hard disk is never powered off.
BAY_POWEROFF_ON_BAT=0
# Optical drive device to power off (default sr0)
BAY_DEVICE="sr0"

# Runtime Power Management for pci(e) bus devices
# (Kernel &gt;= 2.6.35 only): on=disable/auto=enable
RUNTIME_PM_ON_AC=on
RUNTIME_PM_ON_BAT=auto

# Runtime PM for *all* pci(e) bus devices, expect backlisted ones:
# 0=disable / 1=enable
# Warning: experimental option, could cause system instabilities
RUNTIME_PM_ALL=0

# Exclude pci(e) device adresses the following list from Runtime PM
# (separate with spaces). Use lspci to get the adresses (1st column).
#RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"

# Set to 0 to disable/1 to enable usb autosuspend feature
USB_AUTOSUSPEND=1

# Devices from the following list are excluded from usb autosuspend
# (separate with spaces). Use lsusb to get the ids.
# Note: input devices (usbhid) are excluded automatically
#USB_BLACKLIST="1111:2222 3333:4444"

# WWAN devices are excluded from usb autosuspend:
# 0=do not exclude / 1=exclude
# Note: works for ids 05c6:* 0bdb:* 1199:* only
USB_BLACKLIST_WWAN=1

# Set to 1 to disable autosuspend before shutdown/0 to do nothing
# (workaround for usb devices that cause shutdown problems)
#USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1

# Restore radio device state (bluetooth, wifi, wwan) from previous shutdown
# on system startup: 0=disable/1=enable
# Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
#       are ignored when this is enabled!
RESTORE_DEVICE_STATE_ON_STARTUP=0

# Radio devices to disable on startup: bluetooth wifi wwan
#DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"

# Radio devices to enable on startup: bluetooth wifi wwan
#DEVICES_TO_ENABLE_ON_STARTUP="wifi"

# Radio devices to disable on shutdown: bluetooth wifi wwan
# (workaround for devices that are blocking shutdown)
#DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"

# Radio devices to enable on shutdown: bluetooth wifi wwan
# (to prevent other operating systems from missing radios)
#DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"

# Radio devices to enable when wireless radio switch is turned on:
# bluetooth wifi wwan (Ubuntu + ThinkPad only)
#DEVICES_TO_ENABLE_ON_RADIOSW="wifi wwan"

# Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module required)
# Charging starts when the remaining capacity falls below the START_CHARGE_TRESH
# value and stops when exceeding the STOP_CHARGE_TRESH value.
# Main battery (values in %)
#START_CHARGE_THRESH_BAT0=75
#STOP_CHARGE_THRESH_BAT0=80
# Ultrabay or slice battery (values in %)
#START_CHARGE_THRESH_BAT1=75
#STOP_CHARGE_THRESH_BAT1=80

# Set to 1 to disable use of tpacpi-bat on Sandy Bridge or newer Thinkpads
# and force usage of tp-smapi instead
#DISABLE_TPACPIBAT=1

# ------------------------------------------------------------------------------
# tlp-rdw - Parameters for the radio device wizard
# Possible devices: bluetooth/wifi/wwan

# Hint: parameters are disabled by default, remove the leading # to enable them

# Radio devices to disable on connect
DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"

# Radio devices to enable on disconnect
DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""

# Radio devices to enable/disable when docked
#DEVICES_TO_ENABLE_ON_DOCK=""
#DEVICES_TO_DISABLE_ON_DOCK=""

# Radio devices to enable/disable when undocked
#DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
#DEVICES_TO_DISABLE_ON_UNDOCK=""
</pre>
</div>
</li></ul>
</div>
</div>

<div id="outline-container-sec-2-5" class="outline-3">
<h3 id="sec-2-5">Touchpad</h3>
<div class="outline-text-3" id="text-2-5">
<p>
As you already notice, the touchpad is quite peculiar. Itself is a
<i>giant click-button</i>. In the upper section of the touchpad, there are
divisions assigned for each mouse button. It gets time to get used to,
but I prefer it since I mostly use my <i>trackpad</i>. The distance between
the divisions of the mouse buttons and the <i>trackpad</i> is perfect, this
makes the usage of both pleasant.
</p>

<p>
By default, the divisions of the buttons, two-finger scrolling, and
the sensibility calibration are not set. To enable all of them, set up
a configuration file for the <i>X server</i> in <code>/etc/X11/xorg.conf.d/</code>
with the following:
</p>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/X11/xorg.conf.d/50-synaptics.conf
</pre>
</div>

<pre class="example">
# Synaptics Touchpad configuration for Thinkpad X240
Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
 
        # buttons by multi-touch taps
        Option "TapButton1"           "1"     # left click with one finger tap
        Option "TapButton2"           "2"     # middle click with two finger tap
        Option "TapButton3"           "3"     # right click with three finger tap
 
        # bottom right corner tap is right click
        Option "RBCornerButton"       "3"
 
        # scroll with two fingers only
        Option "VertEdgeScroll"       "off"
        Option "VertTwoFingerScroll"  "on"
        Option "HorizEdgeScroll"      "off"
        Option "HorizTwoFingerScroll" "on"
        Option "CircularScrolling"    "off"
 
        # locked drags
        Option "LockedDrags"          "1"
        Option "LockedDragTimeout"    "500"
 
        # top row click areas
        Option "ClickPad"             "true"
        Option "SoftButtonAreas"      "60% 0 0 5% 40% 60% 0 5%"
        Option "AreaTopEdge"          "4%"
EndSection
 
# avoid interferences from other drivers
Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection
</pre>
</div>
</div>
</div>


<div id="outline-container-sec-3" class="outline-2">
<h2 id="sec-3">System</h2>
<div class="outline-text-2" id="text-3">
</div><div id="outline-container-sec-3-1" class="outline-3">
<h3 id="sec-3-1">systemd</h3>
<div class="outline-text-3" id="text-3-1">
<p>
<b><i>systemd</i></b> is a great tool for managing services and system states. I
won't explain what <b><i>systemd</i></b> is, or why you should be using it in
your system. I will only add that, it does have a learning curve, it
goes against all the established patterns for upstarting a system and
its services.
</p>

<p>
For learning documents and other resources, go to <a href="http://www.freedesktop.org/wiki/Software/systemd/">systemd
official website</a>.
</p>
</div>

<div id="outline-container-sec-3-1-1" class="outline-4">
<h4 id="sec-3-1-1">systemd for Debian</h4>
<div class="outline-text-4" id="text-3-1-1">
<p>
It's redundant to explain how to install and configure <b><i>systemd</i></b> in
Debian, when the Debian's wiki covers everything you need.
</p>

<p>
Visit <a href="https://wiki.debian.org/systemd"><a href="https://wiki.debian.org/systemd">https://wiki.debian.org/systemd</a></a>
</p>
</div>
</div>


<div id="outline-container-sec-3-1-2" class="outline-4">
<h4 id="sec-3-1-2">journalctl</h4>
<div class="outline-text-4" id="text-3-1-2">
<p>
<b>journalctl</b> is meant to query the <b><i>systemd</i></b> journal. <b><i>systemd</i></b>'s
journal is an aggregation of most important logs and events occurring
in your system.
</p>

<p>
In order for the normal user to access <b>journalctl</b>, you must add the
user to the <i>systemd-journal</i> group.
</p>

<div class="org-src-container">

<pre class="src src-sh">usermod -a -G systemd-journal &lt;your username&gt;
</pre>
</div>

<p>
Now reboot <b><i>systemd</i></b>:
</p>

<div class="org-src-container">

<pre class="src src-sh">systemctl reboot
</pre>
</div>
</div>
</div>

<div id="outline-container-sec-3-1-3" class="outline-4">
<h4 id="sec-3-1-3">NetworkManager</h4>
<div class="outline-text-4" id="text-3-1-3">
<p>
By default, NetworkManager.service should be part of the <b><i>systemd</i></b> lib
directory, and should be enabled.
</p>

<p>
You should be able to find the service units for NetworkManager in
<code>/etc/systemd/system/</code>
</p>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service
</pre>
</div>

<pre class="example">
[Unit]
Description=Network Manager

[Service]
Type=dbus
BusName=org.freedesktop.NetworkManager
ExecStart=/usr/sbin/NetworkManager --no-daemon
# Suppress stderr to eliminate duplicated messages in syslog. NM calls openlog()
# with LOG_PERROR when run in foreground. But systemd redirects stderr to
# syslog by default, which results in logging each message twice.
StandardError=null
# NM doesn't want systemd to kill its children for it
KillMode=process

[Install]
WantedBy=multi-user.target
Alias=dbus-org.freedesktop.NetworkManager.service
Also=NetworkManager-dispatcher.service
</pre>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service
</pre>
</div>

<pre class="example">
[Unit]
Description=Network Manager Script Dispatcher Service

[Service]
Type=dbus
BusName=org.freedesktop.nm_dispatcher
ExecStart=/usr/lib/NetworkManager/nm-dispatcher.action

[Install]
Alias=dbus-org.freedesktop.nm-dispatcher.service
</pre>

<p>
You should see that NetworkManager.service is enabled.
</p>

<div class="org-src-container">

<pre class="src src-sh">systemctl status NetworkManager
</pre>
</div>

<pre class="example">
NetworkManager.service - Network Manager
   Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled)
   Active: active (running) since Thu 2014-08-07 08:51:25 PDT; 7min ago
 Main PID: 1011 (NetworkManager)
   CGroup: name=systemd:/system/NetworkManager.service
           └─1011 /usr/sbin/NetworkManager --no-daemon

Aug 07 08:51:24 raiser systemd[1]: Starting Network Manager...
Aug 07 08:51:24 raiser NetworkManager[1011]: &lt;info&gt; NetworkManager (version 0.9.8.10) is starting...
Aug 07 08:51:24 raiser NetworkManager[1011]: &lt;info&gt; Read config file /etc/NetworkManager/NetworkManager.conf
Aug 07 08:51:24 raiser NetworkManager[1011]: &lt;info&gt; WEXT support is enabled
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: init!
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: update_system_hostname
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPluginIfupdown: management mode: unmanaged
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:19.0/net/eth0, iface: eth0)
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:19.0/net/eth0, iface: eth0): no ifupdown configuration found.
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: devices added (path: /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/net/wlan0, iface: wlan0)
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: device added (path: /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/net/wlan0, iface: wlan0): no ifupdown configuration found.
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: devices added (path: /sys/devices/virtual/net/lo, iface: lo)
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: device added (path: /sys/devices/virtual/net/lo, iface: lo): no ifupdown configuration found.
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: end _init.
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; Loaded plugin ifupdown: (C) 2008 Canonical Ltd.  To report bugs please use the NetworkManager mailing list.
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; Loaded plugin keyfile: (c) 2007 - 2010 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.
Aug 07 08:51:25 raiser NetworkManager[1011]: Ifupdown: get unmanaged devices count: 0
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: (35959328) ... get_connections.
Aug 07 08:51:25 raiser NetworkManager[1011]: SCPlugin-Ifupdown: (35959328) ... get_connections (managed=false): return empty list.
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto wutangclanaintnothingtofuckwithn ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto wutangclanaintnothingtofuckwithn'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto The Box Factory ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto The Box Factory'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto noisebridge ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto noisebridge'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto #SFO FREE WIFI ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto #SFO FREE WIFI'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto GoogleGuest ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto GoogleGuest'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto CoupaSM ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto CoupaSM'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Wired connection 1 ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Wired connection 1'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto wutangn ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto wutangn'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto MonkeyBrains.net ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto MonkeyBrains.net'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto Coupa ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto Coupa'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto NETGEAR-5G ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto NETGEAR-5G'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto wutangclanaintnothingtofuckwith ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto wutangclanaintnothingtofuckwith'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto hearth ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto hearth'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto Sycamore Public ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto Sycamore Public'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto _San_Francisco_Free_WiFi ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto _San_Francisco_Free_WiFi'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing CoupaHQ ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'CoupaHQ'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto cafelabohemesanfrancisco ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto cafelabohemesanfrancisco'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto SRGNC-GUEST ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto SRGNC-GUEST'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Stormpath Guest ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Stormpath Guest'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto Premium ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto Premium'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto JWAFREEWIFI ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto JWAFREEWIFI'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto Automattic-Guest ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto Automattic-Guest'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto CustomerSuccess ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto CustomerSuccess'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto CoffeeBarU ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto CoffeeBarU'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto hearth-new ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto hearth-new'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto Webroot-Guest ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto Webroot-Guest'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto UCBX ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto UCBX'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto BLUEFIG-guest ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto BLUEFIG-guest'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto .Workshop_FREE. ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto .Workshop_FREE.'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto protectyourneck ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto protectyourneck'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto AB4966 ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto AB4966'
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile: parsing Auto .FreeWiFibyYahoo! ...
Aug 07 08:51:25 raiser NetworkManager[1011]: keyfile:     read connection 'Auto .FreeWiFibyYahoo!'
Aug 07 08:51:25 raiser NetworkManager[1011]: Ifupdown: get unmanaged devices count: 0
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; monitoring kernel firmware directory '/lib/firmware'.
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; monitoring ifupdown state file '/run/network/ifstate'.
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; rfkill1: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.1/0000:03:00.0/ieee80211/phy0/rfkill1) (driver iwlwifi)
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; WiFi hardware radio set enabled
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; WiFi enabled by radio killswitch; enabled by state file
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; WWAN enabled by radio killswitch; enabled by state file
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; WiMAX enabled by radio killswitch; enabled by state file
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; Networking is enabled by state file
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;warn&gt; failed to allocate link cache: (-26) Protocol mismatch
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (eth0): carrier is OFF
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (eth0): new Ethernet device (driver: 'e1000e' ifindex: 2)
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (eth0): exported as /org/freedesktop/NetworkManager/Devices/0
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (eth0): device state change: unmanaged -&gt; unavailable (reason 'managed') [10 20 2]
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (eth0): bringing up device.
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (eth0): preparing device.
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (eth0): deactivating device (reason 'managed') [2]
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): using nl80211 for WiFi device control
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): driver supports Access Point (AP) mode
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): new 802.11 WiFi device (driver: 'iwlwifi' ifindex: 3)
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): exported as /org/freedesktop/NetworkManager/Devices/1
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): device state change: unmanaged -&gt; unavailable (reason 'managed') [10 20 2]
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): bringing up device.
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): preparing device.
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): deactivating device (reason 'managed') [2]
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;warn&gt; /sys/devices/virtual/net/lo: couldn't determine device driver; ignoring...
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;warn&gt; /sys/devices/virtual/net/lo: couldn't determine device driver; ignoring...
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; ModemManager available in the bus
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; wpa_supplicant started
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0) supports 5 scan SSIDs
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;warn&gt; Trying to remove a non-existant call id.
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): supplicant interface state: starting -&gt; ready
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): device state change: unavailable -&gt; disconnected (reason 'supplicant-available') [20 30 42]
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0): supplicant interface state: ready -&gt; inactive
Aug 07 08:51:25 raiser NetworkManager[1011]: &lt;info&gt; (wlan0) supports 5 scan SSIDs
</pre>
</div>
</div>



<div id="outline-container-sec-3-1-4" class="outline-4">
<h4 id="sec-3-1-4">MySQL</h4>
<div class="outline-text-4" id="text-3-1-4">
<p>
The <b>MySQL</b> server <i>debian package</i> doesn't contain a unit service for
it.
</p>

<p>
Here's a version that I wrote myself:
</p>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/systemd/system/mysqld.service
</pre>
</div>

<pre class="example">
[Unit]
Description=MySQL Server
After=network.target

[Service]
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir /var/run/mysqld
ExecStartPre=/bin/chown -R mysql:mysql /var/run/mysqld
User=mysql
Group=mysql
WorkingDirectory=/usr
ExecStart=/usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --datadir=/var/lib/mysql --socket=/var/run/mysqld/mysqld.sock

[Install]
WantedBy=multi-user.target
</pre>
</div>
</div>


<div id="outline-container-sec-3-1-5" class="outline-4">
<h4 id="sec-3-1-5">TLP</h4>
<div class="outline-text-4" id="text-3-1-5">
<p>
<b>TLP</b>'s <i>Debian package</i> by default, doesn't provide
<code>/etc/systemd/system/tlp.service</code> and
<code>/etc/systemd/system/tlp-sleep.service</code> files for <b><i>systemd</i></b>
</p>

<p>
You can grab this from the <b>TLP</b>'s upstream git repository like I did.
</p>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/systemd/system/tlp.service
</pre>
</div>

<pre class="example">
# tlp - systemd startup/shutdown service
#
# Copyright (c) 2014 Thomas Koch &lt;linrunner at gmx.net&gt;
# This software is licensed under the GPL v2 or later.

[Unit]
Description=TLP system startup/shutdown
After=multi-user.target
Before=shutdown.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/tlp init start
ExecStop=/usr/sbin/tlp init stop

[Install]
WantedBy=multi-user.target
</pre>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/systemd/system/tlp-sleep.service
</pre>
</div>

<pre class="example">
# tlp - systemd suspend/resume service
#
# Copyright (c) 2014 Thomas Koch &lt;linrunner at gmx.net&gt;
# This software is licensed under the GPL v2 or later.

[Unit]
Description=TLP suspend/resume
Before=sleep.target
StopWhenUnneeded=yes

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/sbin/tlp suspend
ExecStop=/usr/sbin/tlp resume

[Install]
WantedBy=sleep.target
</pre>

<p>
After that enable both services.
</p>

<div class="org-src-container">

<pre class="src src-sh">systemctl enable tlp.service
</pre>
</div>

<div class="org-src-container">

<pre class="src src-sh">systemctl enable tlp-sleep.service
</pre>
</div>

<p>
Now check that everything is working properly.
</p>

<div class="org-src-container">

<pre class="src src-sh">systemctl status tlp.service
</pre>
</div>

<pre class="example">
tlp.service - TLP system startup/shutdown
   Loaded: loaded (/etc/systemd/system/tlp.service; enabled)
   Active: active (exited) since Thu 2014-08-07 08:51:26 PDT; 7min ago
  Process: 1602 ExecStart=/usr/sbin/tlp init start (code=exited, status=0/SUCCESS)

Aug 07 08:51:26 raiser tlp[1602]: Loading tp-smapi kernel module...done.
Aug 07 08:51:26 raiser tlp[1602]: Setting battery charge thresholds...done.
</pre>
</div>
</div>

<div id="outline-container-sec-3-1-6" class="outline-4">
<h4 id="sec-3-1-6">acpid</h4>
<div class="outline-text-4" id="text-3-1-6">
<p>
<b><i>systemd</i></b> and <b>acpid</b> with <i>acpi-support</i> both offer the same
capabilities for events triggered by hardware, specifically, the ACPI
calls. For example, closing the lid to suspend a laptop.
</p>

<p>
For instance, by default, the closing the lid will trigger <b>acpid</b> to
call the <i>suspend</i> state of <i>pm-utils</i>, but at the same time
<b><i>systemd</i></b> recognizes the closing action which in the same case will
trigger <i>suspend</i> actions in <b><i>systemd</i></b>.
</p>

<p>
In order to avoid these, we have to disable the action in either
<b>acpid</b> or <b><i>systemd</i></b>.
</p>
</div>

<ul class="org-ul"><li>Disable Lid action<br ><div class="outline-text-5" id="text-3-1-6-1">
<p>
To disable this in <b>acpid</b>, modify <code>/etc/acpi/events/lidbtn</code>, and
comment all of the lines.
</p>

<div class="org-src-container">

<pre class="src src-sh">cat /etc/acpi/events/lidbtn
</pre>
</div>

<pre class="example">
# /etc/acpi/events/lidbtn
# Called when the user closes or opens the lid

#event=button[ /]lid
#action=/etc/acpi/lid.sh
</pre>


<p>
To disable this in <b><i>systemd</i></b>, modify <code>/etc/systemd/logind.conf</code>, and
change the key <code>HandleLidSwitch</code> to ignore:
</p>

<pre class="example">
HandleLidSwitch=ignore
</pre>
</div>
</li>

<li>Enable Lid suspend action in systemd<br ><div class="outline-text-5" id="text-3-1-6-2">
<p>
To enable suspend on closing the laptop lid, disable the <b>acpid</b>'s
like mentioned above. Change the key <code>HandleLidSwitch</code> to suspend in
<code>/etc/systemd/logind.conf</code>:
</p>

<pre class="example">
HandleLidSwitch=suspend
</pre>
</div>
</li></ul>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="date">Date: 2014-05-07</p>
<p class="author">Author: Carlos Sosa</p>
<p class="date">Created: 2014-08-07 Thu 08:58</p>
<p class="creator"><a href="http://www.gnu.org/software/emacs/">Emacs</a> 24.3.92.1 (<a href="http://orgmode.org">Org</a> mode 8.2.7b)</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
</html>