test
test ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: hibernate, external monitor, color problem
On Sun, 2009-11-22 at 12:22 -0500, Tyler Smith wrote: Hi, I have a problem with my external monitor. If I boot while connected, the everything is fine. However, if I hibernate the laptop while not connected to the external monitor, and then resume after connecting, usually (I can't consistently reproduce the error, it happens more than 50% of the time though) the external monitor color is distorted to be almost illegible - very strong pinks and purples, I can barely make out the windows on the screen and some text. I can only recover proper, legible colors, by rebooting or by closing and restarting X. The same problem occurs when connecting to an external monitor through a docking station, directly to a lcd television, or directly to an overhead projector. Details: I'm running Debian Testing on an HP Elitebook 6930p, with the xorg version packaged by Debian, version: 1:7.4+4. I had previously had problems with getting the external monitor to work at all following hibernate, which was corrected by adding the following line to /etc/hibernate/common.conf: OnResume 20 xrandr --auto The default hardware detection in X used the radeon driver, which produced a lot of flickering. I used the Debian tools (dpkg-reconfigure xserver-xorg) to generate a xorg.conf file, which I then edited manually to use the radeonhd driver, which seems to work properly. I've googled for answers, read the xrandr and xorg.conf documentation (which I don't fully understand, I admit), and my xorg.0.log (also mostly incomprehensible to me) but I'm not sure how to proceed. Any suggestions would be welcome. I've attached my xorg.0.log and my /etc/X11/xorg.conf file. Hi, you can delete xorg.conf , all confs are now autodetect , Driver kbd and Driver mouse are deprecated. my xorg.conf, just change for my specifics , and not default options: Section ServerLayout Identifier single head configuration Screen 0 Screen0 0 0 Option DontZap false Option DontZoom false EndSection Section InputDevice Identifier Synaptics Driver synaptics Option TapButton1 1 Option TapButton2 1 Option TapButton3 1 Option VertEdgeScroll true #Option SpecialScrollAreaRight true EndSection Section Device Identifier Videocard0 # Driver vesa Driver intel #Option AccelMethod exa #Option XvMC true EndSection Section Screen Identifier Screen0 Device Videocard0 DefaultDepth 24 SubSection Display Depth 24 EndSubSection EndSection Thanks, Tyler plain text document attachment (xorg.conf) Section ServerLayout Identifier X.org Configured Screen 0 Screen0 0 0 InputDeviceMouse0 CorePointer InputDeviceKeyboard0 CoreKeyboard EndSection Section Files ModulePath /usr/lib/xorg/modules FontPath /usr/share/fonts/X11/misc FontPath /usr/share/fonts/X11/cyrillic FontPath /usr/share/fonts/X11/100dpi/:unscaled FontPath /usr/share/fonts/X11/75dpi/:unscaled FontPath /usr/share/fonts/X11/Type1 FontPath /usr/share/fonts/X11/100dpi FontPath /usr/share/fonts/X11/75dpi FontPath /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType FontPath built-ins EndSection Section Module Load dri2 Load extmod Load dbe Load record Load dri Load glx EndSection Section InputDevice Identifier Keyboard0 Driver kbd EndSection Section InputDevice Identifier Mouse0 Driver mouse Option Protocol auto Option Device /dev/input/mice Option ZAxisMapping 4 5 6 7 EndSection Section Monitor #DisplaySize 300 190 # mm Identifier Monitor0 VendorName SEC ModelName4c42 EndSection Section Device ### Available Driver options are:- ### Values: i: integer, f: float, bool: True/False, ### string: String, freq: f Hz/kHz/MHz ### [arg]: arg optional #Option NoAccel # [bool] #Option SWcursor# [bool] #Option Dac6Bit # [bool] #Option Dac8Bit # [bool] #Option BusType # [str] #Option CPPIOMode # [bool] #Option CPusecTimeout # i #Option AGPMode # i #Option AGPFastWrite# [bool] #Option AGPSize # i #Option GARTSize# i
Re: [xmodmap] Problem with e and n
On 11/16/2009 08:28 AM, Dirk Wallenstein wrote: On Sunday 15 November 2009 01:01:49 Maciej Piechotka wrote: Everything is working except AltGr+e/E and AltGr+n/N. What is wrong? You probably have to change the key types. You can get the current keymap by executing this command: $ xkbcomp -xkb ${DISPLAY} -o keymap.xkb Now edit the resulting file keymap.xkb and find the sections for the keysym assignment... You have to change the values for the type[groupX] entries. Just take the values from the keys that work, and fill in the keysyms. You can install the result by executing the following command: $ xkbcomp keymap.xkb ${DISPLAY} Hi Dirk, and thanks for the helpful hints. I've mapped my CapsLock key to a plain Shift_L key, using your instructions. Here is the output of xev (note the keycode is 66): KeyPress event, serial 30, synthetic NO, window 0x201, root 0x189, subw 0x0, time 35504647, (136,79), root:(140,822), state 0x0, keycode 66 (keysym 0xffe1, Shift_L), same_screen YES, XKeysymToKeycode returns keycode: 50 XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False That part is wonderful, but pressing the Caps Lock key doesn't create upper case letters, but pressing the Shift key does. Here is the line that I changed in the .xkb file: key CAPS { [ Shift_L ] }; What have I missed? Thanks! ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Key continue repeating if setting global autorepeat off while the key was already repeating.
Hi. If I turn global autorepeat off while a key is already being repeated, the key doesn't stop repeating. It continues on and on. I have prepared the following code for demonstrating the issue: reptest.c After the code, I quote 5 results from tests by running this code. The tests involve pressing a combination of a hotkey (in this code, Super_L) and the letter k in different combinations and timing. Tests A and B are OK, but tests C and D are not. Tests A, B, C, and D are under plain X11: startx `which xterm` -- :1 I'm running X.org version 1.6.5 under Debian Sid. I think (but not sure) I'm using the evdev driver. A friend tried test D for me under 1.7.1.901 and happens too. I tried putting a lot of XFlush(dpy) all over the place, but it still happens. evtest and showkey output look pretty normal to me, but I can attach a sample if needed. This problem happens also under Ubuntu Jaunty box (X 7.4, 1.6.0) but I remember previous distros not failing. Say Ubuntu Hardy or Gutsy and before. Is it a bug, or am I missing something? Thanks. /* * reptest.c: extract from Superkb to test autorepeat misbehavior. * * Copyright (C) 2005-2009, Octavio Alvarez Piza. * License: GNU General Public License v2. * * Compile with: gcc -Wall -std=gnu99 -pedantic -lX11 -o reptest reptest.c */ #include X11/Xlib.h #include errno.h #include stdio.h #include stdarg.h int main() { /* X11 connection setup */ Display *dpy; dpy = XOpenDisplay(NULL); /* Get code for Super_L, as a sample hotkey. */ KeyCode hotkey; hotkey = XKeysymToKeycode(dpy, XStringToKeysym(Super_L)); Window rootwin; rootwin = DefaultRootWindow(dpy); /* Grab the hotkey */ XGrabKey(dpy, hotkey, AnyModifier, rootwin, True, GrabModeAsync, GrabModeAsync); XKeyboardState xkbs; /* Save hotkey autorepeat state */ int saved_hotkey_autorepeat_mode; XGetKeyboardControl(dpy, xkbs); saved_hotkey_autorepeat_mode = (xkbs.auto_repeats[(int) hotkey/8] hotkey % 8) 0; /* Turn autorepeat off for the hotkey */ XKeyboardControl xkbc; xkbc.key = hotkey; xkbc.auto_repeat_mode = AutoRepeatModeOff; XChangeKeyboardControl(dpy, KBAutoRepeatMode | KBKey, xkbc); /* This variable holds the autorepeat state for the whole keyboard while the hotkey is NOT pressed. */ int saved_autorepeat_mode = 0; while (1) { XEvent ev; XNextEvent(dpy, ev); if (ev.xkey.keycode == hotkey ev.type == KeyPress) { printf([sk] Hotkey has been pressed, code: %d, name: %s.\n, ev.xkey.keycode, XKeysymToString(XKeycodeToKeysym(dpy, ev.xkey.keycode, 0))); XKeyboardState xkbs; /* Save autorepeat current state state, in order to restore it after hotkey is released. Autorepeat will be turned off in the meanwhile. */ XGetKeyboardControl(dpy, xkbs); saved_autorepeat_mode = xkbs.global_auto_repeat; printf([ar] AutoRepeat state has been saved: %d.\n, saved_autorepeat_mode); /* Turn autorepeat off. */ XKeyboardControl xkbc; xkbc.auto_repeat_mode = AutoRepeatModeOff; XChangeKeyboardControl(dpy, KBAutoRepeatMode, xkbc); printf([ar] AutoRepeat state has been turned off.\n); /* Starting the active mechanism by grabbing the kb. */ XGrabKeyboard(dpy, rootwin, False, GrabModeAsync, GrabModeAsync, CurrentTime); } else if (ev.xkey.keycode == hotkey ev.type == KeyRelease) { printf([sk] Hotkey has been released, code: %d, name: %s.\n, ev.xkey.keycode, XKeysymToString(XKeycodeToKeysym(dpy, ev.xkey.keycode, 0))); /* Restore saved_autorepeat_mode. */ XKeyboardControl xkbc; xkbc.auto_repeat_mode = saved_autorepeat_mode; XChangeKeyboardControl(dpy, KBAutoRepeatMode, xkbc); printf([ar] AutoRepeat has been restored to: %d\n, saved_autorepeat_mode); /* End the active state by ungrabbing the keyboard. */ XUngrabKeyboard(dpy, CurrentTime); printf(-\n); } else if (ev.type == KeyRelease) { /* Released any other key. */ printf([ac] Due to bound key release, executed action for key code = %d, name: %s\n, ev.xkey.keycode, XKeysymToString(XKeycodeToKeysym(dpy, ev.xkey.keycode, 0))); } } } [Sun Nov 22 16:48:20 -0800 -- alvar...@octavio:~/temp/xorg-repeat-test] $ ./reptest === TEST A: HOLD HOTKEY, HIT K, RELEASE HOTKEY == [sk] Hotkey has been pressed, code: 133, name: Super_L. [ar] AutoRepeat state has been saved: 1. [ar] AutoRepeat state has been turned off. [ac] Due to bound