Reply to topic

Wrong display on dual screen layout after restore from tray

User avatar Heiko Tietze
Registered Member
Posts
51
Karma
0
OS
I use to minimize programs to tray, for instance Firefox. When I restore the window the output is often moved to the secondary monitor (and sometimes maximized due to smaller screen size). It's annoying because my secondary screen is off in most times and I have to use the window menu. It happens as well that programs are started on the secondary screen and ignore my "make this the primary display for the X screen" setting. (Probably, I'm wrong her at kwin).
Can it be fixed or do I need to change my configuration?
mgraesslin
KDE Developer
Posts
357
Karma
4
OS
I would highly recommend to not minimize application to systray. That would fix most problems.

But the root problem is that the screen is still known but disabled. My recommendation would be to switch to KScreen for screen management and turn off the screen with the help of KScreen. That way the system knows that the screen is gone and doesn't extend into the disabled area.
User avatar Heiko Tietze
Registered Member
Posts
51
Karma
0
OS
"To not minimize" is not an option. With all respect to your recommendation: that's my workflow and I rather struggle with bad positioned windows than a cluttered list of windows. But thanks for the idea about a workaround. I'm just trying to apply a dual X-server layout with xinerama (after half an hour try 'n error it fits my specs but I don't know if it fix the original problem; seems to be very slow on a first glance). If it not helps I will use KScreen.
User avatar Heiko Tietze
Registered Member
Posts
51
Karma
0
OS
Xinerama is too slow, therefore I switched to KScreen. First impression: Looks good, works well (only for twinview and not with dual x-server), and is easy to handle. But windows are still placed wrong, sometimes.
Is there any way to switch on/off the second monitor via script, or to link it to activities?
mgraesslin
KDE Developer
Posts
357
Karma
4
OS
http://xkcd.com/1172/ - that's all I can say to workflow. Rethink your workflow, using the systray is not the way to do it. I expect that Plasma Workspaces 2 won't support the XEmbed based systray any more.
User avatar Heiko Tietze
Registered Member
Posts
51
Karma
0
OS
Lol! I'll take in into consideration. Meanwhile I'm almost happy with KScreen, because with the plasmoid my secondary display is only two clicks away.
luebking
Registered Member
Posts
928
Karma
7
"Minimize" to systray is usually *not* minimizing - the window is closed and reconstructed. Even if technically the same drawable is reused, the window will be treated as re-added.
Windows are either placed where they explicitly request or "somewhere" (depends on strategy) on the active screen, where the active screen is either the one with the mouse or the one with the currently active window on it (configurable, "kcmshell4 kwinoptions")

A reasonable "minimize to systray" implementation would store the position on the workspace/rootwindow and claim it when being restored.

If you turn off the screen by it's power button, that's a quite bad habit¹. A "script" to turn it off would be "xrandr --output DVI-I-1 --off" and to turn it on: "xrandr --output DVI-I-1 --auto" (be aware that "DVI-I-1" can differ for your screen) - it can be bound to a shortcut via "kcmshell4 khotkeys".

The script can trivially be extended to know the amount of active screens by counting (wc) the amount of asterisks (*) in "xrandr -q"

[1] Only an absolute minority of screens reasonably tell the system about their power state (unlike their attachement) what means that the system does not know whether the backlight of the screen is on or not.
Now, turning off the screen power, but not deactivating it in the system will in most cases imply an overhead to your GPU (beyond! the extended size) and eg. nvidia chips will always stay in performance mode, causing their noise generator ("fan") to stir up and heat the system and waste energy ... YOU will be responsible for global warming (+ you loose battery and nerves to that noise device ;-)
Long story short: it's usually much better to turn the screen off on the GPU and have the screen notice the loss of input signal (thus moving into standby itself)
User avatar Heiko Tietze
Registered Member
Posts
51
Karma
0
OS
With "turn off" I wanted to point out that moving the wrong placed window is annoying (right click on windows menu > add. actions > move). I'd never have expected that power is really recognized.
I understand your explanations about minimizing; that makes clear the differences between OS/DE.
"xrandr --output DVI-I-1 --auto" was something I was looking for (a simple script to toggle screen on/off). With "--off" it works well but "--auto" duplicates the primary display. Currently I'm fine with the kscreen plasmoid; except it has two or three clicks more than a script.
luebking
Registered Member
Posts
928
Karma
7
"xrandr --help", check for "--left-of", "--right-of" or "--pos"

 
Reply to topic

Bookmarks



Who is online

Registered users: afiestas, avishekk, Baidu [Spider], bcooksley, Bing [Bot], bjoernbalazs, brankko, colomar, Cris70, david_edmundson, einar, Exabot [Bot], ggael, Google [Bot], Heiko Tietze, joshaughnessy, ken300, koriun, La Ninje, Majestic-12 [Bot], metalbrick, mmagnusson, ooker, ozim, paulus3005, rossdv8, seal20, starbuck, stavallo, steltsop, steph, SysGhost, valoriez, vHanda, Yahoo [Bot]