dvdhrm / kmscon

Linux KMS/DRM based virtual Console Emulator
http://www.freedesktop.org/wiki/Software/kmscon
Other
432 stars 79 forks source link

kmscon only works once on Thinkpad T40 (radeondrmfb) #78

Open larsks opened 11 years ago

larsks commented 11 years ago

I've just set up kmscon (7) under Arch Linux (kernel 3.7.9-2) on an IBM ThinkPad T40:

# cat /proc/fb
0 radeondrmfb

The first time kmscon launches it works correctly. If I switch to the kernel text console and then back to kmscon, the display is now corrupt (see this image).

After this point, launching any new kmscon instances will behave the same way.

dvdhrm commented 11 years ago

That looks a lot like a driver bug. Could you tell me what graphics-card you are using? Can you also please use "kmscon --debug" and append the output here? It's much easier to debug this if I know what happened. You should also trigger the bug while running with "--debug". Otherwise the log is useless ;)

As a workaround, you can use "--no-drm" as command-line option. kmscon will then use fbdev instead. You can also try whether "--hwaccel" or "--no-hwaccel" fix the issues for you (try them instead of --no-drm).

Thanks for the report David

larsks commented 11 years ago

The problem persists with both --hwaccel and --no-hwaccel. Using --no-drm causes kmscon to do nothing (does not blank the screen, does not estbalish a console, etc). The VT appears "frozen" until you kill kmscon from another VT.

larsks commented 11 years ago

[0000.000000] NOTICE: kmscon Revision kmscon-7 Feb 28 2013 16:16:35 [0000.023455] INFO: conf: reading config file /etc/kmscon/kmscon.conf [0000.042732] DEBUG: module: loading global modules from /usr/lib/kmscon (kmscon_load_modules() in src/kmscon_module.c:188) [0000.043500] DEBUG: module: opening module /usr/lib/kmscon/mod-unifont.so (kmscon_module_open() in src/kmscon_module.c:53) [0000.069690] DEBUG: module: Initializing module: /usr/lib/kmscon/mod-unifont.so (kmscon_module_open() in src/kmscon_module.c:83) [0000.070094] DEBUG: module: Date: Feb 28 2013 16:16:33 (kmscon_module_open() in src/kmscon_module.c:95) [0000.070405] DEBUG: module: GIT: kmscon-7 (kmscon_module_open() in src/kmscon_module.c:96) [0000.070700] DEBUG: module: Hooks: (nil) 0xb7092000 0xb7091fd0 (nil) (kmscon_module_open() in src/kmscon_module.c:101) [0000.071042] DEBUG: module: loading module /usr/lib/kmscon/mod-unifont.so (kmscon_module_load() in src/kmscon_module.c:154) [0000.071377] DEBUG: font: register font backend unifont (kmscon_font_register() in src/font.c:168) [0000.071709] DEBUG: module: opening module /usr/lib/kmscon/mod-bbulk.so (kmscon_module_open() in src/kmscon_module.c:53) [0000.089966] DEBUG: module: Initializing module: /usr/lib/kmscon/mod-bbulk.so (kmscon_module_open() in src/kmscon_module.c:83) [0000.090329] DEBUG: module: Date: Feb 28 2013 16:16:34 (kmscon_module_open() in src/kmscon_module.c:95) [0000.090638] DEBUG: module: GIT: kmscon-7 (kmscon_module_open() in src/kmscon_module.c:96) [0000.090931] DEBUG: module: Hooks: (nil) 0xb776bce0 0xb776bcb0 (nil) (kmscon_module_open() in src/kmscon_module.c:101) [0000.091260] DEBUG: module: loading module /usr/lib/kmscon/mod-bbulk.so (kmscon_module_load() in src/kmscon_module.c:154) [0000.091580] DEBUG: text: register text backend bbulk (kmscon_text_register() in src/text.c:78) [0000.091896] DEBUG: module: opening module /usr/lib/kmscon/mod-pango.so (kmscon_module_open() in src/kmscon_module.c:53) [0000.533008] DEBUG: module: Initializing module: /usr/lib/kmscon/mod-pango.so (kmscon_module_open() in src/kmscon_module.c:83) [0000.533570] DEBUG: module: Date: Feb 28 2013 16:16:34 (kmscon_module_open() in src/kmscon_module.c:95) [0000.533883] DEBUG: module: GIT: kmscon-7 (kmscon_module_open() in src/kmscon_module.c:96) [0000.534178] DEBUG: module: Hooks: (nil) 0xb7767170 0xb7767140 (nil) (kmscon_module_open() in src/kmscon_module.c:101) [0000.534509] DEBUG: module: loading module /usr/lib/kmscon/mod-pango.so (kmscon_module_load() in src/kmscon_module.c:154) [0000.534831] DEBUG: font: register font backend pango (kmscon_font_register() in src/font.c:168) [0000.535145] DEBUG: module: opening module /usr/lib/kmscon/mod-gltex.so (kmscon_module_open() in src/kmscon_module.c:53) [0000.555632] DEBUG: module: Initializing module: /usr/lib/kmscon/mod-gltex.so (kmscon_module_open() in src/kmscon_module.c:83) [0000.556000] DEBUG: module: Date: Feb 28 2013 16:16:35 (kmscon_module_open() in src/kmscon_module.c:95) [0000.556310] DEBUG: module: GIT: kmscon-7 (kmscon_module_open() in src/kmscon_module.c:96) [0000.556639] DEBUG: module: Hooks: (nil) 0xb55fc590 0xb55fc560 (nil) (kmscon_module_open() in src/kmscon_module.c:101) [0000.556970] DEBUG: module: loading module /usr/lib/kmscon/mod-gltex.so (kmscon_module_load() in src/kmscon_module.c:154) [0000.557295] DEBUG: text: register text backend gltex (kmscon_text_register() in src/text.c:78) [0000.557617] DEBUG: font: register font backend 8x16 (kmscon_font_register() in src/font.c:168) [0000.557920] DEBUG: text: register text backend bblit (kmscon_text_register() in src/text.c:78) [0000.558259] DEBUG: eloop: new eloop object 0x9ecbe40 (ev_eloop_new() in src/eloop.c:673) [0000.558647] INFO: systemd: system booted with systemd, enabling multi-seat support [0000.559157] DEBUG: scanning for devices... (setup_app() in src/kmscon_main.c:576) [0000.559525] DEBUG: new seat seat0 (app_seat_new() in src/kmscon_main.c:191) [0000.559983] DEBUG: parsing seat configuration for seat seat0 (kmscon_conf_load_seat() in src/kmscon_conf.c:666) [0000.678995] DEBUG: input_uxkb: new keyboard description (, , , ) (uxkb_desc_init() in src/uterm_input_uxkb.c:85) [0000.679387] DEBUG: input: new object 0x9ebf8f0 (uterm_input_new() in src/uterm_input.c:262) [0000.679818] DEBUG: vt: open vt 0x9ec2530 (real_open() in src/uterm_vt.c:312) [0000.680165] NOTICE: vt: using tty /dev/tty2 [0000.680426] DEBUG: vt: new tty ID is 2 (open_tty() in src/uterm_vt.c:299) [0000.680722] DEBUG: vt: previous VT KBMODE was 1 (real_open() in src/uterm_vt.c:358) [0000.681029] DEBUG: seat: register session 0x9ec05a0 (kmscon_seat_register_session() in src/kmscon_seat.c:929) [0000.681362] DEBUG: dummy: new dummy object 0x9ec4110 (kmscon_dummy_register() in src/kmscon_dummy.c:143) [0000.681678] DEBUG: seat: enable session 0x9ec05a0 (kmscon_session_enable() in src/kmscon_seat.c:1087) [0000.682264] DEBUG: tsm_screen: new screen (tsm_screen_new() in src/tsm_screen.c:471) [0000.682635] DEBUG: tsm_vte: new vte object (tsm_vte_new() in src/tsm_vte.c:399) [0000.683028] DEBUG: eloop: new eloop object 0x9ed7b38 (ev_eloop_new() in src/eloop.c:673) [0000.683383] DEBUG: pty: new pty object (kmscon_pty_new() in src/pty.c:96) [0000.683672] DEBUG: seat: register session 0x9ec4da8 (kmscon_seat_register_session() in src/kmscon_seat.c:929) [0000.683999] DEBUG: terminal: new terminal object 0x9ed4858 (kmscon_terminal_register() in src/kmscon_terminal.c:582) [0000.684330] DEBUG: seat: enable session 0x9ec4da8 (kmscon_session_enable() in src/kmscon_seat.c:1087) [0000.689915] DEBUG: vt: entering VT 2 on demand (real_activate() in src/uterm_vt.c:487) [0000.690127] DEBUG: monitor: new seat seat0 (monitor_new_seat() in src/uterm_monitor.c:313) [0000.693186] DEBUG: new input device /dev/input/event3 on seat seat0 (app_monitor_event() in src/kmscon_main.c:458) [0000.694735] DEBUG: input: ignoring non-useful device /dev/input/event3 (uterm_input_add_dev() in src/uterm_input.c:369) [0000.694983] DEBUG: monitor: new device /dev/input/event3 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.695942] DEBUG: new input device /dev/input/event4 on seat seat0 (app_monitor_event() in src/kmscon_main.c:458) [0000.696578] DEBUG: input: ignoring non-useful device /dev/input/event4 (uterm_input_add_dev() in src/uterm_input.c:369) [0000.696809] DEBUG: monitor: new device /dev/input/event4 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.697671] DEBUG: new input device /dev/input/event1 on seat seat0 (app_monitor_event() in src/kmscon_main.c:458) [0000.698126] DEBUG: input: ignoring non-useful device /dev/input/event1 (uterm_input_add_dev() in src/uterm_input.c:369) [0000.698356] DEBUG: monitor: new device /dev/input/event1 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.699217] DEBUG: new input device /dev/input/event2 on seat seat0 (app_monitor_event() in src/kmscon_main.c:458) [0000.699923] DEBUG: input: ignoring non-useful device /dev/input/event2 (uterm_input_add_dev() in src/uterm_input.c:369) [0000.700154] DEBUG: monitor: new device /dev/input/event2 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.700823] DEBUG: monitor: DRM device /dev/dri/card0 is primary PCI GPU (is_drm_primary() in src/uterm_monitor.c:461) [0000.701070] DEBUG: monitor: DRM device /dev/dri/card0 uses driver radeon (is_drm_usb() in src/uterm_monitor.c:535) [0000.701309] DEBUG: new video device /dev/dri/card0 on seat seat0 (app_seat_add_video() in src/kmscon_main.c:336) [0000.701544] INFO: drm_shared: new drm device via /dev/dri/card0 [0000.701759] DEBUG: video_drm2d: initialize 2D layer on 0x9edd648 (video_init() in src/uterm_drm2d_video.c:330) [0000.701988] INFO: video: new device 0x9edd648 [0000.702153] DEBUG: monitor: new device /dev/dri/card0 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.703002] DEBUG: monitor: adding non-seat'ed device /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/controlD64 (monitor_udev_add() in src/uterm_monitor.c:595) [0000.703668] INFO: ignoring video device /dev/fb0 on seat seat0 as it is a DRM-fbdev device [0000.703864] DEBUG: monitor: new device /dev/fb0 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.704809] DEBUG: new input device /dev/input/event0 on seat seat0 (app_monitor_event() in src/kmscon_main.c:458) [0000.706632] DEBUG: input: new device /dev/input/event0 (input_new_dev() in src/uterm_input.c:185) [0000.706858] DEBUG: monitor: new device /dev/input/event0 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.707769] DEBUG: new input device /dev/input/event7 on seat seat0 (app_monitor_event() in src/kmscon_main.c:458) [0000.710062] DEBUG: input: ignoring non-useful device /dev/input/event7 (uterm_input_add_dev() in src/uterm_input.c:369) [0000.710295] DEBUG: monitor: new device /dev/input/event7 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.710716] DEBUG: monitor: adding unsupported input dev /sys/devices/platform/i8042/serio1/input/input7/mouse0 (monitor_udev_add() in src/uterm_monitor.c:622) [0000.711645] DEBUG: new input device /dev/input/event8 on seat seat0 (app_monitor_event() in src/kmscon_main.c:458) [0000.713446] DEBUG: input: ignoring non-useful device /dev/input/event8 (uterm_input_add_dev() in src/uterm_input.c:369) [0000.713679] DEBUG: monitor: new device /dev/input/event8 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.714107] DEBUG: monitor: adding unsupported input dev /sys/devices/platform/i8042/serio1/serio2/input/input8/mouse1 (monitor_udev_add() in src/uterm_monitor.c:622) [0000.714971] DEBUG: new input device /dev/input/event5 on seat seat0 (app_monitor_event() in src/kmscon_main.c:458) [0000.716868] DEBUG: input: ignoring non-useful device /dev/input/event5 (uterm_input_add_dev() in src/uterm_input.c:369) [0000.717099] DEBUG: monitor: new device /dev/input/event5 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.718002] DEBUG: new input device /dev/input/event6 on seat seat0 (app_monitor_event() in src/kmscon_main.c:458) [0000.720030] DEBUG: input: new device /dev/input/event6 (input_new_dev() in src/uterm_input.c:185) [0000.720252] DEBUG: monitor: new device /dev/input/event6 on seat0 (seat_new_dev() in src/uterm_monitor.c:230) [0000.720846] DEBUG: monitor: adding unsupported input dev /sys/devices/virtual/input/mice (monitor_udev_add() in src/uterm_monitor.c:622) [0000.721127] DEBUG: 1 running seats after startup (main() in src/kmscon_main.c:626) [0000.721337] DEBUG: eloop: run for -1 msecs (ev_eloop_run() in src/eloop.c:924) [0000.721562] DEBUG: input: wakeing up (uterm_input_wake_up() in src/uterm_input.c:455) [0000.721860] DEBUG: vt: enter VT 2 0x9ec2530 due to VT signal (real_sig_enter() in src/uterm_vt.c:209) [0000.722089] DEBUG: video: wake up (uterm_video_wake_up() in src/uterm_video.c:680) [0000.731049] INFO: video: new display 0x9ec11d0 [0000.731301] INFO: drm_shared: display 0x9ec11d0 DPMS is ON [0000.731484] DEBUG: seat: add display 0x9ec11d0 to seat seat0 (seat_add_display() in src/kmscon_seat.c:480) [0000.737751] INFO: video_drm2d: activating display 0x9ec11d0 to 1400x1050 [0000.837051] INFO: drm_shared: setting DPMS of display 0x9ec11d0 to ON [0000.837388] DEBUG: font: searching for: be: pango nm: Droid Sans Mono ppi: 96 pt: 14 b: 0 i: 0 he: 0 wt: 0 (kmscon_font_find() in src/font.c:320) [0000.837638] DEBUG: font_pango: loading pango font Droid Sans Mono (kmscon_font_pango_init() in src/font_pango.c:380) [0001.164162] DEBUG: font: using: be: pango nm: Droid Sans Mono ppi: 96 pt: 15 b: 0 i: 0 he: 21 wt: 11 (kmscon_font_find() in src/font.c:339) [0001.164490] DEBUG: font: searching for: be: pango nm: Droid Sans Mono ppi: 96 pt: 14 b: 1 i: 0 he: 0 wt: 0 (kmscon_font_find() in src/font.c:320) [0001.164732] DEBUG: font_pango: loading pango font Droid Sans Mono (kmscon_font_pango_init() in src/font_pango.c:380) [0001.171094] DEBUG: font: using: be: pango nm: Droid Sans Mono ppi: 96 pt: 15 b: 1 i: 0 he: 21 wt: 11 (kmscon_font_find() in src/font.c:339) [0001.171390] DEBUG: text: using: be: bbulk (kmscon_text_new() in src/text.c:171) [0001.172930] DEBUG: terminal: added display 0x9ec11d0 to terminal 0x9ed4858 (add_display() in src/kmscon_terminal.c:272) [0001.173174] DEBUG: seat: activate session 0x9ec4da8 (session_call_activate() in src/kmscon_seat.c:120) [0001.174836] DEBUG: pty: forking child 468 (pty_spawn() in src/pty.c:382) [0006.755818] DEBUG: vt: deactivating VT 2 to 1 due to user input (real_input() in src/uterm_vt.c:577) [0006.756140] DEBUG: vt: leaving VT 2 0x9ec2530 due to VT signal (real_sig_leave() in src/uterm_vt.c:230) [0006.756362] DEBUG: seat: deactivate session 0x9ec4da8 (session_call_deactivate() in src/kmscon_seat.c:126) [0006.756614] DEBUG: video: go asleep (uterm_video_sleep() in src/uterm_video.c:663) [0006.756829] DEBUG: input: going to sleep (uterm_input_sleep() in src/uterm_input.c:431) [0011.456645] DEBUG: input: wakeing up (uterm_input_wake_up() in src/uterm_input.c:455) [0011.456796] DEBUG: vt: enter VT 2 0x9ec2530 due to VT signal (real_sig_enter() in src/uterm_vt.c:209) [0011.456837] DEBUG: video: wake up (uterm_video_wake_up() in src/uterm_video.c:680) [0011.493428] DEBUG: seat: activate session 0x9ec4da8 (session_call_activate() in src/kmscon_seat.c:120) [0014.459142] DEBUG: vt: deactivating VT 2 to 1 due to user input (real_input() in src/uterm_vt.c:577) [0014.459367] DEBUG: vt: leaving VT 2 0x9ec2530 due to VT signal (real_sig_leave() in src/uterm_vt.c:230) [0014.459410] DEBUG: seat: deactivate session 0x9ec4da8 (session_call_deactivate() in src/kmscon_seat.c:126) [0014.459442] DEBUG: video: go asleep (uterm_video_sleep() in src/uterm_video.c:663) [0014.459480] DEBUG: input: going to sleep (uterm_input_sleep() in src/uterm_input.c:431) [0016.489410] INFO: terminating due to caught signal 2 [0016.493231] DEBUG: eloop: exiting 0x9ecbe40 (ev_eloop_exit() in src/eloop.c:964) [0016.493313] DEBUG: deactivating VTs during shutdown (main() in src/kmscon_main.c:640) [0016.493391] DEBUG: monitor: free seat seat0 (monitor_free_seat() in src/uterm_monitor.c:325) [0016.493463] DEBUG: monitor: free device /dev/input/event6 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.493536] DEBUG: free input device /dev/input/event6 on seat seat0 (app_monitor_event() in src/kmscon_main.c:476) [0016.493609] DEBUG: input: free device /dev/input/event6 (input_free_dev() in src/uterm_input.c:207) [0016.493714] DEBUG: monitor: free device /dev/input/event5 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.493790] DEBUG: free input device /dev/input/event5 on seat seat0 (app_monitor_event() in src/kmscon_main.c:476) [0016.493861] DEBUG: monitor: free device /dev/input/event8 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.493932] DEBUG: free input device /dev/input/event8 on seat seat0 (app_monitor_event() in src/kmscon_main.c:476) [0016.494003] DEBUG: monitor: free device /dev/input/event7 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.494074] DEBUG: free input device /dev/input/event7 on seat seat0 (app_monitor_event() in src/kmscon_main.c:476) [0016.494145] DEBUG: monitor: free device /dev/input/event0 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.494216] DEBUG: free input device /dev/input/event0 on seat seat0 (app_monitor_event() in src/kmscon_main.c:476) [0016.494286] DEBUG: input: free device /dev/input/event0 (input_free_dev() in src/uterm_input.c:207) [0016.496599] DEBUG: monitor: free device /dev/fb0 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.496677] DEBUG: monitor: free device /dev/dri/card0 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.496748] DEBUG: free video device /dev/dri/card0 on seat seat0 (app_seat_remove_video() in src/kmscon_main.c:406) [0016.496822] DEBUG: seat: remove display 0x9ec11d0 from seat seat0 (seat_remove_display() in src/kmscon_seat.c:501) [0016.496897] DEBUG: terminal: removed display 0x9ec11d0 from terminal 0x9ed4858 (rm_display() in src/kmscon_terminal.c:334) [0016.496970] DEBUG: terminal: destroying terminal screen 0x9edd8a8 (free_screen() in src/kmscon_terminal.c:295) [0016.497042] DEBUG: text: freeing text renderer (kmscon_text_unref() in src/text.c:206) [0016.497126] DEBUG: font: freeing font (kmscon_font_unref() in src/font.c:374) [0016.497199] DEBUG: font_pango: unloading pango font (kmscon_font_pango_destroy() in src/font_pango.c:396) [0016.497299] DEBUG: font: freeing font (kmscon_font_unref() in src/font.c:374) [0016.497372] DEBUG: font_pango: unloading pango font (kmscon_font_pango_destroy() in src/font_pango.c:396) [0016.498223] INFO: video: free device 0x9edd648 [0016.498296] INFO: video_drm2d: deactivating display 0x9ec11d0 [0016.498750] INFO: video: free display 0x9ec11d0 [0016.498833] INFO: video_drm2d: free drm video device 0x9edd648 [0016.498925] DEBUG: monitor: free device /dev/input/event2 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.499003] DEBUG: free input device /dev/input/event2 on seat seat0 (app_monitor_event() in src/kmscon_main.c:476) [0016.499076] DEBUG: monitor: free device /dev/input/event1 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.499148] DEBUG: free input device /dev/input/event1 on seat seat0 (app_monitor_event() in src/kmscon_main.c:476) [0016.499220] DEBUG: monitor: free device /dev/input/event4 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.499291] DEBUG: free input device /dev/input/event4 on seat seat0 (app_monitor_event() in src/kmscon_main.c:476) [0016.499965] DEBUG: monitor: free device /dev/input/event3 on seat0 (seat_free_dev() in src/uterm_monitor.c:241) [0016.500037] DEBUG: free input device /dev/input/event3 on seat seat0 (app_monitor_event() in src/kmscon_main.c:476) [0016.500111] DEBUG: free seat seat0 (app_seat_free() in src/kmscon_main.c:245) [0016.500184] DEBUG: seat: unregister session 0x9ec05a0 (kmscon_session_unregister() in src/kmscon_seat.c:981) [0016.500258] DEBUG: seat: unregister session 0x9ec4da8 (kmscon_session_unregister() in src/kmscon_seat.c:981) [0016.500327] DEBUG: terminal: free terminal object 0x9ed4858 (terminal_destroy() in src/kmscon_terminal.c:432) [0016.506336] DEBUG: pty: free pty object (kmscon_pty_unref() in src/pty.c:120) [0016.506430] DEBUG: eloop: free eloop object 0x9ed7b38 (ev_eloop_unref() in src/eloop.c:735) [0016.507432] DEBUG: tsm_vte: destroying vte object (tsm_vte_unref() in src/tsm_vte.c:427) [0016.507513] DEBUG: tsm_screen: destroying screen (tsm_screen_unref() in src/tsm_screen.c:507) [0016.507979] DEBUG: vt: closing VT 2 (real_close() in src/uterm_vt.c:418) [0016.508129] DEBUG: input: free object 0x9ebf8f0 (uterm_input_unref() in src/uterm_input.c:291) [0016.509979] DEBUG: eloop: free eloop object 0x9ecbe40 (ev_eloop_unref() in src/eloop.c:735) [0016.510075] DEBUG: text: unregister backend bblit (kmscon_text_unregister() in src/text.c:102) [0016.510159] DEBUG: font: unregister font backend 8x16 (kmscon_font_unregister() in src/font.c:192) [0016.510237] DEBUG: module: unloading modules (kmscon_unload_modules() in src/kmscon_module.c:266) [0016.510317] DEBUG: module: unloading module /usr/lib/kmscon/mod-unifont.so (kmscon_module_unload() in src/kmscon_module.c:173) [0016.510390] DEBUG: font: unregister font backend unifont (kmscon_font_unregister() in src/font.c:192) [0016.510463] DEBUG: module: closing module /usr/lib/kmscon/mod-unifont.so (kmscon_module_unref() in src/kmscon_module.c:135) [0016.510665] DEBUG: module: unloading module /usr/lib/kmscon/mod-bbulk.so (kmscon_module_unload() in src/kmscon_module.c:173) [0016.510746] DEBUG: text: unregister backend bbulk (kmscon_text_unregister() in src/text.c:102) [0016.510818] DEBUG: module: closing module /usr/lib/kmscon/mod-bbulk.so (kmscon_module_unref() in src/kmscon_module.c:135) [0016.510952] DEBUG: module: unloading module /usr/lib/kmscon/mod-pango.so (kmscon_module_unload() in src/kmscon_module.c:173) [0016.511031] DEBUG: font: unregister font backend pango (kmscon_font_unregister() in src/font.c:192) [0016.511103] DEBUG: module: closing module /usr/lib/kmscon/mod-pango.so (kmscon_module_unref() in src/kmscon_module.c:135) [0016.538974] DEBUG: module: unloading module /usr/lib/kmscon/mod-gltex.so (kmscon_module_unload() in src/kmscon_module.c:173) [0016.539024] DEBUG: text: unregister backend gltex (kmscon_text_unregister() in src/text.c:102) [0016.539056] DEBUG: module: closing module /usr/lib/kmscon/mod-gltex.so (kmscon_module_unref() in src/kmscon_module.c:135) [0016.539141] INFO: exiting

larsks commented 11 years ago

lspci reports 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Radeon RV250 [Mobility FireGL 9000] (rev 02).

dvdhrm commented 11 years ago

Hm, it's a pretty old card, isn't it? Ok, lets try to narrow this down. Could you start kmscon and trigger the bug and then stop kmscon. If you then spawn kmscon again, screen will be garbled, right?

In this case, try compiling kmscon from source and run "make check". This will give you some debug-programs. Could you try running "./test_output --test" (as root)? This should give you a white screen for 5 seconds.

Compiling the debug programs should work with: tar -xvjf kmscon-7.tar.bz2 cd kmscon-7 ./configure make check sudo ./test_output --test

Please run the "test_output" from a getty, not from inside of X or kmscon.

Also, which kernel version are you using?

larsks commented 11 years ago

Yeah, it's an older laptop. kmscon only runs once successfully; after that, it will not work again until after a reboot.

Running test_output --test does set the screen white for 5 seconds. It works fine run multiple times.

Running test_output --test and then running kmscon works fine, once. After that, while test_output still behaves the same way, kmscon no longer works (although instead of producing garbled text, I'm just getting a blank screen).

dvdhrm commented 11 years ago

Thanks a lot for testing it. However, the results are really weird. So lets try something else. If test_output works, maybe that's because it only uses a single buffer.

Can you clone my "docs" repository and try the three DRM examples? You can find them here: https://github.com/dvdhrm/docs

You can run them via: git clone git://github.com/dvdhrm/docs.git cd docs/drm-howto/ make sudo ./modeset-vsync

This should show a colored screen that changes the colors smoothly. Can you run it multiple times? And do it after kmscon showed the bug, please.

The way kmscon uses DRM is quite complex and I am trying to find a simpler example that still finds to see what exactly is going wrong. test_output actually uses the same library kmscon does, so I really wonder why it works.

If you built test_output from source, did you also try kmscon from that self-built source then? You can try it with: sudo ./kmscon --debug

Thanks! David

larsks commented 11 years ago

modeset-vsync doesn't run at all; it reports:

using card '/dev/dri/card0'
ignoring unused connector 13
ignoring unused connector 15
mode for connector 17 is 1400x1050
cannot mmap dumb buffer (22): Invalid argument
cannot create framebuffer for connector 17
cannot setup device for connector 2:17 (22): Invalid argument
ignoring unused connector 19
exiting

This happens regardless of whether or not I have run kmscon.

Also, yes, I am running kmscon from the same sources used to build test_output. I've removed the system kmscon package just to make sure the source builds aren't picking up any extraneous bits.

dvdhrm commented 11 years ago

Ok, that definitely sounds like a driver bug. Just for completeness, could you also try the other two examples in that repository? "modeset" and "modeset-double-buffered".

I try to get some radeon devs on IRC, but I think they will just tell me to forward you to bugs.freedesktop.org. I will try to help you narrow this further down here, but I don't know how far I can get with that.

Thanks

larsks commented 11 years ago

modeset and modeset-double-buffered both behave the same way (as modeset-vsync).

No worries if it's a driver bug; I'm happy open something at bugs.freedesktop.org. Given the age of the machine it's doubtful that a bug report will generate much interest, but I can always keep my fingers crossed.

dvdhrm commented 11 years ago

I have cleaned up the howto file so it has no annoying comments. You can find it here: https://gist.github.com/dvdhrm/5083553 The raw file is available here: https://gist.github.com/dvdhrm/5083553/raw/b3f45fe91f35877792bfcb2a0329b252ae5c112f/modeset.c

Please make sure that:

If it fails, please report the bug to bugs.freedesktop.org against the radeon DRI/DRM driver. Also include:

Please say in your report that the bug is related to "DRM dumb buffers", however, the same bug also happens with "mesa3D on DRM". Also tell them whether xserver shows the same behavior.

I think that's all I can think of. Feel free to add me as CC and I will jump in if something is unclear.

(Optionally: If you run Arch-Linux, you might also give "weston" a try. This is the Wayland-Reference-Compositor and it uses the same modesetting API as kmscon. Would be nice to see whether it also fails.)

Thanks David