dvdhrm / kmscon

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

kmscon not working with proprietary nvidia drivers? #113

Open trusktr opened 10 years ago

trusktr commented 10 years ago

It's been a while since I've posted here, and have long since changed machines. I'm on a MacBook Pro Retina now, and I have nvidia 337.25-4 installed on Arch Linux.

When I try to switch from Xorg to Kmscon, I get errors like these:

Jul 10 12:55:12 starlancer kmscon[6796]: gbm: failed to open any driver (search paths /usr/lib/xorg/modules/dri)failed to load driver: nouveau
Jul 10 12:55:12 starlancer kmscon[6796]: [0000.124072] ERROR: uterm_drm3d_video: cannot create gbm device for /dev/dri/card0 (permission denied)
Jul 10 12:55:12 starlancer kmscon[6796]: [0000.124102] ERROR: video_drm2d: driver does not support dumb buffers
Jul 10 13:01:51 starlancer kmscon[6796]: [0399.168109] ERROR: video_fbdev: cannot set DPMS on /dev/fb0 (22): Invalid argument

I'm using systemd to start kmscon. Here's the ExecStart line:

ExecStart=/usr/bin/kmscon "--vt=%I" --seats=seat0 --no-switchvt --hwaccel --drm --debug

I'm also not sure how to revert back to getty in case I just need to do some work, so I'm stuck with Xorg only (which has some issues so I'd like to switch to another tty sometimes but I can't).

Here's the full debug output just in case, for the last kmscon process on tty1: http://hastebin.com/agagoqurup

Is there known fix for this problem? How can I change a tty back to getty for the meantime?

dvdhrm commented 10 years ago

You cannot pass --hwaccel or --drm if you use the binary driver. Please drop both.

To revert to the getty-way, I need to know how you enabled kmscon in the first place? Try looking into /etc/systemd/system/ and remove any "kmsconvt@...servce" files.

trusktr commented 10 years ago

After removing those two options, the result is the same: a black empty screen when switching to a vt.

Here's the debug output:

Jul 10 13:56:24 starlancer kmscon[9330]: [0143.980244] DEBUG: input: wakeing up (uterm_input_wake_up() in src/uterm_input.c:456)
Jul 10 13:56:24 starlancer kmscon[9330]: [0143.980290] DEBUG: vt: enter VT 3 0x6a08e0 due to VT signal (real_sig_enter() in src/uterm_vt.c:209)
Jul 10 13:56:24 starlancer kmscon[9330]: [0143.980296] DEBUG: video: wake up (uterm_video_wake_up() in src/uterm_video.c:680)
Jul 10 13:56:24 starlancer kmscon[9330]: [0143.980305] DEBUG: video_fbdev: disable double buffering (display_activate_force() in src/uterm_fbdev_video.c:206)
Jul 10 13:56:24 starlancer kmscon[9330]: [0143.980309] INFO: video_fbdev: activating display /dev/fb0 to 2880x1800 32 bpp
Jul 10 13:56:24 starlancer kmscon[9330]: [0143.980312] DEBUG: video_fbdev: vblank timer: 10 ms, monitor refresh rate: 94 Hz (display_activate_force() in src/uterm_fbdev_video.c:296)
Jul 10 13:56:24 starlancer kmscon[9330]: [0144.000360] INFO: video_fbdev: setting DPMS of device 0x747610 to ON
Jul 10 13:56:24 starlancer kmscon[9330]: [0144.000383] ERROR: video_fbdev: cannot set DPMS on /dev/fb0 (22): Invalid argument
Jul 10 13:56:24 starlancer kmscon[9330]: [0144.000389] WARNING: seat: cannot set DPMS state to on for display: -14
Jul 10 13:56:24 starlancer kmscon[9330]: [0144.000394] DEBUG: text: using: be: bbulk (kmscon_text_new() in src/text.c:171)
Jul 10 13:56:24 starlancer kmscon[9330]: [0144.001332] DEBUG: terminal: added display 0x747ca0 to terminal 0x69e4a0 (add_display() in src/kmscon_terminal.c:333)
Jul 10 13:56:24 starlancer kmscon[9330]: [0144.001343] DEBUG: seat: activate session 0x736c30 (session_call_activate() in src/kmscon_seat.c:119)
Jul 10 13:56:24 starlancer kmscon[9330]: [0144.001800] DEBUG: pty: forking child 9358 (pty_spawn() in src/pty.c:403)
Jul 10 13:56:26 starlancer kmscon[9330]: [0145.574933] DEBUG: vt: deactivating VT 3 to 7 due to user input (real_input() in src/uterm_vt.c:577)
Jul 10 13:56:26 starlancer kmscon[9330]: [0145.574971] DEBUG: vt: leaving VT 3 0x6a08e0 due to VT signal (real_sig_leave() in src/uterm_vt.c:230)
Jul 10 13:56:26 starlancer kmscon[9330]: [0145.574976] DEBUG: seat: deactivate session 0x736c30 (session_call_deactivate() in src/kmscon_seat.c:125)
Jul 10 13:56:26 starlancer kmscon[9330]: [0145.574981] DEBUG: video: go asleep (uterm_video_sleep() in src/uterm_video.c:663)
Jul 10 13:56:26 starlancer kmscon[9330]: [0145.574984] INFO: video_fbdev: deactivating device /dev/fb0
Jul 10 13:56:26 starlancer kmscon[9330]: [0145.594726] DEBUG: input: going to sleep (uterm_input_sleep() in src/uterm_input.c:432)
dvdhrm commented 10 years ago

Hm, that output looks just fine. The nvidia-driver does not accept the DPMS-change, though. Not sure what to do. I don't know how the nvidia binary driver works.

cirosantilli commented 6 years ago

For those that just want a DRM example to play with, here is a QEMU + Buildroot setup: https://github.com/cirosantilli/linux-kernel-module-cheat/tree/a64b276e9c02719a3e620c75aaa1ec490b240851#drm