Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Cursor speed resets after every suspend

  1. #1
    Join Date
    Nov 2012
    Beans
    265
    Distro
    Ubuntu 13.04 Raring Ringtail

    Cursor speed resets after every suspend

    Hi

    I got a problem with setting the cursor speed. I use the following setting for my needs:
    Code:
    xset m 2/1 4
    But whenever I suspend my computer, the settings reset and I have to do it all over again. is there a way to make it permanent?

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Cursor speed resets after every suspend

    Try adding that information to the xorg configuration files (instead of running xset). It should make it a permanent default. To do so, either add the releavant entries to your /etc/X11/xorg.conf file if you have one, or in the absence of an /etc/X11/xorg.conf file, create (with root privileges) the file /usr/share/X11/xorg.conf.d/50-mouse-acceleration.conf with the following content:
    Code:
    Section "InputClass"
    	Identifier "My Mouse"
    	MatchIsPointer "yes"
    	Option "AccelerationNumerator" "2"
    	Option "AccelerationDenominator" "1"
    	Option "AccelerationThreshold" "4"
    EndSection
    ...and log out and back in again to test. Review the /var/log/Xorg.0.log file to confirm that these settings were applied.

  3. #3
    Join Date
    Nov 2012
    Beans
    265
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Cursor speed resets after every suspend

    Hi, thanks for your suggestion. I added what you wrote to the /etc/X11/xorg.conf, but I'm still having the same problem...
    Here is the /var/log/Xorg.0.log
    Code:
    [    18.459] (II) evdev: Microsoft Comfort Mouse 6000: initialized for relative axes.
    [    18.459] (WW) evdev: Microsoft Comfort Mouse 6000: ignoring absolute axes.
    [    18.460] (**) Microsoft Comfort Mouse 6000: (accel) keeping acceleration scheme 1
    [    18.460] (**) Microsoft Comfort Mouse 6000: (accel) acceleration profile 0
    [    18.460] (**) Option "AccelerationNumerator" "2"
    [    18.460] (**) Option "AccelerationDenominator" "1"
    [    18.460] (**) Option "AccelerationThreshold" "4"
    [    18.460] (**) Microsoft Comfort Mouse 6000: (accel) acceleration factor: 2.000
    [    18.460] (**) Microsoft Comfort Mouse 6000: (accel) acceleration threshold: 4
    [    18.460] (II) config/udev: Adding input device Microsoft Comfort Mouse 6000 (/dev/input/mouse0)
    [    18.460] (**) Microsoft Comfort Mouse 6000: Applying InputClass "My Mouse"
    [    18.460] (II) No input driver specified, ignoring this device.
    [    18.460] (II) This device may have been added with another device file.

  4. #4
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Cursor speed resets after every suspend

    Did the mouse work properly on boot (with respect to cursor speed) but got reset after suspend again?

    What happens if you manually unload the psmouse module prior to suspending:
    Code:
    sudo modprobe -r psmouse
    ...then suspend and on resume, manually reload the module:
    Code:
    sudo modprobe psmouse
    ...are the settings maintained?

    What modules are currently loaded?
    Code:
    lsmod

  5. #5
    Join Date
    Nov 2012
    Beans
    265
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Cursor speed resets after every suspend

    No, it didn't work on boot.
    Nothing happens when unloading on suspend / loading on wake (cursor speed still resets).

    Code:
    Module                  Size  Used by
    psmouse                97626  0 
    arc4                   12608  0 
    md4                    12595  0 
    nls_utf8               12557  0 
    cifs                  435684  0 
    vesafb                 13828  1 
    pci_stub               12622  1 
    vboxpci                23194  0 
    vboxnetadp             25670  0 
    vboxnetflt             27613  0 
    vboxdrv               320455  3 vboxnetadp,vboxnetflt,vboxpci
    autofs4                38645  2 
    parport_pc             32701  0 
    ppdev                  17671  0 
    rfcomm                 69070  0 
    bnep                   19564  2 
    bluetooth             371874  10 bnep,rfcomm
    binfmt_misc            17468  1 
    nfsd                  279192  2 
    auth_rpcgss            54489  1 nfsd
    nfs_acl                12837  1 nfsd
    nfs                   180519  0 
    lockd                  93583  2 nfs,nfsd
    sunrpc                271025  6 nfs,nfsd,auth_rpcgss,lockd,nfs_acl
    fscache                58475  2 nfs,cifs
    joydev                 17377  0 
    hid_generic            12548  0 
    snd_usb_audio         149162  1 
    snd_usbmidi_lib        25070  1 snd_usb_audio
    gspca_pac7302          17481  0 
    usbhid                 53014  0 
    gspca_main             36692  1 gspca_pac7302
    hid                   101512  2 hid_generic,usbhid
    videodev              133390  2 gspca_main,gspca_pac7302
    kvm_amd                59958  0 
    kvm                   431315  1 kvm_amd
    snd_hda_codec_hdmi     41276  1 
    snd_cmipci             44561  2 
    snd_mpu401_uart        14169  1 snd_cmipci
    snd_hda_codec_realtek    51465  1 
    snd_opl3_lib           19131  1 snd_cmipci
    gameport               15435  1 snd_cmipci
    snd_seq_midi           13324  0 
    snd_seq_midi_event     14899  1 snd_seq_midi
    snd_hda_intel          48171  5 
    microcode              23518  0 
    snd_hda_codec         188738  3 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_intel
    snd_rawmidi            30095  3 snd_usbmidi_lib,snd_mpu401_uart,snd_seq_midi
    snd_hwdep              13602  3 snd_usb_audio,snd_hda_codec,snd_opl3_lib
    snd_pcm               102033  5 snd_usb_audio,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_cmipci
    k10temp                13126  0 
    snd_page_alloc         18710  2 snd_pcm,snd_hda_intel
    serio_raw              13413  0 
    edac_core              62312  0 
    edac_mce_amd           22617  0 
    snd_seq                61560  2 snd_seq_midi_event,snd_seq_midi
    snd_seq_device         14497  4 snd_seq,snd_rawmidi,snd_opl3_lib,snd_seq_midi
    snd_timer              29433  3 snd_pcm,snd_seq,snd_opl3_lib
    snd                    69141  32 snd_hda_codec_realtek,snd_usb_audio,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_usbmidi_lib,snd_hda_codec,snd_hda_intel,snd_mpu401_uart,snd_seq_device,snd_cmipci,snd_opl3_lib,snd_seq_midi
    fglrx                6732934  157 
    sp5100_tco             13979  0 
    i2c_piix4              22106  0 
    amd_iommu_v2           19025  1 fglrx
    soundcore              12680  1 snd
    mac_hid                13205  0 
    wmi                    19070  0 
    lp                     17759  0 
    parport                42299  3 lp,ppdev,parport_pc
    r8169                  67341  0 
    mii                    13934  1 r8169
    firewire_ohci          40060  0 
    pata_acpi              13038  0 
    firewire_core          64476  1 firewire_ohci
    pata_atiixp            13242  0 
    pata_jmicron           12758  0 
    crc_itu_t              12707  1 firewire_core
    ohci_pci               13561  0 
    ahci                   25819  2 
    libahci                31898  1 ahci

  6. #6
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Cursor speed resets after every suspend

    Quote Originally Posted by Thee View Post
    No, it didn't work on boot.
    Nothing happens when unloading on suspend / loading on wake (cursor speed still resets).
    Okay, remove the /usr/share/X11/xorg.conf.d/50-mouse-acceleration.conf file since its not working.

    Lets try this approach instead. Create the file /etc/pm/sleep.d/000fix_mouse_acceleration with the following content:
    Code:
    #!/bin/sh
    export DISPLAY=":0"
    case "$1" in
        thaw|resume)
            /usr/bin/xset m 2/1 4
        ;;
    esac
    ...save the file and make it executable. It will be run everytime the system resumes from suspend or hibernate and should re-set the mouse settings. Review the /var/log/pm-suspend.log file for errors/messages if it doesn't work.

  7. #7
    Join Date
    Nov 2012
    Beans
    265
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Cursor speed resets after every suspend

    Still the same.

    Code:
    Running hook /etc/pm/sleep.d/000fix_mouse_acceleration resume suspend:
    No protocol specified
    /usr/bin/xset:  unable to open display ":0"
    /etc/pm/sleep.d/000fix_mouse_acceleration resume suspend: Returned exit code 1.

  8. #8
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Cursor speed resets after every suspend

    Perhaps we need to export Xauthority as well. Change the /etc/pm/sleep.d/000fix_mouse_acceleration file to look like this:
    Code:
    #!/bin/sh
    username=MYUSERNAME
    userhome=/home/$username
    export XAUTHORITY="$userhome/.Xauthority"
    export DISPLAY=":0"
    case "$1" in
        thaw|resume)
            su -c $username "/usr/bin/xset m 2/1 4"
        ;;
    esac
    ...change MYUSERNAME to be your system username and try again. Refer to /var/log/pm-suspend.log for errors if it doesn't work.

  9. #9
    Join Date
    Nov 2012
    Beans
    265
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Cursor speed resets after every suspend

    Code:
    Running hook /etc/pm/sleep.d/000fix_mouse_acceleration resume suspend:
    No passwd entry for user '/usr/bin/xset m 2/1 4'
    /etc/pm/sleep.d/000fix_mouse_acceleration resume suspend: Returned exit code 1.

  10. #10
    Join Date
    Jun 2005
    Location
    Toronto, Canada
    Beans
    Hidden!
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Cursor speed resets after every suspend

    Can you post back the contents of your /etc/pm/sleep.d/000fix_mouse_acceleration file for a quick once-over? Something might be amiss in the file.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •