LinuxQuestions.org
Register a domain and help support LQ
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, 12:47 PM   #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 12:51 PM.
 
Old 08-15-2006, 09:19 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,152

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
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, 10: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, 10:10 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,152

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
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 10:11 PM.
 
Old 08-15-2006, 10: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, 10:26 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,152

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
This will help.
https://ubuntu.wordpress.com/2005/09...run-at-bootup/
 
Old 08-15-2006, 10: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, 01: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:18 AM
make 'you are subscribed to this thread' a link nadroj LQ Suggestions & Feedback 5 02-03-2006 10:15 PM
No email notifications for replies or subscribed thread redhatrosh LQ Suggestions & Feedback 10 06-24-2005 11:01 AM
Loading kills me in cs (but not dod/tfc/hl) SuperCoolAl Linux - Games 3 03-26-2004 03:40 AM


All times are GMT -5. The time now is 01:28 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration