Bug 350657

Summary: krandrtray: intel-driver crashing
Product: [openSUSE] openSUSE 11.0 Reporter: Felix Möller <felix>
Component: KDE3Assignee: Lubos Lunak <llunak>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P3 - Medium    
Version: Factory   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Felix Möller 2007-12-25 20:11:48 UTC
I get the following crash when starting krandrtray with a connected TFT on my MacBook.

#6  RandRCrtc::id (this=0x961cc00) at ./kcontrol/randr/randrcrtc.cpp:41
#7  0x08062313 in RandROutput::applyProposed (this=0x961cc00, 
    changes=16777215, confirm=false) at ./kcontrol/randr/randroutput.cpp:459
#8  0x080633d2 in RandRScreen::slotUnifyOutputs (this=0x9620d18, unified=0)
    at ./kcontrol/randr/randrscreen.cpp:509
#9  0x080635b5 in RandRScreen::load (this=0x9620d18, config=@0xbff9847c)
    at ./kcontrol/randr/randrscreen.cpp:376
#10 0x08063b90 in RandRScreen::load (this=0x9620d18)
    at ./kcontrol/randr/randrscreen.cpp:409
#11 0x08065702 in RandRScreen (this=0x9620d18, screenIndex=0)
    at ./kcontrol/randr/randrscreen.cpp:37
#12 0x080659c5 in RandRDisplay (this=0x9620a28)
    at ./kcontrol/randr/randrdisplay.cpp:61
#13 0x08053238 in KRandRApp (this=0xbff9862c)
    at ./kcontrol/randr/krandrapp.cpp:33
#14 0x080533cd in main (argc=157400552, argv=0x961c1d8)
    at ./kcontrol/randr/main.cpp:48
#15 0xb6f21fc6 in __libc_start_main () from /lib/libc.so.6
#16 0x08051881 in _start ()
Comment 1 Felix Möller 2007-12-25 20:13:00 UTC
# xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 1280 x 1280
VGA disconnected 1024x768+0+0 (normal left inverted right x axis y axis) 434mm x 270mm
   1024x768_60    60.0*
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 286mm x 179mm
   1280x800       59.9*+   60.0     58.9
   1152x768       54.8
   1024x768       60.0     60.0     58.8
   800x600        60.3     60.0     56.2     58.7
   640x480        59.9
TMDS-1 connected (normal left inverted right x axis y axis)
   1280x1024      75.0     59.9
   1280x960       59.9
   1152x864       75.0     74.8
   1024x768       75.1     60.0
   832x624        74.6
   800x600        75.0     60.3     56.2
   640x480        75.0     60.0     59.9
   720x400        70.1
TV disconnected (normal left inverted right x axis y axis)
Comment 2 Felix Möller 2007-12-25 20:21:15 UTC
# xrandr --output TMDS-1 --auto
xrandr: cannot find crtc for output TMDS-1

After doing:
# xrandr --output VGA --off

I get the following xrandr output:
# xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 1280 x 1280
VGA disconnected (normal left inverted right x axis y axis)
   1024x768_60    60.0
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 286mm x 179mm
   1280x800       59.9*+   60.0     58.9
   1152x768       54.8
   1024x768       60.0     60.0     58.8
   800x600        60.3     60.0     56.2     58.7
   640x480        59.9
TMDS-1 connected (normal left inverted right x axis y axis)
   1280x1024      75.0     59.9
   1280x960       59.9
   1152x864       75.0     74.8
   1024x768       75.1     60.0
   832x624        74.6
   800x600        75.0     60.3     56.2
   640x480        75.0     60.0     59.9
   720x400        70.1
TV disconnected (normal left inverted right x axis y axis)

And now:
# xrandr --output TMDS-1 --auto

switches on the screen and I can start krandrtray.
Comment 3 Felix Möller 2008-02-27 23:19:06 UTC
This is still happening today:
# rpm -qf /opt/kde3/bin/krandrtray
kdebase3-3.5.9-4
Comment 4 Dirk Mueller 2008-04-17 13:49:14 UTC
is this also an issue with the kde4 version of krandrtray? I can reproduce iwth neither, and I use the intel driver. 
Comment 5 Felix Möller 2008-04-17 17:39:54 UTC
KDE3 krandr still crashes here is the gdb output of /opt/kde3/bin/krandrtray --nofork --nocrashhandler:

Program terminated with signal 11, Segmentation fault.
[New process 7833]
#0  RandRCrtc::id (this=0x80c41b0) at ./kcontrol/randr/randrcrtc.cpp:41
41      ./kcontrol/randr/randrcrtc.cpp: No such file or directory.
        in ./kcontrol/randr/randrcrtc.cpp
(gdb) bt
#0  RandRCrtc::id (this=0x80c41b0) at ./kcontrol/randr/randrcrtc.cpp:41
#1  0x08062253 in RandROutput::applyProposed (this=0x80c41b0, changes=40, confirm=false) at ./kcontrol/randr/randroutput.cpp:459
#2  0x08064277 in RandRScreen::unifyOutputs (this=0x80c1a60) at ./kcontrol/randr/randrscreen.cpp:480
#3  0x0806489f in RandRScreen::slotUnifyOutputs (this=0x80c1a60, unified=1) at ./kcontrol/randr/randrscreen.cpp:532
#4  0x08064c35 in RandRScreen::load (this=0x80c1a60, config=@0xbf89661c) at ./kcontrol/randr/randrscreen.cpp:376
#5  0x08065210 in RandRScreen::load (this=0x80c1a60) at ./kcontrol/randr/randrscreen.cpp:409
#6  0x08065402 in RandRScreen (this=0x80c1a60, screenIndex=0) at ./kcontrol/randr/randrscreen.cpp:37
#7  0x080656c5 in RandRDisplay (this=0x80c17c0) at ./kcontrol/randr/randrdisplay.cpp:61
#8  0x08053238 in KRandRApp (this=0xbf8967cc) at ./kcontrol/randr/krandrapp.cpp:33
#9  0x080533cd in main (argc=135017312, argv=0x80c3750) at ./kcontrol/randr/main.cpp:48
Comment 6 Felix Möller 2008-04-17 17:43:59 UTC
KDE4 krandr does not do anything good at all, but at least it does not crash. But that probably would be another bug report...

# rpm -qf /opt/kde3/bin/krandrtray `which krandrtray`
kdebase3-3.5.9-35
kdebase4-workspace-4.0.3-11
Comment 7 Dirk Mueller 2008-04-18 08:08:44 UTC
context menu click on the krandrtray icon of kde4 krandrtray? it pops up a dialog for me.. you can't select entries? doesn't it have entries? what is the issue? please be a bit more precise, thanks
Comment 8 Felix Möller 2008-04-18 09:17:05 UTC
This bug has "Component: KDE3" therefore I retested KDE4 krandrtray yesterday.

Right now I do not have access to my external monitor, but I can test tonight.

From the top of my head here are the biggest KDE4 krandrtray problems:
- One cannot apply changes made in "context menu" -> "configure screen" (Anzeige einrichten...). The same problem applies to systemsettings -> screen (Anzeige).
- Yesterday the context menu showed just one of the two connected screens and 3 out of 10 resolutions...

Do you want to move this bug to KDE4 krandrtray?
Comment 9 Felix Möller 2008-04-19 12:41:45 UTC
> - Yesterday the context menu showed just one of the two connected screens and 3
> out of 10 resolutions...
Sorry this was wrong, the menu now has an option to unify the screen sizes. 

But if I deunify my outputs I cannot set different resolutions nevertheless. The only thing that works for me from the context menu is to switch a display off. The resolution shown in the context menu are the correct ones (i.e. the same as seen by xrandr), but clicking on them just makes the screen blank for a minute without any resolution change.

# xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1680 x 1050
VGA disconnected (normal left inverted right x axis y axis)
   1024x768_60    60.0
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 286mm x 179mm
   1280x800       59.9 +   60.0
   1280x768       60.0
   1152x768       54.8
   1024x768       60.0*    60.0
   1280x600       60.0
   1024x600       60.0
   800x600        60.3     60.0     56.2
   768x576        60.0
   640x480        59.9     60.0
TMDS-1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 434mm x 270mm
   1680x1050      59.9 +   60.0
   1280x1024      75.0     59.9
   1440x900       59.9
   1280x960       59.9
   1152x864       75.0     74.8
   1024x768       75.1*    60.0
   832x624        74.6
   800x600        75.0     60.3     56.2
   640x480        75.0     60.0
   720x400        70.1
TV disconnected (normal left inverted right x axis y axis)
Comment 10 Felix Möller 2008-04-19 12:50:46 UTC
After killing krandrtray I can use "xrandr --output TMDS-1 --mode 1680x1050" to set the resolution on my external panel.

When not killed krandrtray will reset the resolution immediately.
Comment 11 Felix Möller 2008-04-19 13:11:57 UTC
Both my krandrtray (KDE4) problems are mentioned in:
http://bugs.kde.org/show_bug.cgi?id=154193
Comment 12 Felix Möller 2008-04-29 16:31:52 UTC
Dirk, what do you want to do with this bug? Move it to KDE4 or fix KDE3?
Comment 13 Dirk Mueller 2008-04-30 06:42:09 UTC
I would first like to fix kde4, and if time permits kde3. but kde4 has to work. if I understand you correctly, you don't have a crash with kde4 krandrtray
Comment 14 Felix Möller 2008-04-30 06:54:35 UTC
Yes you are correct KDE4 version does not crash.

But it does not work see comment #8 and comment #9.

I wont have access to the internet from tommorrow till next monday.
Comment 15 Felix Möller 2008-04-30 20:20:56 UTC
Looking at http://websvn.kde.org/trunk/KDE/kdebase/workspace/kcontrol/randr/krandrmodule.cpp?view=log I found 

Revision 763267 - (view) (download) (as text) (annotate) - [select for diffs]
Modified Sat Jan 19 02:48:06 2008 UTC (3 months, 1 week ago) by bock
File length: 3245 byte(s)
Diff to previous 758505

- XRRQueryExtension returns Bool, not Status
- Fix crash where Qt's QDesktopWidget returns multiple Xinerama screens;
  if we are being managed by RANDR, this number may be greater than the
- Fix a few memory leaks and uninitialized variables thanks to valgrind.
- Use the proper Xrandr.h macros for rotation and reflection masks in the
  actual number of screens as reported by ScreenCount in Xlib.
  RandR::Orientations enum.
- Don't remove the OutputGraphicsItems from a scene if they do not belong
  to it (why does QGraphicsScene return them in ::items() if they don't
  exist in the scene???)
- Add some useful accessors to OutputConfig to grab user configuration
  values for resolution, refresh rate, etc.
- Add preliminary multi-monitor ability; you can now set the absolute position
  of any screen.  Setting any other relationship other than "Absolute" currently
  clones all outputs to the largest display.
- Remove the "Active" checkbox and add a "Disabled" option in the resolution
  combo box instead; removes clutter and is clearer.
- Add the ability to get the preferred mode of a given connected output.
- Mark the preferred output mode (resolution) of a user as (Auto)
- Add missing proposeRefreshRate to RandROutput (was only in RandRCrtc)
- Remove performApplyOnStartup for KRandRModule - this makes sense for 
  krandrtray, which likely starts up with KDE4, but not for opening the
  KCModule, which should keep the active settings until the user makes a change.
- Remove some of my unnecessary output relationship code; found a much better
  way to do it :)
- More i18n contexts.
- The tray doesn't need to force querying infomation about each display/screen/
  output/crtc every time it prepares the context menu; it can receive randr
  events for a reason.
- Temporarily disable the logic to use the legacy RANDR API if the user has
  RANDR 1.2 but only one RROutput; this seems silly.
- Clean up the RandROutput and RandRCrtc APIs to use the proper RandR*
  classes instead of RRMode/Crtc/Output IDs from Xrandr.h to avoid
  headaches.

This does not seem to be in the KDE4.0 branch:
http://websvn.kde.org/branches/KDE/4.0/kdebase/workspace/kcontrol/randr/krandrmodule.cpp?view=log

Will look a little deeper
Comment 16 Felix Möller 2008-09-27 13:54:46 UTC
Just to track the status a little in this bug:

Plugging in a monitor now pops up a window and asks me to configure it. But playing with the options in krandrtray either does not work (no crash, just no reaction) or hangs the machine hard (have to press powerbutton)

This is now with KDE 4.1.1 on todays factory.

Is this working for anybody? I guess giving the users a hint to "man xrandr" would be more helpfull.
Comment 17 Lubos Lunak 2008-12-10 14:10:19 UTC
See bug #383187 for problems with the KDE4 version.
Comment 18 Felix Möller 2008-12-10 14:31:31 UTC
Lubos you may close this as a duplicate. The purpose is the same and nobody is interested in the original kde3 problems anymore.
Comment 19 Lubos Lunak 2008-12-10 16:05:19 UTC
Ok.


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