Short version: kernel module driver "mgag200" did the trick for me. In kernel 
config, it is represented by CONFIG_DRM_MGAG200.
http://cateee.net/lkddb/web-lkddb/DRM_MGAG200.html

I found a bug that is relevant to this one:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1642470 It says
that the kernel module "mgag200" was blacklisted from kernels due to
this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1042903 I
tried manually compiling the driver as a module, adding it to a kernel
and it worked.

I had problems with MGA G200e [Pilot] ServerEngines (SEP1) card. I tried
Zoltán's X.org regression hack, I also tried using a recompiled up-to-
date mga_drv.so, the library in xserver-xorg-video-mga, where the
maintainers claim to support G200e chip
(https://cgit.freedesktop.org/xorg/driver/xf86-video-mga/, commits from
July 2016). Nothing worked. I am, however, just an intermediate user, so
I might have made a mistake somewhere. I also do not know the difference
between a kernel driver, X.org driver, and how they interact together
and how they are used. Therefore I will trust someone more knowledgeable
to put this all together, and I am just going to describe what I did to
make it work :-)

As a reference, I did a fresh install of Linux Mint 18.1 MATE, where the
GPU was unclaimed:

$ uname -a
Linux rack3test 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 
x86_64 x86_64 x86_64 GNU/Linux
$ sudo lshw -c display
  *-display UNCLAIMED    
       description: VGA compatible controller
       product: MGA G200e [Pilot] ServerEngines (SEP1)
       vendor: Matrox Electronics Systems Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       version: 05
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list
       configuration: latency=0
       resources: memory:c2000000-c2ffffff memory:c1010000-c1013fff 
memory:c0800000-c0ffffff memory:c1000000-c100ffff

Then I tried two approaches, both worked.

1. the easier way is to compile and install just the module mgag200. I
downloaded the sources and headers for the current kernel, compiled and
installed the module, and then added it in the initramfs image. Then,
after reboot, it worked. Here are the resources I used:

http://askubuntu.com/questions/168279/how-do-i-build-a-single-in-tree-kernel-module
http://askubuntu.com/questions/676707/how-to-load-a-module-in-initrd

In the first one, do not forget to use your kernel version and the path
to the module (drivers/gpu/drm/mgag200). Also it is probably more
convenient to use "$ make menuconfig" instead of editing the .config
file with vi (you need the ncurses package though). In the menu, find
Graphics Drivers --> Graphics Support --> Kernel modesetting driver for
MGA G200 server engines, and enable it as a module. When updating
initramfs, it might be necessary to specify the kernel version, for
example $ update-initramfs -u -k 4.4.0-66-generic. If you have multiple
kernels, the command will tell you which initramfs it updated.

The result after a reboot:
$ uname -a
Linux rack3test 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 
x86_64 x86_64 x86_64 GNU/Linux
$ sudo lshw -c display
  *-display              
       description: VGA compatible controller
       product: MGA G200e [Pilot] ServerEngines (SEP1)
       vendor: Matrox Electronics Systems Ltd.
       physical id: 0
       bus info: pci@0000:02:00.0
       version: 05
       width: 32 bits
       clock: 33MHz
       capabilities: pm pciexpress msi vga_controller bus_master cap_list rom
       configuration: driver=mgag200 latency=0
       resources: irq:16 memory:c2000000-c2ffffff memory:c1010000-c1013fff 
memory:c0800000-c0ffffff memory:c1000000-c100ffff

2. Second way is building a new kernel, which is much longer;
unfortunately, I tried it first :-) I downloaded the current stable
kernel sources from kernel.org, version 4.10.1. Then I used the existing
kernel config file for 4.4.0-66-generic, updated it with default choices
to 4.10.1 and enabled CONFIG_DRM_MGAG200 as a module. I compiled the
whole kernel and installed it, the new driver "mgag200" loads
automatically and it works.

I used Linux Mint 18.1 for testing, but the installed system is Mint
17.2. I tried compiling the kernel module there for kernel version
3.16.0-38-generic, but after enabling module mgag200 with modprobe, the
screen turned black and monitor went into sleep mode. I had to switch to
tty1 and reboot. After reboot, the module mgag200 was visible in lsmod,
but probably not active and the GPU was still unclaimed with no hardware
acceleration.

Maybe I did something wrong, but it is possible that the mgag200 module
helps only with newer kernels.

You can check whether your device is recognized by this driver in the
first link in this comment. Numeric ID (vendor, device) can be displayed
by running $ sudo lshw -c display -numeric, it will be in square
brackets under "product".

If anyone tries this, please let me know if it worked.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to xorg-server in Ubuntu.
https://bugs.launchpad.net/bugs/1316035

Title:
  matrox g200eR2 is unclaimed in 14.04

Status in xorg-server package in Ubuntu:
  Confirmed

Bug description:
  On a certified Dell PowerEdge T620 server
  (http://www.ubuntu.com/certification/hardware/201207-11426/)

  The matrox video card is not recognised:
  lspci | grep VGA
  0a:00.0 VGA compatible controller: Matrox Electronics Systems Ltd. G200eR2

  lshw -C display
    *-display UNCLAIMED     
         description: VGA compatible controller
         product: G200eR2
         vendor: Matrox Electronics Systems Ltd.
         physical id: 0
         bus info: pci@0000:0a:00.0
         version: 00
         width: 32 bits
         clock: 33MHz
         capabilities: pm vga_controller bus_master cap_list
         configuration: latency=64 maxlatency=32 mingnt=16
         resources: memory:d8000000-d8ffffff memory:deffc000-deffffff 
memory:de000000-de7fffff

  Thus xserver is not hardver accelerated.

  Also /dev/dri and /dev/dri/card0 is missing.

  kernel module mga is not loaded, although if i manually load by modprobe it 
works fine
  modprobe mga
  lsmod | grep mga
  mga                    40811  0 
  drm                   302817  1 mga

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/1316035/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to