gpu-manager tries to use pci-stub module as a vga driver

Bug #1397124 reported by Martin Öhrling
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-drivers-common (Ubuntu)
Fix Released
Medium
Alberto Milone

Bug Description

There is two AMD gpu:s installed in my computer. The first one uses the fglrx module and is the one that is intended to be used for the linux desktop. The second is intended for gpu passthrough and owned by pci-stub.

gpu-manager makes the assumption that a card shall be used based on vendor/device id and if the fglrx module is loaded. That is not sufficient in this case. I have not verified if the same applies to xen-pciback but it seems likely.

My workaround has been to use the fake lspci file option and a manually created xorg.conf. Everything worked fine before I changed one of the cards to use the pci-stub module. The result before use of fake_lspci was a permanently blank screen.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: ubuntu-drivers-common 1:0.2.98.4
ProcVersionSignature: Ubuntu 3.16.0-24.32-generic 3.16.4
Uname: Linux 3.16.0-24-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.14.7-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Nov 27 22:07:08 2014
InstallationDate: Installed on 2014-01-18 (312 days ago)
InstallationMedia: Ubuntu-Server 13.10 "Saucy Salamander" - Release amd64 (20131016)
SourcePackage: ubuntu-drivers-common
UpgradeStatus: Upgraded to utopic on 2014-10-29 (29 days ago)
mtime.conffile..etc.init.gpu.manager.conf: 2014-11-26T23:10:48.005964

Revision history for this message
Martin Öhrling (j-martin-m) wrote :
Revision history for this message
Alberto Milone (albertomilone) wrote :

Please attach your /var/log/gpu-manager.log and your /etc/init/gpu-manager.lspci. This is definitely a use case that I didn't handle.

Changed in ubuntu-drivers-common (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Martin Öhrling (j-martin-m) wrote :
Revision history for this message
Martin Öhrling (j-martin-m) wrote :
Revision history for this message
Martin Öhrling (j-martin-m) wrote :

This file includes stdout as well as stderr from running "gpu-manager --dry-run" without the workaround.

"Error : Failed to open /dev/dri" message appears on stderr. Last card is set to 1 and number of cards is set to 3. The first card (00:02.0) is the integrated i915 gpu. The second is a 290x card (01:00.0) and the third is the only one that is not using the pci-sub module (02:00.0).

With fake_lspci file that only includes the card intended to be used, the number of cards is set to 1 and the last cards number is set to 3.

Revision history for this message
Martin Öhrling (j-martin-m) wrote :

Module seems to be missing from the attached information. Cards of interes are:

00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06) (prog-if 00 [VGA controller])
 Subsystem: Gigabyte Technology Co., Ltd Device d000
 Flags: bus master, fast devsel, latency 0, IRQ 11
 Memory at d0400000 (64-bit, non-prefetchable) [size=4M]
 Memory at 90000000 (64-bit, prefetchable) [size=256M]
 I/O ports at f000 [disabled] [size=64]
 Capabilities: <access denied>
 Kernel driver in use: pci-stub

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii XT [Radeon R9 290X] (prog-if 00 [VGA controller])
 Subsystem: ASUSTeK Computer Inc. Device 046c
 Flags: bus master, fast devsel, latency 0, IRQ 64
 Memory at a0000000 (64-bit, prefetchable) [size=256M]
 Memory at b0000000 (64-bit, prefetchable) [size=8M]
 I/O ports at e000 [size=256]
 Memory at b0800000 (32-bit, non-prefetchable) [size=256K]
 Expansion ROM at b0840000 [disabled] [size=128K]
 Capabilities: <access denied>
 Kernel driver in use: pci-stub

02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cape Verde PRO [Radeon HD 7750 / R7 250E] (prog-if 00 [VGA controller])
 Subsystem: PC Partner Limited / Sapphire Technology Device e213
 Flags: bus master, fast devsel, latency 0, IRQ 63
 Memory at c0000000 (64-bit, prefetchable) [size=256M]
 Memory at d0000000 (64-bit, non-prefetchable) [size=256K]
 I/O ports at d000 [size=256]
 Expansion ROM at d0040000 [disabled] [size=128K]
 Capabilities: <access denied>
 Kernel driver in use: fglrx_pci

Revision history for this message
Alberto Milone (albertomilone) wrote :

Ok, the fix should actually be quite simple. I can make sure that the gpu-manager ignores devices bound to the pci-stub module or to the pciback module (for the xen-pciback use case)

Changed in ubuntu-drivers-common (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Alberto Milone (albertomilone) wrote :

Can you test the packages available here, please? (attach the log)

http://people.canonical.com/~amilone/lp1397124/

Please do not use the fake lspci file for testing, so that I can see if the fix works.

Revision history for this message
Martin Öhrling (j-martin-m) wrote :

Got a working desktop without the lspci file!

There is still an error message in log: "Error : Failed to open /dev/dri"

Could that be related to error messages from dmesg?

[ 5.484514] vgaarb: this pci device is not a vga device
[ 5.484520] vgaarb: this pci device is not a vga device
[ 5.484523] vgaarb: this pci device is not a vga device
[ 5.484530] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=none:owns=none
[ 5.484536] vgaarb: this pci device is not a vga device
[ 5.484539] vgaarb: this pci device is not a vga device
[ 5.484542] vgaarb: this pci device is not a vga device
[ 5.484546] vgaarb: this pci device is not a vga device
[ 5.484549] vgaarb: this pci device is not a vga device
[ 5.484553] vgaarb: this pci device is not a vga device
[ 5.484557] vgaarb: this pci device is not a vga device
[ 5.484560] vgaarb: this pci device is not a vga device
[ 5.484564] vgaarb: this pci device is not a vga device
[ 5.484568] vgaarb: this pci device is not a vga device
[ 5.484572] vgaarb: this pci device is not a vga device
[ 5.484576] vgaarb: this pci device is not a vga device
[ 5.484580] vgaarb: this pci device is not a vga device
[ 5.484584] vgaarb: this pci device is not a vga device
[ 5.484588] vgaarb: this pci device is not a vga device
[ 5.484595] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none
[ 5.484602] vgaarb: this pci device is not a vga device
[ 5.484611] vgaarb: this pci device is not a vga device
[ 5.484617] vgaarb: this pci device is not a vga device
[ 5.484623] vgaarb: this pci device is not a vga device
[ 5.484629] vgaarb: this pci device is not a vga device
[ 5.484634] vgaarb: this pci device is not a vga device
[ 5.484640] vgaarb: this pci device is not a vga device
[ 5.484647] vgaarb: this pci device is not a vga device
[ 5.744119] fglrx_pci 0000:02:00.0: irq 63 for MSI/MSI-X
[ 5.744494] <6>[fglrx] Firegl kernel thread PID: 2276
[ 5.744545] <6>[fglrx] Firegl kernel thread PID: 2277
[ 5.744598] <6>[fglrx] Firegl kernel thread PID: 2278
[ 5.744658] <6>[fglrx] IRQ 63 Enabled
[ 5.750607] <6>[fglrx] Reserved FB block: Shared offset:0, size:1000000
[ 5.750609] <6>[fglrx] Reserved FB block: Unshared offset:f838000, size:4000
[ 5.750609] <6>[fglrx] Reserved FB block: Unshared offset:f83c000, size:4c4000
[ 5.750610] <6>[fglrx] Reserved FB block: Unshared offset:3ffee000, size:12000
[ 6.150848] pci-stub 0000:01:00.0: irq 64 for MSI/MSI-X
[ 6.151213] <6>[fglrx] Firegl kernel thread PID: 2280
[ 6.151317] <6>[fglrx] Firegl kernel thread PID: 2281
[ 6.151424] <6>[fglrx] Firegl kernel thread PID: 2282
[ 6.151503] <6>[fglrx] IRQ 64 Enabled
[ 6.174634] <6>[fglrx] Reserved FB block: Shared offset:0, size:1000000
[ 6.174636] <6>[fglrx] Reserved FB block: Unshared offset:f738000, size:4000
[ 6.174637] <6>[fglrx] Reserved FB block: Unshared offset:f73c000, size:4c4000
[ 6.174637] <6>[fglrx] Reserved FB block: Unshared offset:fc00000, size:100000
[ 6.174638] <6>[fglrx] Reserved FB block: Unshared offset:ffff4000, size:c000

Revision history for this message
Alberto Milone (albertomilone) wrote : Re: [Bug 1397124] Re: gpu-manager tries to use pci-stub module as a vga driver

On 04-12-14 18:17:07, Martin Öhrling wrote:
> Got a working desktop without the lspci file!
>

Great, thanks for testing. I'll upload my fix soon.

> There is still an error message in log: "Error : Failed to open
> /dev/dri"
>
> Could that be related to error messages from dmesg?

No, that's just error output that I should silence, it's not that
relevant to gpu-manager's behaviour.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-drivers-common - 1:0.2.98.9

---------------
ubuntu-drivers-common (1:0.2.98.9) vivid; urgency=medium

  * gpu-manager.c:
    - Ignore pci passthroughs (LP: #1397124).
 -- Alberto Milone <email address hidden> Mon, 08 Dec 2014 10:56:17 +0100

Changed in ubuntu-drivers-common (Ubuntu):
status: In Progress → Fix Released
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.