Version: 4.7.4 (using KDE 4.7.4) OS: Linux When an external vga cable get disconnected from a laptop, kwin doesn't fall back to the default screen. Reproducible: Always Steps to Reproduce: Power up your laptop Connect an external screen to the laptop (vga, hdmi or displayport) Use krandr to deactivate the laptop screen and activate the external display Then unplug the vga/hdmi/displayport Actual Results: -> the laptop screen stays deactivated Expected Results: The laptop screen should be automatically reactivated to its native resolution. That little detail should give my grandma more incentive to use her computer with the tv !
Not the WMs job - also i'm not sure whether this should actually be dealt by krandr or not rather udev. And i'm even more unsure whether esp. VGA adapter status changes can be detected by the system (except for polling?) at all (and whether "turned off screen" can be distinguished from "unplugged cable")
I'm not sure where to report the 'wish' then. That and Windows 7 seems to know how to reactivate the laptop sceen when the vga is unplugged. Anyway, the main idea behind my bug report was to point out I can't really see the point in making a distinction between "turned off screen" and "unplugged cable", as in both case you end up with just a black screen, which is counter-intuitive imho.
> Anyway, the main idea behind my bug report was to point out I can't really > see the point in making a distinction between "turned off screen" and > "unplugged cable", as in both case you end up with just a black screen, > which is counter-intuitive imho. Actually there is. I very often unplug but don't want to change the screen. Consider a presentation and someone else wants to test the connection to the projector before your presentation. This is a valid usecase for unplug, but don't change screens. But anyway: it's probably nothing we can do in KDE layer. This needs to be supported by udev first (in case it isn't yet).
(In reply to comment #2) > I'm not sure where to report the 'wish' then. krandr, already re-assigned. Whether it should be handled upstream is matter to the krandr maintainers. I've no idea (but likely would try) > That and Windows 7 seems to know how to reactivate the laptop sceen when the > vga is unplugged. "VGA" means "D-SUB" (that fat veeeery old plug) i assume. No idea whether there was a standard for device recognition, but you should be able to query "status" in "/sys/class/drm/<some-device>" if this is supported by your HW. Personally i'd set up a udev rule and make it "do stuff" on changes there. > Anyway, the main idea behind my bug report was to point out I can't really see > the point in making a distinction between "turned off screen" and "unplugged > cable" "temporary" (to save energy) and "permanent" - could become relevant in case the screen you just turned off kept private data for your presentation ("DO NOT FORGET: THEY ARE ALL MORONS") while the other one contained the presentation. Merging output to the remaining screen could have... "unwanted" results ;-) So i guess there would have to be some sort of configuration UI on what to do on what occurrence. *shrug*
You are both right, it's always a bad idea to limit functionalities, therefore I guess there should be an option to activate/deactivate this behavior somewhere. As I see it, that could also allow users whose Fn keys aren't supported a simple way to bind this useful replacement.
I don't know udev enough to create rules and not break my system, but as you pointed out, I can see all my display ports in /sys/class/drm/, and specially : `cat /sys/class/drm/card0-VGA-1/status` returns "disconnected" so I guess perhaps it's 'just' a matter of writing a rules for that ? Then, what would be the command line to select the (Auto) mode for the laptop screen (for binding that to a shortcut) ?
gg:"/sys/class/drm" card0 status first result is on stackoverflow: http://stackoverflow.com/questions/5469828/how-to-create-a-callback-for-monitor-plugged-on-an-intel-graphics udev rules meanwhile likely reside in /lib/udev and the HOTPLUG value will likely be relevant but otherwise it should still work fine. > Then, what would be the command line to select the (Auto) mode for the laptop screen (for binding that to a shortcut) ? Sorry but i've not the least idea what this is supposed to ask for, but the CLI tool you want to invoke is xrandr, notably it's "--output" and "--screen" switches. Since you're about to run this from a script (invoked by udev) you also want to use "-display :0"
With 4.10, when you plug an external display, KDE asks you if you want to switch "automatically". That's new and welcome. I guess using the same hooks (or any other way this has been implemented), somebody could force the default display to light up if an external display is disconnected ? That would be the default behavior since most users want this, but there could be an option somewhere to prevent that if a few wants to keep the video output configuration that way. CLI is not for basic users unfortunately..
Moving to some unrelated component will not get this done any faster. I think the kscreen kded can do that (different from the kephal one) - no idea about configurability.
You can close this wish ; Kscreen in 4.13 do _exactly_ what I asked for :) Thank you !
Closing based on comment #10