Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Dynamic twin view with nvidia-settings from the command line?

  1. #1
    Join Date
    Oct 2008
    Location
    Munich, Germany
    Beans
    45
    Distro
    Ubuntu 10.04 Lucid Lynx

    Question Dynamic twin view with nvidia-settings from the command line?

    Dear all,

    I have an nvidia card (9400, i believe) in my 13.3" macbook pro and am frequently changing my monitor setup, i.e. at my office and at home i have an additional 22" monitor hooked up to the dvi port (actually apples weird port with a dvi connector) while on the road I have not.

    I don't have the twin view configuration set in the xorg.conf config file as this behaves funny if you don't have a second monitor connected (your mouse cursor and windows might be beyond what you can see on the small monitor). So what I do each time that I connect an external monitor is to run the GUI of the nvidia-settings tool and enable twin view for the external monitor and position it where I want it. Annnooooyyyying!!! especially if you do it several times a day.

    So I wanted to write a script that I can just run (maybe automatically even if a second monitor is detected, this shouldn't be too hard) to set up everything how I want it. Small problem: I cannot, for the life of me, figure out how this nvidia-settings command line tool works. I have tried a few things such as

    Code:
    nvidia-settings --assign AssociatedDisplays=0x00030000
    (this is the value being displayed when I have both monitors enabled and run
    Code:
    nvidia-settings --query all
    )

    Most other attributes seem to be "read-only" (such as the seemlingly promising "TwinView" or "EnabledDisplays". I've looked into the man pages and searched the web high and low, but to no avail.

    Any help on this would be really truly very highly appreciated

    Thank you
    Paul

    Oh, yes, this is on ubuntu lucid 10.04 amd64 with the current 195 nvidia driver.

  2. #2
    Join Date
    Oct 2008
    Location
    Munich, Germany
    Beans
    45
    Distro
    Ubuntu 10.04 Lucid Lynx

    Talking Re: Dynamic twin view with nvidia-settings from the command line?

    gentle bump

  3. #3
    Join Date
    Dec 2004
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Dynamic twin view with nvidia-settings from the command line?

    This would actually be of great interest to me, as I also use a second monitor @ home, but ofcourse I don't take it along on the train.

    Unfortunately twinview stopped working smoothly some month or two ago, but I haven't noticed, because my computer was home.

    Now everytime I want to connect my second monitor, I need to edid xorg.conf and comment/uncomment the twinview lines. Switching while having the xserver running ends up giving me garbage on both screens until switching back because I don't confirm.

    Having it set in xorg.conf works fine.

    But this is even MORE anoying then the nvidia-settings-clickage.

    any advice?

  4. #4
    Join Date
    Dec 2004
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Dynamic twin view with nvidia-settings from the command line?

    A little note:

    This happens with all versions of the nvidia drivers I have tried, even the previously working ones:
    NVIDIA-Linux-x86-190.42-pkg1
    NVIDIA-Linux-x86-190.53-pkg1
    NVIDIA-Linux-x86-195.36.31-pkg1
    NVIDIA-Linux-x86-256.35

    *sadpanda*

  5. #5
    Join Date
    Mar 2008
    Beans
    5

    Thumbs down Re: Dynamic twin view with nvidia-settings from the command line?

    Quote Originally Posted by bademeister View Post
    ...
    So I wanted to write a script that I can just run (maybe automatically even if a second monitor is detected, this shouldn't be too hard) to set up everything how I want it. Small problem: I cannot, for the life of me, figure out how this nvidia-settings command line tool works. I have tried a few things such as ...
    Did anyone get any further on this matter yet?

  6. #6
    Join Date
    Jun 2006
    Location
    Antarctica
    Beans
    500
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Dynamic twin view with nvidia-settings from the command line?

    Wouldn't it be possible to have a small script:
    - turn off X server
    - switch between two xorg.conf files
    - turn X back on
    ???

  7. #7
    Join Date
    Dec 2004
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Dynamic twin view with nvidia-settings from the command line?

    That is basically exactly what I have done. It works, but ofcourse defeats the concept of "oh I need more screen realestate - turn on second monitor / oh I want to watch a movie on the couch - turn off second monitor" way of 'working'.

    So far, the nvidia-settings still garble my screens.

    The driver I am using right now is:
    NVIDIA-Linux-x86-256.44.run (from nvidia-website)

  8. #8
    Join Date
    Mar 2008
    Beans
    5

    Re: Dynamic twin view with nvidia-settings from the command line?

    Quote Originally Posted by dargaud View Post
    Wouldn't it be possible to have a small script:
    - turn off X server
    - switch between two xorg.conf files
    - turn X back on
    ???
    this of course is possible but a) takes time and b) destroys the current state of the applications.

    nvidia-settings does the job for me quite nice, except for the need of a bunch of clicks.

    There seems to be some help in form of a C API and some example "clients" for the "NV-CONTROL extension", additional to the nvidia-settings GUI.

    'nv-control-dpy' being one of them is even available as binary currently at least on debian testing/unstable. Seems like it only needs a little bit more knowledge to get this working towards a "just update my screen (remove/add/optimize TwinView) for current monitor setup" script.

    Some experiments with 'nv-control-dpy --dynamic-twinview' and 'xrandr NEEDSINVESTIGATION' seem quite promising.

  9. #9
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: Dynamic twin view with nvidia-settings from the command line?

    the tool disper might exactly do what you want...

  10. #10
    Join Date
    Mar 2008
    Beans
    5

    Re: Dynamic twin view with nvidia-settings from the command line?

    Hello,

    Quote Originally Posted by realzippy View Post
    the tool disper might exactly do what you want...
    fantastic! Thx a million, works out of the box and is exactly what I was looking for!

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •