Display corruption when switching virtual terminals in Linux

5

1

I run Fedora (currently version 16, but this problem has been around a while) and occasionally when I switch virtual terminals (VTs) the new VT shows a corrupted version of some data that was previously displayed on the old VT. For example, if I was watching a youtube video in VT1 and press CTRL-ALT-F2 to switch to VT2, where I am logged in to a second X session, the X session doesn't show a login on a blank screen; it shows a login on a screen that appears to have a tiled corrupted version of the youtube video as wallpaper. Or maybe just gibberish.

Here is a sample. It's not clear in the photo because my phone's camera washes out the dialog box, but the unlock dialog box is properly drawn and everything works perfectly fine after unlocking the workstation.

enter image description here

I would like to find some way to prevent this from happening, as it's quite ugly and not to mention a security or privacy risk when two different users are sharing the same workstation and some random image isn't even on the screen anymore appears in the other session's lock screen.

In case it matters, I have a adeon HD 5800 Series video card and I'm using the stock Free AMD drivers that ship with Fedora.

How can I prevent this issue from happening, or at least force the screen to refresh on the lock screen so that this corruption doesn't stay on the screen?

I've tried playing with various screensavers and lock screen options and nothing seems to be able to prevent the corruption.

Mr. Shiny and New 安宇

Posted 2012-06-06T01:13:21.143

Reputation: 1 112

2I think you'd have to find a way to clear the framebuffer? But I don't know how to do this. – chrishiestand – 2012-06-13T20:48:56.773

Switching between text consoles in a Linux virtual machine When the CTRL + ALT + F1 key combination is used to switch to another text console (terminal) on a Linux virtual machine, the host switches to a text console instead of the guest. Resolution The CTRL + ALT combination is used by VMware to direct the keyboard input to the host. Press CTRL + ALT + Space , press the F1 key (or desired Function key) while still holding down CTRL + ALT – Khusen Asoy – 2012-06-16T17:21:05.857

@KhusenAsoy There is no virtualization, such as Xen or VMWare on my setup. – Mr. Shiny and New 安宇 – 2012-06-17T16:28:10.703

I think you should file a bug report.

– Cristian Ciupitu – 2012-06-19T00:00:20.390

Answers

3

I had the same problem with my Radeon HD 5800 series card. What I did to solve this issue was adding the following commands to the end of my grub boot command:

quiet nosplash nomodeset

Try it and see if it can fix the issue.

Nima G

Posted 2012-06-06T01:13:21.143

Reputation: 1 538

This appears to have worked around the problem for now, with the following drawbacks: switching VTs now takes much longer, and the text-mode VTs are using the old character mode instead of the higher-resolution mode they had when mode-setting was on. Oh well.... – Mr. Shiny and New 安宇 – 2012-06-20T18:16:05.760

Yes I have the same side effect but at least it's not forcing me to restart everytime i switch terminal. I'm glad it helped you. – Nima G – 2012-06-20T18:22:39.633

Well, it's not really a side effect... modeset's purpose is to set the high res mode on the console, so setting nomodeset is supposed to turn it off. If it fixes the corruption, well that is the side effect. :-) – Bryce – 2012-06-25T18:19:20.397

Also please note using nomodeset really is just sweeping the problem under the carpet, not actually fixing it. Anyone else with this same hardware is likely going to have the same problem and will have to figure out how to change this too. If you forward the bug upstream as outlined in my answer, you can get it fixed for real and for everyone, which would be way more awesome. – Bryce – 2012-06-25T18:22:11.597

4

The corruption you're seeing is uninitialized memory. There can be a lot of different underlying causes for this. There might be some kernel options that might result in working around it (e.g. using UMS instead of KMS via the nomodeset option), however those are all just workarounds, and it's hard to guess which would work.

Instead, let me explain how to file a bug report and get it fixed for real:

  1. Go to bugs.freedesktop.org and register an account
  2. Open a bug report. Here's a link with the component pre-filled:

    https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/Radeon

  3. Set Version to '7.7' or git

  4. Set Severity, Hardware, and OS as appropriate
  5. Summary should be something like "[HD 5800] Framebuffer corruption shown when VT switching in Fedora 16"
  6. In the Description, start with a short summary of the problem, no more than 2-3 sentences. Then put a full description (e.g. cut and paste what you wrote here).
  7. Identify characteristics of the problem:
    • Roughly when did it first start appearing? Or has it always been that way?
    • Does it happen every time? If not, what proportion of the time does it happen?
  8. After reproducing the problem, collect 'dmesg > dmesg.txt', /var/log/Xorg.0.log, 'lspci -vvnn > lspci.txt', and a couple photos of the screen showing the corruption. Attach all of these to the bug report.
  9. Follow up on any requests by the upstream developers

Bryce

Posted 2012-06-06T01:13:21.143

Reputation: 162

Yes, it's uninitialized memory, but I've essentially had this problem in Linux since a long time ago, in various forms, and I was hoping there was some workaround that solves this particular case. – Mr. Shiny and New 安宇 – 2012-06-20T14:32:38.783

1

I had this happening on an OpenSuse system some time ago, annoying, yes... but not fatal. It's mostly a driver issue, could be fixed in the next update, no telling. It only happens when you flip between 'framebuffers'.

Alas, I don't have any good information to pass on, as I've moved away from that distribution a while ago, and I can't honestly remember if I did anything about it. Flipping to a text console and back did change the pattern, sometimes clearing it, sometimes now. Fuzzy memory.

Searching a bit does show some promising information, this being the best:

Adding 'vga=normal' to your grub boot parameters seems to be a common fix, as it causes the graphics adapter to flip back to text mode, then back to graphics mode when you logout.

I'm not sure how Fedora handles the boot parameters, maybe someone can help us there.

vga=normal

lornix

Posted 2012-06-06T01:13:21.143

Reputation: 9 633

-2

This probably caused the version of your vga driver does not match the linux version of Fedora, so no image can not be displayed properly. you must install the vga driver to the version that matches the fedora linux.

I also tried vga diver that I install on linux ubuntu 11 could and when I install it on linux mint can not run.

Supri Adi

Posted 2012-06-06T01:13:21.143

Reputation: 31

3-1, he's using the drivers that ship with Fedora, so saying "does not match the linux version of Fedora" is … well, not the cause. – slhck – 2012-06-16T19:41:35.610

I am using the stock Fedora install with the free Radeon drivers that ship with it. There are no third-party drivers. And this has been happening to me since at least 2000, back when I used a Voodoo3, so I doubt it's a driver issue. – Mr. Shiny and New 安宇 – 2012-06-17T16:27:32.373

@Mr.ShinyandNew安宇 I'm pretty sure you can get Linux binaries of AMD's own drivers from their web site. – Dr Kitty – 2012-06-19T00:25:32.470

@TheElectricMuffin I could use binary drivers, but the reason I bought an AMD card is so that I don't have to... – Mr. Shiny and New 安宇 – 2012-06-19T12:25:10.153