Experiences in the community

Just another WordPress.com weblog

Are Indian FOSS communities closed-source ?

Hi all,
This will hopefully be a short read as how Indian communities specially product-based communities are opaque in functioning.
Read more…

Dramas and a buggy world

This post would be about a few bugs that I was able to get help and get them fixed, and some which are in process and some which may take a long time to resolve.
Read more…

The debian/watch file.

Hi all,
This would be a sort of longish blog post which attempts to share what the debian/watch file is and how it’s important in the debian ecosystem.
Read more…

Case of a potato, food park, potato chips ,the humble wada-pav and the farmer.

This would be a shortish blog post about the politics behind the humble potato and what I have seen around me.
Read more…

Cppcheck for better QA in Debian, sources, deborphan

This would be somewhat a longish post about how to find c programs in Debian to how to use cppcheck on them to find problems and report them upstream
Read more…

A tax hell on earth

This would be a short take on the Income Tax department and a recent news article and implications for the future.
Read more…

Save the Internet

Hi all,
This is a somewhat longish response given to the TRAI 20 questions using the reply shared by the SavetheInternet Coalition made by users and net advocates alike. The SavetheInternet answers will be in  quotes and my addition to the answers beneath it where I have.
Read more…

Analyzing security vulnerabilities in Debian.

This will be a slightly longish post about what security vulnerabilities and how to find about them in Debian and what possible steps you could take to minimize fallouts once you know the vulnerabilities.
Read more…

/etc/apt/sources.list, GNOME 3.16 release and Jessie RC2

This would be a longish post about lot of topics starting from documenting my /etc/apt/sources.list, going to various goings on with GNOME 3.16 release and Debian Jessie RC2 release.

Read more…

IPv6, issues and nginx

Hi all,
This would be a bit long in the tooth post about #IPv6, it’s uptake in India, potential solutions for the interim solution and little bit of Debian news as well.
Read more…

The semiconductor fab dream

This would be a cynical/realistic view on the semiconductor manufacturing landscape from a totally outsider’s perspective.
Read more…

A keynote, a panel and FOSS

Hi all,
This would be a sort of report of two events -Minidebconf at IIT Mumbai (January) and GNUnify 2015 which happened at SICSR, Pune. #IIT Minidebconf Mumbai 2015, #GNUnify 2015
Read more…

Laptop over-heating issues.

Hi all,

There was a Mini-Debconf held in IIT Mumbai on January 17 – 18 .  The event was good from outsider’s perspective but there were and are a lot of kinks we need to work out when holding future mini-debconfs. I was hoping we would be getting some photos from the event by our official/unofficial photographer of the event Purvesh Shah but as that has also not materialized as of yet hence doing it without it.

But before getting into the specifics of the event itself there was a question raised by several people as to why Debian or any GNU/Linux runs hot on their laptop. Now because I didn’t want to get into the nitty-gritty details therein hence didn’t get into it but now as have the time and the place can share it better.

The answer to it is somewhat complex. Part of the problem on many chips is and was that the software bits (the firmware) which should be telling the CPU telling that each activity doesn’t need full power/frequency was not there. It still is not there as that part has been patented and is considered valuable IP (as shared before it’s called firmware). This was for a long-time then some years back (circa 2004) and after there was a workaround utility made cpufrequtils


$ aptitude show cpufrequtils
Package: cpufrequtils
State: installed
Automatically installed: yes
Version: 008-1
Priority: optional
Section: admin
Maintainer: Mattia Dongili
Architecture: amd64
Uncompressed Size: 233 k
Depends: libc6 (>= 2.3), libcpufreq0 (>= 006), debconf (>= 0.5) | debconf-2.0, lsb-base (>= 3.0)
Description: utilities to deal with the cpufreq Linux kernel feature
This package contains two utilities for inspecting and setting the CPU frequency through both the sysfs and procfs CPUFreq kernel interfaces.

By default, it also enables CPUFreq at boot time if the correct CPU driver is found.
Homepage: http://kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html

Now this utility itself was broken for quite sometime and came into its own just few years back. Sharing output from an old machine I have at my disposal :-


$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 10.0 us.
hardware limits: 1.20 GHz - 2.70 GHz
available frequency steps: 2.70 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz
available cpufreq governors: userspace, conservative, powersave, ondemand, performance
current policy: frequency should be within 1.20 GHz and 2.70 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1.60 GHz.
cpufreq stats: 2.70 GHz:30.84%, 2.00 GHz:2.46%, 1.60 GHz:3.22%, 1.20 GHz:63.49% (19978)
analyzing CPU 1:
driver: acpi-cpufreq
CPUs which run at the same hardware frequency: 1
CPUs which need to have their frequency coordinated by software: 1
maximum transition latency: 10.0 us.
hardware limits: 1.20 GHz - 2.70 GHz
available frequency steps: 2.70 GHz, 2.00 GHz, 1.60 GHz, 1.20 GHz
available cpufreq governors: userspace, conservative, powersave, ondemand, performance
current policy: frequency should be within 1.20 GHz and 2.70 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1.60 GHz.
cpufreq stats: 2.70 GHz:29.07%, 2.00 GHz:2.42%, 1.60 GHz:3.04%, 1.20 GHz:65.47% (20496)

Now because this is on a desktop I haven’t used any governors. If it was a laptop I would have chosen “ondemand” which is the best one. If you want to see which governor you are using or not, see :-


$ cat /sys/devices/system/cpu/cpuidle/current_driver
none

As it says none there, that’s telling me I haven’t turned on any of the governors.

There are quite a few competing applications/packages that you can try to see if any of them do it better. Some of the more well-known ones are cpufrequtils (shared above), thermald, TLP and couple of others.

Now the job is and should be simple, you have an application running and the CPU should allocate power and performance to do computing without over-heating itself. BUT there is no single application, there are multiple applications, some running in the background while some running in the foreground. For e.g. I usually have at least the music player running while browsing the web or doing anything else for that matter. I have a terminal emulator which is running all the time, I have a network monitor which also is going on apart from other things, so there are lots of competition between those applications happening at times but at other times there is virtually nothing or minimal resources are being spent for which something called ‘C States’ which was point of discussion few years back. An lwn.net article refreshes the memory.So the kernel has to make decisions which applications to give priority and which not and many a time it doesn’t do good enough of a job. Add to that there are wake-up events, for e.g. let’s see you had your instant messaging application on the tray and it’s sleeping (conserving power) and somebody sends you a ‘hi’ power would have to be sent to that application and you will get a nice chat window where you could answer to whoever said hi to you. While I’m saying applications I am referring to anything which will interrupt to the sleep state.

There is work happening partly on the hardware end to improve the scene and it’s the failure of third-party device manufacturers as well as developers who should be thinking about power-management for laptops as well. This also hurts MS-Windows but not as much as GNU/Linux due to lot of reasons and I don’t really want to go there. A link as how it can also be somewhat of a ruinous experience for MS-Windows is shared by the Anandtech article who goes in some detail as well.

For people looking to fix the situation I would direct them to look up and work with the kernel and specifically the power-management folks. This is and will require lots of reading, lots of trying out stuff etc. It’s a long-term game where the goal posts will keep on moving from time to time (as CPU’s and GPU’s don’t seem to be ending manufacturing anytime soon) as well as form factors such as tablets, phones etc.

Also look at http://wr.informatik.uni-hamburg.de/_media/teaching/wintersemester_2014_2015/eep-1415-broemstrup-operating-systems.pdf where Mr. Bj ̈orn Br ̈omstrup (I hope it comes out right) shares the current state of power management in linux rather than in my stumbling manner but then this post was not for those who understand these matters in the first place :)

Debutsav 2014 Experiences – Day 2

This will be the last post in series on Debutsav 2014 held at Amrita University and consequently will be biggish.
Read more…

Debutsav 2014 Experiences – Day 1

This again will be a tell-all from a perspective of an organizer of Debutsav 2014 with some left-over notes of Day 0 as well.
Read more…

Post Navigation

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: