Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 489382 - x11-drivers/xf86-video-mga won't load if kernel KMS driver mgag200 is loaded
Summary: x11-drivers/xf86-video-mga won't load if kernel KMS driver mgag200 is loaded
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-25 14:58 UTC by Jeremy Johnson
Modified: 2013-10-25 21:46 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Johnson 2013-10-25 14:58:16 UTC
I upgraded kernel to 3.10.7-gentoo-r1 and switched from old matroxfb framebuffer graphics drivers to KMS mgag200 drivers following WIKI: 
https://wiki.gentoo.org/wiki/Xorg/Configuration

After rebooting, got nice graphical boot up, so KMS working, yeah!
But xorg-server refused to start because it said the kernel was already claiming the grahics device.

So I blacklisted mgag200 and rebuilt initramfs with genkernel, rebooted
without KMS support, and xorg-server now starts with mga driver. After
starting xorg-server, I can now modprobe mgag200 without issue. But if I load mgag200 BEFORE starting X, mga won't load.

Reproducible: Always

Steps to Reproduce:
1. load mgag200 KMA kernel graphics driver
2. startx using mga driver
3.
Actual Results:  
X won't start because graphics device claimed by another driver

Expected Results:  
X should start even if KMS framebuffer in use; otherwise what would be the point of having fancy boot graphics but no GUI once booted?

# lspci -k
VGA compatible controller: Matrox Electronics Systems Ltd. MGA G200eW WPCM450 (rev 0a)
Subsystem: Super Micro Computer Inc Device a711
Kernel driver in use: mgag200
Kernel modules: mgag200

# zgrep CONFIG_DRM /proc/config.gz |grep -v "^#"
CONFIG_DRM=y
CONFIG_DRM_KMS_HELPER=m
CONFIG_DRM_TTM=m
CONFIG_DRM_MGA=m
CONFIG_DRM_MGAG200=m

# lsmod|grep mga
mgag200                27501  1 
syscopyarea             2946  1 mgag200
sysfillrect             2974  1 mgag200
sysimgblt               2162  1 mgag200
drm_kms_helper         29509  1 mgag200
ttm                    63316  1 mgag200

BTW, once I load the KMS mgag200 driver, I can't seem to unload it or the modules using it (kernel says they're all in use)


x11-base/xorg-server-1.14.3-r2
x11-drivers/xf86-video-mga-1.6.2
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-10-25 15:14:32 UTC
I believe this is on purpose.
Use either matroxfb + xf86-video-mga, or mgag200 + xf86-video-modesetting.
Comment 2 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-10-25 15:21:27 UTC
(In reply to Jeremy Johnson from comment #0)
> BTW, once I load the KMS mgag200 driver, I can't seem to unload it or the
> modules using it (kernel says they're all in use)

That is normal and expected too, you need to detach the KMS driver from the framebuffer console before you can unload it.
Comment 3 Jeremy Johnson 2013-10-25 21:46:34 UTC
Thank you.

I installed xf86-video-moesetting, 
then removed mgag200 from /etc/modprobe.d/blacklist.conf
and ran genkernel to get a new initramfs
and rebooted

All is now working!