Gsynaptics loses settings on resume

Bug #303595 reported by Victor Trac
116
This bug affects 19 people
Affects Status Importance Assigned to Milestone
gsynaptics (Debian)
Fix Released
Unknown
gsynaptics (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Karmic by Jeremy Nickurak

Bug Description

Binary package hint: gsynaptics

On my Dell D630 with an Alps touchpad, my custom gsynaptics settings are lost after resuming from a sleep state. I would expect that the settings are persistent until I change them again, after all resumes and reboots.

Ubuntu 8.10
gsynaptics version : 0.9.14-6

Revision history for this message
NTA (sakovias) wrote :

I have the same issue. After resume from suspend gsynaptics forgets settings.

Dell Inspiron 1420
Ubuntu 8.10
gsynaptics 0.9.14-6

Revision history for this message
Hans-Peter Klett (hpklett) wrote :

Same issue

Dell Latitude D620
Intrepid

Revision history for this message
Victor Trac (victor-trac) wrote :

I found that the problem is gsynaptics-init needs to be run upon resume. You can do this manually in the CLI, but probably a better way is to add this to the acpi resume scripts upon installation of gsynaptics (or maybe make gsynaptics installed be default and already include this script?).

Revision history for this message
robled (robled) wrote :

Can also reproduce this on Intrepid. GSynaptics is pretty much required for my Dell Studio 15n and its Alps touchpad. Without GSynaptics the touchpad is too slow to be usable. I don't see any reason why GSynaptics shouldn't be installed by default on any laptop. Why wouldn't a user want to configure their touchpad separate from their mouse?

Can anyone show me the correct way to edit the resume scripts to get this to work automagically?

Revision history for this message
Florian Schricker (fschricker-gmail) wrote :

I'd be interested in any pointers on how to write some resume script(s), too.

Revision history for this message
robled (robled) wrote :

After some trial and error I cooked up a resume script:

/etc/pm/sleep.d/90-gsynaptics-init

Remember to make it executable. Let me know if it works for you.

Revision history for this message
NTA (sakovias) wrote :

NTolerance, thanks for your input. I tried the script following your instructions, but unfortunately it didn't work for me. How can I check what goes wrong?

Revision history for this message
BurakkuChi (burakkuchi) wrote :

NTolerance,
  For some reason, I couldn't get the same script you wrote to work. I slightly modified it and ended with:

--------
#!/bin/sh

RUNUSER=`who | grep tty | sed 's/\([a-z]*\).*/\1/'`

touchpad_init()
{
    sleep 5
    DISPLAY=:0.0 su ${RUNUSER} -c 'xhost +'
    DISPLAY=:0.0 su ${RUNUSER} -c '/usr/bin/gsynaptics-init --sm-disable'
    DISPLAY=:0.0 su ${RUNUSER} -c 'xhost -'
}

case "$1" in
    thaw|resume)
 touchpad_init &
    ;;
esac

exit 0
--------

I don't see any major differences, but it seems to work. Also, I added $RUNUSER because it seems that sometimes, I'm logged in under tty9 instead of tty7. There should be a better way to get the user that is resuming though. <shrug>

Revision history for this message
NTA (sakovias) wrote :

BurakkuChi,
thanks: works for me :)

Revision history for this message
BurakkuChi (burakkuchi) wrote :

FYI, I didn't try until after everything was working, but you don't need the lines with 'xhost' in it. So you can just use the following:

--------
#!/bin/sh

RUNUSER=`who | grep tty | sed 's/\([a-z]*\).*/\1/'`

touchpad_init()
{
    sleep 5
    DISPLAY=:0.0 su ${RUNUSER} -c '/usr/bin/gsynaptics-init --sm-disable'
}

case "$1" in
    thaw|resume)
        touchpad_init &
    ;;
esac

exit 0
--------

I guess this works because it runs the function touchpad_init() in the background, exits the script, and allows X to startup before it runs gsynaptics-init.

Revision history for this message
joseff (joseff) wrote :

Confirming that BurakkuChi's fix works
Compaq Presario V3000

Revision history for this message
eneeng (woofroggie) wrote :

BurakkuChi's fix does work for me sometimes. After resuming from suspend, my saved touchpad settings in gsynaptics are loaded. However, after several suspend cycles, both touchpad and keyboard no longer work upon resuming from suspend. At this point, i have to reset my dell laptop.

Revision history for this message
nathan (ferrisn) wrote :

upgraded to 9.04 and I still have this bug

gsynaptics version is 0.9.14-8

I'm going to try the script discussed above, but it's just a workaround. Is there any effort underway to fix the problem so that we don't need the script to make it work? Seems like gsynaptics shouldn't forget it's settings in the first place.

Revision history for this message
nathan (ferrisn) wrote :

After suspending and resuming a couple of times the script works for me

Revision history for this message
Miloš Mandarić (mandzo18) wrote :

I have this issue in Ubuntu 9.10.

Revision history for this message
Jeremy Nickurak (nickurak) wrote :

I also get this issue switching to a text console (ctrl-alt-F1) and back (alt-F1).

Revision history for this message
Jason Straight (jason-jeetkunedomaster) wrote :

I just wrote a script for /etc/pm/sleep.d that will run gsynaptics-init for all users with an X session running, so it won't matter if you're running multiple X sessions :), everyone can have their own settings, and won't cause a delay with the sleep command while waiting for X to resume.

Here it is if anyone wants to work/tweak or include it with the gsynaptics package:

#!/bin/bash

# Only run on resume/thaw
if [[ ${1} =~ (thaw|resume) ]] ; then

  synaptics() {

    # sleep to give time for X
    sleep 4s

    who | while read line ; do
      a=(${line})
      regex="^:[[:digit:]]"
      if [[ ${a[1]} =~ $regex ]] ; then
        init="sudo -H -u ${a[0]} DISPLAY=${a[1]} gsynaptics-init"
      fi
    done
  }

  # run in background so sleep doesn't hold up resume
  synaptics &
  # disown the job so exiting shell doesn't kill function
  disown %1

fi

Revision history for this message
Jason Straight (jason-jeetkunedomaster) wrote :

oops - I pasted the one that had the eval removed for debugging :) the if statement should read:

if [[ ${a[1]} =~ $regex ]] ; then
        init="sudo -H -u ${a[0]} DISPLAY=${a[1]} gsynaptics-init"
        eval "${init}"
      fi

Revision history for this message
Pedro Ângelo (pangelo) wrote :

I can also confirm this issue on an up to date karmic install on an Apple MAcbook Pro 5,1 with the applesmc driver. The provided script fails to restore the tochpad settings on resume.

Also, the script version on https://help.ubuntu.com/community/SynapticsTouchpad is missing the shebang line on top (#! /bin/bash) and without it the script doesn't let the machine suspend.

Without the script, running gsynaptics-init on a shell after resume restores the touchpad settings properly.

This issue might have something to do with comment #4 on bug #399902 and this message on /var/log/messages:

applesmc: device has already been initialized (0xe0, 0xf8).

Revision history for this message
Jeremy Nickurak (nickurak) wrote :

One of the most visible regressions from Jaunty I can see.

Revision history for this message
dertimo (dertimo) wrote :

Same problem here on acer travelmate 2420 for ubuntu 9.10b

Revision history for this message
Jason Straight (jason-jeetkunedomaster) wrote :

Pedro Ângelo,

I added the script I wrote to https://help.ubuntu.com/community/SynapticsTouchpad, but the wiki formatting system kicked out the #!/bin/bash for some reason.

Did you get it to run okay after adding the magic line? I've been running it on mine now since I wrote it without any issues.

Revision history for this message
dertimo (dertimo) wrote :

Jason Straight,

thanks to your script, my touchpad-config now loads after boot.
I still have to manually start gsynaptics-init after switching consoles.

Revision history for this message
calbaker (calbaker) wrote :

Same problem. Ubuntu 9.10, Dell Latitude D630.

I added the script on the wiki, but it does not work for me. I might have messed around with the shmconfig files a while back. Could this have screwed anything up?

Thanks.

Revision history for this message
Spork (590rkb0y) wrote :

NTolerance's script seems to work as-is on my HP Pavillion dv2710us with 9.10

Revision history for this message
calbaker (calbaker) wrote :

How can I know if I correctly made the script executable? I'm not sure I did that right. I tried to do it with the GUI from within Nautilus.

Revision history for this message
Spork (590rkb0y) wrote :

ls -lh on that file should show a section that says -rwxr-xr-x. the x's are what you're looking for.
sudo chmod a+x
will definitely do it.

I used:
cd /etc/pm/sleep.d/
sudo wget http://launchpadlibrarian.net/22506354/90-gsynaptics-init
chmod a+x 90-gsynaptics-init
There may be a 'better' way, but if you don't know what you're doing, this will get it.

Revision history for this message
calbaker (calbaker) wrote :

That totally worked! Thanks.

Changed in gsynaptics (Debian):
status: Unknown → New
Revision history for this message
Paddy Launch (paddylaunch-deactivatedaccount) wrote :

Can confirm this is still broken under Lucid Lynx. It's particularly frustrating, as I'm only using gsynaptics in the first place to completely disable the touchpad since that functionality has been removed from Mouse Preferences.

Revision history for this message
Paddy Launch (paddylaunch-deactivatedaccount) wrote :

NTolerance's script works out of the box as described above by Spork. Thanks!

Jason Straight - your script won't work on my system because the output of 'who' looks like this:

paddy tty7 2010-04-15 09:50 (:0)
paddy pts/0 2010-04-15 10:46 (:0.0)
paddy pts/1 2010-04-15 10:34 (:0.0)

so the regex will never match.

Revision history for this message
robled (robled) wrote :

It's cool to see that my script has continued to be useful to some, but as pointed out earlier it does have a major limitation in that if you're not on tty7 the script won't work. I've attached a new script which might be a small improvement, but it's completely untested. It's based on my assumption that in the output of the "who" command, the (:0) denotes DISPLAY 0, which should be the logged-in X11 user.

How this will interact with multiple X11 users on DISPLAY 0 (Gnome switch user feature?), I have no idea. Since I no longer own the troublesome laptop in question, I haven't needed this script, but if anyone wants to test this new script I'd like to know if it works.

Revision history for this message
Isaac Kriegman (zackriegman) wrote :

Also broken in Kubuntu 10.04.

Multiple settings are lost on resume. Mostly I want to turn the tap-clicking off. I can do that by unchecking the tap-click option. I can also do it by setting the times so low that its impossible to tap quickly enough, or accurately enough. Both of these approaches work until I suspend and resume, in which case the settings are lost.

Revision history for this message
mbrennwa (mbrennwa) wrote :

I am also affected by this bug. If I set my Touchpad "tapping" to "off", it will be "on" after resume. This is with Ubuntu 10.04 on a MacBook. This is a serious issue, because it is virtually impossible to work with my laptop with the "tapping" enabled, and the tapping is so sensitive. This is not just "not so nice", it's a serious usability issue and should therefore be taken care of soon. How can I convince somebody to fix this?

Revision history for this message
wyrless2002 (wyrless2002) wrote :

I confirm this issue with Dell XPS M1530 / Alps touchpad in Lucid. I can also confirm that NTolerance's script via Spork's instructions fixed the problem for me (posts #6; #27). Thanks to EVERYONE that has been working on this so far for your efforts. I hope that this can be written in to an update that will fix everyone else's problems with this on differing hardware.

Changed in gsynaptics (Debian):
status: New → Confirmed
Revision history for this message
Phillip Susi (psusi) wrote :

This package has been removed from Ubuntu. Closing all related bugs.

Changed in gsynaptics (Ubuntu):
status: New → Invalid
Changed in gsynaptics (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.