Comment 26 for bug 492782

Revision history for this message
DBooth (david-dbooth) wrote : Re: Mouse cursor disappears after restarting screen (xrandr / resume)

This bug also affects me, on Dell Studio 15, Ubuntu 10.04. For a while, the workaround at
https://bugs.launchpad.net/ubuntu/+bug/554438/comments/21
was effective, but recently ctrl-alt-f7 started completely freezing my display, forcing me to power-off reboot. ( I have not yet found a workaround for that problem, but for the moment I am assuming that that is a separate issue.)

The workaround of changing virtual desktops (via ctrl-alt-leftArrrow and ctrl-alt-rightArrow) does NOT work for me.

The partial workaround of making the pointer visible when ctrl is pressed is helpful, but not a full workaround:
https://bugs.launchpad.net/ubuntu/+source/acpi/+bug/64333/comments/2

The gedit workaround described at
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/492782/comments/3
*does* work for me, though it is inconvenient to be blindly trying to start up an instance of gedit after every suspend/resume cycle. To make it slightly more convenient, I modified the code at
https://bugs.launchpad.net/ubuntu/+bug/554438/comments/21
to run gedit automatically upon resuming. I did this by placing the following shell script (and remember to chmod +x 99_mousecursor) in /etc/pm/sleep.d/99_mousecursor

#!/bin/sh
case "${1}" in
  hibernate)
    #nothing
    ;;
  resume|thaw)
    # dbooth 2/21/11: this is a workaround for the mouse pointer being
    # invisible after suspend/resume, given that ctrl-alt-f7 now
    # freezes my display, so i can no longer use the workaround
    # described at
    # https://bugs.launchpad.net/ubuntu/+bug/554438/comments/21
    # The gedit workaround requires both a key press in gedit
    # and the pointer must be within the gedit window.
    /usr/bin/xrefresh -display ":0.0"
    /usr/bin/gedit --display :0.0
    ;;
  suspend)
    ;;
esac