Skip to content

Commit

Permalink
lemp9: Add intel_idle.max_cstate=4 kernel parameter to fix freezes
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Sep 29, 2021
1 parent 90bf4cf commit 7472a0b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
system76-driver (20.04.43~~alpha) focal; urgency=low

* Daily WIP for 20.04.43
* lemp9: Add intel_idle.max_cstate=4 kernel parameter to fix freezes

-- Jeremy Soller <jeremy@system76.com> Wed, 29 Sep 2021 08:53:34 -0600

Expand Down
16 changes: 13 additions & 3 deletions system76driver/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1558,20 +1558,30 @@ def perform(self):
class meer5_audio_hdajackretask(FileAction):
def describe(self):
return _('Fix pins for meer5 HDMI/DP audio output.')

def __init__(self):
self.modprobefile = '/etc/modprobe.d/system76-meer5-audio.conf'
self.patchfile = '/lib/firmware/system76-meer5-audio.fw'

def get_isneeded(self):
if not (os.path.exists(self.modprobefile) and os.path.exists(self.patchfile)):
return True
else:
return False

def perform(self):
modprobecontent = 'options snd-hda-intel patch=system76-meer5-audio.fw'
atomic_write(self.modprobefile, modprobecontent)
patchcontent = '[codec]\n0x8086280b 0x80860101 2\n\n'
patchcontent += '[pincfg]\n0x05 0x18560070\n0x06 0x18560070\n0x07 0x18560070\n'
atomic_write(self.patchfile, patchcontent)

class intel_idle_max_cstate_4(GrubAction):
"""
Add `intel_idle.max_cstate=4` to Linux command line.
"""

add = ('intel_idle.max_cstate=4',)

def describe(self):
return _('Fix for freezes on some CML-U processors')
4 changes: 3 additions & 1 deletion system76driver/products.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,9 @@
},
'lemp9': {
'name': 'Lemur Pro',
'drivers': [],
'drivers': [
actions.intel_idle_max_cstate_4
],
},
'lemp10': {
'name': 'Lemur Pro',
Expand Down

0 comments on commit 7472a0b

Please sign in to comment.