Resolution change with KVM switch on Precise

Bug #988290 reported by Andreas Heinlein
150
This bug affects 28 people
Affects Status Importance Assigned to Milestone
GNOME Screensaver
Expired
Medium
gnome-screensaver (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

I have a machine that shares monitor, keyboard and mouse with a second machine via a standard KVM-Switch (USB/VGA). After updating to precise beta yesterday, I noticed that, after having worked with the other machine for a while and switching back to the precise machine, screen resolution has changed to 800x600. Just opening "Monitors" from gnome-system-settings restores the original resolution of 1280x1024, you don't need to change anything.

This is reproducible, if you switch away from the machine long enough (I guess until the screensaver gets invoked) resolution will be changed when you come back. This was not the case with oneiric.

Is there some way to disable this behaviour?

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: xorg 1:7.6+12ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic i686
.tmp.unity.support.test.0:

ApportVersion: 2.0.1-0ubuntu5
Architecture: i386
CompizPlugins: [core,bailer,detection,composite,opengl,compiztoolbox,decor,move,grid,resize,snap,regex,gnomecompat,imgpng,vpswitch,place,text,mousepoll,session,animation,thumbnail,ezoom,workarounds,staticswitcher,switcher,fade,scale]
CompositorRunning: compiz
Date: Wed Apr 25 14:10:55 2012
DistUpgraded: Fresh install
DistroCodename: precise
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes, whatever it takes to get this fixed in Ubuntu
GraphicsCard:
 Intel Corporation 82945G/GZ Integrated Graphics Controller [8086:2772] (rev 02) (prog-if 00 [VGA controller])
   Subsystem: ABIT Computer Corp. Device [147b:108f]
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release i386 (20111012)
MachineType: PhoenixAward PhoenixAward
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.2.0-23-generic root=UUID=2e69dfbb-4dfc-4d2a-98ac-698951c48197 ro crashkernel=384M-2G:64M,2G-:128M quiet splash vt.handoff=7
SourcePackage: xorg
UdevDb: Error: [Errno 2] No such file or directory
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/01/2007
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: 6.00 PG
dmi.board.name: I-45C(Intel i945GC-ICH7)
dmi.board.vendor: http://www.abit.com.tw/
dmi.board.version: 0.2
dmi.chassis.type: 3
dmi.chassis.vendor: PhoenixAward
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvr6.00PG:bd10/01/2007:svnPhoenixAward:pnPhoenixAward:pvr6.0:rvnhttp//www.abit.com.tw/:rnI-45C(Inteli945GC-ICH7):rvr0.2:cvnPhoenixAward:ct3:cvr:
dmi.product.name: PhoenixAward
dmi.product.version: 6.0
dmi.sys.vendor: PhoenixAward
version.compiz: compiz 1:0.9.7.6-0ubuntu1
version.libdrm2: libdrm2 2.4.32-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.2-0ubuntu3
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.2-0ubuntu3
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu10
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Revision history for this message
Andreas Heinlein (aheinlein) wrote :
bugbot (bugbot)
affects: xorg (Ubuntu) → xorg-server (Ubuntu)
Bryce Harrington (bryce)
affects: xorg-server (Ubuntu) → xserver-xorg-video-intel (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xserver-xorg-video-intel (Ubuntu):
status: New → Confirmed
Revision history for this message
Andreas Heinlein (aheinlein) wrote :

No change with precise final (as of 04/30/12).

bugbot (bugbot)
tags: added: resolution
Revision history for this message
graemev (graeme-launchpad) wrote :

I also have a KVM but this does not need a 'switch' it happens if I simply leave the screen to go to sleep.

Revision history for this message
Erick Brunzell (lbsolost) wrote :

I see the same behavior still in Precise with all proposed updates applied as of May 13th. My graphics info is:

00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)

I'll be glad to perform any testing requested.

Revision history for this message
Duke Murden (dmurden) wrote :

I believe the behavior is caused by the timed lock of the session. If I lock the screen before switching the KVM the session retains the screen settings. But if I leave the screen unlocked, switch the KVM, and let the session get locked due to inactivity, then the resolution of the screen gets changed.

bugbot (bugbot)
tags: added: oneiric
Revision history for this message
Erick Brunzell (lbsolost) wrote :

Just noticed this AM that opening the terminal and typing "xrandr" also restores the proper resolution.

I hope to follow up on this when the 12.04.1 images begin to show up on the qa tracker. Shouldn't be long since the scheduled release date is August 23rd.

And bug 1010016 may be a duplicate of this.

Revision history for this message
Erick Brunzell (lbsolost) wrote :

@ Bryce,

This is killing me!

I need to perform both Quantal and 12.04.1 testing and constantly having to reset xrandr is kicking my butt!

What can we do?

12.04.1 should be very stable and usable!!!!!!!!!!!!!!!!!

At least change the status!

Revision history for this message
AMSlider (dan-deeog) wrote :

Hi all,

I have the same issue with a Nvidia card and IOGEAR MiniView 4 port KVM (usb/VGA) to a LG Flatron M2762D. It revert back to a 800x600 resolution. The only way to fix it for me was to go to the "Displays", until I've turned off the screen saver. When I leave I just switch it to a Windows computer that functions properly. There is nothing in the dmesg output of value, and the Xorg logfile doesn't seem too helpful either, but it is attached. The NVIDIA driver is version 302.17.

I've also tried to implement an xorg.conf config file from the nvidia-settings application that would force the monitor into a 1920x1080, but it didn't help.

$ lspci | grep NVIDIA
01:00.0 VGA compatible controller: NVIDIA Corporation G84 [GeForce 8600 GTS] (rev a1)

Thanks gents,
Dan

Revision history for this message
Erick Brunzell (lbsolost) wrote :

I need to do more cross testing to be certain but this evening I was testing Xubuntu Precise i386 (20120801.1) and I don't see this. So maybe it's actually a 'gnome-screensaver' bug????

I'm guessing it's not limited to only 'xserver-xorg-video-intel' ATM but I really must do more studying. It is worth asking though if anyone has seen this on any other flavor of Ubuntu such as Lubuntu, Xubuntu, etc.

I may try converting an Ubuntu install to 'xscreensaver' and see what happens.

Revision history for this message
Erick Brunzell (lbsolost) wrote :

Forgot to mention this does currently also effect Ubuntu Quantal but I've been waiting for the last bits of the new 'xorg' to pass proposed before saying much.

Revision history for this message
AMSlider (dan-deeog) wrote :

I agree it's got to be somewhere else. It would appear that it is not hardware specific, not video card, nor monitor, nor kvm.

I just did a test from another machine to see if it's related to the gnome-screensaver, not sure if it's truly testing anything... :
0) switch to another machine on the kvm
1) login via ssh from another machine on the kvm
2) export DISPLAY=192.168.2.4:0 # IP of ubuntu machine having resolution issues
3) gnome-screensaver-command -a
4) switch back to ubuntu machine having resolution issues
5) verify screen is black/asleep and move mouse
6) resolution stayed at the proper 1920x1080

I've mapped a keyboard shortcut to run xrandr in the meantime :(

Hope this helps,
Dan

Revision history for this message
Erick Brunzell (lbsolost) wrote :

Those of us effected definitely need to share some notes. I'm using a simple 2-port KVM switch with 2 sets of hardware:

Intel Atom CPU 230 @ 1.60GHz
Intel 82945G/GZ Integrated Graphics

VIA C7 CPU @ 1500MHz
VIA CN700/P4M800 Pro/P4M800 CE/VN800 Graphics [S3 UniChrome Pro]

Only the Intel set is effected in Ubuntu Precise and Quantal, but it works OK with either Xubuntu or Lubuntu Precise. It also works OK with Ubuntu Oneiric.

The old P4M800 is not effected at all but it may be helpful to note that when I open "Displays" in the Intel set it displays "HSD 19", whereas when I open "Displays" in the VIA set it displays "Laptop". Naturally it's not a laptop and the actual monitor is an 18.5" HannsG widescreen.

But I'd think that Ubuntu Precise, Lubuntu Precise, and Xubuntu Precise all share the same Xorg packages, but certainly Ubuntu uses 'gnome-screensaver' whereas Lubuntu and Xubuntu use 'xscreensaver' --- I think!

I may try downgrading 'gnome-screensaver' in a test install of Ubuntu Precise to see what happens, not that I recommend it! Doing so may blow things up badly :^(

I'd very much like to see this fixed in 12.04.1, or soon after ;^)

Revision history for this message
Erick Brunzell (lbsolost) wrote :

Just downgrading 'gnome-screensaver' was easy but also did no good :^(

I'll see if I can figure out how to switch to 'xcreensaver'.

Revision history for this message
Erick Brunzell (lbsolost) wrote :

I did some more fiddling and I'm fairly well convinced that this is actually a 'gnome-screensaver' bug.

I first booted into an Lubuntu Precise and installed 'gnome-desktop-environment' which I know is Gnome version 3.0 rather than the Gnome version 3.2 + bits of 3.4 that Ubuntu Precise uses. Booting into a "gnome classic (no effects)" session uses 'gnome-screensaver' and results in this bug, but booting into an Lubuntu session which uses 'xscreensaver' works just fine.

In the meanwhile the last bits of the new Xorg stack fell into place in Ubuntu Quantal proposed so I applied those updates, but no joy :^(

Next I decided to try converting an Ubuntu Precise from using 'gnome-screensaver' to using 'xscreensaver'. It was a bit fiddly for me. I first tried this:

http://www.howtogeek.com/114027/how-to-add-screensavers-to-ubuntu-12.04/

But that didn't quite work properly on reboot so I deleted the new entry in Startup Apps and tried this:

http://www.liberiangeek.net/2012/04/add-enable-screensavers-in-ubuntu-12-04-precise-pangolin/

Sadly 'xscreensaver' was still NOT working properly on reboot so I opened Startup Apps again, noticed Xsreensaver was once again added, so removed and re-added it. No idea why but it then worked OK on repeated reboots.

So that's just fiddly enough I can't recommend it as a work-around!!!!

Regardless, once I had 'xscreensaver' working properly with the "blank-screen" option in Ubuntu Precise, I tried this with my KVM switch and all was well. So I'm fairly well convinced this is a 'gnome-screensaver' bug.

The next step is to see if we can find something upstream (or side-stream in another Gnome based distro) so please help me search :^)

Revision history for this message
AMSlider (dan-deeog) wrote :

This link worked for me - http://www.liberiangeek.net/2012/04/add-enable-screensavers-in-ubuntu-12-04-precise-pangolin/

Thanks!

Another bizarre Ubuntu oddity that we've spent too much time on :)

Revision history for this message
Erick Brunzell (lbsolost) wrote :

I actually didn't spend much time at all on it ;^)

I've just been battling some health issues and I did a very lax job of testing over the past several months. I've been grouchy too :^(

Revision history for this message
Jonathan Marsden (jmarsden) wrote :

If this issue is now known to be in gnome-screensaver and to be independent of the graphics card/driver used by X, I'd think it might help to edit the "Affects" stuff to reflect these facts :) I'd update it, but I have not tested / duplicated the issue myself, and so I don't feel I should be doing that.

Note that simply uninstalling gnome-screensaver might well be a valid workaround for this issue in some cases -- just push the power button on your monitor when you walk away from it.

Revision history for this message
Vincent Gerris (vgerris) wrote :

I have seen this issue on various intel integrated video chips.
The issue seemed to be caused by the KVM switch at first, but it did not return to a proper resolution when it was removed from it.
I found a workaround here:
http://robert.penz.name/219/workaround-for-the-ubuntu-problem-with-kvm-switches/
In the comment someone mentiones:
1. Get a working xorg.conf file for your system using whatever method
2. Get in a terminal the modeline corresponding to your monitor and desired resolution using :
gtf 1920 1200 60

the modeline needs to be proper for your screen and then added to the monitor section.

I have not had this issue before, I hope something can be done to "autofix" this when a monitor is plugged.

Revision history for this message
AMSlider (dan-deeog) wrote : Re: [Bug 988290] Re: Resolution change with KVM switch on Precise

Hi Vincent,

The link you posted worked for me. I had to back out the one made for
xscreensaver. It kept the resolution, but xscreensaver didn't turn off
the monitor (or make it sleep) it just blacked it out.

Erick,
Hope you're feeling better!

On 08/04/2012 01:14 PM, Vincent Gerris wrote:
> I have seen this issue on various intel integrated video chips.
> The issue seemed to be caused by the KVM switch at first, but it did not return to a proper resolution when it was removed from it.
> I found a workaround here:
> http://robert.penz.name/219/workaround-for-the-ubuntu-problem-with-kvm-switches/
> In the comment someone mentiones:
> 1. Get a working xorg.conf file for your system using whatever method
> 2. Get in a terminal the modeline corresponding to your monitor and desired resolution using :
> gtf 1920 1200 60
>
> the modeline needs to be proper for your screen and then added to the
> monitor section.
>
> I have not had this issue before, I hope something can be done to
> "autofix" this when a monitor is plugged.
>

Revision history for this message
Mark (moutcault) wrote :

I have confirmed it is related to gnome-screensaver package.
I removed it and restarted. Can switch through all displays and back to Ubuntu and the resolution stays the same.

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/988290

tags: added: iso-testing
Revision history for this message
Stapel (wstapelberg) wrote :

This affects me too and I have an NVidea card.

Revision history for this message
Erick Brunzell (lbsolost) wrote :

Bug #1037895 may be a duplicate of this.

Revision history for this message
Chris Wilson (ickle) wrote :

It is not a driver issue, but an unhelpful KVM switch that doesn't trigger a hotplug event on change and marks the display as unconnected when switched away.

echo 0 > /sys/modules/drm_kms_helper/parameters/poll

will fix most of the observed behaviour.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
graemev (graeme-launchpad) wrote :

I worked around this by un-installing the screen saver.

Given what appears to be the 'root cause' ... my guess would be the screen saver it provoking a 'poll'
when it locks or unlocks the screen ... Given that this will probably happen when a KVM is switched 'away'
for long periods , it would seem to be (at least) a BUG WRT the screen saver.

In a Lab situation a KVM would be the norm ... having to remove the screen saver/locking on lab machines would make Ubuntu
unsuitable for this kind of use on security grounds.

Suggest yon don't close but reassign to screen saver.

Revision history for this message
Steven Pemberton (steven-pemberton) wrote :

On Fri, 15 Feb 2013 12:41:51 +0100, Chris Wilson
<email address hidden> wrote:

> It is not a driver issue, but an unhelpful KVM switch that doesn't
> trigger a hotplug event on change and marks the display as unconnected
> when switched away.
>
> echo 0 > /sys/modules/drm_kms_helper/parameters/poll
>
> will fix most of the observed behaviour.
>
> ** Changed in: xserver-xorg-video-intel (Ubuntu)
> Status: Confirmed => Invalid
>

Be that as it may, it was only introduced by 12.04/Precise. Before that I
didn't have any problem; so something changed to break how it works. That
still counts as a bug to me.

Revision history for this message
Glyn M Burton (modiford) wrote :

I don't wish to sound like a 'me too' but here I am on this latest (at time of writing) 13.04 of Ubuntu and it still occurs.

I have a VGA and PS2 KVM, 4x port by StarTech. Switching back from my work Windows desktop to Ubuntu after the screen blanker / password lock has kicked in produces a lower resolution; even if I switch the KVM wait for the monitor to state 'no signal' to possibly allow DDC to invoke prior to moving the mouse and waking the system.

The monitor is detected as Hewlett Packard 19" (HP Compaq LA1951g) and the graphics chip detected as Intel Ivybridge.

Opening up System Settings, clicking on DIsplays automatically adjusts the screen. No need to Apply, just closing retains the right resolution.

Changed in xserver-xorg-video-intel (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
graemev (graeme-launchpad) wrote :

My workaround for this was to uninstall the screen lock .... total uninstall , not just disabled. Big security hole, but the only way I've been able to work for the past year

Revision history for this message
Mike Perrin (mperrin) wrote :

The problem may be deeper than gnome-screensaver. I experienced the same annoying symptom with a fresh install of Debian 7.0.0 on a machine behind an IOGear 8-port PS2 KVM switch. As reported above, simply opening System Settings -> Displays caused the resolution to revert to 1600x1200, as did running the xrandr command in a terminal. To determine if it was gnome-screensaver, I forced it to quit using 'gnome-screensaver-command --exit' and confirmed that the screensaver process was no longer running. However, switching to another machine for a few seconds still resulted in the display changing to 1024x768. Using Gnome Classic instead of Gnome shell didn't help. I did not remove gnome-screensaver because it required uninstalling other gnome desktop components also. My solution was to install the XFCE desktop which doesn't exhibit the resolution switching behavior -- and is more usable than Gnome3 in my opinion.

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

I merged 1037895 into this

Changing from the intel xserver to gnome-screensaver; from the reports it doesn't seem to be Intel specific.
Whether it's actually gnome-screensaver or something else seems to be difficult to tell; most people seem to be saying removing it helps them, but #30 is not sure; but the conclusion seems to be other desktops don't suffer from it.

However, the fact that xrandr reprobe causes it to sort out seems to suggest it might not be the screensavers problem?

affects: xserver-xorg-video-intel (Ubuntu) → gnome-screensaver (Ubuntu)
Changed in gnome-screensaver (Ubuntu):
importance: Undecided → Medium
tags: added: release-regression
tags: added: regression-release
removed: release-regression
Changed in gnome-screensaver:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Steven Pemberton (steven-pemberton) wrote :

This is still happening in 13.10, but there is a difference: before 13.10 one of the ways to get back to the right resolution was to start 'System Settings', and then start 'Displays'. That would fix the resolution (without having to click on 'Apply').

Since 13.10 just starting 'System Settings' is enough, no need to go to 'Displays'.

Revision history for this message
maddy_1002 (satuluri-madhava) wrote :

Able to see this issue even on 14.40 LTS
Also I saw an issue of not rendering anything after KVM switch.

Changed in gnome-screensaver:
status: New → Expired
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.