# laptop freezes randomly

## muebi

Hi, 

I have a weired problem with my laptop that seems to freeze randomly with blinking capslock led. I can't do anything then except power of f with keeping the power button pressed... 

So far, I didn't realize any specifc pattern when it happens nor does it seem to be related to any specific application.

Does anybody know what causes this problem and how to fix it? I googled a bit and realized that people running ubuntu reported similar problems but I couldn't find a satisfactory solutions.

And: I am not sure but I believe that the problem may be related to some updates during the last weeks since I can't remember having this problem right from the beginning...

----------

## Hu

That sounds like a kernel panic.  What is the output of uname -a ; emerge --info ; lsmod ; cat /proc/sys/kernel/tainted?

----------

## muebi

Hi Hu, 

This is what you have asked for:

uname -a

Linux aitken 2.6.27.6 #13 SMP Tue Nov 25 22:00:06 CET 2008 x86_64 Intel(R) Core(TM)2 Duo CPU T9400 @ 2.53GHz GenuineIntel GNU/Linux

emerge --info

Portage 2.1.6.7 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27.6 x86_64)

=================================================================

System uname: Linux-2.6.27.6-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9400_@_2.53GHz-with-glibc2.2.5

Timestamp of tree: Wed, 04 Mar 2009 02:15:01 +0000

ccache version 2.4 [enabled]

app-shells/bash:     3.2_p39

dev-java/java-config: 1.3.7, 2.1.6

dev-lang/python:     2.4.4-r13, 2.5.2-r7

dev-python/pycrypto: 2.0.1-r6

dev-util/ccache:     2.4-r7

dev-util/cmake:      2.4.6-r1

sys-apps/baselayout: 1.12.11.1

sys-apps/sandbox:    1.2.18.1-r2

sys-devel/autoconf:  2.13, 2.63

sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.0-r4

sys-devel/libtool:   1.5.26

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -march=nocona -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"

CXXFLAGS="-O2 -march=nocona -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb vorbis xml xorg xulrunner xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fglrx radeon intel vesa vga"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

lsmod

Module                  Size  Used by

fglrx                2070024  0

cat /proc/sys/kernel/tainted

1

----------

## muebi

any suggestions?

----------

## Hu

Try to reproduce the problem with an untainted kernel or report the issue as-is to ATI.  Since you have a proprietary kernel module loaded, it is unlikely that the upstream kernel maintainers will take much interest in the problem report if the problem only occurs when using the ATI proprietary driver.

----------

## muebi

Sorry, but I am not sure what you are talking about. What is an untainted kernel?

----------

## ziggysquatch

A kernel that has a commercial module loaded is tainted.  That's how I understand it from a few years back, someone correct me if I am wrong.

I think the thing that taints the kernel may be your fglrx module.

----------

## Hu

The module does not need to be commercial, but yes, in this case the proprietary module is the reason for the taint.  Kernels can become tainted for other reasons.  See kernel/panic.c around the function print_tainted for details.

----------

## ziggysquatch

I did a little more research to clarify my knowledge of a tainted kernel for any passers by.

Novell had a good description:

 *Quote:*   

> 
> 
> P: A module with a Proprietary license has been loaded, i.e. a module that is not licensed under the GNU General Public License (GPL) or a compatible license. This may indicate that source code for this module is not available to the Linux kernel developers or to Novell's developers.
> 
> G: The opposite of 'P': the kernel has been tainted (for a reason indicated by a different flag), but all modules loaded into it were licensed under the GPL or a license compatible with the GPL.
> ...

 

Full document:

http://www.novell.com/support/viewContent.do?externalId=3582750&sliceId=1

----------

## muebi

In order to come back to my problem I wonder if I my problem would be solved if I unlod this module (fglrx)? Since I am actually using another graphics device the module is not used...

----------

## ziggysquatch

Probably.  Or you could take fglrx out of Xorg.conf (unless hal is handling X's config for you).

How did fglrx get loaded?  Is there an ATI card there but not being used or do you have something manually loading it?

I'm only asking because you said that you have another graphics device.

----------

## muebi

In my xorg.conf I have the following lines. The fglrx is loaded but never used because so far it never really worked...

And: Is there a way to check if this module is the real reason for the troubles?

Section "ServerLayout"

    Identifier     "Default Layout"

    Screen      0  "Screen0" 0 0

EndSection

Section "Files"

EndSection

Section "Module"

    Load           "dbe" 

    Load           "extmod"

    Load           "fbdevhw"

    Load           "glx"

    Load           "record"

    Load           "freetype"

    Load           "type1"

EndSection

Section "ServerFlags"

    Option         "Xinerama" "0"

EndSection

Section "InputDevice"

    Identifier     "Generic Keyboard"

    Driver         "kbd"

    Option         "XkbRules" "xorg"

    Option         "XkbModel" "thinkpad60"

    Option         "XkbLayout" "us"

EndSection

Section "InputDevice"

    Identifier     "Configured Mouse"

    Driver         "mouse"

    Option         "CorePointer"

EndSection

Section "Monitor"

    Identifier     "Configured Monitor"

EndSection

Section "Monitor"

    Identifier     "Monitor0"

    VendorName     "Unknown"

    ModelName      "Samsung SyncMaster"

    HorizSync       30.0 - 81.0

    VertRefresh     56.0 - 75.0

EndSection

Section "Device"

    Identifier     "Card0"

    Driver         "vesa"

    Option         "NoLogo" "True"

EndSection

Section "Device"

    Identifier     "Videocard0"

    Driver         "fglrx"

    VendorName     "ATI Corporation"

    BoardName      "Radeo 4850"

    BusID          "PCI:1:0:0"

EndSection

Section "Screen"

    Identifier     "Screen0"

    Device         "Card0"

    Monitor        "Configured Monitor"

    DefaultDepth    24

EndSection

#Section "Screen"

#    Identifier     "Screen0"

#    Device         "Videocard0"

#    Monitor        "Monitor0"

#    DefaultDepth    24

#    Option         "TwinView" "0"

#    Option         "TwinViewXineramaInfoOrder" "DFP-0"

#    Option         "metamodes" "DFP-0: 1680x1050 +0+0"

#EndSection

----------

## ziggysquatch

If you look at /var/log/Xorg.0.log it should tell you what's going on when it freezes.

Sometimes while it's frozen you can ssh into the machine to look at the log.  If that's not possible, after reboot there is usually a backup log called Xorg.1.log or something like that which should have the info from the last use.

----------

## Hu

If the system is hanging due to a kernel panic, it is unlikely that meaningful logs will be written.  You may be able to extract information via a serial console or netconsole, if you can get the kernel to print to them during the panic.  Given that information, we might be able to identify what caused the panic.

----------

