Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[WORKAROUNDED] DualHead Confusion
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Thu Jun 26, 2014 8:49 pm    Post subject: [WORKAROUNDED] DualHead Confusion Reply with quote

Hello there,

For the first time in my life I decided to try to use two screens for my monitor, the embedded one and an external one. I've been failing miserably. I tried to follow this guide
https://help.ubuntu.com/community/XineramaHowTo
but nothing seems to work (perhaps its a silly mistake).

This is my xorg.conf and this is Xorg.1.log

I get them to clone alright, but I'd like one of the top of the other. Also, I've tried it with KDE, E18 and TWM. None of them work. E18 crashes if I try to set the screens configuration; KDE seems to kinda work, but the bottom screen (my laptop's screen) remains black. Judging from the fact that I can drag a window all the way to the bottom (in a way that I cannot if I am using only 1 screen), I think it understands the configuration, but the screen is too stubborn to accept it. TWM is hopeless. nvidia-settings only show one screen regardless of xorg.conf.

Suggestions are appreciated!
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)


Last edited by Holysword on Sun Jul 13, 2014 4:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 618

PostPosted: Thu Jun 26, 2014 10:47 pm    Post subject: Reply with quote

I've only had luck with Dual Head using nvidia drivers when turning Xinerama off, and using TwinView.

The nvidia-settings utility can often help (media-video/nvidia-settings), if you can get a display on one monitor, bring up nvidia-settings and use the "X Server Display Configuration" section to arrange the "Layout" the way you want it. You may have to use the "Selection" drop-down to bring a monitor to the front. Use the "Resolution" drop-down to choose a resolution, preferably "Auto". If you are able to get things to the way you like them, "Save to X Configuration File" and select merge. Helps to keep backups of the xorg.conf file. Sometimes the utility insists on changing things that I prefer it would not.

HTH.
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Thu Jun 26, 2014 10:59 pm    Post subject: Reply with quote

russK wrote:
I've only had luck with Dual Head using nvidia drivers when turning Xinerama off, and using TwinView.

The nvidia-settings utility can often help (media-video/nvidia-settings), if you can get a display on one monitor, bring up nvidia-settings and use the "X Server Display Configuration" section to arrange the "Layout" the way you want it. You may have to use the "Selection" drop-down to bring a monitor to the front. Use the "Resolution" drop-down to choose a resolution, preferably "Auto". If you are able to get things to the way you like them, "Save to X Configuration File" and select merge. Helps to keep backups of the xorg.conf file. Sometimes the utility insists on changing things that I prefer it would not.

HTH.

nvidia-settings does not recognize two displays, unfortunately.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Fri Jun 27, 2014 1:22 am    Post subject: Reply with quote

Okay, I think there were some mistakes in my xorg.conf. I have modified some things, and I get the big screen with E18. However, one of the physical screens is all blank all the time i.e. I can drag stuffs down there and the WM's virtual desktop shows it there, but I cannot see it since the physical screen that should be displaying that is blank.

I tried setting the screens to the same resolution, but it didn't help.

xorg.conf
Xorg.1.log
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 618

PostPosted: Fri Jun 27, 2014 2:10 am    Post subject: Reply with quote

Maybe my xorg.conf will help or at least give you some ideas. I have 3 screens. Note only Screen0 is used in the ServerLayout, so you can ignore a lot of stuff. The metamodes Option does a lot of magic.

http://pastebin.com/Gm02tUxi
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6972
Location: Saint Amant, Acadiana

PostPosted: Fri Jun 27, 2014 2:17 am    Post subject: Reply with quote

My dual setup is below, xrandr does the rest.
Code:
xrandr --auto --output DVI-I-3 --left-of DVI-I-2


Code:
cat /etc/X11/xorg.conf
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    Option          "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3333; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    DefaultDepth    24
EndSection

_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 618

PostPosted: Fri Jun 27, 2014 12:41 pm    Post subject: Reply with quote

Jaglover wrote:
My dual setup is below, xrandr does the rest.
Code:
xrandr --auto --output DVI-I-3 --left-of DVI-I-2


Code:
cat /etc/X11/xorg.conf
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    Option          "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3333; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    DefaultDepth    24
EndSection



I like the simplicity of this. I followed this example to greatly simplify my xorg.conf and put the rotation of one of my screens with xrandr in an autostart script.
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Fri Jun 27, 2014 9:27 pm    Post subject: Reply with quote

Jaglover wrote:
My dual setup is below, xrandr does the rest.
Code:
xrandr --auto --output DVI-I-3 --left-of DVI-I-2


Code:
cat /etc/X11/xorg.conf
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    Option          "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3333; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    DefaultDepth    24
EndSection


Thank you very much. This almost works.
TWM seems to completely ignore the dual head setting. It does nothing, and only the laptop screen gets recognized, with its correct resolution. The external screen says "no digital signal" on the screen.
E18 gets everything wrong. The external monitor gets started with a 1400x1050 resolution (instead of 1680x1050, the correct one), and it creates a duplicate of that on the laptop screen: a virtual desktop with dimensions 1400x1050, but whose resolution is actually 1920x1080 (the correct resolution); it displays a black padding around it, since the virtual desktop is smaller than the actual desktop.
The point is, with E18 I CAN get it to work by tweaking the settings. I drag stuffs here, drag stuffs there, and it works perfectly fine: External screen above the laptop screen, the former with 1680x1050 resolution and the later with 1920x1080 resolution. I can drag stuffs back and forth with no glitch whatsoever, but after I close E18 it loses the changes and I have to do everything again. Also, E18 does not know how to use the "Above" flag, so it sets it in an absolute position.

KDE is hopeless, gets lost and no matter what I do it does not get what to do.

This is my current xorg.conf
Code:
Section "ServerLayout"
    Identifier     "layout"
    Inactive      "intel"
EndSection

Section "InputClass"
  Identifier      "eGalax Touchscreen"
  MatchUSBID      "0eef:a802"
  Driver          "evdev"
EndSection

Section "Screen"
  Identifier   "s_nvidia"
  Device       "nvidia"
 EndSection

Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    BusID          "PCI:01:00:0"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 740M"
    Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3333; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"
EndSection

Section "Device"
    Identifier     "intel"
    BusID          "PCI:00:02:0"
    Driver         "modesetting"
    VendorName     "Intel Corporation"
    BoardName      "Xeon E3-1200 Integrated"
EndSection


Section "Screen"
    Identifier     "s_intel"
    Device         "intel"
EndSection

my .xinit_rc
Code:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto --output HDMI-1-0 --above eDP-1-0
#exec twm
#exec xterm
exec enlightenment_start -evil
#exec startkde

and my current Xorg.1.log
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6972
Location: Saint Amant, Acadiana

PostPosted: Fri Jun 27, 2014 11:25 pm    Post subject: Reply with quote

Code:
Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3333; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"

This may not be needed for your setup, I'm using it to scale down the GPU frequency.

Holysword, do you have xinerama USE flag enabled? I believe it will not work without it.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Fri Jun 27, 2014 11:39 pm    Post subject: Reply with quote

Jaglover wrote:
Code:
Option         "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3333; PowerMizerDefault=0x3; PowerMizerDefaultAC=0x3"

This may not be needed for your setup, I'm using it to scale down the GPU frequency.

Holysword, do you have xinerama USE flag enabled? I believe it will not work without it.


I think so:
Code:
◢ jarvis ◣ ~ $  equery h xinerama
 * Searching for USE flag xinerama ...
[IP-] [  ] app-emulation/wine-1.7.17:0
[I--] [??] dev-qt/qtgui-4.8.5-r1:4
[IP-] [  ] kde-base/ksplash-4.11.9:4/4.11
[IP-] [  ] media-libs/libsdl-1.2.15-r4:0
[IP-] [  ] media-video/mplayer-1.2_pre20130729:0
[IP-] [  ] x11-libs/gtk+-2.24.23:2
[IP-] [  ] x11-libs/gtk+-3.10.8:3
◢ jarvis ◣ ~ $ 


After fixing the setup under E18, I run xrandr and get this:
Code:
◢ jarvis ◣ ~ $  xrandr
Screen 0: minimum 8 x 8, current 1920 x 2130, maximum 16384 x 16384
eDP-1-0 connected 1920x1080+0+1050 (normal left inverted right x axis y axis) 381mm x 214mm
   1920x1080      60.0*+   40.0 
   1400x1050      60.0 
   1280x1024      60.0 
   1280x960       60.0 
   1024x768       60.0     60.0 
   960x720        60.0 
   928x696        60.1 
   896x672        60.0 
   800x600        60.0     60.3     56.2 
   700x525        60.0 
   640x512        60.0 
   640x480        60.0     59.9 
   512x384        60.0 
   400x300        60.3     56.3 
   320x240        60.1 
VGA-1-0 disconnected (normal left inverted right x axis y axis)
HDMI-1-0 connected 1680x1050+120+0 (normal left inverted right x axis y axis) 433mm x 271mm
   1680x1050      60.0*+
   1400x1050      59.9 
   1280x1024      75.0     60.0 
   1440x900       75.0     59.9 
   1280x960       60.0 
   1152x864       75.0 
   1024x768       75.1     70.1     60.0 
   832x624        74.6 
   800x600        72.2     75.0     60.3     56.2 
   640x480        75.0     72.8     66.7     60.0 
   720x400        70.1 
   640x400        70.0 
◢ jarvis ◣ ~ $ 


Is there any way to "save these settings" and tell xrandr to "load" then later?
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Sat Jun 28, 2014 12:52 am    Post subject: Reply with quote

I think I'm getting closer, but it is not as "black box" as it is for you guys.

If I start my X normally and run the commands
Code:
xrandr --fb 1920x2130 --output eDP-1-0
xrandr --fb 1920x2130 --output HDMI-1-0 --mode 1680x1050 --above eDP-1-0

I get my configuration alright - except that I have to leave the TTY and then come back for the changes to take effect, that is, "CTRL+ALT+F1" (for instance) and then back to CTRL+ALT+F7.
Also, this does not allow me to set a panning; 1680x1050+120+0 should be the correct configuration to centralize the smaller screen. However, the --panning option returns an error.

Also, having this in my .xinitrc file does absolutely nothing. I have to run it manually once I'm inside X.

This is being really, really clumsy to me...
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 618

PostPosted: Sat Jun 28, 2014 4:23 am    Post subject: Reply with quote

I feel your pain.


Not sure about the panning thing, but you can put both outputs in one xrandr command, here is one that I used for a while with 2 different size monitors:

Code:
xrandr --fb 1680x1200 --output "${BIG_MON}" --scale 1.1666x1.1666 --pos 0x0 --output "${SMALL_MON}" --scale 1x1 --pos 0x1050


May not be exactly what you are looking for but it might give you some ideas.

Also, are you using xdm or gdm or other dm? They typically don't run .xinitrc. I hate that. Usually they say they will run .xsession but I have found that to be problematic as well for some reason. Currently I have my xrandr in an autostart script in $HOME/.config/autostart which works with gnome.


HTH
Back to top
View user's profile Send private message
deefster
Tux's lil' helper
Tux's lil' helper


Joined: 19 Apr 2004
Posts: 77

PostPosted: Sat Jun 28, 2014 4:35 am    Post subject: Reply with quote

I'm using the opensource radeon drivers, and don't require any of that xrandr stuff to have extended display across 2 monitors. I have no .xinitrc, and no xorg.conf, and call kde directly from xdm at startup.

Code:
$: pwd
/etc/X11/xorg.conf.d

$: cat 40-monitor.conf
Section "Device"
        Identifier "Radeon HD4870"
        Option          "Monitor-HDMI-0" "Left Monitor"
        Option          "Monitor-DVI-0"  "Right Monitor"
EndSection
Section "Monitor"
        Identifier "Left Monitor"
        Option "PreferredMode"  "1680x1050"
EndSection
Section "Monitor"
        Identifier "Right Monitor"
        Option "PreferredMode"  "1680x1050"
        Option  "RightOf"       "Left Monitor"
EndSection

$: cat 10-keyboard.conf
Section "InputClass"
        Identifier "keyboard-all"
        Driver "evdev"
        Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection



Hope that's helpful
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Sat Jun 28, 2014 4:14 pm    Post subject: Reply with quote

russK wrote:
I feel your pain.


Not sure about the panning thing, but you can put both outputs in one xrandr command, here is one that I used for a while with 2 different size monitors:

Code:
xrandr --fb 1680x1200 --output "${BIG_MON}" --scale 1.1666x1.1666 --pos 0x0 --output "${SMALL_MON}" --scale 1x1 --pos 0x1050


May not be exactly what you are looking for but it might give you some ideas.

Also, are you using xdm or gdm or other dm? They typically don't run .xinitrc. I hate that. Usually they say they will run .xsession but I have found that to be problematic as well for some reason. Currently I have my xrandr in an autostart script in $HOME/.config/autostart which works with gnome.


HTH

I don't use a login manager. I just log in the console and use startx, so the .xinitrc is being taken into account.

EDIT#1: Btw, I just tried with two monitors of identical resolution. It also does not work.
EDIT#2: Also fonts get crazy and this is stressing me. Sometimes they get very large, sometimes very small. Every time I start X I need to change the size of the font. This is absolutely not out-of-the-box.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Sat Jun 28, 2014 8:28 pm    Post subject: Reply with quote

One more note to those trying to venture into this field...
xrandr seems to confuse the DPI settings, and then chooses something ridiculously low sometimes. I had to add "--dpi 72" to the xrandr line, but still didn't figure out how to have X automagically calling xrandr during xinit. I have to do it manually every time I start X server.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Thu Jul 10, 2014 9:36 pm    Post subject: Reply with quote

In the end I wrote a script to call xrandr inside my WM after it has started and set that to autostart with the WM. Dualhead is working now, even though I don't think that's how this is supposed to be. I am unable to set a primary display though, but I think this is related to this nvidia-drivers bug.

So, now I have everything sort of configured, I disabled compositioning because it adds an extra layer of complication and I don't even like it anyway. My problem now is that when I am running games (on only one screen, with the other plainly showing the desktop) it is painfully slow. Games that otherwise would run okay on 1920x1080 now cannot run on 1280x720 windowed without antialising (which is UGLY). Is this something known? Is it expected for dualhead setups? Did I mess up my configuration somehow?

EDIT#1: Nevermind, the slowdown was coming from the recently installed pulseaudio. Purging it... (again)
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
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
Page 1 of 1

 
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