LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-21-2008, 02:14 PM   #31
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 2,658
Blog Entries: 3

Rep: Reputation: 222Reputation: 222Reputation: 222

Quote:
Originally Posted by Drakeo View Post
this sounds may be different but in bios do you have a setting for the mouse and is it set to both or just touch pad. this was a prblem once with a older laptop and I used a ps2 touch pad on it. pluss the onboard mouse. so I guess yours is a on board mouse pad so while your in there set you bios to none operating system. or none windows if you have that option. Linux is not good at controlling bios. but can read them and kinda and work with the acpi
I would also like to say thank you for helping us with detailed
data that you posted.
 
Old 12-21-2008, 02:43 PM   #32
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Drakeo View Post
this sounds may be different but in bios do you have a setting for the mouse and is it set to both or just touch pad. this was a prblem once with a older laptop and I used a ps2 touch pad on it. pluss the onboard mouse. so I guess yours is a on board mouse pad so while your in there set you bios to none operating system. or none windows if you have that option. Linux is not good at controlling bios. but can read them and kinda and work with the acpi
I'm not sure I'm following you. I now have my mice working correctly. Are you suggesting this might be connected to the hibernate?
 
Old 12-21-2008, 04:28 PM   #33
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
Is it just me or rob.rice's and Drakeo's posts are out of topic? It looks like another thread posts interfere with that thread. Maybe some moderator could check it? Especially funny is post #31 in which Drakeo thanks to himself.

Perhaps we discovered a bug in LinuxQuestions.org...

***

I have fresh installation of Slackware 12.2 with default huge kernel so I tested suspend.sh and hibernation.sh scripts. The second works well. The first works in X Window mode but in console mode it blanks the screen permanently so I should reboot machine to restore the system. I don't know why you have problems with the second script. On my systems it works properly.

***

Quote:
The step at which it failed was actually shutting down. It started to hibernate but instead of shutting down, I was returned immediately to my desktop.
Which one window manager you use? Did you try hibernate the system in console mode?

Last edited by w1k0; 12-21-2008 at 06:12 PM.
 
Old 12-21-2008, 06:26 PM   #34
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by w1k0 View Post
Is it just me or rob.rice's and Drakeo's posts are out of topic? It looks like another thread posts interfere with that thread. Maybe some moderator could check it? Especially funny is post #31 in which Drakeo thanks to himself.
Well, rob.rice's post was related to one of my original questions.

Quote:
Originally Posted by w1k0 View Post
I have fresh installation of Slackware 12.2 with default huge kernel so I tested suspend.sh and hibernation.sh scripts. The second works well. The first works in X Window mode but in console mode it blanks the screen permanently so I should reboot machine to restore the system. I don't know why you have problems with the second script. On my systems it works properly.

***



Which one window manager you use? Did you try hibernate the system in console mode?
I'm using KDE. I switched to run-level 3 and did the hibernate key combination (still have not tried calling the script from the command line). It did shut down. When re-starting, it did a regular boot, not a resume.

Hmm, the append I know I added to my lilo.conf appears not to be there anymore. I will try adding it back in and see what happens.
 
Old 12-21-2008, 06:57 PM   #35
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
Quote:
Well, rob.rice's post was related to one of my original questions.
My apologies, rob.rice...

Quote:
Hmm, the append I know I added to my lilo.conf appears not to be there anymore. I will try adding it back in and see what happens.
Do you have one long append such as:

Code:
append="vt.default_utf8=0 resume=/dev/sda8 acpi_sleep=s3_bios,s3_mode libata.atapi_enabled=1 combined_mode=libata"
Or you have a few appends such as:

Code:
.
.
.
append="vt.default_utf8=0"
.
.
.
append="resume=/dev/sda8"
.
.
.
I'm not sure but it seems to me that valid method is to use one append.

Last edited by w1k0; 12-21-2008 at 07:00 PM.
 
Old 12-21-2008, 07:42 PM   #36
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Original Poster
Rep: Reputation: 31
Ah yes. I found an append was already in my lilo.config that I didn't notice before.

In your long append, you had some other parameters, such as acpi_sleep. How did you determine to add those?
 
Old 12-21-2008, 09:24 PM   #37
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
Quote:
Ah yes. I found an append was already in my lilo.config that I didn't notice before.
And now hibernation works?

Quote:
In your long append, you had some other parameters, such as acpi_sleep. How did you determine to add those?
After installation of Slackware 12.1 I had problem with DMA. Hard drive was painfully slow and I couldn't turn DMA on. I sought for the solution in Internet. I found that tip: http://thomer.com/howtos/dma_on_sata_dvd.html. I implemented it. DMA started to work.

During further researches I found that it's enough to set Config | Serial ATA (SATA) | Sata Controller Mode Option in BIOS to AHCI before installation of the system. With that option set to Compatibility system recognizes hard drive as /dev/hda and DMA doesn't work. With that option set to AHCI system recognizes hard drive as /dev/sda and DMA works. In my laptop there was no problem with CD-ROM and DMA.

Then I tested these magic switches to the append option and I stated all of them are unnecessary. Sometimes I disable them and sometimes I enable them. By accident when I wrote the last post these switches were enabled.

Maybe they do something but my tests show that these switches have noting to DMA.

***

Well... I found that page: http://www.thinkwiki.org/wiki/Proble...el_915.2F945GM.

It's about blank screen after suspending the system. It suggest to use acpi_sleep=s3_bios kernel parameter. So at least that one parameter is necessary.

Last edited by w1k0; 12-21-2008 at 11:33 PM.
 
Old 12-22-2008, 09:09 AM   #38
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Original Poster
Rep: Reputation: 31
I put the resume= in the right place and was able to hibernate and resume. However, my wireless did not come back on line when I resumed (this also happened after a suspend).

Should I unload the ath_pci kernel module and re-load it after resume to revive my wireless or is there a method requiring less brute force?

I have also noticed that my screensaver does not start automatically after a period of inactivity. In the display settings in KDE I have set the screensaver to start after 5 min of inactivity.
 
Old 12-22-2008, 01:50 PM   #39
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
Quote:
I put the resume= in the right place and was able to hibernate and resume.
Bingo!

***

On my old ThinkPad T40 with Slackware 10.1 and kernels from 2.4.22 to 2.4.29 I used combination of two scripts to suspend the system:

suspend
Code:
#!/bin/sh


IP="`/sbin/ifconfig | grep 'Bcast:' | cut -d ':' -f 1-2 | sed 's/inet addr://;s/ Bcast//;s/ //g'`"
export IP

suspend.sh
suspend.sh
Code:
#!/bin/sh

PATH="$PATH:/usr/sbin:/sbin"

# removes usb-storage module or exits
if lsmod | grep usb-storage > /dev/null
then
        rmmod usb-storage || {
                echo "USB storage device in use."
                df
                exit 1
        }
fi

# removes printer module or exits
if lsmod | grep printer > /dev/null
then
        rmmod printer || {
                echo "USB printer driver in use."
                exit 1
        }
fi

# shuts down interface eth0 (net)
ifconfig eth0 down

# kills processes accessing /dev/dsp and /dev/dvd (sound and video)
fuser -k /dev/dsp
fuser -k /dev/dvd

# kills pppd process (internet)
if grep [0-9] /var/run/ppp0.pid &> /dev/null
then
    killall -HUP pppd
fi

# stops hotpluggable subsystems
/etc/rc.d/rc.hotplug stop

sleep 1

# ejects pcmcia card
cardctl eject

# kills slmodemd process (modem)
if ps ax | grep slmodemd | grep -v grep > /dev/null
then
        killall slmodemd
        SLMODEM="used"
fi

sleep 2

# removes module slamr (modem)
if lsmod | grep slamr > /dev/null
then
        rmmod slamr
fi

# changes foreground virtual terminal to 1
chvt 1

# flushes filesystem buffers
sync

# puts the machine into suspend mode
apm -s

sleep 2

# changes foreground virtual terminal to 7
chvt 7

# activates interface eth0 (net)
#ifconfig eth0 up

# restores network connection
if [ "$IP" == "81.168.156.135" ]
then
    /etc/rc.d/network.d/rc.dsl
fi

# restores local network
if [ "`echo $IP | grep 192.168.1 | grep -v grep`" != "" ]
then
    /etc/rc.d/network.d/rc.home3
fi

# starts hotpluggable subsystems
/etc/rc.d/rc.hotplug restart

# loads slmodemd driver (modem)
if [ "$SLMODEM" == "used" ]
then
    /usr/sbin/slmodemd --country=POLAND /dev/slamr0 &>/dev/null &
fi
The first script exported IP number to the second one. The second stopped different services, suspended the system, and then restored services. Actual suspend command was humble apm -s in 67 line of suspend.sh script. These two scripts were a part of sophisticated configuration including rc.dsl script to start DSL connection, rc.home3 script to start local network etc.

So if you feel you need stop and start some services in your hibernate.sh and suspend.sh scripts just do it.

(ACPI manages with devices better than APM so there is no need to stop and start a lot of services explicitly but sometimes it can be necessary.)

Last edited by w1k0; 12-22-2008 at 02:05 PM.
 
Old 12-22-2008, 06:14 PM   #40
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Original Poster
Rep: Reputation: 31
So, if a script has more commands after the one that suspends or hibernates the system, when the system resumes it continues the script from that point on?

In the case of my wireless, wicd is still reporting that I'm connected to my router, yet I can not connect to anything. When a disconnect (also via wicd) and reconnect, my wireless fails to reconnect.
 
Old 12-22-2008, 08:15 PM   #41
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
1. Yes, the script continues work after resume.

2. So stop wicd before suspend/hibernate commands and start it after them.

Code:
/usr/sbin/wicd stop
echo -n mem > /sys/power/state
/usr/sbin/wicd start
Code:
/usr/sbin/wicd stop
echo -n disk > /sys/power/state
/usr/sbin/wicd start
***

Quote:
When a disconnect (also via wicd) and reconnect, my wireless fails to reconnect.
I observed similar problem with wicd and PPPOE connection. When I stop wicd and run pppoe-start it starts PPPOE but stops after few seconds with error messages. I need wait a few minutes after stopping wicd before I start PPPOE. It looks like wicd remains something in memory for a while.

Last edited by w1k0; 12-22-2008 at 08:21 PM.
 
Old 12-22-2008, 09:31 PM   #42
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by w1k0 View Post
2. So stop wicd before suspend/hibernate commands and start it after them.

Code:
/usr/sbin/wicd stop
echo -n mem > /sys/power/state
/usr/sbin/wicd start
Code:
/usr/sbin/wicd stop
echo -n disk > /sys/power/state
/usr/sbin/wicd start
***

I observed similar problem with wicd and PPPOE connection. When I stop wicd and run pppoe-start it starts PPPOE but stops after few seconds with error messages. I need wait a few minutes after stopping wicd before I start PPPOE. It looks like wicd remains something in memory for a while.
This didn't do the trick in my case. I did a "modprob -r ath_pci" followed by a "modprobe ath_pci" Initially I could not reconnect, but after a few minutes I could.

I have noticed that the suspend occasionally fails in strange ways. One time it did not resume. Power came back but the system didn't. After I rebooted, the Fn-F2 combination resulted in a freeze with my caps-lock LED blinking at me.

I see that slackbuilds.org has a hibernate script for use with tuxonice-patched kernels. How would I determine if my kernel had this patch?
 
Old 12-22-2008, 09:47 PM   #43
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
I just started to configure Slackware 12.2. I will report my experiences with ACPI soon. Just like you I noticed once some problem with suspend and hibernation scripts. I will test it in the nearest future.
 
Old 12-27-2008, 03:51 PM   #44
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware, Mint
Posts: 1,240

Rep: Reputation: 196Reputation: 196
If you'd like to use ``multimedia'', ``browser'', ``Windows'', and ``Menu'' keys in Slackware 12.2 with Window Maker or any similar window manager follow post #20 and put in ~/.xinitrc file that command:

Code:
xmodmap ~/.Xmodmap
/usr/bin/wmaker
The methods described in post #20 work with Slackware 12.1. With Slackware 12.2 you need modify ~/.xinitrc.

***

If you'd like to use ``multimedia keys'' in KDE look at that post: http://www.linuxquestions.org/questi...n-keys-693318/. Follow the section ``Slackware 12.2'' and omit steps 4 and 5.

Last edited by w1k0; 12-27-2008 at 07:19 PM.
 
Old 12-27-2008, 05:21 PM   #45
statguy
Member
 
Registered: Sep 2004
Location: Ontario, Canada
Distribution: Slackware 14.1, 13.37
Posts: 332

Original Poster
Rep: Reputation: 31
Thanks for that link w1k0.

Have you got your suspend/hibernate scripts working right?
 
  


Reply

Tags
acpi, hibernate, keyboard, shortcuts, suspend, t60, thinkpad


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
Slackware 11.0 Install/confg Issues midas Linux - Laptop and Netbook 2 04-06-2007 10:42 AM
Slackware 10 Install Issues GT_Onizuka Slackware 5 09-04-2004 06:12 PM
mysql++ install issues on slackware 9 compupurdy Linux - Software 2 01-12-2004 09:44 PM
New to Slack, lots of niggly problems. BongFish Slackware 9 09-22-2003 09:15 AM
slackware 9 install issues AlteZza2k2 Linux - Software 4 09-11-2003 04:27 PM


All times are GMT -5. The time now is 05:44 AM.

Main Menu
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