SDL icon indicating copy to clipboard operation
SDL copied to clipboard

kmsdrm: VT switching doesn't work

Open stsp opened this issue 6 months ago • 6 comments

It seems VT switching was implemented per https://github.com/libsdl-org/SDL/pull/8509 It doesn't work here though.

Steps to reproduce:

  • Ctrl-Alt-f5 to console
  • cd <sdl_build_dir>/test
  • ./testdraw
  • Press Ctrl-Alt-f3 or Alt-f3 or whatever

Result:

  • nothing happens

Expected result:

  • VT switch

stsp avatar May 29 '25 16:05 stsp

What platform are you running on?

slouken avatar May 29 '25 16:05 slouken

Ubuntu 25.04/x86_64

stsp avatar May 29 '25 16:05 stsp

Ironically if you don't have access to the keyboard, console switching works. Something about how we initialize the keyboard disables console switching.

slouken avatar May 29 '25 23:05 slouken

Also, using sudo runs the application under a psuedo-tty, so it doesn't have access to the console.

slouken avatar May 29 '25 23:05 slouken

I already filled https://github.com/sudo-project/sudo/issues/447 and I think sudo will add SUDO_TTY var in the future. Then you can at least re-open the console. Maybe sdl can add some fn for the user to pass the console fd to it.

stsp avatar May 30 '25 06:05 stsp

SUDO_TTY is now implemented. Do you think an app should open the tty and pass an fd to sdl somehow?

stsp avatar Jun 08 '25 08:06 stsp