Skip to content

Comments

Use current KMS videomode by default and add an option to control this.#66

Merged
Aetf merged 1 commit intoAetf:developfrom
vanfanel:develop
Dec 20, 2024
Merged

Use current KMS videomode by default and add an option to control this.#66
Aetf merged 1 commit intoAetf:developfrom
vanfanel:develop

Conversation

@vanfanel
Copy link

This is meant to prevent modesetting when the KMS video mode doesn't match the default display mode.
Doing a full modesetting causes a display blanking on (all?) modern displays and it's something that should be avoided.

@DanielMartensson
Copy link

@vanfanel
Hi!
So this pull request tells kmscon to not change to the original settings of DRM? I'm facing the problem that once kmscon is starting, it change the DRM settings, which leads to incorrect and errors at my HDMI screen.

@Aetf Aetf merged commit f60af92 into Aetf:develop Dec 20, 2024
Copy link
Collaborator

@kdj0c kdj0c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit breaks on my system.

The root cause is that the encoder can be NULL in bind_display().

Stack trace of thread 7403:
*0 0x0000563646abd83e bind_display (kmscon + 0x2183e)
*1 0x0000563646abdcd1 uterm_drm_video_wake_up (kmscon + 0x21cd1)
*2 0x0000563646abdd54 video_wake_up (kmscon + 0x21d54)
*3 0x0000563646ab3ba7 uterm_video_wake_up (kmscon + 0x17ba7)
*4 0x0000563646aa76aa app_seat_event (kmscon + 0xb6aa)
*5 0x0000563646abb956 seat_go_foreground (kmscon + 0x1f956)
*6 0x0000563646aa739e seat_vt_event (kmscon + 0xb39e)
*7 0x0000563646aaca7a vt_call (kmscon + 0x10a7a)
*8 0x0000563646ab6988 vt_call_activate (kmscon + 0x1a988)
*9 0x0000563646aada6d shl_hook_call (kmscon + 0x11a6d)
*10 0x0000563646aae1b7 ev_eloop_dispatch (kmscon + 0x121b7)
*11 0x0000563646aae853 ev_eloop_run (kmscon + 0x12853)
*12 0x0000563646a9f74f main (kmscon + 0x374f)
*13 0x00007f49294bb248 __libc_start_call_main (libc.so.6 + 0x3248)
*14 0x00007f49294bb30b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x330b)
*15 0x0000563646aa00d5 _start (kmscon + 0x40d5)

I will submit a fix soon.

ddrm = disp->data;

drmModeEncoder *enc = drmModeGetEncoder(vdrm->fd, conn->encoder_id);
drmModeCrtc *current_crtc = drmModeGetCrtc(vdrm->fd, enc->crtc_id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes a segfault on my two test PC.
enc is NULL, and using enc->crtc_id leads to a crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants