LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 08-15-2006, 11:47 AM   #1
kaens
LQ Newbie
 
Registered: Feb 2005
Posts: 19

Rep: Reputation: 0
loading lt_hotswap on boot kills ibm_acpi: Thinkpad T30


Alright, so I have a Thinkpad T30 - and Ubuntu works awfully nice under it. I did notice, however, that the system would freeze if I hotswapped an optical drive for a battery in the Ultra-bay slot.

There is a module called lt_hotswap that monitors the slot, and sends the eject command to ibm_acpi (I do believe) if the release lever is pulled. It works perfectly fine if I load it when my system is already booted.

I'd really like to have this loaded at boot time though - so I added lt_hotswap to /etc/modules, and the one configuration option it has to /etc/modules.d/options as options lt_hotswap auto_eject=1.

That should load the module on boot, right? And it does.

dmesg | grep hotswap produces


[17179849.068000] Laptop ultrabay hotswap driver version 0.3.6 [17179849.068000] lt_hotswap: '\_SB.PCI0.LPC.EC.BAT1' found (Hot-Swappable) [17179849.068000] lt_hotswap: '\_SB.PCI0.IDE0.SCND.MSTR' found (Hot-Swappable) [17179849.068000] lt_hotswap: '\_SB.PCI0.PCI1.DOCK.IDE1.PRIM.MSTR' found (Non-Swappable) [17179849.068000] lt_hotswap: '\_SB.PCI0.LPC.FDC.FDD0' found (Hot-Swappable) [17179849.068000] lt_hotswap: '\_SB.PCI0.PCI1.DOCK' found (Hot-Swappable)


However, when it boots, /proc/acpi/ibm is entirely missing. The /dev/ files didn't get made, and dmesg | grep ibm produces:


ibm_acpi: IBM ThinkPad ACPI Extras v0.12a ibm_acpi: http://ibm-acpi.sf.net/ ibm_acpi: dock device not present ibm_acpi: acpi_install_notify_handler(bay) failed: 7


I found out that lt_hotswap needs to be loaded after all other ACPI modules are loaded, and I suspect that this is the problem. Any confirmation on that? I've also read that udev does not load modules in any specific order - so is there any way around this other than adding something to xinitrc or bashrc (or wherever would be appropriate) or running a script on login? That seems like an ugly solution to me, but I'll do it if I need to - It does work seamlessly if it's loaded after boot.

Sigh.

Any feedback would be appreciated.
I found out that lt_hotswap needs to be loaded after all other ACPI modules are loaded, and I suspect that this is the problem. Any confirmation on that? I've also read that udev does not load modules in any specific order - so is there any way around this other than adding something to xinitrc or bashrc (or wherever would be appropriate) or running a script on login? That seems like an ugly solution to me, but I'll do it if I need to - It does work seamlessly if it's loaded after boot.

Sigh.

Any feedback would be appreciated.

Last edited by kaens; 08-15-2006 at 11:51 AM.
 
Old 08-15-2006, 08:19 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893
So what distribution are you running? Fedora/Redhat and derivatives have a rc.local file which is the last script to run prior to log in. If not then you would need to configure a script to run via init.d. s99xxxxx would be the last script to run in a rcx.d. Which rcx.d (runlevel) depends on distro.
 
Old 08-15-2006, 09:01 PM   #3
kaens
LQ Newbie
 
Registered: Feb 2005
Posts: 19

Original Poster
Rep: Reputation: 0
I'm running Ubuntu Dapper. . . so, runlevel 6?
 
Old 08-15-2006, 09:10 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893
Ubuntu is based on debian so I would assume runlevel 2 is default.
FYI:
runlevels
0 (halt the system) standard for all distributions
1 (single-user mode) standard for all distributions
2 through 5 (various multi-user modes) depends on distribution.
6 (reboot the system) standard for all distributions

Last edited by michaelk; 08-15-2006 at 09:11 PM.
 
Old 08-15-2006, 09:20 PM   #5
kaens
LQ Newbie
 
Registered: Feb 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Ahh, thanks. I haven't done much readup on the rc scripts and how they work (as probably made apparent by my misthinking that the runlevel for reboot was the one for some multi-user mode) - I'm about to though.

Time to go hit up the ubuntu site to see what they have to say about how to customize their rc scripts....

Thanks for the point in the right direction!
 
Old 08-15-2006, 09:26 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893Reputation: 5893
This will help.
https://ubuntu.wordpress.com/2005/09...run-at-bootup/
 
Old 08-15-2006, 09:33 PM   #7
kaens
LQ Newbie
 
Registered: Feb 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Sweet - good info, with links to more good info.

Thanks again!

Off to test!
 
Old 08-17-2006, 12:46 PM   #8
kaens
LQ Newbie
 
Registered: Feb 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Nice - making a one-line script that loads the module, and then running update-rc.d <scriptname> defaults works fine.

Peter Fruhberger on the linux-thinkpad mailing list says that the following will fix it as well (I haven't tested this yet)

Quote:
I fixed it following (it just works *G*):

in /etc/modprobe.d/

I created a new file called lt_hotswap
with:

option lt_hotswap auto_eject=1
install lt_hotswap /sbin/modprobe ibm_acpi; /sbin/modprobe --ignore-install
lt_hotswap
 
  


Reply

Tags
module, udev



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
You are subscribed to this thread Connection reset by peer (S: vsftpd, C: gftp) baosheng Linux - Networking 1 05-13-2006 10:18 AM
make 'you are subscribed to this thread' a link nadroj LQ Suggestions & Feedback 5 02-03-2006 09:15 PM
No email notifications for replies or subscribed thread redhatrosh LQ Suggestions & Feedback 10 06-24-2005 10:01 AM
Loading kills me in cs (but not dod/tfc/hl) SuperCoolAl Linux - Games 3 03-26-2004 02:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 08:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration