Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dual head with G450 ... how ?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 476
Location: Close to Annecy (France)

PostPosted: Thu May 03, 2012 10:14 pm    Post subject: Dual head with G450 ... how ? Reply with quote

Hello,

I have a G450 video card on my Gentoo system but ... I'm facing problem to use a second monitor on this dual head card.

My main monitor is a SUN CRT screen that handle without trouble 1280x960.
The second one is an LCD that can't go above 1024x768.

I followed the wiki and the one related to Matrox, but I haven't loaded matrox driver has it is said to use HAL ... whereas HAL is not anymore used on my system.

1/ Without xorg configuration file, I got a copy of my 1st screen to the second one.

2/ I created a file named 10-screen.conf as the documentation :
Code:
Section "Device"
 Identifier "Matrox"
 Driver     "mga"
 BusID      "PCI:1:0:0"        #check this with lspci
EndSection
Section "Screen"
 Identifier "Screen Merged"
 Device     "Matrox"
 Monitor    "Monitor0"
 Option     "MergedFB"         "on"
 Option     "Monitor2Position" "LeftOf" #Position of the second Monitor
 Option     "MetaModes"        "1024x768-1024x768 800x600-800x600 1024x768 800x600" #Display sizes
 # add the second Monitor data here
 Option     "Monitor2HSync"    "30-80"
 Option     "Monitor2VRefresh" "50-120"
 DefaultDepth 16
 SubSection "Display"
  Virtual 2048 768
  Depth 16
  Modes    "1024x768" "800x600"
 EndSubSection
EndSection


In this case, I got a very large screen of 2048x768 with a 800x600 view port.
LXRandR detect only one screen.
The 2nd screen is a copy of the 1st one.

3/ If I add a new file named 20-xinerama.conf as
Code:
Section "ServerFlags"
   Option    "Xinerama" "true"
EndSection


Idem as #2 : large screen and screen 2 a copy of the main one.
But this time LXRandR fails saying it "can't get screen information"

4/ I remove 10-screen.conf but I keep 20-xinerama.conf

I got my original 1280x960, screen 2 seems again a copy of screen 1 ... but it isn't supported by the monitor and LXRandR is failing.

So ... any clue to make it working ?


Last edited by destroyedlolo on Sat Jul 28, 2012 10:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Thu May 03, 2012 11:01 pm    Post subject: Reply with quote

The matrox driver doesn't support xrandr, so no surprise lxrandr doesn't work.

The HAL mentioned on that wiki page isn't the HAL, the thingy Linux used to have for device mounting and such. It's a binary module for the matrox driver. The page is quite clear that you *need* it. However, which version of xf86-video-mga are you using? Version 1.5 removes support for that module, which means you're pretty much screwed :)
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2584
Location: UK

PostPosted: Fri May 04, 2012 1:27 am    Post subject: Reply with quote

I had a G450 working with two 1024x768 screens a long time ago - I'm pretty sure the HAL thing is only required for cards with an on-board TV encoder. Try it with lower resolutions/colour depths, this might be a VRAM shortage.
_________________
runit-init howto | Overlay
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 476
Location: Close to Annecy (France)

PostPosted: Fri May 04, 2012 8:16 am    Post subject: Reply with quote

Ant P. wrote:
I had a G450 working with two 1024x768 screens a long time ago - I'm pretty sure the HAL thing is only required for cards with an on-board TV encoder. Try it with lower resolutions/colour depths, this might be a VRAM shortage.


Did you installed Matrox drivers ?
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2584
Location: UK

PostPosted: Fri May 04, 2012 11:22 am    Post subject: Reply with quote

No, just the X.Org driver.
_________________
runit-init howto | Overlay
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 476
Location: Close to Annecy (France)

PostPosted: Fri May 04, 2012 5:03 pm    Post subject: Reply with quote

Ha ... and with or without Xinerama ?

And screen 2 was an "extension" of screen 1 ?
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 476
Location: Close to Annecy (France)

PostPosted: Sat May 05, 2012 10:00 am    Post subject: Reply with quote

Well, I tried with 800x600 resolution and only 1 screen is viewed (in this case, screen 2 is a copy of screen 1 as supported by the monitor).

I did some check using Ubuntu 10.04 LTS and it's unfortunately the same ... :?

I'm discouraged as I'm starting to edit some video with Cinelerra and having a second screen would help :cry:
Back to top
View user's profile Send private message
Gusar
Advocate
Advocate


Joined: 09 Apr 2005
Posts: 2643
Location: Slovenia

PostPosted: Sat May 05, 2012 12:12 pm    Post subject: Reply with quote

Well, you haven't said which driver version you're using. And did you install the hal module?

I'm reading around now what the deal is with matrox and dual-head, there's some interesting discussion here. According to that, Ubuntu should contain a fix. However, I see you've tested that and it doesn't work. Though possibly Ubuntu doesn't have the hal module by default.

If all else fails, buy a new graphic card. If you don't have a PCIe slot, there's this: http://geizhals.at/685133
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 476
Location: Close to Annecy (France)

PostPosted: Sun May 06, 2012 7:46 am    Post subject: Reply with quote

Gusar wrote:
Well, you haven't said which driver version you're using. And did you install the hal module?

Code:

[    30.599] (II) LoadModule: "mga"
[    30.599] (II) Loading /usr/lib/xorg/modules/drivers/mga_drv.so
[    30.631] (II) Module mga: vendor="X.Org Foundation"
[    30.631]    compiled for 1.11.2, module version = 1.4.13
[    30.631]    Module class: X.Org Video Driver
[    30.631]    ABI class: X.Org Video Driver, version 11.0


Gusar wrote:
I'm reading around now what the deal is with matrox and dual-head, there's some interesting discussion here. According to that, Ubuntu should contain a fix. However, I see you've tested that and it doesn't work. Though possibly Ubuntu doesn't have the hal module by default.

Well, I have LTS 10.04 and it seems it doesn't contains the fix as well, and will be only in the next LTS, as per last comment.
Quote:
12.04 LTS is soon released, and includes the fix.

(in addition to performance boost I found with Gentoo, it's one of the raison I leave Ubuntu : they are rarely solving issues found but by upgrading ...)
But is this fix included in Gentoo (as not only related to Ubuntu) ? If not, is it worth a try ?

I'm trying now with Matrox HAL module ... But
  1. which version of the driver I have to use ? The readme said
    Quote:
    XFree86 4.3.0, and X.org versions 6.7.0, 6.8.0 or 6.8.1
    whereas I have
    Code:
    xorg-server-1.11.2-r2

  2. where to put this driver ? In my actual system, I found a mga_drv.o driver file only in the kernel source tree ... :roll:
Back to top
View user's profile Send private message
raygun
n00b
n00b


Joined: 03 Sep 2011
Posts: 24

PostPosted: Fri Jul 06, 2012 6:42 am    Post subject: Reply with quote

destroyedlolo wrote:

But is this fix included in Gentoo (as not only related to Ubuntu) ? If not, is it worth a try ?

I deduce that the fix is not in Gentoo, on the evidence that this doesn't work in a current Gentoo installation.

Further, there is no obvious way to apply the fix. The latest patch in that bug is from 2010, and does not appear to correlate at all to the current mga driver source, in that the two files it tries to patch -- mga_driver.c and mga.h -- do not exist in drivers/gpu/drm/mga in the current (3.2.12 kernel) source tree.

destroyedlolo wrote:

which version of the driver I have to use ? The readme said
Quote:
XFree86 4.3.0, and X.org versions 6.7.0, 6.8.0 or 6.8.1
whereas I have
Code:
xorg-server-1.11.2-r2


Right. The latest mga_hal_drv I found was in a 2006 archive that supports up to X server 7.0.0. As you note, in the current numbering system, X is at 1.11.*, implying the newest HAL driver is so old it uses an obsolete X version numbering scheme.

So, does anyone know where to find either a current

  • patch for the standard Linux mga driver, or
  • Matrox HAL driver?

Or another way to get this working?
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Sat Jul 07, 2012 3:41 am    Post subject: Reply with quote

One of the best resources for G450 I found was http://forum.tuxx-home.at/viewtopic.php?f=5&t=91, my experience with it is documented there too.

But that was 2007, and already support for the G450 was dropping. For me dual-head never worked properly (not at all above 1024x768), and you could pretty much kiss goodbye to OpenGL. After 2-3 years I finally gave up and bought an old nVidia NV40 series card. I wish I'd done that much sooner.
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 476
Location: Close to Annecy (France)

PostPosted: Sat Jul 07, 2012 1:34 pm    Post subject: Reply with quote

Perhasp there is a solution : (but I'm far than a X specialist so bellow is probably ^$&#^@* :evil: )

it seems the matrox kernel module is able to deal with dual head (as per /usr/src/linux/Documentation/fb/matroxfb.txt).

And it seems if we configure X11 to use FB_Dev, it will use this kernel driver ... the problem is I ave stricly no idea how to configure the relationship b/w heads ...
Back to top
View user's profile Send private message
raygun
n00b
n00b


Joined: 03 Sep 2011
Posts: 24

PostPosted: Sat Jul 14, 2012 8:50 am    Post subject: Reply with quote

raygun wrote:

The latest patch in that bug is from 2010, and does not appear to correlate at all to the current mga driver source, in that the two files it tries to patch -- mga_driver.c and mga.h -- do not exist in drivers/gpu/drm/mga in the current (3.2.12 kernel) source tree.


All right, I've at least figured out what I was doing wrong with the patch. It's not a patch for the kernel mga driver, but for the x11-drivers/xf86-video-mga package.

Unfortunately, while it's very easy to patch and rebuild the kernel, gentoo makes it painfully difficult to apply a patch to the source of one of its packages. So, my results are still inconclusive as to whether this patch fixes anything, but at least now I know where to apply the patch so I can make the attempt.
Back to top
View user's profile Send private message
genstorm
Advocate
Advocate


Joined: 05 Apr 2007
Posts: 2482
Location: Austria

PostPosted: Sat Jul 14, 2012 11:01 am    Post subject: Reply with quote

raygun wrote:
Unfortunately, while it's very easy to patch and rebuild the kernel, gentoo makes it painfully difficult to apply a patch to the source of one of its packages. So, my results are still inconclusive as to whether this patch fixes anything, but at least now I know where to apply the patch so I can make the attempt.

Code:
# mkdir -p /etc/portage/patches/x11-drivers/xf86-video-mga

Place the *.patch file there and watch emerge doing the work.
_________________
backend.cpp:92:2: warning: #warning TODO - this error message is about as useful as a cooling unit in the arctic
Back to top
View user's profile Send private message
raygun
n00b
n00b


Joined: 03 Sep 2011
Posts: 24

PostPosted: Sat Jul 14, 2012 5:36 pm    Post subject: Reply with quote

genstorm wrote:
Place the *.patch file there and watch emerge doing the work.

Thank you! I wish I'd found this simple instruction when searching the web for how to apply a patch, rather than the Byzantine process of creating a portage overlay and hacking the ebuild script.
Back to top
View user's profile Send private message
raygun
n00b
n00b


Joined: 03 Sep 2011
Posts: 24

PostPosted: Fri Jul 20, 2012 9:19 am    Post subject: Reply with quote

raygun wrote:
The latest patch in that bug is from 2010

I can now confirm that this patch is not in the Gentoo x11-drivers/xf86-video-mga package. I applied it using genstorm's advice, and got an updated /usr/lib/xorg/modules/drivers/mga_drv.so.

Unfortunately, the patched driver failed to have any effect on the problem. The second screen still echoes exactly what the first screen shows, regardless of what X configuration settings I try. This is rather useless behavior.

In chasing down some other leads from the page kimmie suggested, I found a comment from an xf86-video-mga developer stating, "G450 dual head works without mga_hal." Couldn't prove it by me. But this comment is from 2007. He also says MergedFB support would likely be included in the driver soon. I can confirm that, in the latest driver, specifying Option "MergedFB" generates the error:
Code:
HALLib not loaded! NOT using "Merged Framebuffer" mode.
So the option most likely to solve the problem continues to depend on a driver that doesn't exist for any modern version of X.org.

I have not yet tried the kernel's Matrox framebuffer driver, so I'm not out of tricks yet. (But I am pretty sick of working on this. I'd love to solve the problem by just going out and buying a different graphics card, but until that money tree in the back yard blooms, I'm stuck with the hardware I have.)
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Fri Jul 20, 2012 3:38 pm    Post subject: Reply with quote

Hey raygun, I know it's not that likely to help but I dug out my old working 2007 xorg.conf http://bpaste.net/show/35959/
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 476
Location: Close to Annecy (France)

PostPosted: Fri Jul 20, 2012 4:06 pm    Post subject: Reply with quote

But do you think my idea can work ?
destroyedlolo wrote:

it seems the matrox kernel module is able to deal with dual head (as per /usr/src/linux/Documentation/fb/matroxfb.txt).

And it seems if we configure X11 to use FB_Dev, it will use this kernel driver ... the problem is I ave stricly no idea how to configure the relationship b/w heads ...


And if so, how can we configure respective resolution ?
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Fri Jul 20, 2012 4:23 pm    Post subject: Reply with quote

Using the framebuffer might work.. the only way to find out is to try. Doc file you mentioned says you have to use fbset to set secondary resolution.
Back to top
View user's profile Send private message
raygun
n00b
n00b


Joined: 03 Sep 2011
Posts: 24

PostPosted: Sat Jul 28, 2012 9:15 am    Post subject: Reply with quote

kimmie wrote:
I dug out my old working 2007 xorg.conf http://bpaste.net/show/35959/

WAHOO!!! That, in fact, helped immensely! Thank you for going through whatever trials you had to endure in 2007 to save me the trouble of replicating it all five years later! :D

Once I got a configuration up and running, I took the xorg.conf down to bare bones (to where it didn't work any more) and then started adding bits back in until it did work again. So I think I've found the minimal configuration necessary to get dual-head working for the G450:

Code:
Section "ServerLayout"
        Identifier     "Xinerama"

        Screen         "Screen 1" LeftOf "Screen 2"
        Screen         "Screen 2"
EndSection

Section "ServerFlags"
    Option "Xinerama"
EndSection


Section "Device"
        Identifier  "G450"
        Driver      "mga"
        Screen 0
EndSection

Section "Device"
        Identifier  "G450-2"
        Driver      "mga"
        Screen 1
EndSection

Section "Screen"
        Identifier "Screen 1"
        Device     "G450"
EndSection

Section "Screen"
        Identifier "Screen 2"
        Device     "G450-2"
EndSection


I should mention that I am also using the x11-drivers/xf86-video-mga patch posted about previously. I don't know whether this is necessary or not; once I got a working X, I was reluctant to undo the patch and try it again just for curiosity's sake.

So thank you, again, Kimmie, for saving an old xorg.conf that I'm sure you thought you'd never have need of again!
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 476
Location: Close to Annecy (France)

PostPosted: Sat Jul 28, 2012 11:03 am    Post subject: Reply with quote

Hum, interesting.
Which version of X are U using and with resolution ?
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Sat Jul 28, 2012 11:43 am    Post subject: Reply with quote

raygun wrote:
So thank you, again, Kimmie, for saving an old xorg.conf that I'm sure you thought you'd never have need of again!


:D Terrific! Some good news on an outstandingly crap day, that's a relief :)
Back to top
View user's profile Send private message
raygun
n00b
n00b


Joined: 03 Sep 2011
Posts: 24

PostPosted: Sat Jul 28, 2012 7:26 pm    Post subject: Reply with quote

destroyedlolo wrote:
Which version of X are U using and with resolution ?


I originally installed x11-base/xorg-server-1.11.4-r1 with the x11-drivers/xf86-video-mga-1.4.13 driver (with the patch applied). Kimmie's config file gave me a working dual-head desktop with these packages. I have since upgraded to xorg-server-1.12.2 and xf86-video-mga-1.5.0 (again patched), and things still seem to be working.

My monitors are both Dell Trinitron P990s.

Resolution has been tricky. If I tried to force a particular resolution, it would sometimes honor my request and sometimes not -- and sometimes give different behaviors on subsequent starts of X even with the exact same config file in place. Most irritating is when I would get different resolutions on the two monitors, even when I had a config file specifying only one resolution.

I'm currently running with the exact config file I posted above, which specifies no resolution and lets X autodetect it. It's giving me 1600x1200 on both screens. I have no particular faith I'll get the same results next time I have to start X; barring crashes or power failures, hopefully that won't be for a long time!
Back to top
View user's profile Send private message
raygun
n00b
n00b


Joined: 03 Sep 2011
Posts: 24

PostPosted: Sat Jul 28, 2012 7:30 pm    Post subject: Reply with quote

kimmie wrote:
Some good news on an outstandingly crap day, that's a relief :)


May this be only the first item in a long string of good news today.
Back to top
View user's profile Send private message
destroyedlolo
Guru
Guru


Joined: 17 Jun 2011
Posts: 476
Location: Close to Annecy (France)

PostPosted: Sat Jul 28, 2012 10:47 pm    Post subject: Reply with quote

YEEEEAAAAHHHHHHHH, I got my 2nd screen a extension of the 1st one :D :D :D

genstorm wrote:

Code:
# mkdir -p /etc/portage/patches/x11-drivers/xf86-video-mga

Place the *.patch file there and watch emerge doing the work.


Portage is simply a total blast ! Clean and efficient way. Thanks for the tips.

Now, speaking about those 2 screens : I have some refresh problems.
First of all, my 2 screens has different resolution :
  • the 1st one is a 21' SUN CRT, connected thu an AVO switch and without any configuration, it gives a 1280x960 screen.
  • the second one is a "Proview" 15' LCD only being able to display 1024x768.


Now problems :
  1. it seems I lost hardware acceleration : I can feel some "slowness" compared to what I have with only 1 screen. And even displaying this forum smilies put the CPU to 40% usage (Athlon 1.1 Ghz).
  2. Vlc is now lagging when displaying videos (before it was perfect) but I guess it's for the same reason
  3. I have conky running on background : every refresh make it flickering
  4. conky "transparent" background is also corrupted :
    • on the 1st screen, when I'm moving a window on top of conky, some "ghost" of the moved window can stays instead of the normal background. It is correct within the next refresh.
    • on the 2nd screen, the background is "moved" ; I mean the 2nd screen display only the upper part of my background image as it is smaller (1024x768 vs 1280x960). BUT conky background is what I had got if conky was displayed in the lower corner of a 1280x960 screen.

  5. last but not least, LXPanel is expended also to the second screen ... but not visible as outside it's resolution. Nevertheless, there is no "virtual enlargement" as the mouse cursor is still constrained into 1024x768


The loss of performances is the most penalizing because it void any attempt to do video editing :(


raygun wrote:

I should mention that I am also using the x11-drivers/xf86-video-mga patch posted about previously. I don't know whether this is necessary or not; once I got a working X, I was reluctant to undo the patch and try it again just for curiosity's sake.


Without this fix, it will not work. How to make it integrated in the mainstream ?

Thanks for both of you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum