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

Update to set_prefs.sh to fix check_nvidia - #27

Open
williamchanter wants to merge 1 commit into
jsalatas:masterfrom
williamchanter:patch-1
Open

Update to set_prefs.sh to fix check_nvidia#27
williamchanter wants to merge 1 commit into
jsalatas:masterfrom
williamchanter:patch-1

Conversation

@williamchanter

Copy link
Copy Markdown

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

williamchanter commented Jul 6, 2019

Copy link
Copy Markdown
Author

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

jsalatas commented Jul 6, 2019

Copy link
Copy Markdown
Owner

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.

@jsalatas jsalatas left a comment

Copy link
Copy Markdown
Owner

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