Bug 772279

Summary: Latest update(s) made system unbootable :(
Product: [openSUSE] openSUSE 12.2 Reporter: Richard Bos <richard.bos>
Component: X.OrgAssignee: E-mail List <xorg-maintainer-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Critical    
Priority: P3 - Medium CC: jose.simon.selva
Version: Beta 2   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 12.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: X.org log
u_Do-not-use-intel-driver-on-unknown-8086-0be2-GPU-lik.patch
Xorg log with running X environment
u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch

Description Richard Bos 2012-07-19 18:42:50 UTC
Created attachment 499296 [details]
X.org log

User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0

Updated system on wednesday 18 july with the following rpms:

#  rpm -qa --last --dbpath /mnt/var/lib/rpm | head -20
systemd-sysvinit-44-9.11.1                    wo 18 jul 2012 21:00:16 CEST
aaa_base-extras-12.2-2.12.1                   wo 18 jul 2012 21:00:16 CEST
SuSEfirewall2-3.6.293-1.4.1                   wo 18 jul 2012 21:00:15 CEST
yast2-bootloader-2.23.7-1.4.1                 wo 18 jul 2012 21:00:14 CEST
xf86-video-intel-2.20.0-3.9.1                 wo 18 jul 2012 21:00:13 CEST
systemd-44-9.11.1                             wo 18 jul 2012 21:00:11 CEST
aaa_base-12.2-2.12.1                          wo 18 jul 2012 21:00:07 CEST
libxslt1-1.1.26-22.6.1                        wo 18 jul 2012 21:00:03 CEST

Today (next day), the system no longer boots


Reproducible: Always

Steps to Reproduce:
1. Power on system
2. Boot into OS-12.2 with the latest and greatest updates
3.
Actual Results:  
System hangs when X is being started


Expected Results:  
A running system


Xorg.0.log says:

[    15.259] (EE) intel(0): [drm] Failed to detect GEM.  Kernel 2.6.28 required.
[    15.260] (EE) intel(0): Failed to become DRM master.


/var/log/messages has:
Jul 19 20:17:57 cedar xdm[538]: Starting service kdm..done
Jul 19 20:17:57 cedar kdm_config[654]: Cannot open master configuration file /var/adm/kdm/kdmrc.sysconfig
Jul 19 20:17:57 cedar network[449]: Setting up (localfs) network interfaces:
Jul 19 20:17:57 cedar acpid: 1 client rule loaded
Jul 19 20:17:57 cedar kdm[653]: X server died during startup
Jul 19 20:17:57 cedar kdm[653]: X server for display :0 cannot be started, session disabled

/mnt/var/log/zypp # tail -28 history | cut -d"|" -f-7
2012-07-18 21:00:03|install|libxslt1|1.1.26-22.6.1|x86_64||repo-update
# 2012-07-18 21:00:09 aaa_base-12.2-2.12.1.x86_64.rpm installed ok
# Additional rpm output:
# Updating /etc/sysconfig/language...
# Updating /etc/sysconfig/backup...
# Updating /etc/sysconfig/boot...
# Updating /etc/sysconfig/suseconfig...
# Updating /etc/sysconfig/clock...
# Updating /etc/sysconfig/proxy...
# Updating /etc/sysconfig/windowmanager...
# Updating /etc/sysconfig/cron...
# Updating /etc/sysconfig/news...
# Updating /etc/sysconfig/shutdown...
# Updating etc/passwd...unchanged
# Updating etc/group...unchanged
# Updating etc/shadow...unchanged
# 
2012-07-18 21:00:09|install|aaa_base|12.2-2.12.1|x86_64||repo-update
2012-07-18 21:00:12|install|systemd|44-9.11.1|x86_64||repo-update
2012-07-18 21:00:13|install|xf86-video-intel|2.20.0-3.9.1|x86_64||repo-update
# 2012-07-18 21:00:14 yast2-bootloader-2.23.7-1.4.1.x86_64.rpm installed ok
# Additional rpm output:
# Updating /etc/sysconfig/bootloader...
# 
2012-07-18 21:00:14|install|yast2-bootloader|2.23.7-1.4.1|x86_64||repo-update
2012-07-18 21:00:15|install|SuSEfirewall2|3.6.293-1.4.1|noarch||repo-update
2012-07-18 21:00:16|install|aaa_base-extras|12.2-2.12.1|x86_64||repo-update
2012-07-18 21:00:16|install|systemd-sysvinit|44-9.11.1|x86_64||repo-update
Comment 1 Stefan Dirsch 2012-07-20 11:18:32 UTC
> [    15.259] (EE) intel(0): [drm] Failed to detect GEM.  Kernel 2.6.28
> required.
> [    15.260] (EE) intel(0): Failed to become DRM master.

This is weird. Sure, that the i915 kernel module can still be loaded? Please boot with boot options "drm.debug=0x4 3" and attach the output of 'dmesg'.
Comment 2 José Simón 2012-07-20 16:37:40 UTC
Hi, I think I might be having the same issue, although I'm not sure.

> /var/log/messages has:
> Jul 19 20:17:57 cedar xdm[538]: Starting service kdm..done
> Jul 19 20:17:57 cedar kdm_config[654]: Cannot open master configuration file
> /var/adm/kdm/kdmrc.sysconfig
> Jul 19 20:17:57 cedar network[449]: Setting up (localfs) network interfaces:
> Jul 19 20:17:57 cedar acpid: 1 client rule loaded
> Jul 19 20:17:57 cedar kdm[653]: X server died during startup
> Jul 19 20:17:57 cedar kdm[653]: X server for display :0 cannot be started,
> session disabled

I'm running  on a 32 bit system, with a N2800 Intel atom, with the infamous GMA3600 series video card (Cedar Trail). If the 'cedar' above refers to Cedar Trail it might be it. Intel has failed to provide an apropriate driver for Linux.

After exactly the same update I have experienced the same issue, before that the gma500 module provided a basic functionality, not i915. I suspect the xf86-video-intel update might be related, but I don't know, it can be a different thing.
Comment 3 Stefan Dirsch 2012-07-20 18:08:33 UTC
(In reply to comment #3)
> Created an attachment (id=499296) [details]
> X.org log

[    15.214] (--) PCI:*(0:0:2:0) 8086:0be2:8086:2012 rev 9, Mem @ 0x80500000/1048576, I/O @ 0x000030d0/8

Hmm. Which GPU is this? It's not supported by x86-video-intel driver. Indeed appears to be a Cedartrail. fbdev driver should be used here, not intel.
Comment 4 Stefan Dirsch 2012-07-20 18:09:46 UTC
Created attachment 499466 [details]
u_Do-not-use-intel-driver-on-unknown-8086-0be2-GPU-lik.patch

Possible fix.
Comment 5 Stefan Dirsch 2012-07-20 18:12:21 UTC
But this does not explain, why it ever worked before. Unless  before the update fbdev X driver was configured manually. But why? And why did this change during the update?
Comment 6 Stefan Dirsch 2012-07-20 18:15:34 UTC
Jose, do you have the same GPU? Check with "hwinfo --gfxcard". Thanks.
Comment 7 Richard Bos 2012-07-21 08:50:26 UTC
A couple of things:

I was able to install the original xf86-video-intel of OS-12.2 beta-2 back on my system :), by:

- Mount -o loop <OS-12.2 beta-2 iso image> /mnt
- Copied from /mnt the xf86-video-intel-2.19.0_20120601_8eed569-3.2.1.x86_64.rpm to the Cedar system
- On the Cedar system mount <OS-12.2 beta-2 partition> on /mnt
- Copied xf86-video-intel-2.19.0_20120601_8eed569-3.2.1.x86_64.rpm to /mnt/var/tmp
- chroot'ed to /mnt
- removed xf86-video-intel (rpm -e)
- Installed previous xf86-video-intel rpm, using: rpm -Uvh /var/tmp/xf86-video-intel-2.19.0_20120601_8eed569-3.2.1.x86_64.rpm 

Rebooted system all is fine!

My gfx card information is:

cedar:~ # hwinfo --gfxcard
09: PCI 02.0: 0300 VGA compatible controller (VGA)              
  [Created at pci.319]
  Unique ID: _Znp.JHc5nQ+JrfB
  SysFS ID: /devices/pci0000:00/0000:00:02.0
  SysFS BusID: 0000:00:02.0
  Hardware Class: graphics card
  Model: "Intel VGA compatible controller"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x0be2 
  SubVendor: pci 0x8086 "Intel Corporation"
  SubDevice: pci 0x2012 
  Revision: 0x09
  Driver: "gma500"
  Driver Modules: "drm"
  Memory Range: 0x80500000-0x805fffff (rw,non-prefetchable)
  I/O Ports: 0x30d0-0x30d7 (rw)
  IRQ: 42 (no events)
  I/O Ports: 0x3c0-0x3df (rw)
  Module Alias: "pci:v00008086d00000BE2sv00008086sd00002012bc03sc00i00"
  Driver Info #0:
    Driver Status: gma500_gfx is active
    Driver Activation Cmd: "modprobe gma500_gfx"
  Config Status: cfg=no, avail=yes, need=no, active=unknown

I never ever configured the gfxcard manually.  At least not that I'm aware of.  I just run the openSUSE installer and after installation, the video is there.

>> But this does not explain, why it ever worked before. Unless  before the update
>> fbdev X driver was configured manually. But why? And why did this change during
>> the update?

Fortunately both src.rpms (2.19 and 2.20) are available at:
http://download.opensuse.org/update/12.2/src/

I made a diff between, you can find it attached.  It is not just a small patch, but a rather big file (over 30.000 lines!).

The change notes starts with:
Release 2.12.0 (2012-07-15)
===========================
First the big news, a new acceleration method that aims to be faster and
consume far less CPU than UXA is now available for selection at runtime.
This snazzy new architecture can be selected through use of
  Option "AccelMethod" "sna"
in your xorg.conf. Whilst it has been under development for some time, it
has not yet had the same degree of widespread testing of UXA, so tread
lightly. Try it and if you spot anything that can be improved, please do
report a bug.

<<<< >>>>>

Thus it is not a trivial update, but introduces a new feature.

ps: the version number is first line is wrong.  It states 2.12.0, it should be 2.20.0
Comment 8 Richard Bos 2012-07-21 09:30:39 UTC
Tried to build xf86-video-intel.spec:
- after installing 'zypper in rpmbuild' and rpmbuild -ba xf86-video-intel.spec, I get:

2.20.0-updated> rpmbuild -ba xf86-video-intel.spec
fout: line 82: Unknown tag: %x11_abi_videodrv_req

Looks like an buildrequires is missing (or not)?

It looks like that: zypper in xorg-x11-server-sdk, solves the problem

After installing many dependencies, I got this far:

cedar:~/packages/1220/SOURCES> rpmbuild -ba xf86-video-intel.spec
fout: Failed build dependencies:
        pkgconfig(xcb-aux) is needed by xf86-video-intel-2.20.0-3.9.1.x86_64
        pkgconfig(xvmc) is needed by xf86-video-intel-2.20.0-3.9.1.x86_64

cedar:/var/tmp # zypper in xcb-aux-devel xvmc-devel xcb-aux xvmc
Loading repository data...
Reading installed packages...
Package 'xcb-aux' not found.
Package 'xcb-aux-devel' not found.
'xvmc' not found in package names. Trying capabilities.
No provider of 'xvmc' found.
'xvmc-devel' not found in package names. Trying capabilities.
No provider of 'xvmc-devel' found.
Resolving package dependencies...

Nothing to do.

What packages provide pkgconfig(xcb-aux) and pkgconfig(xvmc)?
This dependency solves it: xorg-x11-devel

Is it possible to add the build dependencies: xorg-x11-server-sdk and xorg-x11-devel to the xf86-video-intel.spec file?

And after the patch does not seem to be meant for xf86-video-intel.spec.....
xf86-video-intel> find | grep xf86pciBus.c
...no result...

For which src.rpm is the patch meant?  Or can you provide an update xserver rpm (including the patch), so I could test it?
Comment 9 Stefan Dirsch 2012-07-21 15:16:17 UTC
This makes not much sense. intel is definitely the wrong X driver for this GPU. Please attach /var/log/Xorg.0.log when X works. I bet fbdev X driver is running, so intel driver bails out in a non-fatal way in that case - for whatever reasons.
Comment 10 Richard Bos 2012-07-21 16:59:02 UTC
Created attachment 499502 [details]
Xorg log with running X environment

I think that fbdev is used indeed.  I found in the log:
...
[    17.400] (==) Matched intel as autoconfigured driver 0
[    17.400] (==) Matched fbdev as autoconfigured driver 1
[    17.400] (==) Matched vesa as autoconfigured driver 2
...
[    17.415] (**) FBDEV(0): claimed PCI slot 0@0:2:0
...
[    17.546] (II) UnloadModule: "intel"
[    17.546] (II) Unloading intel
[    17.546] (II) UnloadModule: "vesa"
[    17.546] (II) Unloading vesa
[    17.546] (==) Depth 24 pixmap format is 32 bpp
[    17.546] (==) FBDEV(0): Backing store disabled
[    17.547] (==) FBDEV(0): DPMS enabled
...
Comment 11 Stefan Dirsch 2012-07-22 09:17:30 UTC
Thanks. This confirms my assumptions. Still waiting for feedback by Jose (see comment #6).
Comment 12 José Simón 2012-07-22 09:19:20 UTC
I'm sorry, I don't have much Internet access now. I can't get in, even with the failsafe mode it fails.
Comment 13 José Simón 2012-07-22 09:21:04 UTC
I'll keep trying but I don't know when I'll be able to be online again.
Comment 14 Stefan Dirsch 2012-07-22 11:01:35 UTC
Created attachment 499509 [details]
u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch

That one should fix the issue.
Comment 15 Stefan Dirsch 2012-07-22 11:03:52 UTC
Fixed in obs://X11:XOrg/xorg-x11-server and submitrequested for openSUSE:Factory.
Comment 16 Bernhard Wiedemann 2012-07-22 12:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (772279) was mentioned in
https://build.opensuse.org/request/show/128620 Factory / xorg-x11-server
Comment 17 Richard Bos 2012-07-22 16:02:51 UTC
Interesting patch.  From where did you get that impressive list with device id numbers?  Is the resulting rpm available somewhere, would it make sense that I install that one and test it?

@José: why don't you have much internet now.  Because of this problem, of because of something else?
Comment 18 Stefan Dirsch 2012-07-22 18:03:17 UTC
(In reply to comment #17)
> Interesting patch.  From where did you get that impressive list with device id
> numbers?  

Current kernel sources: drivers/gpu/drm/gma500/psb_drv.c

> Is the resulting rpm available somewhere, would it make sense that I
> install that one and test it?

Sure, why not?

  http://download.opensuse.org/repositories/X11:/XOrg/openSUSE_Factory/

--> xorg-x11-server package
Comment 19 Richard Bos 2012-07-23 18:23:13 UTC
I installed the xorg-x11-server-7.6_1.12.3-185.1 rpm, build on 22 Juli.
It has the following changelog:

* zo jul 22 2012 sndirsch@suse.com
- u_Do-not-use-intel-driver-on-Poulsbo-Oaktrail-Medfield.patch
  * Do not use intel driver on Poulsbo, Oaktrail, Medfield, CDV.
    IDs stolen from Kernel psb driver. (bnc#772279)
  * obsoletes xorg-detect-psb.patch

After the installation I rebooted the system, and it kept on working.

I verified the Xorg.0.log and the intel driver is no longer called.

After this I looked for the updated xf86-video-intel, but that is no longer present (did you remove it from the repository?).

At this point I decided to remove the xf86-video-intel rpm, and rebooted the system.  System booting fine, X is working.

Looks like a fine patch has been applied.

I'm impressed by the speed, by which this problem has been tackled, solved.

Thanks!
Comment 20 Stefan Dirsch 2012-07-24 05:05:06 UTC
> After this I looked for the updated xf86-video-intel, but that is no longer
> present (did you remove it from the repository?).

No, it's still there and an update to 2.20.1 is planned. Thanks for confirmation, that the patch fixes the issue.
Comment 21 José Simón 2012-07-25 07:59:53 UTC
It seems the issue is solved, great!. I'll try the package from the XOrg repo too. The reason why I couldn't have Internet is not related to the bug, I'm not at home these days.
Just in case, this is the output to hwinfo --gfxcard, I reinstalled openSUSE.

09: PCI 02.0: 0300 VGA compatible controller (VGA)              
  [Created at pci.319]
  Unique ID: _Znp.RnKWEMhAUhB
  SysFS ID: /devices/pci0000:00/0000:00:02.0
  SysFS BusID: 0000:00:02.0
  Hardware Class: graphics card
  Model: "Intel VGA compatible controller"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x0be2 
  SubVendor: pci 0x1043 "ASUSTeK Computer Inc."
  SubDevice: pci 0x84a9 
  Revision: 0x09
  Driver: "gma500"
  Driver Modules: "drm"
  Memory Range: 0xdfc00000-0xdfcfffff (rw,non-prefetchable)
  I/O Ports: 0xf0c0-0xf0c7 (rw)
  IRQ: 43 (no events)
  I/O Ports: 0x3c0-0x3df (rw)
  Module Alias: "pci:v00008086d00000BE2sv00001043sd000084A9bc03sc00i00"
  Driver Info #0:
    Driver Status: gma500_gfx is active
    Driver Activation Cmd: "modprobe gma500_gfx"
  Config Status: cfg=new, avail=yes, need=no, active=unknown

Primary display adapter: #9

Thanks!
Comment 22 Stefan Dirsch 2012-07-25 08:39:13 UTC
Ok. So it's the same GPU Richard is using (GMA 3600/CDV).
Comment 23 José Simón 2012-07-25 09:03:49 UTC
I can confirm it works, although I have to say I decided to add the whole repo, so I can't confirm if it works by installing only that rpm.
Thanks for the good job!!
Comment 24 Stefan Dirsch 2012-08-27 10:07:22 UTC
(In reply to comment #9)
> This makes not much sense. intel is definitely the wrong X driver for this 
> GPU.

Looks like they fixed that issue in the intel X driver (release 2.20.5).

commit ae6b3c7508d570af94f172d6a91d62d2987d654b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Aug 20 17:03:16 2012 +0100

    Check that the module that indeed i915 before using custom ioctls
    
    Thanks to Adam Jackson for pointing me towards drmGetVersion() and
    Julien Cristau for saying "Yuck!"

commit b5b76ad849bfda1e75192d1cb3c6c0fcc623bb91
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Aug 20 12:01:39 2012 +0100

    Sanity check that the driver is an i915.ko GEM device before claiming it
    
    This fixes an issue with us claiming Poulsbo and friends even though we
    do not speak their language.