Announcement

Collapse
No announcement yet.

Problem with Multiple Monitors

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

    Problem with Multiple Monitors

    Recently installed Kubuntu and I love it! But I have trouble with my external monitors. I have a Dell Latitude 5570 on a docking station with two external monitors attached. When I remove the laptop from the docking station, I keep losing the monitor configuration. I can get it back by going to the display settings and rerunning my setup, but it's annoying to do it. I had heard there is a bug in plasma about handling multiple monitors but wasn't sure if there is a workaround.

    The video card is an Intel HDGraphics 520

    Any tips or things I can try?

    #2
    Yes, KScreen has never been very good at handling multiple monitors. It's one of the areas that KDE really needs work.

    What I did for my Dell laptop was write a script and set it to run at bootup. You could also run it manually. In my case, it was my external monitor requiring a specific setting to work and KDE kept defaulting to the wrong settings no matter what I did. Here's my script:

    Code:
    #!/bin/bash
    #
    
    
    docked () {
    xrandr --output eDP-1 --off --output DP-3 --mode 3840x1600 --rate 60.00 --dpi 110 --primary
    }
    
    
    not_docked () {
    xrandr --output eDP-1 --auto --primary --output DP-3 --mode 3840x1600 --rate 60.00 --dpi 110 --right-of eDP-1
    }
    
    
    not_attached () {
    xrandr --output eDP-1 --auto --primary
    }
    
    
    mode="3840x1600"
    mode0=`xrandr | grep -n -w "DP-3" | awk -F: '{ print $1 }'`
    mode1=`expr $mode0 + 1`
    modeX=199
    
    
    if [[ `cat /sys/class/drm/card0-DP-3/status` = "disconnected" ]]; then
            not_attached
        else
            if [[ `cat /sys/class/power_supply/AC/online` -eq 1 ]]; then
                if [[ -n `xrandr | sed -n "$mode1","$modeX""p" | grep "$mode"` ]]; then
                    if [[ `cat /proc/acpi/button/lid/LID0/state | awk '{ print $2 }'` = "closed" ]]; then
                            docked
                        else
                            not_docked
    fi; fi; fi; fi
    
    
    exit 0
    Obviously the content of the script is very specific to my usage, but you could modify it to your needs.

    The three conditions I used; docked, not_docked, not_attached, handled the uses I needed. "docked" meant plugged into A/C power, attached to the external monitor, and lid closed. "not_docked" meant the external monitor was attached but I was going to use both the internal and external monitors. "not_attached" meant no external monitor was detected.

    Please Read Me

    Comment


      #3
      Thanks! That helped, especially the lid close check as I had been hunting for a way to determin if the laptop was docked or not. Do you know if there is a way to call and action to run a script if the laptop is connected to a dell docking station?

      Comment

      Working...
      X