You are not logged in.

#1 2012-02-02 01:03:04

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

KDE 4.8 freezes on VGA disconnect?

I have a laptop which gets routinely moved from place to place. Some of these places have VGA stuff which I need to redirect output to.

A while back this was working pretty well. If I threw too much at it, it got upset but generally it worked OK.

Today is the first time I've tried to output to VGA since the update to 4.8. I had a slight issue getting the output to work in the first place but this was user error, I think. (I do wish it was possible to have it remember that such-and-such display should be configured thus while so-and-so display should be configured otherwise - or even to just set up named profiles which could be applied rather than doing the config from scratch all the time.)

The background from the greeter was displayed rather than my usual desktop background. (The new greeter background whereas my desktop still uses the old background - horos vs. ariyu, is it?) I wasn't really bothered by this, though. At this point, the external monitor and my laptop screen formed an extended desktop with the external monitor picture mirrored on the room's main screen via the standard LCD/beamer setup.

The real problems started after I disconnected the VGA. I disconnected and then put the laptop to sleep by closing the lid. I then woke the laptop up by opening the lid. KDE let me log back in but then did not respond to any further input - trackpad, click, function keys... The only thing I could get to work was switching to console mode. Admittedly, this is a pretty useful "only" but it was not ideal. (Especially since it kept beeping extremely loudly. I think I've killed this now but it was rather embarrassing at the time.) I noticed that the "cashew" was not in its usual position on the desktop and that it seemed to be in a bigger box than usual.

I finally shutdown and on reboot, the desktop is back to normal. But I need to know how to handle VGA connect/disconnect smoothly in the future. Is there a work around? Or is there something which I might be doing wrong which would cause this?

I've looked through the logs (error.log, previous X.org log, everything log...) and can't see anything relevant although I'm not sure what I'm looking for. A google search turned up some rather old looking descriptions of not terribly similar problems but I might not be searching on the right terms.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#2 2012-02-02 06:02:57

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: KDE 4.8 freezes on VGA disconnect?

you could always disable the external monitor in systemsettings prior to unplugging it...


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#3 2012-02-03 00:37:11

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: KDE 4.8 freezes on VGA disconnect?

Unfortunately, I am not likely to remember to do that every time. I'm often disconnecting in a hurry, trying to pack my stuff up and trying to answer student questions to give the next user time to set up for the next class. This isn't terribly conducive to remembering to visit system settings before pulling the cable, I'm afraid. If at all possible, I really need a fix which will be more tolerant of user behaviour than that!

Wondering, though. Is there a way of disabling the VGA monitor from the command line *after* pulling the plug? That would be far from ideal but it would be a lot better than being completely stuck (short of reboot).

Last edited by cfr (2012-02-03 00:39:05)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#4 2012-02-03 03:02:43

mister_playboy
Member
Registered: 2012-01-23
Posts: 17

Re: KDE 4.8 freezes on VGA disconnect?

When I unplug the VGA cable on my laptop, a dialog comes up asking if I want to run the monitor configuration tool.

Not exactly sure what you experienced, possibly sleep-related?

You can disable the VGA from the console like so:

xrandr --off VGA1

Teach not that I died in vain; rather, teach that I did not die by demonstrating that I live in you.--- ACIM

Offline

#5 2012-02-05 01:25:21

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: KDE 4.8 freezes on VGA disconnect?

Thank you! I will try that if and when it happens again.

It could be sleep related. I disconnected the VGA before putting the laptop to sleep but perhaps it didn't have time to register things properly.

I do get the configuration option when I connect a VGA monitor. This is something I really, really wish I could automate as I tend to forget how to do it, do it wrong, panic, thrash around a bit and (hopefully) eventually hit the right options through a combination of trial-and-error and sheer terror. It's OK if it is just an external monitor - it's when I'm doing all this in front of an audience with limited time available that the panic and terror kick in. I'd like something which let me save "profiles" - a bit like saving power profiles for different scenarios... But maybe I'll just learn how to do it right in the end...


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#6 2012-02-08 17:37:31

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: KDE 4.8 freezes on VGA disconnect?

OK. So I needed to use VGA again today. After disconnecting the VGA I was careful to wait for KDE to pop up the configuration dialog. Basically, this had VGA disabled and just the laptop screen showing. I OKed that, waited and put the laptop to sleep. At least, I tried. I don't think the laptop actually went to sleep properly.

Back in my office, I tried to wake it up. At first I thought it wouldn't wake but it responded to AC connect/disconnect with sound. I then realised I just couldn't see anything.

Switch to console. I tried various xrandr commands but none helped. It knows that the VGA is disconnected, but the theoretical screen size is still big enough to accommodate it and I cannot move the laptop screen output into position 0x0. Still, I'm not sure why it was completely black - I'd expect to see, say, the stuff that was on the laptop screen when the VGA was connected, even if I couldn't get the stuff from the VGA back.

I wasn't entirely sure what information to collect or what to try:

$ xrandr --current

Screen 0: minimum 320 x 200, current 1366 x 1536, maximum 8192 x 8192
LVDS1 connected 1366x768+0+768 (normal left inverted right x axis y axis) 256mm x 144mm
   1366x768       60.0*+
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)

$ xrandr --current --verbose

Screen 0: minimum 320 x 200, current 1366 x 1536, maximum 8192 x 8192
LVDS1 connected 1366x768+0+768 (0x45) normal (normal left inverted right x axis y axis) 256mm x 144mm
        Identifier: 0x41
        Timestamp:  63480103
        Subpixel:   horizontal rgb
        Gamma:      1.0:1.0:1.0
        Brightness: 1.0
        Clones:    
        CRTC:       0
        CRTCs:      0 1
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        EDID:
                00ffffffffffff004ca3433100000000
                00150103801a0e78ea1d859156598f26
                18505400000001010101010101010101
                010101010101b91d56f0500016303020
                25000090100000190000000f00000000
                000000000025d9066a00000000fe0053
                414d53554e470a204ca34154000000fe
                004c544e3131364154303634303200e1
        BACKLIGHT: 12 (0x0000000c)      range:  (0,15)                                                                          
        Backlight: 12 (0x0000000c)      range:  (0,15)                                                                          
        scaling mode:   Full aspect
                supported: None         Full         Center       Full aspect 
  1366x768 (0x45)   76.1MHz -HSync -VSync *current +preferred
        h: width  1366 start 1414 end 1446 total 1606 skew    0 clock   47.4KHz
        v: height  768 start  770 end  775 total  790           clock   60.0Hz
  1024x768 (0x46)   65.0MHz -HSync -VSync
        h: width  1024 start 1048 end 1184 total 1344 skew    0 clock   48.4KHz
        v: height  768 start  771 end  777 total  806           clock   60.0Hz
  800x600 (0x47)   40.0MHz +HSync +VSync
        h: width   800 start  840 end  968 total 1056 skew    0 clock   37.9KHz
        v: height  600 start  601 end  605 total  628           clock   60.3Hz
  800x600 (0x48)   36.0MHz +HSync +VSync
        h: width   800 start  824 end  896 total 1024 skew    0 clock   35.2KHz
        v: height  600 start  601 end  603 total  625           clock   56.2Hz
  640x480 (0x49)   25.2MHz -HSync -VSync
        h: width   640 start  656 end  752 total  800 skew    0 clock   31.5KHz
        v: height  480 start  490 end  492 total  525           clock   59.9Hz
VGA1 disconnected 1024x768+0+0 (0x46) normal (normal left inverted right x axis y axis) 0mm x 0mm
        Identifier: 0x42
        Timestamp:  63480103
        Subpixel:   unknown
        Gamma:      1.0:1.0:1.0
        Brightness: 1.0
        Clones:    
        CRTC:       1
        CRTCs:      0 1
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
HDMI1 disconnected (normal left inverted right x axis y axis)
        Identifier: 0x43
        Timestamp:  63480103
        Subpixel:   unknown
        Clones:    
        CRTCs:      0 1
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        Broadcast RGB:  Full
                supported: Full         Limited 16:2
        audio:  auto
                supported: off          auto         on          
DP1 disconnected (normal left inverted right x axis y axis)
        Identifier: 0x44
        Timestamp:  63480103
        Subpixel:   unknown
        Clones:    
        CRTCs:      0 1
        Transform:  1.000000 0.000000 0.000000
                    0.000000 1.000000 0.000000
                    0.000000 0.000000 1.000000
                   filter: 
        Broadcast RGB:  Full
                supported: Full         Limited 16:2
        audio:  auto
                supported: off          auto         on         

I tried the command suggested above (xrandr -off VGA1) as well as some other variants (e.g. xrandr --output VGA1 --off) and got errors similar to the following every time:

$ xrandr --fb 1366x768 --output LVDS1 --mode 1366x768 --pos 0x0 --output VGA1 --off

xrandr: Configure crtc 0 failed
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  150 (RANDR)
  Minor opcode of failed request:  21 (RRSetCrtcConfig)
  Serial number of failed request:  37
  Current serial number in output stream:  37

I also tried just resizing the screen to 1366x768 but it told me that wasn't big enough to accommodate everything. I also tried having the VGA1 output autoconfigure hoping it would discover it wasn't there and remove the 1024x768 space it is taking up but that didn't have any effect.

I'm a bit out of my depth here and unfortunately, this is usually something I need to "just work" for speed and audience-related reasons! I'm hoping somebody will be able to explain what's going on and suggest either how I might solve the problem or how I might further diagnose it.

Thanks for all the suggestions so far.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#7 2012-02-10 01:13:24

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: KDE 4.8 freezes on VGA disconnect?

I think the issues I'm seeing are due to a bug in krandr (e.g. https://bugs.kde.org/show_bug.cgi?id=273212). Does anybody have this working correctly or have a nice work around?

I don't use the krandr applet thing in the tray and I'm wondering if that makes a difference. (I just rely on the dialog popping up as needed.) It seems unlikely, though.

So I'm wondering if there's a way to prevent krandr etc. from being triggered on connection of VGA output and instead arranging for an alternative action. I'm not sure what action - would arandr work better? At a push, just triggering a script with xrandr might work but since I don't always connect to the same external VGA, maybe that would be tricky to get right.

Or should I use an X org config fragment? I just have some default fragments right now e.g. for evdev - nothing custom - but maybe that's necessary? I'm slightly wary of this because the advice seems to be to rely on the auto stuff if possible and auto add works fine, it is just the removing which causes issues...


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#8 2012-02-22 23:10:42

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: KDE 4.8 freezes on VGA disconnect?

I'm still not getting very far with this. Last week, I managed to get it to work almost perfectly. I say "almost" because I don't really think I should have to be this careful!

Before disconnecting, I disabled the VGA. Then I pulled the plug. I got the configure option and configured (basically reapplying the disabled screen bit). Worked fine.

This week, I tried to do the same. I disabled the VGA. I then disconnected it and got the configure option but I couldn't click it. Everything looked as if it there was a piece of translucent glass over the whole of my laptop display and although I could see things fine, I didn't seem to have any ability to control anything or input anything. Since my boss was there (of course couldn't be last week!), I ended up putting the laptop to sleep without resolving it. I couldn't do much else. When I woke it again, I gave my password to unlock the screen and then got this:
- a black block the width of the screen and perhaps 2 or 3 times the depth of the top panel. This was under the panel but over any windows. E.g. over the top of Firefox but under the top panel stuff.
- inability to input text, random ability to click (sometimes worked, sometimes not).
- very, very slow under X.
- everything fine on tty1, normal responsiveness etc. Output from xrandr looked normal (same as I get now with everything fine.) xrefresh made no difference.
- switching to tty1 and back sometimes seemed to kick the display into showing the next "bit" (e.g. menu or window) as though it wasn't refreshing properly. Nothing moved the black box, though.

In the end I rebooted from tty1.

Does anyone have any ideas? I wondered about hardware but connecting works fine and VGA works perfectly while connected so I'm thinking that is unlikely and this is X/KDE/Intel drivers/...? I really don't know.

I would really appreciate any thoughts, including - perhaps especially - ideas about how I might try to pin down the precise problem.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#9 2012-02-23 07:56:15

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: KDE 4.8 freezes on VGA disconnect?

Next time you just unplug the external or get issues with X try restarting X (/etc/rc.d/kdm restart). Since all the KDE libs are already in memory this shouldn't take long and all monitors _should_ get recognised correctly - quick and _very_ dirty wink

Out of interest, you on the Intel video driver?


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#10 2012-02-24 01:58:26

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: KDE 4.8 freezes on VGA disconnect?

Thanks, I'll try that. It's definitely odd. This week, xrandr was actually giving me output that looked correct - after rebooting, it gave the same even though things then worked fine.

On second thoughts, when you say it is "_very_ dirty", is it really better to just reboot? I don't want to make things worse...

Yes, I am using the intel driver. I don't think there's an alternative, is there?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#11 2012-02-24 09:13:58

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: KDE 4.8 freezes on VGA disconnect?

No, it isn't _that_ dirty smile Restarting X is no big deal and KDE will forgive you for your sins.

Best thing would probably an xrandr script of some sort to automate it all...


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#12 2012-03-29 02:50:43

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: KDE 4.8 freezes on VGA disconnect?

This problem has got worse. The last few times I've disconnected the vga, I've been unable to get any display of anything at all and have had to do a hard shutdown and recover the disk journal, hoping for the best. Today I got stripes on the screen briefly but nothing more.

Is there any way to debug this?

I'm currently using the lts kernel because the current one is unusable as it causes so much graphics corruption followed by hard lockups... (I'm also very reluctant to update right now as I'm worried I will just make things worse.)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#13 2012-03-29 07:43:49

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: KDE 4.8 freezes on VGA disconnect?

What about a tty? No can do?

EDIT:
You may want to try and ask your question in the KDE forum.

Last edited by toad (2012-03-29 07:46:28)


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#14 2012-03-29 17:09:01

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: KDE 4.8 freezes on VGA disconnect?

No, I can't switch to a tty anymore either. That used to work but now I still get a blank screen. The computer seems to respond in some sense. If, for example, there are stripes on the screen as there were yesterday, those may disappear and I'll get a plain black screen (with the backlight on - the screen isn't off) but I don't get any sort of prompt or text. (Or, at least, I don't get anything I can *see*.) This is why it is worse really - before, I could switch to a tty and shutdown or restart kdm from the command line so I could avoid, e.g. file system corruption etc. But now I can't do that. ctrl + alt + backspace/del doesn't seem to do anything either.

This is happening even when I've done everything "right" in the sense of doing everything in just the way which previously seemed to upset the system least. I don't really understand why it is this difficult...


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#15 2012-03-29 21:32:51

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: KDE 4.8 freezes on VGA disconnect?

http://forum.kde.org/viewtopic.php?f=22&t=101058 is my post on the KDE forums asking about this problem. (I am not sure it is in the right subsection of the forum but still.)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

Board footer

Powered by FluxBB