The officially official Devuan Forum!

You are not logged in.

#1 2018-04-13 20:02:20

GNUser
Member
Registered: 2017-03-16
Posts: 561  

nomodeset causes suspend to work only once per boot [SOLVED]

I'm on a T400 with integrated graphics. Today I discovered that using the nomodeset kernel boot option magically makes various video artifacts go away, no matter what kernel I'm using.

An unfortunate and unexpected side effect of using nomodeset is that it breaks my machine's ability to suspend, regardless of which kernel I'm running. Both loginctl suspend and sudo pm-suspend work without nomodeset, break with nomodeset.

Does anyone know of a way to use nomodeset kernel boot option without breaking machine's ability to suspend?

Last edited by GNUser (2018-04-14 11:51:16)

Offline

#2 2018-04-14 00:25:49

GNUser
Member
Registered: 2017-03-16
Posts: 561  

Re: nomodeset causes suspend to work only once per boot [SOLVED]

I did a bit more research on this issue and discovered that the i915 kernel module, which is the default graphics driver on my T400 with integrated Intel graphics, requires kernel mode setting (see here). Therefore, using nomodeset kernel boot option on my machine causes it to fallback to the more barebones vesa graphics driver.

I can confirm that i915 is not the graphics driver when I use nomodeset kernel boot option.

Here is the output of  sudo lshw -c video without nomodeset (notice the "configuration:" line):

  *-display:0 UNCLAIMED     
       description: VGA compatible controller
       product: Mobile 4 Series Chipset Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 07
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list
       configuration: driver=i915 latency=0
       resources: memory:e1400000-e17fffff memory:d0000000-dfffffff ioport:5400(size=8) memory:c0000-dffff

And here is the output of the same command with nomodeset:

  *-display:0 UNCLAIMED     
       description: VGA compatible controller
       product: Mobile 4 Series Chipset Integrated Graphics Controller
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 07
       width: 64 bits
       clock: 33MHz
       capabilities: msi pm vga_controller bus_master cap_list
       configuration: latency=0
       resources: memory:e1400000-e17fffff memory:d0000000-dfffffff ioport:5400(size=8) memory:c0000-dffff

Last edited by GNUser (2018-04-14 03:31:53)

Offline

#3 2018-04-14 02:54:33

GNUser
Member
Registered: 2017-03-16
Posts: 561  

Re: nomodeset causes suspend to work only once per boot [SOLVED]

I did one more experiment:
Deleted the nomodeset kernel boot option, blacklisted the i915 kernel module, rebooted.

Result:
All observations are the same as when using nomodeset.

I think this proves that using the vesa fallback instead of i915 is breaking computer's ability to suspend--it does not matter if i915 is disabled directly (by blacklisting it) or indirectly (by using nomodeset).

Since i915 seems to be responsible for all the graphics bugs I was experiencing, I'm happy with vesa. Nevertheless, if anyone knows a way to make suspend work while on vesa graphics, please do share.

Last edited by GNUser (2018-04-14 03:34:11)

Offline

#4 2018-04-14 04:19:22

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,117  

Re: nomodeset causes suspend to work only once per boot [SOLVED]

To explore deeper, you might want to try

# PM_DEBUG=true pm-suspend >& LOG 

Reviewing that LOG file might tell you something about why suspending fails.

Online

#5 2018-04-14 11:39:47

GNUser
Member
Registered: 2017-03-16
Posts: 561  

Re: nomodeset causes suspend to work only once per boot [SOLVED]

Thanks, ralph.ronnquist. That was key.

I logged both without nomodeset (suspend working consistently) and with nomodeset (suspend works once then fails to work subsequently).

Interestingly, the logs without nomodeset and the first log with nomodeset are identical. With nomodeset, second attempt to suspend onwards do nothing and the last few lines of the log are:

+ flock -x -n 3
+ return 1
+ exit 1

It seems that the problem is that when running on vesa graphics, the pm-suspend command gets stuck at some point (presumably during the resume phase) and never finishes executing, leaving behind some kind of lock that prevents further attempts to suspend.

Last edited by GNUser (2018-04-14 15:16:19)

Offline

#6 2018-04-14 11:49:37

GNUser
Member
Registered: 2017-03-16
Posts: 561  

Re: nomodeset causes suspend to work only once per boot [SOLVED]

Since the only lines in the log having to do with graphics are these:

+ PM_QUIRKDB=/usr/lib/pm-utils/video-quirks
+ PM_LKW_QUIRKS=/var/cache/pm-utils/last_known_working.quirkdb

I tried different command line parameters having to do with quirks. This command causes suspend/resume to work as expected when running with nomodeset/vesa graphics: sudo pm-suspend --quirk-dpms-on

Wow, this was tough. I'll mark as solved.

Offline

#7 2018-04-14 12:06:42

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,117  

Re: nomodeset causes suspend to work only once per boot [SOLVED]

Great. You might even want to lodge a bug report on pm-utils to add the appropriate vendor quirk combination into the database for T400.

Online

Board footer