Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

xorg configuration for laptop with two gpus

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
kotecek
n00b
n00b
Posts: 8
Joined: Mon Jul 15, 2013 8:31 pm

xorg configuration for laptop with two gpus

  • Quote

Post by kotecek » Mon Mar 08, 2021 7:46 pm

Hi,
I've got a lenovo ideapad 3 15arh05.

My goal is to connect additional monitor to the laptop. It has integrated amdgpu and dedicated gtx 1650ti card.

Here's my current configuration based on the default 'X -configure' one

Code: Select all

Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        Screen      1  "Screen1" RightOf "Screen0"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
        Option         "Xinerama" "1"
EndSection

Section "Files"
        ModulePath   "/usr/lib64/xorg/modules"
        FontPath     "/usr/share/fonts/misc/"
        FontPath     "/usr/share/fonts/TTF/"
        FontPath     "/usr/share/fonts/OTF/"
        FontPath     "/usr/share/fonts/Type1/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
        Load  "glx"
        Load  "glxserver_nvidia"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "amdgpu"
        BusID       "PCI:5:0:0"
EndSection

Section "Device"
        Identifier  "Card1"
        Driver      "nvidia"
        BusID       "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card1"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen1"
        Device     "Card0"
        Monitor    "Monitor1"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection
With this I can start my desktop with two working monitors. The problem is the situation where I maximize windows etc. - both monitors are working as a single screen. Even display manager shows only one screen with double sized resolution.

With any other configuration (like these below) only one monitor works - the second one freezes.

Code: Select all

Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        Screen      1  "Screen1" RightOf "Screen0"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/lib64/xorg/modules"
        FontPath     "/usr/share/fonts/misc/"
        FontPath     "/usr/share/fonts/TTF/"
        FontPath     "/usr/share/fonts/OTF/"
        FontPath     "/usr/share/fonts/Type1/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
        Load  "glx"
        Load  "glxserver_nvidia"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "nvidia"
        BusID       "PCI:1:0:0"
EndSection

Section "Device"
        Identifier  "Card1"
        Driver      "nvidia"
        BusID       "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card1"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen1"
        Device     "Card0"
        Monitor    "Monitor1"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Code: Select all

Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        Screen      1  "Screen1" RightOf "Screen0"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        ModulePath   "/usr/lib64/xorg/modules"
        FontPath     "/usr/share/fonts/misc/"
        FontPath     "/usr/share/fonts/TTF/"
        FontPath     "/usr/share/fonts/OTF/"
        FontPath     "/usr/share/fonts/Type1/"
        FontPath     "/usr/share/fonts/100dpi/"
        FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
        Load  "glx"
        Load  "glxserver_nvidia"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        VendorName   "Monitor Vendor"
        ModelName    "Monitor Model"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "nvidia"
        BusID       "PCI:1:0:0"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection

Section "Screen"
        Identifier "Screen1"
        Device     "Card0"
        Monitor    "Monitor1"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     4
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     8
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     15
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     16
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
        EndSubSection
EndSection
I've tried many other options. At this point I'm almost giving up.

I will provide you any information you need and test any configuration that may work.

Thanks in advance.
Top
bandreabis
Advocate
Advocate
User avatar
Posts: 2497
Joined: Fri Feb 18, 2005 4:21 pm
Location: イタリアのロディで

  • Quote

Post by bandreabis » Mon Mar 08, 2021 9:46 pm

Sorry, but I use intel/nVidia. But I do not use any Xorg.conf.
I guess you tried it already.
Il numero di post non fa di me un esperto! Anzi!
Top
kotecek
n00b
n00b
Posts: 8
Joined: Mon Jul 15, 2013 8:31 pm

  • Quote

Post by kotecek » Tue Mar 09, 2021 9:38 am

bandreabis wrote:Sorry, but I use intel/nVidia. But I do not use any Xorg.conf.
I guess you tried it already.
Yes I've tried to delete xorg.conf but it's being created at boot.
Top
Marlo
Veteran
Veteran
Posts: 1591
Joined: Sat Jul 26, 2003 1:41 pm

  • Quote

Post by Marlo » Tue Mar 09, 2021 10:24 am

Hi kotecek,
your xorg.conf looks correct.

I recently faced exactly the same problem. viewtopic-p-8573667.html#8573667
Working with "Xinerama" is not an option. It feels like dragging the mouse cursor through jelly.

On my PC I have gentoo-openrc and Suse-Tumbleweed installed. Tumbleweed automatically detects - without xorg.conf - both cards. I can swap the cables or use adapters. Everything works exelent and without errors.

So wanted to clarify the question if it was really just a coincidence that Tumbleweed recognizes both graphics cards immediately and sets them up correctly. For this I installed Gentoo-systemd, Fedora-Workstation, ubuntu-20.04.2.0-desktop LTS and debian-10.8.0 on my PC.

As a result, Tumbleweed, Fedora-Workstation and ubuntu-20.04.2.0-desktop detect both graphics cards as soon as the installation media boots.
They provide them completely ready to work after the installation.

Only Gentoo and Debian cannot do this. This cannot be a coincidence.
By the way, I know now all howtos or man pages to xorg or xorg.conf. A lack of knowledge does not seem to exist.

Despite many attempts I have not found a solution. Doesn't matter, there is suse installed.

With kind regards
Ma
------------------------------------------------------------------
http://radio.garden/
Top
kotecek
n00b
n00b
Posts: 8
Joined: Mon Jul 15, 2013 8:31 pm

  • Quote

Post by kotecek » Tue Mar 09, 2021 11:28 am

kotecek wrote:
bandreabis wrote:Sorry, but I use intel/nVidia. But I do not use any Xorg.conf.
I guess you tried it already.
Yes I've tried to delete xorg.conf but it's being created at boot.
Oh, I just found out that after deleting xorg.conf it's not being created again. I don't know what changed but I'm 100% sure that it was created at boot time. Sadly it didn't help much.

But i found something new. I have created a new config with "X -reconfigure" and connected the monitor AFTER the sddm login. And then the problems start to appear.

1. After connecting my laptop screen seems to work in 640x480. I can move my mouse over the whole 1920x1080 desktop but dragging windows etc works only in this small window and then the mouse movement is blocked.

2. I need to change resolution of the laptop screen to any other than current and apply the changes - then I need to change it back to the 1920x1080 and voila - everything works fine on the laptop screen.

and here's what changed:

3. I CAN ACTUALLY SEE ANOTHER MONITOR IN DISPLAY MENU. It's my DELL. Everything's cool but I cannot enable it - the display manager says that it cannot save the settings. Additionaly i cannot set any resolution and refresh rate (empty drop menu).

Any ideas?



Mario thanks for your feedback. At this point I think I will find solution or just give up and try again in next few months with hopes for better support for my setup.
Edit:
After reading the whole post I can see that our problems are almost the same. I've tried to run ubuntu live to see the X11 config but it uses different mechanisms to create configuration. Of course it started right away on both screens without any flaw. I think it's time to switch to another distro and wait few months (or rather a year or two) for some improvements in this matter.
For few days i thought that's something wrong with me but it seems that's the problem with gentoo :D
Top
Post Reply

5 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic