Posts

Showing posts from 2013

Broken resume after suspend to ram on Toshiba R830-10p

Resume after suspend to RAM is broken on Toshiba R830. I want to fix it. Can you help me, or introduce me to someone who can help me?

Somehow the bug is related to Intel VT-d or x2apic. Disabling VT-d on the BIOS, makes the resume work. With VT-d enabled, passing nox2apic as boot parameter to Kernel also makes the resume work.

I've asked for help: https://lkml.org/lkml/2013/11/1/186

The current issue is that my notebook doesn't have real serial port, so I can't track what's going on. Suspend / resume steps before calling the platform firmware work perfectly. So it works perfectly if I echo freeze > /sys/power/state...

Ideas? Any creative idea on using systemtap to debug this issue?

Debugging suspend on Toshiba R830-10p: Some test results and logs

When testing suspend to RAM, all tests went well. But the real thing doesn't work... Ideas?

# echo freezer > /sys/power/pm_test
# echo mem > /sys/power/state
[27354.755748] PM: Syncing filesystems ... done.
[27354.780184] PM: Preparing system for mem sleep
[27354.780687] Freezing user space processes ... (elapsed 0.007 seconds) done.
[27354.787975] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[27354.789133] suspend debug: Waiting for 5 seconds.
[27359.783027] PM: Finishing wakeup.
[27359.783028] Restarting tasks ... done.
[27359.784320] video LNXVIDEO:01: Restoring backlight state

# echo devices > /sys/power/pm_test # echo mem > /sys/power/state  [27476.796841] PM: Syncing filesystems ... done. [27476.820641] PM: Preparing system for mem sleep [27476.820952] Freezing user space processes ... (elapsed 0.001 seconds) done. [27476.822083] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [27476.823290] PM: Entering mem sleep [274…

Kernel Summit 2013

Image
I did a brief presentation of Coccinelle in a lightning talk on Friday. It was the first time I had Linus on the audience. :-) Slides here.
Photo on the Linux Kernel Summit 2013. I'm near Linus and Greg :-)*
:-)

*Photo by: Thorsten Leemhuis

Fedora: Compile a single module directory for current running Kernel

Sometimes one may want to just compile a single module and use it without rebooting the machine. In my case I wanted to play with 8139cp/8139too modules inside a KVM virtual machine running Fedora.

There are two requirements:
1 - Kernel source code
2 - Kernel development package

The source code is where to do the changes, while the development package contains the headers that allow to compile Kernel modules with the right version magic.

There are some options for obtaining the Kernel source code, but here the Fedora way is listed. You could probably download the Kernel from http://kernel.org.

Install packages, prepare RPM buil tree, and "install" the source code(Fedora way):
[fedora] $ sudo yum install @"Development Tools" rpmdevtools yum-utils ncurses-devel
[fedora] $ rpmdev-setuptree
[fedora] $ yumdownloader --source kernel
[fedora] $ sudo yum-builddep kernel-<version>.src.rpm
[fedora] $ rpm -Uvh kernel-<version>.src.rpm Prepare the source code for build…

What are the source code files associated to Kconfig symbol?

I needed a way to discover which Linux source code files are related to a Kconfig symbol. As there is at least one Kconfig symbol for each Linux device driver, how could I find out what files are part of a device driver based on a single, or a set, of Kconfig symbols? I made a Perl script for that. For example:

$ cd /src/linux/drivers/net/ethernet
$ Kconfig-files.pl ALX
atheros/alx/hw.h
atheros/alx/hw.c
atheros/alx/ethtool.c
atheros/alx/main.c
atheros/alx/alx.h
atheros/alx/reg.h

All source files associated to the ALX Kconfig symbol are listed. The script is at Github.

Using Coccinelle with Python

There are examples and documentation about using Coccinelle and Python:
http://www.emn.fr/z-info/coccinelle/stuart_thesis.pdf

make localmodconfig

Always wanted easy way of creating good config for compiling your own Kernel? You should try make localmodconfig

Before running make localmodconfig connect everything you want to work on your custom Kernel like USB pen drives and webcamera. make localmodconfig probes for loaded modules and make a new CONFIG for you.

From: http://www.h-online.com/open/features/Good-and-quick-kernel-configuration-creation-1403046.html
Thanks to +Thorsten Leemhuis