#513556 pm-utils: sleep.d/00clear hangs on chvt 63 if pygame (SDL) using frame buffer

#513556#5
Date:
2009-01-30 04:04:05 UTC
From:
To:
Package: pm-utils
Version: 1.1.2.4-1
Severity: normal


/usr/lib/pm-utils/sleep.d/00clear hangs because chvt 63 does not
complete.

X is not running.  A pygame application is running on a frame buffer
console.  This is on an OLPC XO running debxo.  pygame uses SDL.  The
pygame application ran pm-suspend.  The system did not suspend.  Process
tree shows chvt has not completed.

An strace of a manual chvt 63 shows ...

open("/dev/tty0", O_RDWR)               = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost -isig -icanon
-echo ...}) = 0
ioctl(3, KDGKBTYPE, 0xbfda8a63)         = 0
ioctl(3, VIDIOC_G_COMP or VT_ACTIVATE, 0x3f) = 0
ioctl(3, VIDIOC_S_COMP or VT_WAITACTIVE

At which point chvt hangs.  The pygame image is still on screen.  chvt
is interruptible with Control/C.

This bug might be more appropriate for kbd package, not sure.

This bug might be a failure of SDL to release the VT on demand, not sure
if there is such a demand.

I'm logging it first against pm-utils, since unless otherwise
discovered, chvt is not a reliable method to use to enter a text mode.

#513556#10
Date:
2009-01-30 16:33:40 UTC
From:
To:
James Cameron wrote:

[..]

If chvt is not reliable, what would you suggest instead?

Michael

#513556#15
Date:
2009-02-09 22:41:25 UTC
From:
To:
I cannot suggest an alternative to chvt.  chvt can fail to exit due to
race condition, so perhaps the bug should be moved there.  Or perhaps
the kernel should provide an API that combines both syscalls that chvt
tries.

#513556#20
Date:
2023-12-21 17:56:09 UTC
From:
To:
Dear submitter,

as the package pm-utils has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1058701

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Thorsten Alteholz (the ftpmaster behind the curtain)