Bug 164107 - doesn't add containment for added second monitor
Summary: doesn't add containment for added second monitor
Status: RESOLVED DUPLICATE of bug 173017
Alias: None
Product: plasma4
Classification: Unmaintained
Component: multiscreen (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 163497 174059 179601 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-15 00:44 UTC by Andreas Pakulat
Modified: 2009-01-11 17:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Pakulat 2008-06-15 00:44:40 UTC
Version:            (using Devel)
Installed from:    Compiled sources

I've just tried to use xrandr to activate my second head (using xrandr --output VGA-0 --mode 1680x1050_85.00 --right-of LVDS) and it worked (albeit kwin crashing and restarting itself, not a big deal). However plasma didn't create a containment for the new second head and thus there's simply no plasma support for that head now (i.e. no wallpaper, no toolbox). This works just fine if the head is already configured when plasma starts (i.e. I setup the second head in my X11 configuration).

Looks like either plasma doesn't get notified about the head addition (IIRC I found with Aaron some problems in QDesktopWidget which didn't know about xrandr 1.2 or didn't use the X11 notification API from that properly) or it doesn't do the right thing when it gets the notification about the new head.
Comment 1 Aaron J. Seigo 2008-06-16 04:41:32 UTC
can you try with recent trunk/, and if it is still broken send the output to console of plasma when you activate the second screen? thanks =)
Comment 2 Aaron J. Seigo 2008-06-16 04:52:06 UTC
*** Bug 163497 has been marked as a duplicate of this bug. ***
Comment 3 Andreas Pakulat 2008-06-16 08:13:33 UTC
That was a pretty recent trunk/ version (from sometime last week). But luckily I've just rebuilt last night so I'll retry when I'm back home.
Comment 4 Andreas Pakulat 2008-06-16 19:27:32 UTC
Hmm, tried to do

startkde 2>&1 | tee kde.out

but I don't see much "plasma" in there. The only lines I get are:
andreas@morpheus:~>grep -i plasma kde.out
kdeinit4: Got EXEC_NEW '/home/andreas/kde4/bin/plasma' from launcher.
kdeinit4: preparing to launch /home/andreas/kde4/bin/plasma
<unknown program name>(21416)/ checkComposite: Plasma has an argb visual 0x805b698 29360129
<unknown program name>(21416)/ checkComposite: Plasma is COMPOSITE-less on 0x8054b28
QLayout: Attempting to add QLayout "" to Plasma::Dialog "", which already has a layout
plasma(21417)/kdeui (KIconLoader) KIconLoader::loadIcon: No such icon "system"
plasma(21417)/kdeui (KIconLoader) KIconLoader::loadIcon: No such icon "kfm_home"
plasma(21417)/kdeui (KIconLoader) KIconLoader::loadIcon: No such icon "trashcan_full"
plasma(21417): Failed to lock file "/var/tmp/kdecache-andreas/kpc/kde-icon-cache.lock" , last result = 1

I guess thats not very helpful. Any hint how to get more information out of plasma?
Comment 5 Aaron J. Seigo 2008-06-16 19:42:12 UTC
hmm... you should be getting some lines that start with "Containment name:". after you've logged in, open a konsole, kquitapp plasma, plasma and send the entire set of output that appears if you could. thanks in advance =)
Comment 6 Andreas Pakulat 2008-06-16 20:04:58 UTC
There you go:
<unknown program name>(24541)/ checkComposite: Plasma has an argb visual 0x805b698 31457281
<unknown program name>(24541)/ checkComposite: Plasma is COMPOSITE-less on 0x8054b28
Object::connect: No such slot FolderView::layoutChanged(QModelIndex,QModelIndex)
QLayout: Attempting to add QLayout "" to Plasma::Dialog "", which already has a layout
plasma(24552)/kdecore (K*TimeZone*): KSystemTimeZones: ktimezoned initialize() D-Bus call failed:  "The name org.kde.kded was not provided by any .service files"

QDBusConnection received a message of type 3 that it shouldn't have
error: "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.kde.kded was not provided by any .service files"
QPainter::begin: Cannot paint on a null pixmap
Couldn't find node center. Skipping rendering.
QPainter::end: Painter not active, aborted
QPainter::begin: Cannot paint on a null pixmap


Could the missing kded be a problem for plasma?
Comment 7 Aaron J. Seigo 2008-06-16 20:19:49 UTC
no, but the missing debug out is. i really wonder what's happening to the debug output from plasma the application itself. until you can get that debug showing, there's nothing more i can really do from this side.

please ensure that plasma is built with debub and that the debug area for (1209) it hasn't been turned off
Comment 8 Andreas Pakulat 2008-06-16 20:30:58 UTC
Ah, yeah kdebug of course. So I hope this is more informative:

<unknown program name>(25593)/ checkComposite: Plasma has an argb visual 0x805b698 10485761
<unknown program name>(25593)/ checkComposite: Plasma is COMPOSITE-less on 0x8054b28
plasma(25601) PlasmaApp::PlasmaApp: Setting the pixmap cache size to 10346 kilobytes
plasma(25601)/libplasma Plasma::Containment::Private::positionPanel: positioning non- horizontal panel; forced? false
plasma(25601)/libplasma Plasma::Containment::Private::positionPanel: moved to QPointF(11686, -44)
plasma(25601)/libplasma Plasma::Containment::Private::positionPanel: positioning non- horizontal panel; forced? false
plasma(25601)/libplasma Plasma::Containment::Private::positionPanel: moved to QPointF(11686, -50)
plasma(25601)/libplasma Plasma::Containment::Private::positionPanel: positioning  horizontal panel; forced? true
plasma(25601)/libplasma Plasma::Containment::Private::positionPanel: moved to QPointF(0, -50)
plasma(25601)/libplasma Plasma::Containment::Private::positionPanel: positioning  horizontal panel; forced? false
plasma(25601)/libplasma Plasma::Containment::Private::positionPanel: moved to QPointF(0, -50)
plasma(25601) Panel::constraintsEvent: constraints updated with 15 !!!!!!
plasma(25601) Panel::constraintsEvent: constraints updated with 2 !!!!!!
plasma(25601) SystemTray::updateWidgetGeometry: Problem view is NULL
plasma(25601) SystemTray::updateWidgetGeometry: Problem view is NULL
plasma(25601) Battery::Battery: Loading applet battery
plasma(25601) DefaultDesktop::reloadConfig: Using configured wallpaper "/home/andreas/pics/film_background_comicmovies.png"
plasma(25601) IconApplet::IconApplet: sized to: QRectF(0,0 52x52)
plasma(25601) IconApplet::IconApplet: sized to: QRectF(0,0 52x52)
plasma(25601) IconApplet::IconApplet: sized to: QRectF(0,0 52x52)
plasma(25601)/libplasma Plasma::Containment::Private::positionContainment: trying at QPointF(1686, 0)
plasma(25601) DefaultDesktop::reloadConfig: Using configured wallpaper "/home/andreas/pics/film_background_realmovies.png"
plasma(25601) IconApplet::IconApplet: sized to: QRectF(0,0 52x52)
plasma(25601) IconApplet::IconApplet: sized to: QRectF(0,0 52x52)
plasma(25601) IconApplet::IconApplet: sized to: QRectF(0,0 52x52)
Object::connect: No such slot FolderView::layoutChanged(QModelIndex,QModelIndex)
plasma(25601) HotplugEngine::onDeviceAdded: add hardware solid :  "/org/freedesktop/Hal/devices/volume_uuid_444E_3FFC"
QLayout: Attempting to add QLayout "" to Plasma::Dialog "", which already has a layout
plasma(25601) DeviceNotifier::onSourceAdded: DeviceNotifier:: source added "/org/freedesktop/Hal/devices/volume_uuid_444E_3FFC"
plasma(25601) Clock::init: showTimezone: false
plasma(25601)/kdecore (K*TimeZone*): KSystemTimeZones: ktimezoned initialize() D-Bus call failed:  "The name org.kde.kded was not provided by any .service files" 

plasma(25601) Battery::init: BatterySource: "Battery0"
plasma(25601) Battery::init: 1
plasma(25601) Panel::constraintsEvent: constraints updated with 32 !!!!!!
plasma(25601) PlasmaApp::createView: Containment name: "Panel" | type 1 | screen: 1 | geometry: QRectF(0,-50 1680x44) | zValue: 150
plasma(25601)/libplasma Plasma::View::Private::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,-50 1680x44) associated screen is 1
plasma(25601) PanelView::pinchContainment: **************************** pinching QRect(0,0 1680x1050) 1680
plasma(25601) PanelView::pinchContainment: checking panel QRectF(0,-50 1680x44) against QRect(0,0 1680x1050)
plasma(25601) PanelView::pinchContainment: becoming horizontal with 0 1680 1680 1680
plasma(25601) PanelView::PanelView: Panel geometry is QRectF(0,-50 1680x44)
plasma(25601) PanelView::updateStruts: screen l/r/b/t offsets are: 0 0 0 0
plasma(25601) PanelView::updateStruts: screen l/r/b/t offsets are: 0 0 0 0
plasma(25601) PanelView::updateStruts: screen l/r/b/t offsets are: 0 0 0 0
plasma(25601) PlasmaApp::createView: Containment name: "Desktop" | type 0 | screen: 0 | geometry: QRectF(0,0 1680x1050) | zValue: 0
plasma(25601) PlasmaApp::createView: creating a view for 0 and we have 1 screens
plasma(25601)/libplasma Plasma::View::Private::updateSceneRect: !!!!!!!!!!!!!!!!! setting the scene rect to QRectF(0,0 1680x1050) associated screen is 0
plasma(25601) PlasmaApp::createView: Containment name: "Desktop" | type 0 | screen: 1 | geometry: QRectF(1680,0 1680x1050) | zValue: 0
QDBusConnection received a message of type 3 that it shouldn't have
error: "org.freedesktop.DBus.Error.ServiceUnknown" "The name org.kde.kded was not provided by any .service files" 
plasma(25601) Battery::constraintsEvent: Horizontal FormFactor
plasma(25601) DeviceNotifier::dataUpdated: DeviceNotifier::solidDeviceEngine updated "/org/freedesktop/Hal/devices/volume_uuid_444E_3FFC"
QPainter::begin: Cannot paint on a null pixmap
Couldn't find node center. Skipping rendering.
QPainter::end: Painter not active, aborted
QPainter::begin: Cannot paint on a null pixmap
plasma(25601) SystemTrayContainer::embedSystemTrayClient: attempting to embed 50331746
plasma(25601) SystemTrayContainer::embedSystemTrayClient: attempting to embed 39846007
plasma(25601) SystemTrayContainer::embedSystemTrayClient: attempting to embed 27263037
plasma(25601) SystemTrayContainer::embedSystemTrayClient: attempting to embed 18874622
ICE default IO error handler doing an exit(), pid = 25601, errno = 11
Plasma crashed, attempting to automatically recover
Comment 9 Andreas Pakulat 2008-06-17 12:38:21 UTC
Aaron, in case you didn't see my answer last night during half-time of the football game. The above output include the point where I literally plug in the monitor cable. Doing this again and looking at plasma's debug output indicates that plasma doesn't "do" anything when this happens, i.e. there's no output produced when I plug in the cable.
Comment 10 Andreas Pakulat 2008-11-23 17:55:51 UTC
*** Bug 174059 has been marked as a duplicate of this bug. ***
Comment 11 Andreas Pakulat 2008-11-24 17:45:47 UTC
Just setup a xorg.conf for the 2 monitor with large desktop case and this problem is almost gone with that. I still kinda have 2 containments on the first head (i.e. see 2 different parts of the background wallpaper clutched together in the middle of the screen and a dashboard widget that also sits around the top-middle.
Comment 12 Andreas Pakulat 2009-01-04 14:12:13 UTC
*** Bug 179601 has been marked as a duplicate of this bug. ***
Comment 13 Andreas Pakulat 2009-01-04 14:23:59 UTC
I think the "static xorg.conf setup" case works now, but the dynamic adding of a monitor still is the same:

- I do get a desktop wallpaper on initial adding, but its kinda broken (see 179601)
- No context menu on the desktop

- no cashew, but now I see a second cashew on the first screen. Its at the same position than the one for the first screen, but a slight bit off. Looks like the view through binoculars that are not setup properly for your own eye-distance, or as if I'm squinting while looking at them. So I can actually highlight both and I also get the normal menu from both via right-click. But the settings dialog has the same content no matter which of the two cashew's I use. Oh and one is apparently behind the other, thanks to transparency thats easily visible when mousing over the lower one.

- bright gray background, after moving a window a bit into the second screen and out again.
Comment 14 Andreas Pakulat 2009-01-04 18:11:34 UTC
Interesting, there's absolutely 0 output from plasma when adding a screen via xrandr. The kephal library itself unfortunately uses qDebug, so I only have that in .xsession-errors, along with a lot of other stuff. If you want to I can post it here, but it might be easier to first replace qDebug() in kephal with proper kDebug and an apropriate debug area in kdelibs and then re-run the experiment.
Comment 15 Aaron J. Seigo 2009-01-04 18:51:34 UTC
what i need to be able to make progress is:

* output from kephal at the moment xrandr picks up the second screen
* output from plasma over the same time period
* the svn rev# you are using
Comment 16 Aaron J. Seigo 2009-01-04 18:58:37 UTC
oh, btw, you can also run kephald directly for testing as a stand-alone daemon seperate from the kded one. =)
Comment 17 Andreas Pakulat 2009-01-05 00:24:41 UTC
svn is "from yesterday", something around 10pm my time (GMT+1), I'll do an update+build before the next test.

plasma didn't print anything at the time I plugged in the monitor via xrandr, but thanks for the hint about kephald, that should help getting the wanted output without posting huge files :)
Comment 18 Andreas Pakulat 2009-01-08 23:05:25 UTC
svn rev kdelibs: 907816
svn rev kdebase: 907819

I noticed that there's no kephald started after logging into kde4 (using kdm/kde4 and startkde script). I started it manually. The kephald output from adding a new screen is this:

[CRTC] Event...
   Changed mode
   Changed size:  QSize(1680, 1050)
[OUTPUT] Got event for  "VGA"
       crtc:  73
       mode:  145
       rotation:  1
       connection:  0
Setting CRTC 73 on output "VGA" (previous 0 )
possible: (75, 77, 78)
CRTC outputs: (75)
output changed: 75
XRandROutput::_changed() true true QRect(1440,0 1680x1050)
OutputScreens::rebuildScreens()

As I said before, plasma doesn't print anything when adding the output. Not even if I restart plasma after manually staring kephald.
Comment 19 Andreas Pakulat 2009-01-11 17:14:37 UTC
Turns out that this is caused by kephal not getting the notifications right. Patch pending on kwin mailinglist and I'll make sure it'll get in before the 4.2 release.

Closing this as dupe of the xrandr bug, as plasma is not at fault here.

*** This bug has been marked as a duplicate of bug 173017 ***