Ubuntu

Dual Monitor Freeze after changing Display Settings in ubuntu 12.04

Reported by Medya on 2012-05-01
134
This bug affects 26 people
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
High
linux (Ubuntu)
Medium
Unassigned

Bug Description

I had 11.10 64bit, I upgraded to 12.04

if I change the settings in the Display it will freeze .
- if I move the external monitor to the left of laptop monitor , (or above it) it will freeze
 - if I try to turn of the laptop monitor ,so I only have my external monitor it will freeze again.

the mouse wont move and I have to reset the computer by ALT PRINT K to come back to ubuntu

dual monitor used to work fine in ubuntu 11.10 , is there any way to downgrade the Display program to the one in 11.10 ?
---
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
DistroRelease: Ubuntu 12.04
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
Package: linux (not installed)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-meta
Tags: precise precise
Uname: Linux 3.3.0-030300rc5-generic x86_64
UnreportableReason: The running kernel is not an Ubuntu kernel
UpgradeStatus: Upgraded to precise on 2012-05-01 (0 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare vboxusers

Created attachment 58374
Xorg log

I have Archlinux (linux-3.2.9) running on Radeon 4550 using radeon with xf86-video-ati 6.14.3, xorg 1.12 and mesa 8.0.1.
I have two monitors attached using DVI (Dell 2408WFP) and HDMI (Toshiba TV).

While running
xrandr --output HDMI-0 --auto
xrandr --output HDMI-0 --below DVI-0
Xorg hangs.
Here is the Xorg.0.log (full log is attached):

[ 730.765] BUG: triggered 'if (!dev->valuator || dev->valuator->numAxes < 2)'
[ 730.765] BUG: getevents.c:843 in scale_to_desktop()
[ 730.765]
[ 730.765] Backtrace:
[ 730.765] 0: /usr/bin/X (xorg_backtrace+0x34) [0x5684f4]
[ 730.765] 1: /usr/bin/X (0x400000+0x471e4) [0x4471e4]
[ 730.765] 2: /usr/bin/X (0x400000+0x47db5) [0x447db5]
[ 730.765] 3: /usr/bin/X (GetPointerEvents+0x352) [0x449452]
[ 730.765] 4: /usr/bin/X (0x400000+0x152c56) [0x552c56]
[ 730.766] 5: /usr/bin/X (miPointerWarpCursor+0xce) [0x55308e]
[ 730.766] 6: /usr/bin/X (0x400000+0x6c532) [0x46c532]
[ 730.766] 7: /usr/bin/X (0x400000+0x15357e) [0x55357e]
[ 730.766] 8: /usr/bin/X (0x400000+0xf3841) [0x4f3841]
[ 730.766] 9: /usr/bin/X (0x400000+0xdf2ee) [0x4df2ee]
[ 730.766] 10: /usr/bin/X (RRPointerScreenConfigured+0x75) [0x4df535]
[ 730.766] 11: /usr/bin/X (RRTellChanged+0x122) [0x4d9282]
[ 730.766] 12: /usr/bin/X (RRCrtcSet+0x33d) [0x4da41d]
[ 730.766] 13: /usr/bin/X (ProcRRSetCrtcConfig+0x3b3) [0x4db273]
[ 730.767] 14: /usr/bin/X (0x400000+0x33cf9) [0x433cf9]
[ 730.767] 15: /usr/bin/X (0x400000+0x2319a) [0x42319a]
[ 730.767] 16: /lib/libc.so.6 (__libc_start_main+0xed) [0x2ba545a7a38d]
[ 730.767] 17: /usr/bin/X (0x400000+0x234bd) [0x4234bd]

The same behaviour is seen using xf86-video-ati-git and xorg-git.

If "--below" is changed to some other "direction" it makes no difference. But It hangs only when the screens are positioned nearby, but not when showing the same area (1920x1200 on Dell and 1920x1080 on Toshiba).

*** Bug 48174 has been marked as a duplicate of this bug. ***

Created attachment 60643
Fix for xorg infinity loop.

Xorg goes to infinity loop (delta = 548.33340590666785 and incr = 6.3659874129151343e-314). Chromium authors code not good.

Created attachment 60645
proof debug output

I had previously launched "sleep 60 && kill -n 11 xorg_pid" and caused the freeze of xorg. And when xorg killed with SEGV, I receive this debug log. Xorg freezes in infinity loop.

the main question here is why the scroll increment is 0 (or close to 0 anyways). This is the cause of the bug and shouldn't happen.

In any way, while is dangerous without additional checks and in this case are senseless when works only with delta, more useable break loop and fmod delta.

But why scroll increment so small, I don't know, and in this moment mouse scroll not used at all.

Peter Hutterer,
your patch fix problem, but I will now always be nervous until the "while" loop will be completely safe

the loop is safe. "increment" is initialised once by the driver and that's where the server checks for and invalid increment of 0. it's read-only after that. This bug happened because of invalid memory access, there is only so much one can do against that.

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: precise

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 992778

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Medya (medya) on 2012-05-01
tags: added: apport-collected
description: updated
Changed in linux (Ubuntu):
status: Incomplete → Confirmed

I triggered the GPU freeze and collected the logs before and after.

There is no difference between the logs though. So nothing gets logged within 2 minutes of the freeze.

Also happens on fresh install, not related to upgrade!

Medya (medya) wrote :

- I tried with Live CD ubuntu 12.04 64bit
the same problem in live CD too.

- I installed Gnome 3 ,
the same problem in Gnome 3 too .

- I noticed the graphic card shows Unknown in my System Details I added ppa:xorg-edgers/ppa and installed intel graphic driver
the same problem with installed driver too .

- I installed a main line kernel 3.4
the same problem with kernel 3.4

so I tried everything , the problem still exists !!!

TaleRix (talerix) wrote :

Same issue here. I'm using Kubuntu 12.04 64bit

Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.4kernel[1] (Not a kernel in the daily directory). Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag(Only that one tag, please leave the other tags). This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-rc4-precise/

tags: added: needs-upstream-testing
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Medya (medya) wrote :

I tested with the upstream kernel that you linked , the problem still exists there...no luck !

tags: added: kernel-bug-exists-upstream
removed: needs-upstream-testing
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Medya (medya) wrote :

and I don't think it is problem of Kernel, because I used the upstream kernel in ubuntu 11.10 and it was fine, the problem exists since upgrade and it doesn't matter what Kernel I use

Joseph Salisbury (jsalisbury) wrote :

Adding in the xserver-xorg-video-intel package for review.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Medya (medya) wrote :

is there any safe way to downgrade the xserver-xorg-video-intel package to the one in ubuntu 11.10 ?
I tried to download the packages manualy by myself and do a dpkpg but it broke the packages and it didnt install ...

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Albert Damen (albrt) wrote :

No, you cannot use the -intel package from 11.10, because it is build for an older xserver version.

Xorg log says:
[ 1010.456] BUG: triggered 'if (!dev->valuator || dev->valuator->numAxes < 2)'

That suggests this is a duplicate of bug 921236. There success is reported by downgrading xserver-xorg-input-evdev, with the version you can find here: https://launchpad.net/~sarvatt/+archive/sru1/+build/3118994

Can you give that a try?

Thanks a lot for the hint.

At least on my system (Sony Vaio VPCZ1 with AMD/Intel Hybrid Graphics) replacing xserver-xorg-input-evdev with the version from : https://launchpad.net/~sarvatt/+archive/sru1/+build/3118994 does indeed fix the issue.

Medya (medya) wrote :

Thanks a lot Albert Damen, my problem was solved by installing those packages in
 https://launchpad.net/~sarvatt/+archive/sru1/+build/3118994

one question ,in the future if Ubuntu wanted to update xserver-xorg-input-evdev-, should I remember not to let it to upgrade this package?

commit af88b43f9e604157b74270d609c08bdfa256a792
Author: Peter Hutterer <email address hidden>
Date: Fri Apr 27 16:31:17 2012 +1000

    dix: don't emulate scroll events for non-existing axes (#47281)

bugbot (bugbot) on 2012-05-03
tags: added: freeze
tags: added: dual-head
Launchpad Janitor (janitor) wrote :

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

Albert Damen (albrt) wrote :

This bug has been fixed in xserver upstream:

commit af88b43f9e604157b74270d609c08bdfa256a792
Author: Peter Hutterer <email address hidden>
Date: Fri Apr 27 16:31:17 2012 +1000

    dix: don't emulate scroll events for non-existing axes (#47281)

https://bugs.freedesktop.org/show_bug.cgi?id=47281

Changed in xorg-server (Ubuntu):
status: New → Confirmed
Albert Damen (albrt) on 2012-05-03
affects: xserver-xorg-video-intel (Ubuntu) → xorg-server (Ubuntu)
Changed in xorg-server (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
status: Confirmed → Invalid
Changed in xorg-server:
importance: Unknown → High
status: Unknown → Fix Released
Jalsot (jalsot) wrote :

The packaga from #14 fixed my issue too. Will there be an official package release fix?

Igorvc (igorvc) wrote :

I have the same issue. But the hint in #14 is amd64 but my ubuntu is i686!

Igorvc (igorvc) wrote :

The i386 version showed in #14 worked for me!
You can find it here:
https://launchpad.net/~sarvatt/+archive/sru1/+build/3118995

Terry S (itsterry) wrote :

I'm trying to install the version in #30, but getting a message that a later version is already installed. Is there a way to wind back to the earlier version, or is there a later version of the working .deb?

Thanks.
Works for me now.
Xorg-server 1.12.2-1 (ArchLinux)

This fix worked for me as well. Lenovo T420 with Intel integrated gpu and 2 external monitors attached to a docking station.

This still isn't included in the Ubuntu distribution yet, so every time upgrade manager runs, it recommends that I "upgrade" back to the broken version.

Terry S (itsterry) wrote :

In case it helps anyone else, here's how I get it to work again if I accidentally "upgrade" back to the broken version:

Download these files to your desktop

https://launchpad.net/~sarvatt/+archive/sru1/+build/3118995/+files/xserver-xorg-input-evdev-dev_2.6.99.901-1ubuntu3~lp921236_all.deb
https://launchpad.net/~sarvatt/+archive/sru1/+build/3118995/+files/xserver-xorg-input-evdev-udeb_2.6.99.901-1ubuntu3~lp921236_i386.udeb
https://launchpad.net/~sarvatt/+archive/sru1/+build/3118995/+files/xserver-xorg-input-evdev_2.6.99.901-1ubuntu3~lp921236_i386.deb

In a terminal, cd to your Desktop
Then do
dpkg -i --force-downgrade xserver-xorg-input-evdev-dev_2.6.99.901-1ubuntu3~lp921236_all.deb
dpkg -i --force-downgrade xserver-xorg-input-evdev-udeb_2.6.99.901-1ubuntu3~lp921236_i386.udeb
dpkg -i --force-downgrade xserver-xorg-input-evdev_2.6.99.901-1ubuntu3~lp921236_i386.deb

Logout & log back in again

Then you can delete those downloaded files

Scott Davis (sf29p) wrote :

More strangeness with X yesterday. When I booted up, X didn't recognize my keyboard (neither the external keyboard nor the built-in). I tried rebooting and restarting X (with Alt-PrtScn-K) several times to no avail. In the end I decided to reboot into command-line mode and update back to the latest Ubuntu version (i.e. ditch this fix and live with the original problem).

In addition to updating input-evdev, I noticed that it also updated xserver-common, xorg-core, and input-synaptics, plus a bunch of non-X11 packages. I guess these were Ubuntu's standard periodic patches. After updating and rebooting (docked with both monitors), X windows came back up successfully without freezing!!!

However, it seems like this didn't fix the original problem, just worked around it. Whenever I try to move the monitors around in Display Settings, then X freezes again. I think they found a combination of randr settings that don't trigger the defect and then made those the default when booting with dual monitors.

.config/monitors.xml attached, if anyone cares to check it out.

mm (michael-muellers) wrote :

Is it possible to manually edit monitors.xml and set the monitor orientation there as a work around. I always seem to thave the monitor on the left and the laptop on the right which seems to be the oppiste of the default

Per Kjeldaas (kjeldaas) wrote :

I upgraded to 12.04 today, and this bug is still there. The system freezes after I try to change the relative positions of my two displays.

Medya (medya) wrote :

I installed the recent updates of ubutnu 12.04 and the dual monitor problem happened again, I had to go and install pacakages in http://blog.shevin.info/2012/05/how-to-fix-dual-monitor-freeze-in.html
to fix the problem again !
are we supposed to keep fixing the Xorg after each update?

Lafa (luis-alves) wrote :

On 2012-09-14 I update to the latest packages, and my Ubuntu dual monitor using intell gfx is broken, it worked fine before the update.

Now I can only get to work with one monitor.

When I plug the second monitor, the screen gets out of sync in both monitors, and I can only get the image back, when I unplug the second monitor and restart the machine with one monitor.

Wolf F. (wfogl) wrote :

On my machine this bug doesn't exist anymore in 12.10

erick abuzo (lovescripter21) wrote :

I experienced also this problem. I am using the version raring tail 13.04.
Can anyone here tell me how can I see the download link for the deb files at https://launchpad.net/~sarvatt/+archive/sru1/+build/3118995

And Terry S (itsterry) #34 files seems not be working anymore. Hoping someone will post a new link.

Same problem here.

No solution yet :(

Working with Ubuntu 13.04. It worked fine at first, but after connecting two different monitors (VGA connection) with different configurations (and placement of them), when I connect any of them, they just hang!!

Changed in linux (Ubuntu):
status: Invalid → Confirmed

Medya, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

tags: added: needs-kernel-logs needs-upstream-testing
removed: 12.04 display dual dual-head monitor
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
no longer affects: xorg-server (Ubuntu)
Launchpad Janitor (janitor) wrote :

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

Changed in xorg-server (Ubuntu):
status: New → Confirmed
affects: linux → xorg-server (Ubuntu)
no longer affects: xorg-server (Ubuntu)
Serg (einarum) wrote :

Still affecting me. The solutions *.deb files are not accessible anymore, so..

Serg, thank you for your comment. So your hardware and problem may be tracked, could you please file a new report with Ubuntu by executing the following in a terminal while booted into a Ubuntu repository kernel (not a mainline one) via:
ubuntu-bug linux

For more on this, please read the official Ubuntu documentation:
Ubuntu Bug Control and Ubuntu Bug Squad: https://wiki.ubuntu.com/Bugs/BestPractices#X.2BAC8-Reporting.Focus_on_One_Issue
Ubuntu Kernel Team: https://wiki.ubuntu.com/KernelTeam/KernelTeamBugPolicies#Filing_Kernel_Bug_reports
Ubuntu Community: https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette

When opening up the new report, please feel free to subscribe me to it.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.