LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-14-2006, 12:35 AM   #1
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Rep: Reputation: 63
Wowee!!! I Got Suspend2 To Work!!!! Quick question on compiling tho


Hey all,

I got suspend2 to work on my very old laptop; and I'm so amazed and happy you cannot believe.

Now I can do 'hibernate' gnu/linux style and not rely on my motherboards hibernate feature...which is awesome, cuz I get back 600 meg of hard drive space that compaq makes you designate for hibernate.

I'd post what I did, but, I want to dump my pc and do it again to be sure In time I may, but my pc uses "APM" and "ACPI" so I'm not sure how I'd write the tutorial.

I only have two minor issues as a result of suspend2:

One is my sound volume is muted...which is fine, I just put on my flux menu a command to /etc/rc.d/rc.alsa restart and I'm fine. It must be that suspend2 does not check asound.state on resume. No big deal.

The only other issue, which is a minor annoyance really, but I'd like to see if I can fix it is the following:

Would I need to recompile a kernel to do the following for my touchpad?

According to the touchpad driver's documentation,

Quote:
* The driver says "reset failed" and the touchpad doesn't work. What
can I do?

This problem has been reported for some Compaq models. It's
currently not known why it happens, but removing the reset command
from the driver appears to make it work. If you use a 2.4 linux
kernel, replace the contents of the ps2_synaptics_reset() function
in ps2comm.c with a "return TRUE;" statement. If you use a 2.6
linux kernel, remove the while loop in synaptics_query_hardware()
in the file drivers/input/mouse/synaptics.c in the linux kernel
source code.
This issue doesn't happen if I use compaq's hibernate feature, but it's the only flaw I have with suspend2. I don't lose my touchpad, but I do lose tap and drag, and the bottom right of the touchpad being a right click. Not really a big deal, as the laptop has mouse buttons.

So when this happens to me after every hibernate/suspend, and since I run fluxbox, I can just (ctrl alt bckspce) and be back into flux in under 30 seconds; then all of my touchpad features are back.

And believe me 30 seconds to restart "X" and 10 seconds to resume from hibernate is much better than the 6 minutes it takes for my laptop to come into "X" from being powered off And my laptop takes 4 minutes to power off LOL so you can see why I'm interested in hibernate mode

If I want to do this fix as described in the readme file of the touchpad driver, do I simply edit that file in a text editor, hit save and I'm done? Or do I need to edit the file and recompile my kernel. Or do I need a fancy program to edit a 'c' file.

I believe that this section here is the part of the file that the readme want's me to modify.

Quote:
static int synaptics_query_hardware(struct psmouse *psmouse)
{
int retries = 0;

while ((retries++ < 3) && psmouse_reset(psmouse))
printk(KERN_ERR "synaptics reset failed\n");

if (synaptics_identify(psmouse))
return -1;
if (synaptics_model_id(psmouse))
return -1;
if (synaptics_capability(psmouse))
return -1;

return 0;
}
Do I just put # signs and comment out that whole line? And save.


Any feedback greatly appreciated.
 
Old 07-14-2006, 03:07 PM   #2
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,809

Rep: Reputation: 2098Reputation: 2098Reputation: 2098Reputation: 2098Reputation: 2098Reputation: 2098Reputation: 2098Reputation: 2098Reputation: 2098Reputation: 2098Reputation: 2098
Quote:
Originally Posted by Old_Fogie
Would I need to recompile a kernel to do the following for my touchpad?

If I want to do this fix as described in the readme file of the touchpad driver, do I simply edit that file in a text editor, hit save and I'm done? Or do I need to edit the file and recompile my kernel. Or do I need a fancy program to edit a 'c' file.


Do I just put # signs and comment out that whole line? And save.
A c source file can be edited with any text editor, but you will need to recompile the kernel after. Also, comments are /* ... */ in c, # is for shell scripts.

So I think would want to change the function like this:
Code:
static int synaptics_query_hardware(struct psmouse *psmouse)
{
int retries = 0;
/*
while ((retries++ < 3) && psmouse_reset(psmouse))
printk(KERN_ERR "synaptics reset failed\n");
*/
if (synaptics_identify(psmouse))
return -1;
if (synaptics_model_id(psmouse))
return -1;
if (synaptics_capability(psmouse))
return -1;

return 0;
}
 
Old 07-15-2006, 06:36 PM   #3
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Original Poster
Rep: Reputation: 63
OK thankyou. I'll give that a shot. It takes my pc 4 hours to compile...wish me luck
 
Old 07-17-2006, 09:31 AM   #4
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Original Poster
Rep: Reputation: 63
ntubski:

Before I went thru and compile again, I decided to do a search on the net some more...

I wound up finding a way to get the synaptics touchpad in 2.6 kernels to act like they did in kernels 2.4. and thereby allowing me to not have to use this Synaptics driver.

I decided to give it a try just to see if the issue was related to the synaptics driver, or really my mouse that's built into the laptop.

Quote:
Problem:
~~~~~~~~

My Synaptics touchpad lost the ability of tap-to-click, scroll, etc.

Solution:
~~~~~~~~~

The easy solution is to pass psmouse.proto=imps on the kernel command line,
or proto=imps on the psmouse module command line. This will restore 2.4
behavior.
So I added this into my /etc/lilo.conf

append="psmouse.proto=imps"

then I get tap/drag without having to use the 'synaptics' driver for linux.

So far so good right, but on resume from hibernate, I get the same error, no tap and drag.

So I guess I do have this goofy mouse.

Now, if I do "rmmod psmouse -f" and then "modprobe psmouse proto=imps" then I get tap and drag.

I think I'd like to abandon using the synaptics driver and solely use this kernel append line as my solution. Less drivers running for this slow computer are better.

But here's my problem, hopefully you or someone else here might know how to do this,

How do I tell resume2 to "modprobe psmouse proto=imps"

I tried adding it to the common.conf file, it modprobe's the mouse but I don't think it's passing the 'proto=imps' argument to the mouse on resume.

I told resume2 to use the LoadModulesFromFile /etc/rc.d/rc.modules and I have that line in their and then it works,

unfortunately, resume2 tries to modprobe other lines of code in our /etc/rc.d/rc.modules file, lol, it tries to modprobe 'fi' and stuff like that too.

Anythoughts?
 
Old 07-18-2006, 01:38 PM   #5
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Original Poster
Rep: Reputation: 63
Solved my issue in an old thread here:

http://www.linuxquestions.org/questi...d.php?t=456475
 
Old 07-19-2006, 09:02 AM   #6
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Original Poster
Rep: Reputation: 63
Hi all,

so far so good on my touchpad.

but I'm having an issue with my "ALSA" and suspend2.

Sometimes, let's say 3 out of 5 hibernate/resumes my sound is gone. I run "/etc/rc.d/rc.alsa restart" and sometimes that will fix it. But more times than not, I have to either reboot or run 'alsaconf' and the script that alsaconf does get's me back up.

Is there some other script that alsaconf uses that I'm not aware of to restart my sound. There are paramaters in my asound.state file, and my /etc/modules.conf for my sound card.

Is there some kind of 'update modules' command or something to refresh my running moduels.

'cat /proc/modules' shows the sound card running, but for some reason the suspend locks it out.
 
Old 07-20-2006, 11:48 AM   #7
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,519

Original Poster
Rep: Reputation: 63
well,

I found a rude and crude way to fix this in case some1 get's a similar error:

I just made a script that when I resume, I run that does:

rmmod snd_es18xx -f
rmmod snd_hwdep -f
/etc/rc.d/rc.alsa restart

and then I have sound in a second or two.

So all's well on suspend2 front. Bye for now.
 
  


Reply


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
Quick question: Compiling a kernel to be used on another machine Fenster Fedora 2 07-15-2006 06:44 PM
Quick rant about kernel compiling :{ Danielallan Slackware 19 08-08-2004 07:07 PM
samba smb.config question (quick question) TheDOGG Linux - Networking 1 03-02-2004 08:19 AM
cannot get my logitech mx 700 to work (very close tho!) dave_blob Linux - Hardware 6 02-11-2004 02:08 AM
Compiling KDE 3.0 w/ multiple architecture flags (quick and easy question)? MatMan5959 Linux - Software 4 05-31-2002 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:36 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