- <title>The life and death of a laptop battery</title>
- <link>http://people.skolelinux.org/pere/blog/The_life_and_death_of_a_laptop_battery.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/The_life_and_death_of_a_laptop_battery.html</guid>
- <pubDate>Thu, 24 Sep 2015 16:00:00 +0200</pubDate>
- <description><p>When I get a new laptop, the battery life time at the start is OK.
-But this do not last. The last few laptops gave me a feeling that
-within a year, the life time is just a fraction of what it used to be,
-and it slowly become painful to use the laptop without power connected
-all the time. Because of this, when I got a new Thinkpad X230 laptop
-about two years ago, I decided to monitor its battery state to have
-more hard facts when the battery started to fail.</p>
-
-<img src="http://people.skolelinux.org/pere/blog/images/2015-09-24-laptop-battery-graph.png"/>
-
-<p>First I tried to find a sensible Debian package to record the
-battery status, assuming that this must be a problem already handled
-by someone else. I found
-<a href="https://tracker.debian.org/pkg/battery-stats">battery-stats</a>,
-which collects statistics from the battery, but it was completely
-broken. I sent a few suggestions to the maintainer, but decided to
-write my own collector as a shell script while I waited for feedback
-from him. Via
-<a href="http://www.ifweassume.com/2013/08/the-de-evolution-of-my-laptop-battery.html">a
-blog post about the battery development on a MacBook Air</a> I also
-discovered
-<a href="https://github.com/jradavenport/batlog.git">batlog</a>, not
-available in Debian.</p>
-
-<p>I started my collector 2013-07-15, and it has been collecting
-battery stats ever since. Now my
-/var/log/hjemmenett-battery-status.log file contain around 115,000
-measurements, from the time the battery was working great until now,
-when it is unable to charge above 7% of original capacity. My
-collector shell script is quite simple and look like this:</p>
-
-<pre>
-#!/bin/sh
-# Inspired by
-# http://www.ifweassume.com/2013/08/the-de-evolution-of-my-laptop-battery.html
-# See also
-# http://blog.sleeplessbeastie.eu/2013/01/02/debian-how-to-monitor-battery-capacity/
-logfile=/var/log/hjemmenett-battery-status.log
-
-files="manufacturer model_name technology serial_number \
- energy_full energy_full_design energy_now cycle_count status"
-
-if [ ! -e "$logfile" ] ; then
- (
- printf "timestamp,"
- for f in $files; do
- printf "%s," $f
- done
- echo
- ) > "$logfile"
-fi
-
-log_battery() {
- # Print complete message in one echo call, to avoid race condition
- # when several log processes run in parallel.
- msg=$(printf "%s," $(date +%s); \
- for f in $files; do \
- printf "%s," $(cat $f); \
- done)
- echo "$msg"
-}
-
-cd /sys/class/power_supply
-
-for bat in BAT*; do
- (cd $bat && log_battery >> "$logfile")
-done
-</pre>
-
-<p>The script is called when the power management system detect a
-change in the power status (power plug in or out), and when going into
-and out of hibernation and suspend. In addition, it collect a value
-every 10 minutes. This make it possible for me know when the battery
-is discharging, charging and how the maximum charge change over time.
-The code for the Debian package
-<a href="https://github.com/petterreinholdtsen/battery-status">is now
-available on github</a>.</p>
-
-<p>The collected log file look like this:</p>
-
-<pre>
-timestamp,manufacturer,model_name,technology,serial_number,energy_full,energy_full_design,energy_now,cycle_count,status,
-1376591133,LGC,45N1025,Li-ion,974,62800000,62160000,39050000,0,Discharging,
-[...]
-1443090528,LGC,45N1025,Li-ion,974,4900000,62160000,4900000,0,Full,
-1443090601,LGC,45N1025,Li-ion,974,4900000,62160000,4900000,0,Full,
-</pre>
-
-<p>I wrote a small script to create a graph of the charge development
-over time. This graph depicted above show the slow death of my laptop
-battery.</p>
-
-<p>But why is this happening? Why are my laptop batteries always
-dying in a year or two, while the batteries of space probes and
-satellites keep working year after year. If we are to believe
-<a href="http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries">Battery
-University</a>, the cause is me charging the battery whenever I have a
-chance, and the fix is to not charge the Lithium-ion batteries to 100%
-all the time, but to stay below 90% of full charge most of the time.
-I've been told that the Tesla electric cars
-<a href="http://my.teslamotors.com/de_CH/forum/forums/battery-charge-limit">limit
-the charge of their batteries to 80%</a>, with the option to charge to
-100% when preparing for a longer trip (not that I would want a car
-like Tesla where rights to privacy is abandoned, but that is another
-story), which I guess is the option we should have for laptops on
-Linux too.</p>
-
-<p>Is there a good and generic way with Linux to tell the battery to
-stop charging at 80%, unless requested to charge to 100% once in
-preparation for a longer trip? I found
-<a href="http://askubuntu.com/questions/34452/how-can-i-limit-battery-charging-to-80-capacity">one
-recipe on askubuntu for Ubuntu to limit charging on Thinkpad to
-80%</a>, but could not get it to work (kernel module refused to
-load).</p>
-
-<p>I wonder why the battery capacity was reported to be more than 100%
-at the start. I also wonder why the "full capacity" increases some
-times, and if it is possible to repeat the process to get the battery
-back to design capacity. And I wonder if the discharge and charge
-speed change over time, or if this stay the same. I did not yet try
-to write a tool to calculate the derivative values of the battery
-level, but suspect some interesting insights might be learned from
-those.</p>
-
-<p>Update 2015-09-24: I got a tip to install the packages
-acpi-call-dkms and tlp (unfortunately missing in Debian stable)
-packages instead of the tp-smapi-dkms package I had tried to use
-initially, and use 'tlp setcharge 40 80' to change when charging start
-and stop. I've done so now, but expect my existing battery is toast
-and need to be replaced. The proposal is unfortunately Thinkpad
-specific.</p>
-</description>
- </item>
-
- <item>
- <title>Book cover for the Free Culture book finally done</title>
- <link>http://people.skolelinux.org/pere/blog/Book_cover_for_the_Free_Culture_book_finally_done.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Book_cover_for_the_Free_Culture_book_finally_done.html</guid>
- <pubDate>Thu, 3 Sep 2015 21:00:00 +0200</pubDate>
- <description><p>Creating a good looking book cover proved harder than I expected.
-I wanted to create a cover looking similar to the original cover of
-the
-<a href="https://github.com/petterreinholdtsen/free-culture-lessig">Free
-Culture</a> book we are translating to Norwegian, and I wanted it in
-vector format for high resolution printing. But my inkscape knowledge
-were not nearly good enough to pull that off.
-
-<p>But thanks to the great inkscape community, I was able to wrap up
-the cover yesterday evening. I asked on the
-<a href="irc://irc.freenode.net/%23inkscape">#inkscape IRC channel</a>
-on Freenode for help and clues, and Marc Jeanmougin (Mc-) volunteered
-to try to recreate it based on the PDF of the cover from the HTML
-version. Not only did he create a
-<a href="https://marc.jeanmougin.fr/share/copy1.svg ">SVG document with
-the original and his vector version side by side</a>, he even provided
-an <a href="https://marc.jeanmougin.fr/share/out-1.ogv">instruction
-video</a> explaining how he did it</a>. But the instruction video is
-not easy to follow for an untrained inkscape user. The video is a
-recording on how he did it, and he is obviously very experienced as
-the menu selections are very quick and he mentioned on IRC that he did
-use some keyboard shortcuts that can't be seen on the video, but it
-give a good idea about the inkscape operations to use to create the
-stripes with the embossed copyright sign in the center.</p>
-
-<p>I took his SVG file, copied the vector image and re-sized it to fit
-on the cover I was drawing. I am happy with the end result, and the
-current english version look like this:</p>
-
-<img src="http://people.skolelinux.org/pere/blog/images/2015-09-03-free-culture-cover.png" width="70%" align="center"/>
-
-<p>I am not quite sure about the text on the back, but guess it will
-do. I picked three quotes from the official site for the book, and
-hope it will work to trigger the interest of potential readers. The
-Norwegian cover will look the same, but with the texts and bar code
-replaced with the Norwegian version.</p>
-
-<p>The book is very close to being ready for publication, and I expect
-to upload the final draft to Lulu in the next few days and order a
-final proof reading copy to verify that everything look like it should
-before allowing everyone to order their own copy of Free Culture, in
-English or Norwegian Bokmål. I'm waiting to give the the productive
-proof readers a chance to complete their work.</p>
-</description>
- </item>
-
- <item>
- <title>In my hand, a pocket book edition of the Norwegian Free Culture book!</title>
- <link>http://people.skolelinux.org/pere/blog/In_my_hand__a_pocket_book_edition_of_the_Norwegian_Free_Culture_book_.html</link>
- <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/In_my_hand__a_pocket_book_edition_of_the_Norwegian_Free_Culture_book_.html</guid>
- <pubDate>Wed, 19 Aug 2015 22:10:00 +0200</pubDate>
- <description><p>Today, finally, my first printed draft edition of the Norwegian
-translation of Free Culture I have been working on for the last few
-years arrived in the mail. I had to fake a cover to get the interior
-printed, and the exterior of the book look awful, but that is
-irrelevant at this point. I asked for a printed pocket book version
-to get an idea about the font sizes and paper format as well as how
-good the figures and images look in print, but also to test what the
-pocket book version would look like. After receiving the 500 page
-pocket book, it became obvious to me that that pocket book size is too
-small for this book. I believe the book is too thick, and several
-tables and figures do not look good in the size they get with that
-small page sizes. I believe I will go with the 5.5x8.5 inch size
-instead. A surprise discovery from the paper version was how bad the
-URLs look in print. They are very hard to read in the colophon page.
-The URLs are red in the PDF, but light gray on paper. I need to
-change the color of links somehow to look better. But there is a
-printed book in my hand, and it feels great. :)</p>
-
-<p>Now I only need to fix the cover, wrap up the postscript with the
-store behind the book, and collect the last corrections from the proof
-readers before the book is ready for proper printing. Cover artists
-willing to work for free and create a Creative Commons licensed vector
-file looking similar to the original is most welcome, as my skills as
-a graphics designer are mostly missing.</p>
+ <title>Techno TV broadcasting live across Norway and the Internet (#debconf16, #nuug) on @frikanalen</title>
+ <link>http://people.skolelinux.org/pere/blog/Techno_TV_broadcasting_live_across_Norway_and_the_Internet___debconf16___nuug__on__frikanalen.html</link>
+ <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Techno_TV_broadcasting_live_across_Norway_and_the_Internet___debconf16___nuug__on__frikanalen.html</guid>
+ <pubDate>Mon, 1 Aug 2016 10:30:00 +0200</pubDate>
+ <description><p>Did you know there is a TV channel broadcasting talks from DebConf
+16 across an entire country? Or that there is a TV channel
+broadcasting talks by or about
+<a href="http://beta.frikanalen.no/video/625529/">Linus Torvalds</a>,
+<a href="http://beta.frikanalen.no/video/625599/">Tor</a>,
+<a href="http://beta.frikanalen.no/video/624019/">OpenID</A>,
+<a href="http://beta.frikanalen.no/video/625624/">Common Lisp</a>,
+<a href="http://beta.frikanalen.no/video/625446/">Civic Tech</a>,
+<a href="http://beta.frikanalen.no/video/625090/">EFF founder John Barlow</a>,
+<a href="http://beta.frikanalen.no/video/625432/">how to make 3D
+printer electronics</a> and many more fascinating topics? It works
+using only free software (all of it
+<a href="http://github.com/Frikanalen">available from Github</a>), and
+is administrated using a web browser and a web API.</p>
+
+<p>The TV channel is the Norwegian open channel
+<a href="http://www.frikanalen.no/">Frikanalen</a>, and I am involved
+via <a href="https://www.nuug.no/">the NUUG member association</a> in
+running and developing the software for the channel. The channel is
+organised as a member organisation where its members can upload and
+broadcast what they want (think of it as Youtube for national
+broadcasting television). Individuals can broadcast too. The time
+slots are handled on a first come, first serve basis. Because the
+channel have almost no viewers and very few active members, we can
+experiment with TV technology without too much flack when we make
+mistakes. And thanks to the few active members, most of the slots on
+the schedule are free. I see this as an opportunity to spread
+knowledge about technology and free software, and have a script I run
+regularly to fill up all the open slots the next few days with
+technology related video. The end result is a channel I like to
+describe as Techno TV - filled with interesting talks and
+presentations.</p>
+
+<p>It is available on channel 50 on the Norwegian national digital TV
+network (RiksTV). It is also available as a multicast stream on
+Uninett. And finally, it is available as
+<a href="http://beta.frikanalen.no/">a WebM unicast stream</a> from
+Frikanalen and NUUG. Check it out. :)</p>