unity-settings-daemon crashes using xrandr

Bug #1462590 reported by sjjh
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
unity-settings-daemon (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

turning the screen by running the command 'xrand -o right' turns the screen, but it then immediately comes back to normal. Then I get a crash message of unity-settings-daemon. This problem also leads to non-working key combinations, as CTRL + ALT + T to open a terminal or Fn + F1, Fn + F2, Fn + F3, Fn + F4 to control volume/mic or Fn +F5, Fn + F6 to control display brightness. In addition I then have problems running graphical applications from command line, not finding the display and/or returning Mir(!?) errors.

Unfortunately I failed to create a bug report by submitting the crash report, so I'll attach it to this report and hope you can find all the necessary information. Feel free to ask for more information or mark it as duplicate pointing to an existing bug report.

Software: Pretty vanilla Ubuntu 15.04
Hardware: Thinkpad Yoga 12
I first recognised the bug when using following script: https://github.com/admiralakber/thinkpad-yoga-scripts/issues/8

Revision history for this message
sjjh (simon-harhues) wrote :
Revision history for this message
sjjh (simon-harhues) wrote :

This is the error message I get trying to run graphical applications from command line as mentioned above in the bug description:
------------------------------------------------------------------------------
simon@laptop:~$ eog
Maximum number of clients reached
** (eog:7631): WARNING **: Could not open X display
Maximum number of clients reachedgdk_mir_display_open
Failed to connect to Mir: Failed to connect to server socket: Datei oder Verzeichnis nicht gefunden
Unable to init server: Verbindung ist gescheitert: Verbindungsaufbau abgelehnt

(eog:7631): Gtk-WARNING **: cannot open display: :0
simon@laptop:~$
------------------------------------------------------------------------------
The two German texts are in English:
Datei oder Verzeichnis nicht gefunden --> File or folder not found
Verbindung ist gescheitert: Verbindungsaufbau abgelehnt --> Connection has failed: Connection establishment refused

This also leads to the problem that I cannot start any new applications at all. I first have to log off and on again.

The problem happens repeatedly some time after logging in. I don't get any visual error message.

It actually seems that it is not necessary to turn the screen to provoke this problem. So this may be another problem than the one original stated in this bug report. Please tell me if I shall open another bug report for it and how to debug this problem. A first glance at dmesg didn't show anything useful.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-settings-daemon (Ubuntu):
status: New → Confirmed
Revision history for this message
sjjh (simon-harhues) wrote :

The "Maximum number of clients reached" error seems indeed to be independent from the unity-settings-daemon crash.

Revision history for this message
sjjh (simon-harhues) wrote :

The attached crash report for unity-settings-daemon gets generated after the screen is returned by xrandr.

Revision history for this message
sjjh (simon-harhues) wrote :

The bug still exists in Ubuntu 15.10. Running the command xrandr -o right "unity-settings-daemon" still crashes.

Revision history for this message
sjjh (simon-harhues) wrote :

Trying to collect more information:

simon@laptop:~$ unity-settings-daemon --debug -r
[lots of debug information]
[using second terminal to run "xrandr -o right"]
(unity-settings-daemon:11712): Gdk-ERROR **: The program 'unity-settings-daemon' received an X Window System error.
This probably reflects a bug in the program.
The error was 'XI_BadDevice (invalid Device parameter)'.
  (Details: serial 613 error_code 129 request_code 131 (XInputExtension) minor_code 48)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/Breakpoint ausgelöst (Speicherabzug geschrieben)
simon@laptop:~$

Revision history for this message
sjjh (simon-harhues) wrote :

in case it is of any help I'll attach my ~/.config/monitors.xml

Revision history for this message
sjjh (simon-harhues) wrote :

Trying to generate a backtrace with gdb (--sync seemed to not work):

(unity-settings-daemon:28533): Gdk-ERROR **: The program 'unity-settings-daemon' received an X Window System error.
This probably reflects a bug in the program.
The error was 'XI_BadDevice (invalid Device parameter)'.
  (Details: serial 600 error_code 129 request_code 131 (XInputExtension) minor_code 48)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff642789b in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
(gdb) bt
#0 0x00007ffff642789b in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1 0x00007ffff6427a0f in g_log () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007ffff5865828 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#3 0x00007ffff5870879 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#4 0x00007ffff4ac8c4d in _XError () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#5 0x00007ffff4ac5ad7 in ?? () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#6 0x00007ffff4ac6c58 in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
#7 0x00007ffff4882f32 in XIQueryDevice () from /usr/lib/x86_64-linux-gnu/libXi.so.6
#8 0x00007fffd778066e in xdevice_get_dimensions () from /usr/lib/unity-settings-daemon-1.0/libxrandr.so
#9 0x00007fffd777b132 in ?? () from /usr/lib/unity-settings-daemon-1.0/libxrandr.so
#10 0x00007fffd777e140 in ?? () from /usr/lib/unity-settings-daemon-1.0/libxrandr.so
#11 0x00007ffff66f6015 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff6708061 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff6710dfc in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff671112f in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff79c22d4 in ?? () from /usr/lib/libunity-settings-daemon.so.1
#16 0x00007ffff79c233d in ?? () from /usr/lib/libunity-settings-daemon.so.1
#17 0x00007ffff586b291 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#18 0x00007ffff586b56d in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#19 0x00007ffff583e629 in gdk_display_get_event () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#20 0x00007ffff586b312 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#21 0x00007ffff6420ff7 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff6421250 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff6421572 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff6ec1775 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#25 0x00000000004037f1 in main ()

Revision history for this message
sjjh (simon-harhues) wrote :

I didn't have all dbg-Symbols installed, following https://wiki.ubuntu.com/Backtrace I gave it another try. Please see the attached full backtrace by dbg.
Still I didn't understand how to pass the "--sync" option or to run it in the GDK_SYNCHRONIZE environment. If anybody can tell me how to do it I'm willing to try. If anybody knows how to further debug it, please tell me -- I'm happy to help to get this solved.

Revision history for this message
sjjh (simon-harhues) wrote :

I'll attach my ~/.session-errors, but I believe there is not too much helpful in it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.