Skip to contentSkip to conversation

Enabling i915 Panel Self Refresh by default on some devices ?

DISCUSSION Hans de Goede 3 participants 7 messages Feb 1, 2018 – Feb 7, 2018

lore
Share & tools
lore
#0 lore raw

Hi All,

As you may have heard I've recently been working on improving Linux laptop battery life, specifically the OOTB experience without tweaking any options such as e.g. powertop --auto-tune would do, see:

https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife

So far this is going quite nicely, it looks like Fedora 28 will have SATA ALPM (big win), autosuspend of USB Bluetooth HCIs and snd_intel_hda powersaving all enabled OOTB.

Looking for more savings I've run some quick tests with i915.enable_psr=1, this seems to be another nice win (for an idle system) of aprox. 0.5W.

So as with the other 3 items I just mentioned I'm now looking into somehow enabling this be default, at least one some models.

Currently I'm thinking doing a whitelist or blacklist (*) for this, but first I think we need some more data about on how much models this just works and where it is causing issues, as such I've done a blog post to gather this data:

https://hansdegoede.livejournal.com/18653.html

So I will revisit this eventually, once people have had some time to respond to this blog-post.

In the mean time I wonder if anyone can explain why this options is currently disabled by default. E.g. are there any known specific models laptops / panels which are causing issues, are the bugzillas for this? Etc. ?

Also does anyone know if any problems are mainly panel or laptop model specific ? I would expect this to mostly be panel specific and not depend on the model laptop (given then certain models ship with different panels over their production lifetime).

Regards,

Hans

p.s.

If anyone on this list can make 10 minutes to run the tests described in my blogpost and gather the data mentioned there, then that would be great.

*) I know that maintaining such a white/blacklist in the kernel is going to be a pain, so my current thinking on this is to make this runtime configurable through a sysfs attribute and then use a udev rule + udev hwdb entries for this.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#1 lore raw

Hi,

Quoted 51 lines · Hans de Goede

Hi All,

As you may have heard I've recently been working on improving Linux laptop battery life, specifically the OOTB experience without tweaking any options such as e.g. powertop --auto-tune would do, see:

https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife

So far this is going quite nicely, it looks like Fedora 28 will have SATA ALPM (big win), autosuspend of USB Bluetooth HCIs and snd_intel_hda powersaving all enabled OOTB.

Looking for more savings I've run some quick tests with i915.enable_psr=1, this seems to be another nice win (for an idle system) of aprox. 0.5W.

So as with the other 3 items I just mentioned I'm now looking into somehow enabling this be default, at least one some models.

Currently I'm thinking doing a whitelist or blacklist (*) for this, but first I think we need some more data about on how much models this just works and where it is causing issues, as such I've done a blog post to gather this data:

https://hansdegoede.livejournal.com/18653.html

So I will revisit this eventually, once people have had some time to respond to this blog-post.

In the mean time I wonder if anyone can explain why this options is currently disabled by default. E.g. are there any known specific models laptops / panels which are causing issues, are the bugzillas for this? Etc. ?

Also does anyone know if any problems are mainly panel or laptop model specific ? I would expect this to mostly be panel specific and not depend on the model laptop (given then certain models ship with different panels over their production lifetime).

Regards,

Hans

p.s.

If anyone on this list can make 10 minutes to run the tests described in my blogpost and gather the data mentioned there, then that would be great.

Quoted 4 lines

*) I know that maintaining such a white/blacklist in the kernel is going to be a pain, so my current thinking on this is to make this runtime configurable through a sysfs attribute and then use a udev rule + udev hwdb entries for this.

So a quick update on this. The response has been quite overwhelming, with well over 50 test-reports received sofar. The results are all over the place, some people see no changes, some people report the aprox. 0.5W saving my own test show and many people also report display problems, sometimes combined with a significant increase in power-consumption.

I need to take a closer look at all the results, but right now I believe that the best way forward with this is (unfortunately) a whitelist matching on a combination of panel-id (from edid) and dmi data, so that we can at least enable this on popular models (any model with atleast one user willing to contribute).

So intel-gfx-team folks any input from your side, any feedback on the plan to use a udev rule + udev hwdb entries to build a whitelist for this?

Regards,

Hans
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

Hi Hans,

Quoted 11 lines · Hans de Goede

Hi,

Quoted 8 lines · Hans de Goede

Hi All,

As you may have heard I've recently been working on improving Linux laptop battery life, specifically the OOTB experience without tweaking any options such as e.g. powertop --auto-tune would do, see:

https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife

First of all thank you very much for triggering that. It's been so helpful.

Also sorry for not having replied sooner here.

Quoted 48 lines
Quoted 43 lines

So far this is going quite nicely, it looks like Fedora 28 will have SATA ALPM (big win), autosuspend of USB Bluetooth HCIs and snd_intel_hda powersaving all enabled OOTB.

Looking for more savings I've run some quick tests with i915.enable_psr=1, this seems to be another nice win (for an idle system) of aprox. 0.5W.

So as with the other 3 items I just mentioned I'm now looking into somehow enabling this be default, at least one some models.

Currently I'm thinking doing a whitelist or blacklist (*) for this, but first I think we need some more data about on how much models this just works and where it is causing issues, as such I've done a blog post to gather this data:

https://hansdegoede.livejournal.com/18653.html

So I will revisit this eventually, once people have had some time to respond to this blog-post.

In the mean time I wonder if anyone can explain why this options is currently disabled by default. E.g. are there any known specific models laptops / panels which are causing issues, are the bugzillas for this? Etc. ?

Also does anyone know if any problems are mainly panel or laptop model specific ? I would expect this to mostly be panel specific and not depend on the model laptop (given then certain models ship with different panels over their production lifetime).

Regards,

Hans

p.s.

If anyone on this list can make 10 minutes to run the tests described in my blogpost and gather the data mentioned there, then that would be great.

Quoted 4 lines

*) I know that maintaining such a white/blacklist in the kernel is going to be a pain, so my current thinking on this is to make this runtime configurable through a sysfs attribute and then use a udev rule + udev hwdb entries for this.

Quoted 6 lines

So a quick update on this. The response has been quite overwhelming, with well over 50 test-reports received sofar. The results are all over the place, some people see no changes, some people report the aprox. 0.5W saving my own test show and many people also report display problems, sometimes combined with a significant increase in power-consumption.

Do you have that public somewhere? I couldn't see the comments on your blog or on wiki.

Quoted 6 lines

I need to take a closer look at all the results, but right now I believe that the best way forward with this is (unfortunately) a whitelist matching on a combination of panel-id (from edid) and dmi data, so that we can at least enable this on popular models (any model with atleast one user willing to contribute).

First I'd like to check what platform people used on the test.

Also on SKL+ platforms I expect bad issues since https://patchwork.freedesktop.org/series/37598/
is not merged yet. Anyone using DC state plus this will probably
have a bad experience.

Quoted 4 lines

So intel-gfx-team folks any input from your side, any feedback on the plan to use a udev rule + udev hwdb entries to build a whitelist for this?

It would be interesting to collect the /sys/kernel/debug/dri/0/i915_vbt Is it possible to get back to these people asking this?

There is one particular field on VBT that is the OEM
telling it is safe to enable PSR with windows on that particular laptop.

So far we are ignoring this, but I believe we should start respecting that. Maybe with that we could avoid the white list.

I want to avoid at maximum any kind of white list because it would be hard to maintain and hard to expand.
And at this point we have known issues and this possibility of the vbt list. So let's investigate before adopting this strategy.

What do you think?

Thanks,
Rodrigo.

Quoted 8 lines

Regards,

Hans
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

Hi,

Quoted 76 lines · Rodrigo Vivi

Hi Hans,

Quoted 11 lines · Hans de Goede

Hi,

Quoted 8 lines · Hans de Goede

Hi All,

As you may have heard I've recently been working on improving Linux laptop battery life, specifically the OOTB experience without tweaking any options such as e.g. powertop --auto-tune would do, see:

https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife

First of all thank you very much for triggering that. It's been so helpful.

Also sorry for not having replied sooner here.

Quoted 48 lines
Quoted 43 lines

So far this is going quite nicely, it looks like Fedora 28 will have SATA ALPM (big win), autosuspend of USB Bluetooth HCIs and snd_intel_hda powersaving all enabled OOTB.

Looking for more savings I've run some quick tests with i915.enable_psr=1, this seems to be another nice win (for an idle system) of aprox. 0.5W.

So as with the other 3 items I just mentioned I'm now looking into somehow enabling this be default, at least one some models.

Currently I'm thinking doing a whitelist or blacklist (*) for this, but first I think we need some more data about on how much models this just works and where it is causing issues, as such I've done a blog post to gather this data:

https://hansdegoede.livejournal.com/18653.html

So I will revisit this eventually, once people have had some time to respond to this blog-post.

In the mean time I wonder if anyone can explain why this options is currently disabled by default. E.g. are there any known specific models laptops / panels which are causing issues, are the bugzillas for this? Etc. ?

Also does anyone know if any problems are mainly panel or laptop model specific ? I would expect this to mostly be panel specific and not depend on the model laptop (given then certain models ship with different panels over their production lifetime).

Regards,

Hans

p.s.

If anyone on this list can make 10 minutes to run the tests described in my blogpost and gather the data mentioned there, then that would be great.

Quoted 4 lines

*) I know that maintaining such a white/blacklist in the kernel is going to be a pain, so my current thinking on this is to make this runtime configurable through a sysfs attribute and then use a udev rule + udev hwdb entries for this.

Quoted 6 lines

So a quick update on this. The response has been quite overwhelming, with well over 50 test-reports received sofar. The results are all over the place, some people see no changes, some people report the aprox. 0.5W saving my own test show and many people also report display problems, sometimes combined with a significant increase in power-consumption.

Quoted 2 lines

Do you have that public somewhere? I couldn't see the comments on your blog or on wiki.

Not yet, I asked people to email me their results and the response has been quite overwhelming and I've been busy with other stuff, I do plan to eventually build a table with all the info like the SATA one here:

https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife#How_To_Test

Is there anything specific you would like to see in there?

Quoted 7 lines
Quoted 5 lines

I need to take a closer look at all the results, but right now I believe that the best way forward with this is (unfortunately) a whitelist matching on a combination of panel-id (from edid) and dmi data, so that we can at least enable this on popular models (any model with atleast one user willing to contribute).

First I'd like to check what platform people used on the test.

Right, this is why I asked for "cat /proc/cpuinfo | grep "model name"" output so that we will know which iGPU generation people are using. I've also asked for vendor + model name of the laptop.

Quoted 3 lines

Also on SKL+ platforms I expect bad issues since https://patchwork.freedesktop.org/series/37598/
is not merged yet. Anyone using DC state plus this will probably
have a bad experience.

Ah, that may explain quite a few of the failure reports I've received.

Quoted 6 lines
Quoted 3 lines

So intel-gfx-team folks any input from your side, any feedback on the plan to use a udev rule + udev hwdb entries to build a whitelist for this?

It would be interesting to collect the /sys/kernel/debug/dri/0/i915_vbt Is it possible to get back to these people asking this?

Yes I can ask everyone who has done testing to send me their vbt. I've this email alias with all people who have responded in Bcc, so I can e.g. also ask skylake+ users to re-test once:
https://patchwork.freedesktop.org/series/37598/

Has landed, or maybe re-test now with a kenrel-cmdline option to work around the issue ?

Quoted 1 line

There is one particular field on VBT that is the OEM > telling it is safe to enable PSR with windows on that particular laptop.

Sounds like useful info to put in the table of test-results I plan to create. Can you provide a tool (perl script, whatever) to extract this from a vbt dump?

Quoted 9 lines

So far we are ignoring this, but I believe we should start respecting that. Maybe with that we could avoid the white list.

I want to avoid at maximum any kind of white list because it would be hard to maintain and hard to expand.
And at this point we have known issues and this possibility of the vbt list. So let's investigate before adopting this strategy.

What do you think?

Using the VBT field sounds like an excellent solution and when I get around to extracting the info from all the mails I've received from testers, then we can see if there is a good correlation between people reporting issues and this bit being 0.

Note ideally their would also be a good correlation between the bit being 1 and people reporting success, but if this bit allows us to enable PSR on some models and avoid regressions that would be a good start.

Regards,

Hans
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
Quoted 79 lines · Hans de Goede

Hi,

Quoted 76 lines · Rodrigo Vivi

Hi Hans,

Quoted 11 lines · Hans de Goede

Hi,

Quoted 8 lines · Hans de Goede

Hi All,

As you may have heard I've recently been working on improving Linux laptop battery life, specifically the OOTB experience without tweaking any options such as e.g. powertop --auto-tune would do, see:

https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife

First of all thank you very much for triggering that. It's been so helpful.

Also sorry for not having replied sooner here.

Quoted 54 lines
Quoted 43 lines

So far this is going quite nicely, it looks like Fedora 28 will have SATA ALPM (big win), autosuspend of USB Bluetooth HCIs and snd_intel_hda powersaving all enabled OOTB.

Looking for more savings I've run some quick tests with i915.enable_psr=1, this seems to be another nice win (for an idle system) of aprox. 0.5W.

So as with the other 3 items I just mentioned I'm now looking into somehow enabling this be default, at least one some models.

Currently I'm thinking doing a whitelist or blacklist (*) for this, but first I think we need some more data about on how much models this just works and where it is causing issues, as such I've done a blog post to gather this data:

https://hansdegoede.livejournal.com/18653.html

So I will revisit this eventually, once people have had some time to respond to this blog-post.

In the mean time I wonder if anyone can explain why this options is currently disabled by default. E.g. are there any known specific models laptops / panels which are causing issues, are the bugzillas for this? Etc. ?

Also does anyone know if any problems are mainly panel or laptop model specific ? I would expect this to mostly be panel specific and not depend on the model laptop (given then certain models ship with different panels over their production lifetime).

Regards,

Hans

p.s.

If anyone on this list can make 10 minutes to run the tests described in my blogpost and gather the data mentioned there, then that would be great.

Quoted 4 lines

*) I know that maintaining such a white/blacklist in the kernel is going to be a pain, so my current thinking on this is to make this runtime configurable through a sysfs attribute and then use a udev rule + udev hwdb entries for this.

So a quick update on this. The response has been quite overwhelming, with well over 50 test-reports received sofar. The results are all over the place, some people see no changes, some people report the aprox. 0.5W saving my own test show and many people also report display problems, sometimes combined with a significant increase in power-consumption.

Quoted 8 lines
Quoted 2 lines

Do you have that public somewhere? I couldn't see the comments on your blog or on wiki.

Not yet, I asked people to email me their results and the response has been quite overwhelming and I've been busy with other stuff, I do plan to eventually build a table with all the info like the SATA one here:

https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife#How_To_Test

That would be perfect. Specially with VBT info.

Quoted 2 lines

Is there anything specific you would like to see in there?

This is the info available for psr on my decoded vbt:

BDB block 9 - PSR block:
Panel 2 *
Full link: no
Require AUX to wakeup: no Lines to wait before link standby: 0 Idle frames to for PSR enable: 0 TP1 wakeup time: 5000 usec (0x32) TP2/TP3 wakeup time: 5000 usec (0x32)

But now I realized that this bit that I'm talking about is actually on Block 2 and it is not currently being decoded:

u16 psr_enabled:1;

We need some work on igt tool apparently to decode this bit. So better to request users the undecoded version.

Quoted 13 lines
Quoted 8 lines
Quoted 6 lines

I need to take a closer look at all the results, but right now I believe that the best way forward with this is (unfortunately) a whitelist matching on a combination of panel-id (from edid) and dmi data, so that we can at least enable this on popular models (any model with atleast one user willing to contribute).

First I'd like to check what platform people used on the test.

Right, this is why I asked for "cat /proc/cpuinfo | grep "model name"" output so that we will know which iGPU generation people are using. I've also asked for vendor + model name of the laptop.

Quoted 6 lines
Quoted 3 lines

Also on SKL+ platforms I expect bad issues since https://patchwork.freedesktop.org/series/37598/
is not merged yet. Anyone using DC state plus this will probably
have a bad experience.

Ah, that may explain quite a few of the failure reports I've received.

likely if SKL+

Quoted 8 lines
Quoted 7 lines
Quoted 4 lines

So intel-gfx-team folks any input from your side, any feedback on the plan to use a udev rule + udev hwdb entries to build a whitelist for this?

It would be interesting to collect the /sys/kernel/debug/dri/0/i915_vbt Is it possible to get back to these people asking this?

Quoted 7 lines

Yes I can ask everyone who has done testing to send me their vbt. I've this email alias with all people who have responded in Bcc, so I can e.g. also ask skylake+ users to re-test once:
https://patchwork.freedesktop.org/series/37598/

Has landed, or maybe re-test now with a kenrel-cmdline option to work around the issue ?

It is about to land. So let's just wait a bit and ask for clean retest.

Thanks a lot,
Rodrigo.

Quoted 27 lines
Quoted 2 lines

There is one particular field on VBT that is the OEM > telling it is safe to enable PSR with windows on that particular laptop.

Sounds like useful info to put in the table of test-results I plan to create. Can you provide a tool (perl script, whatever) to extract this from a vbt dump?

Quoted 9 lines

So far we are ignoring this, but I believe we should start respecting that. Maybe with that we could avoid the white list.

I want to avoid at maximum any kind of white list because it would be hard to maintain and hard to expand.
And at this point we have known issues and this possibility of the vbt list. So let's investigate before adopting this strategy.

What do you think?

Using the VBT field sounds like an excellent solution and when I get around to extracting the info from all the mails I've received from testers, then we can see if there is a good correlation between people reporting issues and this bit being 0.

Note ideally their would also be a good correlation between the bit being 1 and people reporting success, but if this bit allows us to enable PSR on some models and avoid regressions that would be a good start.

Quoted 7 lines

Regards,

Hans
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw
In reply to Hans de Goede
Quoted 27 lines · Hans de Goede

Hi All,

As you may have heard I've recently been working on improving Linux laptop battery life, specifically the OOTB experience without tweaking any options such as e.g. powertop --auto-tune would do, see:

https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife

So far this is going quite nicely, it looks like Fedora 28 will have SATA ALPM (big win), autosuspend of USB Bluetooth HCIs and snd_intel_hda powersaving all enabled OOTB.

Looking for more savings I've run some quick tests with i915.enable_psr=1, this seems to be another nice win (for an idle system) of aprox. 0.5W.

So as with the other 3 items I just mentioned I'm now looking into somehow enabling this be default, at least one some models.

Currently I'm thinking doing a whitelist or blacklist (*) for this, but first I think we need some more data about on how much models this just works and where it is causing issues, as such I've done a blog post to gather this data:

https://hansdegoede.livejournal.com/18653.html

Quoted 8 lines

So I will revisit this eventually, once people have had some time to respond to this blog-post.

In the mean time I wonder if anyone can explain why this options is currently disabled by default. E.g. are there any known specific models laptops / panels which are causing issues, are the bugzillas for this? Etc. ?

I somehow missed reading your post.

There are few issues I know of:
1) frame counter reset that causes long vblank waits
2) fbcon screen freeze
3) driver v/s HW aux channel usage needs to be serialized
4) occasional cursor lag
5) lack of IGT's to verify correctness

The first two have patches on the list, the third is being worked on. The fourth needs investigation.

Quoted 4 lines

Also does anyone know if any problems are mainly panel or laptop model specific ? I would expect this to mostly be panel specific and not depend on the model laptop (given then certain models ship with different panels over their production lifetime).

I am sure there are panel issues, but I haven't looked into them yet. Like Rodrigo suggested, we probably have to rely on VBT for this and enable PSR by default on only those panels.

Quoted 12 lines

Regards,

Hans

p.s.

If anyone on this list can make 10 minutes to run the tests described in my blogpost and gather the data mentioned there, then that would be great.

Quoted 8 lines

*) I know that maintaining such a white/blacklist in the kernel is going to be a pain, so my current thinking on this is to make this runtime configurable through a sysfs attribute and then use a udev rule + udev hwdb entries for this.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

Hi,

Quoted 41 lines · Dhinakaran
Quoted 27 lines · Hans de Goede

Hi All,

As you may have heard I've recently been working on improving Linux laptop battery life, specifically the OOTB experience without tweaking any options such as e.g. powertop --auto-tune would do, see:

https://fedoraproject.org/wiki/Changes/ImprovedLaptopBatteryLife

So far this is going quite nicely, it looks like Fedora 28 will have SATA ALPM (big win), autosuspend of USB Bluetooth HCIs and snd_intel_hda powersaving all enabled OOTB.

Looking for more savings I've run some quick tests with i915.enable_psr=1, this seems to be another nice win (for an idle system) of aprox. 0.5W.

So as with the other 3 items I just mentioned I'm now looking into somehow enabling this be default, at least one some models.

Currently I'm thinking doing a whitelist or blacklist (*) for this, but first I think we need some more data about on how much models this just works and where it is causing issues, as such I've done a blog post to gather this data:

https://hansdegoede.livejournal.com/18653.html

Quoted 8 lines

So I will revisit this eventually, once people have had some time to respond to this blog-post.

In the mean time I wonder if anyone can explain why this options is currently disabled by default. E.g. are there any known specific models laptops / panels which are causing issues, are the bugzillas for this? Etc. ?

I somehow missed reading your post.

Quoted 8 lines

There are few issues I know of:
1) frame counter reset that causes long vblank waits
2) fbcon screen freeze
3) driver v/s HW aux channel usage needs to be serialized
4) occasional cursor lag
5) lack of IGT's to verify correctness

The first two have patches on the list, the third is being worked on.

Ok, what is the ETA of these fixes landing upstream and I assume it is not a good idea to enable PSR (even on models where people have reported it seems to work) until these are fixed?

Quoted 11 lines

The fourth needs investigation.

Quoted 4 lines

Also does anyone know if any problems are mainly panel or laptop model specific ? I would expect this to mostly be panel specific and not depend on the model laptop (given then certain models ship with different panels over their production lifetime).

I am sure there are panel issues, but I haven't looked into them yet. Like Rodrigo suggested, we probably have to rely on VBT for this and enable PSR by default on only those panels.

So there is a VBT bit for this? Currently I only see the code check the VBT for using full-off vs standby PSR mode and not for whether to actually use PSR or not ?

If we can get this from the VBT that would be way better then building a manual whitelist, which is the direction I'm currently considering.

Regards,

Hans
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx