Bug 427754 - drm_calc_timestamping_constants error
Summary: drm_calc_timestamping_constants error
Status: REPORTED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-15 12:34 UTC by sundoulos2
Modified: 2020-10-15 12:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sundoulos2 2020-10-15 12:34:03 UTC
SUMMARY
After waking from suspend, this message is posted by the thousand to the kernel log:
[drm:drm_calc_timestamping_constants [drm]] *ERROR* crtc 50: Can't calculate constants, dotclock = 0!

STEPS TO REPRODUCE
1. Use Battery and Brightness widget to configure Energy Saving
2. Select Screen Energy Saving, set the time for say 10 minutes
3. Select Suspend session to Automatically Sleep after more than 10 minutes
4. Allow the inactivity timer to put the laptop to sleep.
5. Wake from suspend

OBSERVED RESULT
After waking from suspend, the drm error is posted to the kernel log in a constant stream whenever there is mouse movement. After 2 or 3 days the journal log exceeds 1gb.

EXPECTED RESULT
no error message

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: openSUSE Tumbleweed
(available in About System)
KDE Plasma Version: 5.19 and 5.20
KDE Frameworks Version: 
Qt Version: 5.15

ADDITIONAL INFORMATION
The error does not occur if Screen Energy Saving is not selected. It appears the error occurs because powerdevil sends a GraceFade command when the screen is already turned off.

This is the section from suspendsession.cpp:
> void SuspendSession::onIdleTimeout(int msec)
> {
> QVariantMap args{
> {QStringLiteral("Type"), m_autoType}
> };
>
> // we fade the screen to black 5 seconds prior to suspending to alert the user
> if (msec == m_idleTime - 5000) {
> args.insert(QStringLiteral("GraceFade"), true);
> } else {
> args.insert(QStringLiteral("SkipFade"), true);
> }
>
> trigger(args);
> }
There should be logic in there to SkipFade if Screen Energy Saving is selected. To try to fade a screen that is already turned off is unnecessary and causes the error on resume.