sony-vaio-z-series team mailing list archive
-
sony-vaio-z-series team
-
Mailing list archive
-
Message #02859
Re: Bumblebee + HDMI working with native resolution
I'm replying to Peter's old email, since I finally managed to figure
out how to dedicate a separate set of keyboard & mouse for the
external screen. The answer has appeared in the Bumblebee wiki:
https://github.com/Bumblebee-Project/Bumblebee/wiki/Multi-monitor-setup.
This way you can use the touchpad and Vaio keyboard for the laptop
screen, and external keyboard and mouse for the external screen. Since
the keyboard & mouse do not use an emulation layer (x2x or synergy),
it works even with gaming and other full-screen applications.
The answer is ingeniously simple: just use xinput to disable the
duplicate input devices with a script.
Unlike the script author, I used device IDs instead of device names in
my script, since I had duplicates in my xinput list.
I've attached my launch script and my xorg.conf.nvidia file below.
Cheers,
Heikki
the launch script:
#! /bin/bash
# Starts a separate X session using Optimus
# and uses separate input devices for each
# must be run as root, with 'optirun'
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
# First, disable external inputs on internal screen's X server
# Replace these with the names of your EXTERNAL input devices.
xinput disable 11
xinput disable 13
xinput disable 14
# Set display ID to the external screen's X server
DISPLAY=':8' #<-- This should be the value of 'VirtualDisplay' from earlier.
LD_LIBRARY_PATH=/usr/lib/nvidia-current:$LD_LIBRARY_PATH
# Disable internal inputs
# Replace these with the names of your INTERNAL input devices
xinput disable 16
xinput disable 15
# Start another session. This example is for XFCE or Xubuntu, look up
the appropriate
# command for your desktop environment of choice and replace
'xfce4-session'. (I used awesome /heikki.)
# Remember to replace USERNAME with your username.
su -c awesome USERNAME > /dev/null 2>&1
xorg.conf.nvidia:
Section "ServerLayout"
Identifier "Layout0"
EndSection
Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "NoLogo" "true"
Option "ConnectedMonitor" "DFP-0"
Option "CustomEDID" "DFP-0:
/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1/edid"
EndSection
On Sat, Jul 28, 2012 at 7:08 PM, Peter Rhone <prhone@xxxxxxxxx> wrote:
> This is brilliant, it is what I have been trying to do for a while, and
> works as advertised. However, there is a hitch. I'd like to use my
> external monitor for some gaming, but this messes with synergy pretty
> badly and is a completely unusable. Perhaps the solution would be as
> simple as setting the synergy "server" to be on :8 (haven't tried that
> yet, but I doubt that would really work). I have a USB mouse & keyboard
> connected, and ideally I could set them, along with the HDMI monitor, to
> work together as one unit. I haven't been able to get this to work yet,
> though. So far, my non-working InputDevice sections of
> /etc/bumblebee/xorg.conf.nvidia looks like this:
>
>
> Section "InputDevice"
> Identifier "Keyboard0"
> Driver "kbd"
> Option "Device" "/dev/input/by-id/usb-046a_Das_Keyboard-event-kbd"
> EndSection
>
> Section "InputDevice"
> Identifier "Mouse0"
> Driver "mouse"
> Option "Protocol" "Logitech"
> Option "Device" "/dev/input/mouse2"
> EndSection
>
> This doesn't work. Both keyboards and mice are active on the first
> display, and the hdmi gets no input at all.
>
> Maybe I have to manually set the keyboard and mouse for the intel chip /
> built-in display? I don't know if the "CorePointer" stuff is relevant
> in the ServerLayout section. Any suggestions?
>
> Thanks,
>
> Peter
>
> On 06/30/2012 05:58 PM, Heikki Wilenius wrote:
>> Hi,
>>
>> I have good news regarding Bumblebee and HDMI. My external monitor now
>> works with native resolution!
>>
>> I'm using Z13 (Nvidia 330m GPU) and Ubuntu 12.04.
>>
>> I was lead to the right track after reading this:
>>
>> http://askubuntu.com/questions/3024/good-nvidia-drivers-for-a-geforce-gt-330m-on-a-vaio-laptop
>>
>> Like described in the link above, I disabled nouveau in Grub, just in
>> case it makes a difference:
>>
>> GRUB_CMDLINE_LINUX="nouveau.modeset=0"
>>
>> The tricky bit is to get the EDID info to the X server. I did a search
>> for "edid" under /sys/, while the monitor was connected to the HDMI
>> output, and found the EDID path. I then put that info to the
>> xorg.conf.nvidia file.
>>
>> Also I installed xserver-xorg-input-void to disable mouse and keyboard
>> from doubling on the external monitor.
>>
>> Here's the xorg.conf.nvidia:
>>
>> Section "ServerLayout"
>> Identifier "Layout0"
>> InputDevice "Keyboard0" "CoreKeyboard"
>> InputDevice "Mouse0" "CorePointer"
>> Option "AutoAddDevices" "false"
>> EndSection
>>
>> Section "Device"
>> Identifier "Device1"
>> Driver "nvidia"
>> VendorName "NVIDIA Corporation"
>> Option "NoLogo" "true"
>> Option "ConnectedMonitor" "DFP-0"
>> Option "CustomEDID" "DFP-0:
>> /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-HDMI-A-1/edid"
>> EndSection
>>
>> Section "InputDevice"
>> Identifier "Keyboard0"
>> Driver "void"
>> Option "CoreKeyboard"
>> EndSection
>>
>> Section "InputDevice"
>> Identifier "Mouse0"
>> Driver "void"
>> Option "CorePointer"
>> EndSection
>>
>> * * *
>>
>> The bumblebee config file was edited like described in
>> https://github.com/Bumblebee-Project/Bumblebee/wiki/Multi-monitor-setup.
>>
>> Last step was to install synergy so that the external monitor can be
>> controlled with the laptop mouse and keyboard, see instructions here:
>>
>> http://itviking.net/blog/m11xr3-bumblebee-and-the-dual-screen-setup
>>
>> * * *
>>
>> So now I can start a terminal, and type
>>
>> optirun true
>> export DISPLAY=:8 LD_LIBRARY_PATH=/usr/lib/nvidia-current:$LD_LIBRARY_PATH
>>
>> and then start any program from that terminal window. I use awesome to
>> get a lightweight window manager on the external monitor.
>>
>> Using itviking's synergy config file, I'll just drag my mouse over the
>> right edge of the screen to switch focus to the external monitor.
>>
>> Haven't yet figured out whether this messes up with Bumblebee's power
>> management features. At least the parallel X server doesn't get
>> started before it is used.
>>
>> Anyway, I really needed to use the HDMI output, so I'm happy now. =)
>>
>> Sorry for the rambling write-up, but I hope this'll be of use to some of you!
>>
>> Heikki
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~sony-vaio-z-series
>> Post to : sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~sony-vaio-z-series
>> More help : https://help.launchpad.net/ListHelp
>
>
> --
> Peter Rhone, Dipl. Phys.
> Osterweih Str. 3
> 08056 Zwickau
> Tel.: +1 206 299-2701
> Cell: +49 (0) 1782059108
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~sony-vaio-z-series
> Post to : sony-vaio-z-series@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~sony-vaio-z-series
> More help : https://help.launchpad.net/ListHelp
>
References