Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vgaarb: this pci device is not a vga device #159

Closed
LagodichYuriy opened this issue May 18, 2012 · 18 comments
Closed

vgaarb: this pci device is not a vga device #159

LagodichYuriy opened this issue May 18, 2012 · 18 comments

Comments

@LagodichYuriy
Copy link

Trying to run a program via optirun + wine. Dmesg:

[  365.250501] vgaarb: this pci device is not a vga device
[  396.002277] vgaarb: this pci device is not a vga device

Terminal:

XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":8"

Trying to run optirun + glxgears (workable):

[look@me Warcraft III]$ optirun glxgears
5180 frames in 5.0 seconds = 1035.849 FPS
5162 frames in 5.0 seconds = 1032.246 FPS
5179 frames in 5.0 seconds = 1035.673 FPS

xorg.conf.nvidia:

[look@me ~]$ cat /etc/bumblebee/xorg.conf.nvidia 
Section "ServerLayout"
    Identifier "Layout0"
    Option "AutoAddDevices" "false"
EndSection

Section "Device"
    Identifier "Device1"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    Option "NoLogo" "true"
    Option "UseEDID" "false"
    Option "ConnectedMonitor" "DFP"
    BusID "PCI:01:00:0"
EndSection

Can someone help me with this issue?

@Lekensteyn
Copy link
Member

Have a look at #42 (comment)

@LagodichYuriy
Copy link
Author

Is not working for me. Stil vgaarb: this pci device is not a vga device in dmesg.

@Lekensteyn
Copy link
Member

Weird, so you first opened a shell with optirun bash, and then tried to wine yourprogram right? glxgears works, but your wine program fails? Does it work without optirun?

@LagodichYuriy
Copy link
Author

Weird, so you first opened a shell with optirun bash, and then tried to wine yourprogram right?

Right.

glxgears works, but your wine program fails?

Yep.

Does it work without optirun?

Yep.

@Lekensteyn
Copy link
Member

Have a look at your /var/log/Xorg.8.log, and any output from the wine command. Maybe it helps.

@LagodichYuriy
Copy link
Author

http://pastebin.com/en1XajaN

What's about vgaarb? That's not seems good.

@Lekensteyn
Copy link
Member

May I ask you to post a list of your PCI devices lspci -nn, and the model name? I do not know what exactly is causing this, perhaps it's wine trying to probe for hardware?

@LagodichYuriy
Copy link
Author

[look@me ~]$ lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 2nd Generation Core Processor Family DRAM Controller [8086:0104] (rev 09)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port [8086:0101] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0116] (rev 09)
00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 [8086:1c3a] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 04)
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 [8086:1c10] (rev b4)
00:1c.4 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 [8086:1c18] (rev b4)
00:1d.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 [8086:1c26] (rev 04)
00:1f.0 ISA bridge [0601]: Intel Corporation HM65 Express Chipset Family LPC Controller [8086:1c49] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller [8086:1c03] (rev 04)
00:1f.3 SMBus [0c05]: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller [8086:1c22] (rev 04)
01:00.0 3D controller [0302]: NVIDIA Corporation GF108 [GeForce GT 540M] [10de:0df4] (rev a1)
02:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller [14e4:4727] (rev 01)
03:00.0 USB controller [0c03]: NEC Corporation uPD720200 USB 3.0 Host Controller [1033:0194] (rev 04)

01:00.0 3D controller: NVIDIA Corporation GF108 [GeForce GT 540M] (rev a1)
    Subsystem: Samsung Electronics Co Ltd Device c0a5
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at f5000000 (32-bit, non-prefetchable) [size=16M]
    Memory at e0000000 (64-bit, prefetchable) [size=256M]
    Memory at f0000000 (64-bit, prefetchable) [size=32M]
    I/O ports at d000 [size=128]
    [virtual] Expansion ROM at f6000000 [disabled] [size=512K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Endpoint, MSI 00
    Capabilities: [b4] Vendor Specific Information: Len=14 <?>
    Capabilities: [100] Virtual Channel
    Capabilities: [128] Power Budgeting <?>
    Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
    Kernel driver in use: nvidia

@Lekensteyn
Copy link
Member

In an attempt to fix that vgaarb message, please try the below patch on your kernel. It adds detection for the "3D controller" device. A similar detection was added to bbswitch.

http://pastebin.com/wpmFi38k

I do not know whether this solves the original issue, but at least the vgaarb message should then be gone. Please report back any results.

@LagodichYuriy
Copy link
Author

So how to apply this patch on my kernel?

@Lekensteyn
Copy link
Member

You should ask the Arch guys. Basically, download the patch from http://pastebin.com/wpmFi38k (mind the tabs!) and apply it by running patch -Np1 -i file-you-downloaded.patch before running make, e.g. after https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/linux#n63
See https://wiki.archlinux.org/index.php/Kernels/Compilation/Arch_Build_System

@Lekensteyn
Copy link
Member

Any feedback?

@LagodichYuriy
Copy link
Author

I haven't any time to patch a kernel right now.
Last time I've tried it, the kernel is not boot at all.

@gdevenyi
Copy link

Having just come across this issue and finding you patch, I applied it to 3.12-rc6, it successfully applied, output of dmesg | grep vgaarb

[ 0.679875] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[ 0.679881] vgaarb: device added: PCI:0000:01:00.0,decodes=io+mem,owns=none,locks=none
[ 0.679883] vgaarb: loaded
[ 0.679884] vgaarb: bridge control possible 0000:01:00.0
[ 0.679886] vgaarb: no bridge control possible 0000:00:02.0
[ 2.585315] usb usb1: Manufacturer: Linux 3.12.0-rc6-custom-vgaarb ehci_hcd
[ 2.595307] usb usb2: Manufacturer: Linux 3.12.0-rc6-custom-vgaarb ehci_hcd
[ 2.595986] usb usb3: Manufacturer: Linux 3.12.0-rc6-custom-vgaarb xhci_hcd
[ 2.596325] usb usb4: Manufacturer: Linux 3.12.0-rc6-custom-vgaarb xhci_hcd
[ 4.564778] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=none:owns=none
[ 90.357188] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none

Looks to have worked properly? Perhaps it should be forwarded upstream?

@gdevenyi
Copy link

vgaarb patch fixes the warnings, applies cleanly, and doesn't seem to cause any problems.

Remaining questions

  1. Is there actually any benefit?
  2. Should this be raised as a kernel bug?

@Lekensteyn
Copy link
Member

  1. I don't think so, the VGA arbiter regulates the use of IO addresses for legacy devices. Newer devices should allow arbitary remappings.
  2. Maybe (for the warning).

See https://www.kernel.org/doc/Documentation/vgaarbiter.txt for more details.

@gdevenyi
Copy link

I'll raise a bug in the kernel bugzilla

@gdevenyi
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants