Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Update to set_prefs.sh to fix check_nvidia #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

williamchanter
Copy link

I found when running the new code I got this error ...

awk: line 0: regular expression compile failed (missing '(')
): 

By escaping the ")" it fixed the issue for me

I found when running the new code I got this error ...
```
awk: line 0: regular expression compile failed (missing '(')
): 
```
By escaping the ")" it fixed the issue for me
@williamchanter
Copy link
Author

williamchanter commented Jul 6, 2019

Haven't checked this with anything but my system (Dell XPS 9570 / KDE Neon) but it did fix it 👍

$ awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

compiled limits:
max NF             32767
sprintf buffer      2040

Thanks for all the work you've done on this project it's been super useful

@jsalatas
Copy link
Owner

jsalatas commented Jul 6, 2019

Well, it seems you are using mawk and not gawk. My system (also KDE Neon) uses gawk and I'm pretty sure this is the default. Could you please run sudo update-alternatives --config awk and choose gawk? That will fix your issue.

PS: I'm not merging your patch for now, as in most systems gawk should be the default :. Let's wait for a couple of more days to hear from other people as well.

Copy link
Owner

@jsalatas jsalatas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please check if the following works for you?

powermizer=`nvidia-settings -q GpuPowerMizerMode | grep "Attribute 'GPUPowerMizerMode'" | gawk -F "): " '{print $2}'  | gawk -F "." '{print $1}' ` 

and if that works, and you agree with that, please update your pull request, and I'll merge it.

Thanks! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants