Jump to content


Patched ubuntu kernel (fixes sd/usb suspend/hibernate)


121 replies to this topic

#1 mbm

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts

Posted 25 December 2007 - 12:50 AM

http://mbm.openwrt.org/eee/
kernel 2.6.24-rc5
+ enable usb persist and set on by default
+ patch atl2
+ patch asus_acpi
+ optimize for size (gcc -Os)

With this kernel you can safely suspend or hibernate while booted from a SD or USB drive; also included are updated versions of atl2 and asus_acpi, patched for use on the eee.

#2 garretwp

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 25 December 2007 - 01:08 AM

You might want to give some more info on how to go about installing the new kernel and the files you need to do so for others on this board. :) By the way, thanks for addition. I will give it a try.

- Garrett

#3 garretwp

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 25 December 2007 - 02:14 AM

Got the kernel installed, but could not boot from it. The grub entries all look fine, but I get a file not found from grub.

- Garrett

#4 kevwalker

    Senior Member

  • Members
  • 123 posts

Posted 25 December 2007 - 03:54 AM

I am extremely interested in getting this functionality from ubuntu. When someone gets this working, please post a detailed guide for us newbies to follow. I love this forum and the linux community!

#5 charolastra

    Member

  • Members
  • 23 posts

Posted 25 December 2007 - 05:26 AM

Thanks a lot mbm! I have been trying to recompile the kernel myself to get usb persist working but I dont have the knowhow/patience to trim the fat of a default kernel build.

Now I need to figure out how to get the wireless working, hopefully without ndiswrapper. I used benob's scriptpack before but it doesnt appear to work this time (feel free to correct me). I will search the forums tomorrow night unless someone can easily point me in the right direction.

Re: installation guide:
1) download all the debs (you may omit the source one)
2) sudo dpkg -i linux-headers.....all.deb
3) install the other linux-headers deb (sudo dpkg -i linux-headers....i386.deb)
4) install the linux-image deb
5) reboot

hit esc at grub to choose your old kernel if you desire

Merry Christmas!

#6 charolastra

    Member

  • Members
  • 23 posts

Posted 25 December 2007 - 08:43 AM

Wow mbm, hats off, k++, I now have wifi working. Thanks for doing all the dirty work! It's a good Christmas gift to have everything on my EEE working the way it should (except for the fact that xubuntu refuses to lock on suspend or hibernate...)

For those of you following at home, get this: http://downloads.ope...-generic.tar.gz

untar it, stick the madwifi folder that came out of it in /lib/modules/2.6.24-2-generic, run "sudo depmod", run "sudo modprobe ath_pci", and for good measure stick "ath_pci" at the end of /etc/modules (right? wrong? havent rebooted yet)

Merry Christmas to all and to all a good night.

#7 dvm

    Senior Member

  • Members
  • 124 posts

Posted 25 December 2007 - 09:13 AM

Thanks for the kernel and the installation guide! Good job!

I also noticed the missing modules after installing only the .deb packages. I extracted the madwifi tarball to /lib/modules/2.6.24-2-generic/kernel/net and then do "sudo modprobe ath_hal" (instead of ath_pci -- what is the difference?) and then append "ath_hal" to /etc/modules. Reboot and then i got wifi working under this new kernel.

#8 charolastra

    Member

  • Members
  • 23 posts

Posted 25 December 2007 - 09:37 AM

I think either module depends on the other, so you should be safe. The Madwifi install wiki said to modprobe _pci but they are all loaded if one is.

Ok, now to get sound working I need a fresh snd_hda_intel.ko. Then to get the camera working? Mbm, dvm, do you have these modules built? I just moved my home directory onto an sd card so I have room to start compiling, but I'd rather not spend the time on it if I dont have to.

Thanks a ton!

#9 garretwp

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 25 December 2007 - 12:14 PM

I get an error when trying to boot from the new kernel in grub. I get error 15: file not found. The grub settings point to the exact location of the kernel. Not sure why it will not boot.

- Garrett

#10 charolastra

    Member

  • Members
  • 23 posts

Posted 25 December 2007 - 03:30 PM

How did you install it? Can you post your menu.lst? and the results of "ls /usr/src" and "ls /lib/modules/"?

#11 PhantomsDad

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 25 December 2007 - 07:27 PM

Quote

I get an error when trying to boot from the new kernel in grub. I get error 15: file not found. The grub settings point to the exact location of the kernel. Not sure why it will not boot.

- Garrett
Maybe need to change root line in menu.lst? You can try it from grub boot menu. Scroll to entry in question, hit e (edit). Scroll to "root" line, hit e. Change (hd0,0) to (hd1,0) or vice versa. Hit b to boot. If that works, then you need to edit menu.lst to make fix permanent.
ASUS 4G 701 (7B) black, 2GB ram, BIOS v0910, DebianEeePC v5.0 (Lenny) from image 20081207 installed to SSD, with xfce4 v4.4.2. Lean and mean!

#12 charolastra

    Member

  • Members
  • 23 posts

Posted 25 December 2007 - 08:24 PM

Ok, so to get audio working, should I recompile alsa? After installing the new linux-source deb and the standard alsa-source deb, the build fails (with "sudo module-assistant build alsa"). Anyone have any ideas? I would love to have both sound and usb persistence working...

#13 garretwp

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 25 December 2007 - 08:38 PM

PhantomsDad,

Already tried modifying the grub menu when I first installed the modules via dpkg. I will post the menu.lst as soon as I can. I do not see any discrepancies in the file.

- Garrett

#14 garretwp

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 25 December 2007 - 09:10 PM

I reinstalled the kernel and still get the grub error. Here is the menu.lst file.

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=3711ea55-d8e8-4f02-94b0-b7cf300d3b5c ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd2,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 7.10, kernel 2.6.24-2-generic
root (hd2,0)
kernel /boot/vmlinuz-2.6.24-2-generic root=UUID=3711ea55-d8e8-4f02-94b0-b7cf300d3b5c ro quiet splash
initrd /boot/initrd.img-2.6.24-2-generic
quiet

title Ubuntu 7.10, kernel 2.6.24-2-generic (recovery mode)
root (hd2,0)
kernel /boot/vmlinuz-2.6.24-2-generic root=UUID=3711ea55-d8e8-4f02-94b0-b7cf300d3b5c ro single
initrd /boot/initrd.img-2.6.24-2-generic

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd2,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=3711ea55-d8e8-4f02-94b0-b7cf300d3b5c ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root (hd2,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=3711ea55-d8e8-4f02-94b0-b7cf300d3b5c ro single
initrd /boot/initrd.img-2.6.22-14-generic

title Ubuntu 7.10, memtest86+
root (hd2,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.
title Ubuntu 7.10, kernel 2.6.22-14-generic (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=b0c7f330-a01a-4043-9e79-ca80e6b2251f ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.
title Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode) (on /dev/sda1)
root (hd0,0)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=b0c7f330-a01a-4043-9e79-ca80e6b2251f ro single
initrd /boot/initrd.img-2.6.22-14-generic
savedefault
boot


# This entry automatically added by the Debian installer for an existing
# linux installation on /dev/sda1.
title Ubuntu 7.10, memtest86+ (on /dev/sda1)
root (hd0,0)
kernel /boot/memtest86+.bin
savedefault
boot


The hard drive in question is the hd2,0 but it should be located at hd1,0. When I edit the grub menu for that adjustment I still get file not found.

- Garrett

#15 charolastra

    Member

  • Members
  • 23 posts

Posted 25 December 2007 - 09:42 PM

I'm confused - how did your old kernel boot if it's marked (hd2,0) as well? Are the (hd0,0) entries another installation on the ssd?

#16 garretwp

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 25 December 2007 - 11:34 PM

(hd2,0) should be (hd1,0) which is a usb hard drive. I have another ubuntu install on the ssd. I use the usb hard drive as a testing platform before I go and make any changes to my real ubuntu install that I use. When I installed ubuntu on the usb hard drive, it found another linux distro on the ssd and added it to the grub menu.

- Garrett

#17 charolastra

    Member

  • Members
  • 23 posts

Posted 26 December 2007 - 12:16 AM

So changing to (hd1,0) allows you to boot the old kernel on the usb drive right? Well I don't know what to tell you... make sure the ram disk got made... I'm out of ideas.

Is this familiar to anyone:
"sudo modprobe snd-hda-intel"
[ 3272.859160] ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 16 (level, low) -> IRQ 16
[ 3272.859224] PCI: Setting latency timer of device 0000:00:1b.0 to 64
[ 3272.949839] ACPI: PCI interrupt for device 0000:00:1b.0 disabled
[ 3272.949881] HDA Intel: probe of 0000:00:1b.0 failed with error -16

With the included snd-hda-intel module...

#18 garretwp

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 26 December 2007 - 03:54 AM

I gave it a shot and installed the new kernel on my ssd ubuntu install. The kernel does boot up fine with out issues. I do not know why I have issues with installed it on the usb hard drive. Now I just have to get the wireless and sound drivers compiled and working. So far everything seems to be working for suspend.

- Garrett

#19 garretwp

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 26 December 2007 - 08:05 AM

I am with charolastra. Where can we go about getting the files to compile to get the sound working?

- Garrett

#20 kevwalker

    Senior Member

  • Members
  • 123 posts

Posted 26 December 2007 - 03:51 PM

First off, thanks for all the great work here. I value this fix very much.

My only questions / concerns are:

1) What about kernel updates from Ubuntu? Should there be any pinning in order to preserve the fixed kernel?

2) Is there is any advantage to leaving the old kernels loaded and what would be the way to remove them?

3) I'm with everyone else wanting a sound fix.

Thanks again for the updates, suspend and usb-persist are much appreciated!

Edited by kevwalker, 26 December 2007 - 09:44 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users