Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 507416

Summary: drm i915 error on disabling external display / resuming
Product: [Fedora] Fedora Reporter: Osma Ahvenlampi <oa+redhat>
Component: xorg-x11-drv-intelAssignee: Adam Jackson <ajax>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 11CC: adellam, ajax, emisca, mcepl, rmk, xgl-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: card_965GM
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-28 15:47:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 487202    
Attachments:
Description Flags
xorg.conf
none
dmesg
none
Xorg.log
none
dmesg (messages after boot) none

Description Osma Ahvenlampi 2009-06-22 17:27:31 UTC
Description of problem:

I'm using my Acer TravelMate 6292 laptop primarily in two modes; attached to an external display + keyboard via a docking station, or mobile. I typically switch between these two modes via a suspend/resume cycle, and enable/disable the external display "manually" via a script which toggles xrandr settings based on whether it detects a display connected to VGA port or not.

Since upgrading to F11 (which enables KMS by default), I get a notification about a kernel error nearly (but not 100%) every time I turn off the external display: http://www.kerneloops.org/submitresult.php?number=449696

WARNING: at drivers/gpu/drm/i915/i915_gem_tiling.c:313 i915_gem_set_tiling+0x491/0x4ed [i915]() (Tainted: G        W )
Hardware name: TravelMate 6292 
failed to unbind object for tiling switchModules linked in: fuse rfcomm bridge stp llc bnep sco l2cap vboxnetflt vboxdrv sunrpc ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_multipath sha256_generic aes_x86_64 aes_generic cbc dm_crypt uinput snd_hda_codec_realtek arc4 ecb snd_hda_intel iwlagn snd_hda_codec acer_wmi iwlcore uvcvideo sdhci_pci firewire_ohci pcspkr sdhci iTCO_wdt firewire_core i2c_i801 yenta_socket iTCO_vendor_support videodev mmc_core snd_hwdep joydev crc_itu_t serio_raw snd_pcm rsrc_nonstatic lib80211 snd_timer v4l1_compat mac80211 tg3 wmi irda v4l2_compat_ioctl32 snd btusb soundcore cfg80211 bluetooth snd_page_alloc crc_ccitt i915 drm i2c_algo_bit i2c_core video output [last unloaded: microcode]
Pid: 2436, comm: Xorg Tainted: G        W  2.6.29.4-167.fc11.x86_64 #1
Call Trace:
 [<ffffffff810489bf>] warn_slowpath+0xbc/0xf0
 [<ffffffff813a95ff>] ? printk+0x41/0x4a
 [<ffffffffa0063118>] i915_gem_set_tiling+0x491/0x4ed [i915]
 [<ffffffffa0062c87>] ? i915_gem_set_tiling+0x0/0x4ed [i915]
 [<ffffffffa0023b7e>] drm_ioctl+0x20e/0x2c1 [drm]
 [<ffffffff810e0f58>] vfs_ioctl+0x6f/0x87
 [<ffffffff810e13f3>] do_vfs_ioctl+0x462/0x4a3
 [<ffffffff810e148a>] sys_ioctl+0x56/0x79
 [<ffffffff8101133a>] system_call_fastpath+0x16/0x1b

Version-Release number of selected component (if applicable):

kernel-2.6.29.4-167.fc11.x86_64
xorg-x11-drv-intel-2.7.0-7.fc11.x86_64
xorg-x11-server-Xorg-1.6.1.901-1.fc11.x86_64

Comment 1 Matěj Cepl 2009-06-25 13:26:28 UTC
Thanks for the bug report.  We have reviewed the information you have provided above, and there is some additional information we require that will be helpful in our diagnosis of this issue.

Please attach your X server config file (/etc/X11/xorg.conf, if available), /var/log/dmesg, and X server log file (/var/log/Xorg.*.log) to the bug report as individual uncompressed file attachments using the bugzilla file attachment link below.

We will review this issue again once you've had a chance to attach this information.

Thanks in advance.

Comment 2 Osma Ahvenlampi 2009-06-29 16:27:54 UTC
Created attachment 349813 [details]
xorg.conf

Comment 3 Osma Ahvenlampi 2009-06-29 16:28:25 UTC
Created attachment 349814 [details]
dmesg

Comment 4 Osma Ahvenlampi 2009-06-29 16:29:30 UTC
Created attachment 349815 [details]
Xorg.log

Comment 5 Osma Ahvenlampi 2009-06-29 16:32:33 UTC
Created attachment 349817 [details]
dmesg (messages after boot)

Comment 6 Osma Ahvenlampi 2009-06-29 16:36:28 UTC
Today's first GEM error came after several suspend/resume cycles while mobile when I attached the computer to a VGA display and enabled it via xrandr. The requested files attached. Hope this is useful.

Comment 7 Matěj Cepl 2009-06-30 23:28:51 UTC
This has Rawhide duplicate in bug 489907

Comment 8 Osma Ahvenlampi 2009-07-01 10:03:09 UTC
FWIW, I have not seen the Xorg crash with F11, though I did see it randomly with F10. My current problem is limited to the kernel barf about gem tiling (but the system continues to operate afterwards).

Comment 9 Osma Ahvenlampi 2009-07-29 07:11:30 UTC
I continue to see this or similar problem with kernel 2.6.29.6-213.fc11, now sometimes also when enabling the external display. Kernel taint below is due to VirtualBox drivers being loaded (but no virtual machines are running).

[drm] DAC-6: set mode  38
[drm:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
------------[ cut here ]------------
WARNING: at drivers/gpu/drm/i915/i915_gem_tiling.c:473 i915_gem_set_tiling+0x4ab/0x507 [i915]() (Tainted: G        W )
Hardware name: TravelMate 6292 
failed to unbind object for tiling switchModules linked in: fuse rfcomm bridge stp llc bnep sco l2cap vboxnetflt vboxdrv sunrpc ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_multipath sha256_generic aes_x86_64 aes_generic cbc dm_crypt uinput snd_hda_codec_realtek arc4 ecb snd_hda_intel iwlagn snd_hda_codec iwlcore uvcvideo sdhci_pci firewire_ohci sdhci lib80211 videodev mmc_core pcspkr btusb mac80211 snd_hwdep firewire_core acer_wmi snd_pcm bluetooth iTCO_wdt v4l1_compat irda tg3 snd_timer joydev serio_raw crc_itu_t i2c_i801 yenta_socket v4l2_compat_ioctl32 iTCO_vendor_support cfg80211 snd rsrc_nonstatic wmi soundcore snd_page_alloc crc_ccitt i915 drm i2c_algo_bit i2c_core video output [last unloaded: microcode]
Pid: 2413, comm: Xorg Tainted: G        W  2.6.29.6-213.fc11.x86_64 #1
Call Trace:
 [<ffffffff8104883f>] warn_slowpath+0xbc/0xf0
 [<ffffffff813a9916>] ? printk+0x41/0x43
 [<ffffffffa00634d9>] i915_gem_set_tiling+0x4ab/0x507 [i915]
 [<ffffffffa006302e>] ? i915_gem_set_tiling+0x0/0x507 [i915]
 [<ffffffffa0023b7e>] drm_ioctl+0x20e/0x2c1 [drm]
 [<ffffffff810e0e34>] vfs_ioctl+0x6f/0x87
 [<ffffffff810e12cf>] do_vfs_ioctl+0x462/0x4a3
 [<ffffffff810e1366>] sys_ioctl+0x56/0x79
 [<ffffffff8101133a>] system_call_fastpath+0x16/0x1b
---[ end trace e7dcf5c96f6f64bc ]---

Comment 10 Andrea Dell'Amico 2009-07-30 18:38:18 UTC
I'm getting the same error eache time I disable the external monitor.

I also got a complete freeze once, after enabling the second monitor.
My stack trace is (don't know why the kernel is tainted, I don't have any additional modules):

[drm:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
------------[ cut here ]------------
WARNING: at drivers/gpu/drm/i915/i915_gem_tiling.c:473 i915_gem_set_tiling+0x4a0/0x4f2 [i915]() (Tainted: G        W )
Hardware name: 076322G
failed to unbind object for tiling switchModules linked in: tun fuse rfcomm bridge stp llc bnep sco l2cap sunrpc nf_conntrack_netbios_ns ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq dm_multipath kvm_intel kvm uinput snd_hda_codec_si3054 gspca_m5602 snd_hda_codec_realtek firewire_ohci sdhci_pci snd_hda_intel pcspkr arc4 gspca_main i2c_i801 firewire_core sdhci serio_raw iTCO_wdt ecb ricoh_mmc joydev videodev snd_hda_codec iTCO_vendor_support 8139too mmc_core crc_itu_t 8139cp v4l1_compat mii snd_hwdep btusb iwl3945 snd_pcm bluetooth snd_timer mac80211 snd lib80211 cfg80211 soundcore snd_page_alloc wmi xts gf128mul aes_i586 aes_generic dm_crypt i915 drm i2c_algo_bit i2c_core video output [last unloaded: nf_nat]
Pid: 2100, comm: Xorg Tainted: G        W  2.6.29.6-213.fc11.i686.PAE #1
Call Trace:
 [<c0435266>] warn_slowpath+0x7c/0xa4
 [<c053e13a>] ? selinux_capable+0xb4/0xc1
 [<c071484d>] ? printk+0x14/0x17
 [<f81eb1f9>] ? i915_gem_object_unbind+0x43/0x1f3 [i915]
 [<f80d5545>] ? drm_gem_object_reference+0xd/0xf [drm]
 [<f81ef4c8>] i915_gem_set_tiling+0x4a0/0x4f2 [i915]
 [<f80d473f>] drm_ioctl+0x202/0x292 [drm]
 [<f81ef028>] ? i915_gem_set_tiling+0x0/0x4f2 [i915]
 [<c053ac8f>] ? inode_has_perm+0x60/0x6a
 [<c04b2662>] vfs_ioctl+0x5c/0x76
 [<c04b2f16>] do_vfs_ioctl+0x480/0x4ba
 [<c053b04c>] ? selinux_file_ioctl+0x43/0x46
 [<c04b2f96>] sys_ioctl+0x46/0x66
 [<c040945f>] sysenter_do_call+0x12/0x34
---[ end trace 09f4aff8bd1ccb58 ]---
[drm] LVDS-8: set mode  31

Comment 11 Osma Ahvenlampi 2009-09-08 07:56:11 UTC
The dmesg barf continues with the below packages, but I haven't noted instability (which was very noticeable with interim package combinations)

xorg-x11-server-Xorg-1.6.3-4.fc11.x86_64
xorg-x11-drv-intel-2.7.0-7.fc11.x86_64
xorg-x11-utils-7.4-4.fc11.x86_64
kernel-2.6.29.6-217.2.16.fc11.x86_64

[drm:i915_gem_object_unbind] *ERROR* Attempting to unbind pinned buffer
------------[ cut here ]------------
WARNING: at drivers/gpu/drm/i915/i915_gem_tiling.c:473 i915_gem_set_tiling+0x4ab/0x507 [i915]() (Tainted: G        W )
Hardware name: TravelMate 6292 
failed to unbind object for tiling switchModules linked in: fuse rfcomm bridge stp llc bnep sco l2cap vboxnetflt vboxdrv sunrpc ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table dm_multipath sha256_generic aes_x86_64 aes_generic cbc dm_crypt uinput snd_hda_codec_realtek arc4 ecb snd_hda_intel iwlagn iwlcore uvcvideo firewire_ohci lib80211 mac80211 videodev snd_hda_codec btusb snd_hwdep sdhci_pci firewire_core sdhci snd_pcm mmc_core bluetooth v4l1_compat v4l2_compat_ioctl32 snd_timer irda snd joydev iTCO_wdt tg3 soundcore yenta_socket cfg80211 acer_wmi crc_itu_t rsrc_nonstatic wmi crc_ccitt snd_page_alloc iTCO_vendor_support pcspkr i2c_i801 serio_raw i915 drm i2c_algo_bit i2c_core video output [last unloaded: microcode]
Pid: 8524, comm: Xorg Tainted: G        W  2.6.29.6-217.2.16.fc11.x86_64 #1
Call Trace:
 [<ffffffff8104884b>] warn_slowpath+0xbc/0xf0
 [<ffffffff813aa2ad>] ? printk+0x41/0x44
 [<ffffffffa00634e1>] i915_gem_set_tiling+0x4ab/0x507 [i915]
 [<ffffffffa0063036>] ? i915_gem_set_tiling+0x0/0x507 [i915]
 [<ffffffffa0023b8a>] drm_ioctl+0x20e/0x2c1 [drm]
 [<ffffffff810e0f60>] vfs_ioctl+0x6f/0x87
 [<ffffffff810e13fb>] do_vfs_ioctl+0x462/0x4a3
 [<ffffffff810e1492>] sys_ioctl+0x56/0x79
 [<ffffffff8101133a>] system_call_fastpath+0x16/0x1b
---[ end trace 28486ad091f466fc ]---
[drm] DAC-6: set mode  3b

Comment 12 Matěj Cepl 2009-10-27 17:44:16 UTC

*** This bug has been marked as a duplicate of bug 489907 ***

Comment 13 Matěj Cepl 2009-11-09 11:11:34 UTC
Reopening per bug 489907 comment 53

Comment 14 Matěj Cepl 2009-11-09 11:14:34 UTC
(In reply to comment #13)
> Reopening per bug 489907 comment 53  

Oh, I see, I have misunderstood that comment (too many bugs at once). Do you want to say, that THIS bug has been fixed?

Comment 15 Osma Ahvenlampi 2009-11-09 11:51:46 UTC
Yes, F11 still shows the kernel warning I've pasted here, but I have not been able to repeat them on F12 nightly live image. Xorg is stable on both, the warning seems to not have adverse effects on GM965/GL960.

http://www.smolts.org/client/show/pub_dc0ecb64-9a76-4bcc-becd-ffbb06da7a5a

Comment 16 Andrea Dell'Amico 2009-11-25 13:22:31 UTC
I cannot reproduce it on F12.

Comment 17 Russell King 2009-11-26 17:13:13 UTC
Can this bug also be fixed in the F11 kernel?

I see this warning regularly when trying to log in on an T500 thinkpad on its
docking station with external display attached.  Sometimes I struggle like hell
to get the external display working again.  I normally end up with a random set
of symptoms, normally one of:

- monitor goes into power saving after logging in
  - normally requires laptop lid to be opened, wait, then shut, wait, hit some
    keys and hope it unblanks
  - blindly typing 'xrandr --output VGA1 --off' followed by 'xrandr --output
VGA1 --auto' (the second of which invariably seems to get corrupted despite
typing up-arrow, ^w, --auto)
- a mouse pointer which is fixed at one position on an otherwise black screen,
and it changes shape as I move the mouse
  - this seems to require an entire shutdown (as in power off) and reboot to
resolve.

I have many and regular submissions of this problem into kerneloops.

Thanks.

Comment 18 Osma Ahvenlampi 2009-11-29 10:03:08 UTC
re #17 -- this kernel error never prevented me from using dual screen, either while docked or while plugging in a monitor/projector on the VGA port. It would simply produce the warning, but continue to function anyways. 

Then again, I DID also have a script in /etc/pm/sleep.d to toggle xrandr off/on during the syspend/resume cycle, because I wasn't happy with the Xorg defaults for the display layout.

I can confirm it's been eliminated with F12 kernel-2.6.31.5-127.fc12.x86_64. I no longer need the script, either, because F12 Xorg's defaults (VGA right-of LVDS) are exactly what I wanted to happen anyway. For rmk or anyone else who might benefit, this is the script I used:

$ cat /etc/pm/sleep.d/000xrandr 
#!/bin/bash

. /usr/lib64/pm-utils/pm-functions

DISPLAY=$(/etc/pm/find-console-display)
export DISPLAY

RETVAL=0
case "$1" in
	hibernate|suspend)
		# turn off external display before suspending
		xrandr --output LVDS1 --auto --output VGA1 --off
		RETVAL=$?
		;;
	*)
		xrandr --output LVDS1 --auto --output VGA1 --auto --right-of LVDS1
		;;
esac

exit $RETVAL

$ cat /etc/pm/find-console-display 
#!/usr/bin/python
import dbus, os
if not os.getenv("DISPLAY"):
  # Get the ConsoleKit manager
  bus = dbus.SystemBus()
  manager_obj = bus.get_object('org.freedesktop.ConsoleKit', '/org/freedesktop/ConsoleKit/Manager')
  manager = dbus.Interface(manager_obj, 'org.freedesktop.ConsoleKit.Manager')
  
  # For each of my sessions..
  for ssid in manager.GetSessions():
    obj = bus.get_object('org.freedesktop.ConsoleKit', ssid)
    session = dbus.Interface(obj, 'org.freedesktop.ConsoleKit.Session')
    # Get the X11 display name
    dpy = session.GetX11Display()
    if dpy:
      # If we have a display, set the environment variable
      os.putenv("DISPLAY", dpy)
      print dpy
      break
else:
  print os.getenv("DISPLAY")

Comment 19 Bug Zapper 2010-04-27 15:09:57 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 20 Andrea Dell'Amico 2010-04-27 15:18:17 UTC
It's fixed in F12.

Comment 21 Matěj Cepl 2010-05-27 23:05:14 UTC
Reporter, do you agree with the comment 20, please?

Thank you

Comment 22 Osma Ahvenlampi 2010-05-28 07:03:14 UTC
I have not seen this issue in F12 since comment 15 (end of last year)

Comment 23 Emilio Scalise 2010-05-28 08:03:31 UTC
I also cannot reproduce this bug on F12.
I had the issue on F11 but I cannot tell you when it's gone away..

Regards

Comment 24 Matěj Cepl 2010-05-28 15:47:56 UTC
Thank you for letting us know.