Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ubuntu 12.04, 3.5.0-36-generic kernel through LTS Hardware Enablement stack. HD4600 GPU on top of an Intel Core i7-4770.

When I use the "Lock Screen" feature of the desktop, sometimes I will go back to the machine hours later and will see one of the following two glitches:

  • the screen is mostly black with a bunch of glitchy graphics on it. I can still move the mouse, can't click on anything though, and nothing happens.
  • the system looks unlocked (and if I remember correctly, the monitor is on). Whatever was on the screen before the lock is now fully visible, although you can't click on anything. This has showed my email inbox contents to the rest of the office more than once.

The OS hasn't actually frozen at this point. I usually open a TTY with (CTRL+ALT+F1) and run:

sudo stop lightdm
sudo start lightdm

and am able to resume work, even though all of the processes open before (like Firefox, skype etc) seem to be gone.

First of all, is this an known issue and can I fix it? Secondly, is there a log somewhere I could look at to see what the specific issue is? /var/log/lightdm didn't reveal much, but I might have been looking in the wrong place.

Any suggestions would be super welcome.

Workaround I stumbled upon: If someone else is running into this issue, there's no reason to reboot the machine when it happens. I think switching to a virtual tty with ALT+CTRL+F1 and then back to ALT+CTRL+F7 seems to fix the problem. Even better, you can avoid it altogether by locking the screen in X and then switching to tty1 when you want to leave the machine alone for some time. Switch back to X when you're back. Hasn't glitched out on me yet, probably because it forces some kind of "full refresh" every time you do it.

share|improve this question

2 Answers 2

Strange that you have issue with graphics normally it works out of the box without any issues. Install Intel Graphical Driver Installer and see if it helps

https://01.org/linuxgraphics/downloads/2013/intelr-linux-graphics-installer-version-1.0.1

share|improve this answer
    
Is 12.04 an option? It sounds like you'd need 13.04 for that driver to work. –  Alexandr Kurilin Jul 20 '13 at 20:28
    
My bad forgot that you were using 12.04 –  Roney Thomas Jul 21 '13 at 4:12

Edit: I wrote a script that works around it by detecting the screen state and automatically switching virtual terminals (same as a manual Ctrl+Alt+F-key sequence) at the right time. Try it out and let me know if it works. I don't use lightdm but maybe we can figure out a way to patch it in. You can get it on GitHub and follow the instructions to use it:

https://github.com/appleYaks/switcher


Old method: only works on laptop lid close.

If you're on a laptop, you can make the machine switch ttys automatically when you close and open the lid. This is how I fixed it. I'm not running Ubuntu, so YMMV:

Edit the file /etc/acpi/lid.sh and put the commands chvt 1 and chvt 7 in the right places.

grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
    . /usr/share/acpi-support/screenblank

    # this is the line we add to switch to tty1
    # when the laptop lid closes
    chvt 1

    if [ x$LID_SLEEP = xtrue ]; then
        pm-suspend
    fi
else
    # this is the other part of the pair,
    # that switches back to tty7 when the lid opens again
    chvt 7

Those two lines with chvt are the only changes to the file. I haven't yet found a way to fix it when the screen shuts off when idle, but I'm happy with this for now.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.