Announcement

Collapse
No announcement yet.

Docking station screen issue

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Docking station screen issue

    Hi all,

    I have an issue concerning the docking station screen.

    When I boot from my laptop within the docking station I first see the Kubuntu logo on the docking's screen, it then becomes black and the output goes to the laptop screen. I have to open the laptop (still in the docking) and switch manually to the docking's screen.

    Unfortunately it seems that this is not possible to make it automatically.

    I was wondering to write a script to be run at the startup that recognizes if the laptop is on the docking and eventually switch to its screen.

    Now the question is: how check from shell if I'm on the docking?

    Btw, since I'm not expert, if someone also have suggestions for the following steps (how to switch from shell to the other screen) I would be grateful.

    Best,
    g.
    ---------------<br />Linux kernel 2.6.28-15-generic<br />Kubuntu 9.04 64bit KDE 4.2.2<br />Dell Precision M2400 Intel Dual Core 2<br />Nvidia Quadro FX 370M (Driver Nvidia 180.44)<br />HDA Intel (STAC92xx Analog)<br />---------------

    #2
    Re: Docking station screen issue

    There are a couple of ways to do this, but it partially depends on your graphics chipset and driver. If you use the NVIDIA driver, the easiest thing I've found is to use "nvidia-settings" and configure it for external display only. Then save that configuration to "/etc/X11/xorg.conf". Now when you boot up in the docking station, it should go to the external display. And when you boot up undocked, it should detect that the external display isn't there and fall back to your internal LCD. A little hacky, but it works.

    I don't use this approach myself, though, because by default, NVIDIA will fall back to the highest resolution of the internal LCD, which is too small for my eyes. So, next best thing I know of is to use the "KRandRTray" tool in conjunction with NVIDIA metamodes to switch between "customized" docked and undocked profiles. (Customized in the sense that I've explicitly specified screen resolutions.) You can then use the tray icon to switch back and forth. But the nice thing is that the tray icon remembers the last setting between sessions, so you only have to fuss with it when you're docking or undocking.

    As a last resort, you can use scripts and maintain separate "xorg.conf" files for each state. Then use a hotkey combination to switch. Kind of a pain, but can be done.

    Comment


      #3
      Re: Docking station screen issue

      I'm currently on your third option, I made a script that recognize if I'm on the docking or not doing a grep on dmesg and checking for the external keyboard.

      it seems to work fine.

      next step will be to store the two xorg.conf files that are automatically created when I'm on the docking and when I'm not on it. Then, if I'm on the docking just copy the xorg.conf file at the place of the current one.

      this scritp should be run at the boot of KDE right? I mean it is sufficient to copy the xorg.conf file or there is some other command to run to tell KDE to read the file?

      this should work also when I connect an overhead projector since, not being a docking, it just start with the laptop LCD and then I switch by hand.

      thanks
      g.
      ---------------<br />Linux kernel 2.6.28-15-generic<br />Kubuntu 9.04 64bit KDE 4.2.2<br />Dell Precision M2400 Intel Dual Core 2<br />Nvidia Quadro FX 370M (Driver Nvidia 180.44)<br />HDA Intel (STAC92xx Analog)<br />---------------

      Comment


        #4
        Re: Docking station screen issue

        I think there is an environment variable or argument you can set when starting X that tells it what configuration file to use. But it's probably just as easy to overwrite the main "xorg.conf" like you're doing, and that will also ensure the right one gets used if you have to restart X for some reason during your session.

        There are a few ways to get hardware information in a shell script to tell if you're docked or not. Grepping dmesg is one. You might also find something in the "/sys" or "/proc" filesystems or in the output to "lsusb" or "lspci" that you can use.

        Good luck.

        Comment

        Working...
        X