Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
PATCH 2/2 Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
Those laptops define one grahpics device on a PCI Express (e.g. Internal Intel 965 card) and one on a separate PCI bus (via a PCI root bridge, e.g. in AGP case for an Nvidia graphics card).
PCI devices need to be enumerated and checked whether on the ACPI video device a graphics card is really connected to.
This patch only checks whether a PCI device exists (could also be a PCI bridge). To really get the pci_dev struct and check it whether it really is of class "graphics card" or to further make use of it in this driver, it must be checked what got set up behind a possilbe bridge.
--- drivers/acpi/video.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/acpi/video.c +20 -0
@@ -34,6 +34,8 @@#include <linux/input.h> #include <linux/backlight.h> #include <linux/video_output.h> +#include <linux/pci.h> +#include <linux/acpi.h> #include <asm/uaccess.h> #include <acpi/acpi_bus.h>
@@ -1901,11 +1903,29 @@ static int acpi_video_bus_add(struct acpacpi_status status =0 ;struct acpi_video_bus *video =NULL ;struct input_dev *input; +struct pci_dev *pci =NULL ;if (!device)return -EINVAL ; +/* TBD(trenn): +* Check against pci->class whether we have a graphics device +* If we have a bridge, find out the bus no. it is associated +* to and check whether there a graphics device sits. +* +* Not sure whether this is needed, maybe it's enough to find out +* whether there is a PCI device registered at as done now, +* but it might be helpful for the video module to access the +* video device's struct pci_dev* structure. +*/ + result =acpi_find_pci_device (device, pci); +if (result <0 ) { + printk (KERN_DEBUG PREFIX "Video device %s not physically" + " connected, ignoring\n", acpi_device_bid(device)); +return -ENODEV ; + } + video =kzalloc (sizeof (struct acpi_video_bus ),GFP_KERNEL );if (!video)return -ENOMEM ;
A message that is not in the archive (sent off-list or not yet received): 1192465995.9847.587.camel-X8wR35IVlAxolqkO4TVVkw@public.gmane.org
Quoted 1 line · Thomas Renninger
Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
I think it's ok. dmesg says:
ACPI: Video device VID not physically connected, ignoring
input: Video Bus as /devices/virtual/input/input11
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
# ls /proc/acpi/video/ VID/
(Only one entry now -> good)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
Hi,
Quoted 9 lines · Christian Birchinger
Quoted 1 line · Thomas Renninger
Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
I think it's ok. dmesg says:
ACPI: Video device VID not physically connected, ignoring
input: Video Bus as /devices/virtual/input/input11
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
No i think thats not enough because not everyone is using the ACPI video extension at this moment and at least for my ThinkPad X61 i got:
babyface@bart:~$ ls /proc/acpi/video/VID CRT0 DOS DVI0 LCD0 POST POST_info ROM info babyface@bart:~$ ls /proc/acpi/video/VID1 CRT0 DOS DVI0 LCD0 POST POST_info ROM info
input: Video Bus as /devices/virtual/input/input3
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
input: Video Bus as /devices/virtual/input/input4
ACPI: Video Device [VID1] (multi-head: yes rom: no post: no)
Anyway, also tools like lspci should show you the fake vga device and the X.org will complaint about it like:
(WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
And if you add this section (just for people who want to fix those warnings) your X server will no longer start. :) Can someone correct me if i am wrong?
Quoted 8 lines
# ls /proc/acpi/video/ VID/(Only one entry now -> good)
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
--Maik
Quoted 26 lines · Maik Broemme
Hi,
Quoted 9 lines · Christian Birchinger
Quoted 1 line · Thomas Renninger
Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
I think it's ok. dmesg says:
ACPI: Video device VID not physically connected, ignoring
input: Video Bus as /devices/virtual/input/input11
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)No i think thats not enough because not everyone is using the ACPI video extension at this moment and at least for my ThinkPad X61 i got:
babyface@bart:~$ ls /proc/acpi/video/VID CRT0 DOS DVI0 LCD0 POST POST_info ROM info babyface@bart:~$ ls /proc/acpi/video/VID1 CRT0 DOS DVI0 LCD0 POST POST_info ROM infoinput: Video Bus as /devices/virtual/input/input3
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
input: Video Bus as /devices/virtual/input/input4
ACPI: Video Device [VID1] (multi-head: yes rom: no post: no)
Quoted 8 lines
Anyway, also tools like lspci should show you the fake vga device and the X.org will complaint about it like:
(WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
And if you add this section (just for people who want to fix those warnings) your X server will no longer start. :) Can someone correct me if i am wrong?
Can you send lspci output and check your BIOS version (dmidecode |less, there should be a string like KEWWT456 and a version, not sure, AFAIK 2.01 should be about the latest...).
Thanks,
Thomas
Hi,
Quoted 30 lines · Thomas Renninger
Quoted 29 lines · Maik Broemme
Hi,
Quoted 9 lines · Christian Birchinger
Quoted 1 line · Thomas Renninger
Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
I think it's ok. dmesg says:
ACPI: Video device VID not physically connected, ignoring
input: Video Bus as /devices/virtual/input/input11
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)No i think thats not enough because not everyone is using the ACPI video extension at this moment and at least for my ThinkPad X61 i got:
babyface@bart:~$ ls /proc/acpi/video/VID CRT0 DOS DVI0 LCD0 POST POST_info ROM info babyface@bart:~$ ls /proc/acpi/video/VID1 CRT0 DOS DVI0 LCD0 POST POST_info ROM infoinput: Video Bus as /devices/virtual/input/input3
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
input: Video Bus as /devices/virtual/input/input4
ACPI: Video Device [VID1] (multi-head: yes rom: no post: no)Anyway, also tools like lspci should show you the fake vga device and the X.org will complaint about it like:
Quoted 9 lines
Quoted 5 lines
(WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
And if you add this section (just for people who want to fix those warnings) your X server will no longer start. :) Can someone correct me if i am wrong?
Can you send lspci output and check your BIOS version (dmidecode |less, there should be a string like KEWWT456 and a version, not sure, AFAIK 2.01 should be about the latest...).
First sorry Thomas, it was my fault with ACPI video, i habe at this moemnt to many different modules of that for testing and used the wrong one at time of writing the e-mail yesterday. :) It is correct now and looks like:
babyface@bart:~$ dmesg | grep video -i Boot video device is 0000:00:02.0 input: Video Bus as /devices/virtual/input/input3 ACPI: Video Device [VID] (multi-head: yes rom: no post: no) ACPI: Video device VID not physically connected, ignoring
This will fix the issue with multiple VID devices in /proc but the rest will still occur, of course this is no fault of ACPI video. X.org will still show:
(II) Primary Device is: PCI 00:02:0
(WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found (--) Chipset 965GM found
babyface@bart:~$ lspci 00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c) 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c) 00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c) 00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03) 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03) 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03) 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03) 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03) 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03) 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03) 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03) 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03) 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3) 00:1f.0 ISA bridge: Intel Corporation 82801HBM (ICH8M-E) LPC Interface Controller (rev 03) 00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03) 00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03) 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03) 03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02) 05:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba) 05:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 04) 05:00.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
ThinkPad BIOS 7SET18WW (1.04)
ThinkPad EC 7RHT16WW (1.02)
Notebook is a X61 tablet and the latest bios would be 1.06, but i had not enough time to upgrade it. With dmidecode i was not able to find a string called KEWWT456.
Quoted 3 lines
Thanks,
Thomas
--Maik
Quoted 48 lines · Maik Broemme
Hi,
Quoted 30 lines · Thomas Renninger
Quoted 29 lines · Maik Broemme
Hi,
Quoted 9 lines · Christian Birchinger
Quoted 1 line · Thomas Renninger
Recent Lenovo ThinkPads define a dummy grahpics device, find it and ignore it
I think it's ok. dmesg says:
ACPI: Video device VID not physically connected, ignoring
input: Video Bus as /devices/virtual/input/input11
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)No i think thats not enough because not everyone is using the ACPI video extension at this moment and at least for my ThinkPad X61 i got:
babyface@bart:~$ ls /proc/acpi/video/VID CRT0 DOS DVI0 LCD0 POST POST_info ROM info babyface@bart:~$ ls /proc/acpi/video/VID1 CRT0 DOS DVI0 LCD0 POST POST_info ROM infoinput: Video Bus as /devices/virtual/input/input3
ACPI: Video Device [VID] (multi-head: yes rom: no post: no)
input: Video Bus as /devices/virtual/input/input4
ACPI: Video Device [VID1] (multi-head: yes rom: no post: no)Anyway, also tools like lspci should show you the fake vga device and the X.org will complaint about it like:
Quoted 9 lines
Quoted 5 lines
(WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
And if you add this section (just for people who want to fix those warnings) your X server will no longer start. :) Can someone correct me if i am wrong?
Can you send lspci output and check your BIOS version (dmidecode |less, there should be a string like KEWWT456 and a version, not sure, AFAIK 2.01 should be about the latest...).
First sorry Thomas, it was my fault with ACPI video, i habe at this moemnt to many different modules of that for testing and used the wrong one at time of writing the e-mail yesterday. :) It is correct now and looks like:
Quoted 6 lines
babyface@bart:~$ dmesg | grep video -i Boot video device is 0000:00:02.0 input: Video Bus as /devices/virtual/input/input3 ACPI: Video Device [VID] (multi-head: yes rom: no post: no) ACPI: Video device VID not physically connected, ignoring
Great, thanks.
So what to do here now?
Matthew had some concerns that this one might break other machines, but it definitely fixes the Lenovo ThinkPads.
Shall it be put into -mm until we find offending machines we can debug and provide a better solution?
I try to find a Dell or Toshiba with video extensions (this could get difficult) and try a bit there...
If time is running out for 2.6.24, maybe we can add this check with a Lenovo dmi check added, so that at least those work as expected and remove it if we find a safer way of detecting fake devices?
Quoted 32 lines
This will fix the issue with multiple VID devices in /proc but the rest will still occur, of course this is no fault of ACPI video. X.org will still show:
(II) Primary Device is: PCI 00:02:0
(WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found (--) Chipset 965GM foundbabyface@bart:~$ lspci 00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c) 00:02.0 VGA compatible controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c) 00:02.1 Display controller: Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller (rev 0c) 00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03) 00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Contoller #4 (rev 03) 00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03) 00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03) 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03) 00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03) 00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03) 00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03) 00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03) 00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3) 00:1f.0 ISA bridge: Intel Corporation 82801HBM (ICH8M-E) LPC Interface Controller (rev 03) 00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03) 00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03) 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03) 03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02) 05:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba) 05:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 04) 05:00.2 Class 0805: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
Quoted 6 lines
ThinkPad BIOS 7SET18WW (1.04)
ThinkPad EC 7RHT16WW (1.02)Notebook is a X61 tablet and the latest bios would be 1.06, but i had not enough time to upgrade it. With dmidecode i was not able to find a string called KEWWT456.
I meant the 7SET18WW one...
The newest BIOS version is: 7SET20WW (1.06), EC is 1.02. Don't know whether it helps for your X problem you should probably ask on a X-server related list for that..., updating the BIOS first is probably a good idea and Lenovo fortunately provides BIOS iso's.
Thanks,
Thomas