Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error at line 57, file /home/username/gddr6/lib/src/gddr6.c (1) [Operation not permitted] #29

Open
Ahmed-Mahmod-Salem opened this issue May 19, 2024 · 8 comments

Comments

@Ahmed-Mahmod-Salem
Copy link

the code fails at this point everytime I try to run it

@olealgoritme
Copy link
Owner

Did you enable iomem=relaxed and run it with sudo?

@Ahmed-Mahmod-Salem
Copy link
Author

yes, I did everything in the description, didn't work, turns out it is a problem because we are trying to access /dev/mem which is locked by the kernel, had to recompile the kernel, and disabled secure boot, don't really know for sure which one of the two attempts did it, maybe it was both, but finally it worked.

@daniel-dona
Copy link
Contributor

Getting the same error when running the gddr6 binary:

$ sudo gddr6 
Error at line 57, file /home/dani/gddr6/lib/src/gddr6.c (1) [Operation not permitted]

I verified that iomem (iomem=relaxed) parameter is in the boot command line, kernel is 5.19.0-41-generic (Ubuntu 22.04)

I can provide additional information of the system if needed

@Ahmed-Mahmod-Salem
Copy link
Author

yeah, it is a deep hassle, my advice, just don't.

@daniel-dona
Copy link
Contributor

Additional info from the kernel:

[ 8903.861420] Lockdown: gddr6: /dev/mem,kmem,port is restricted; see man kernel_lockdown.7

Looks like is related to UEFI secure boot

$ sudo mokutil --sb
SecureBoot enabled

I'll test to disable secure boot and see if it works

@daniel-dona
Copy link
Contributor

It was that!

$ sudo gddr6
Device: RTX 3080 Ti GDDR6X (GA102 / 0x2208) pci=2d:0:0
VRAM Temps: |  52°C |

@daniel-dona
Copy link
Contributor

yeah, it is a deep hassle, my advice, just don't.

With this Ubuntu kernel just the iomem=relaxed and secure boot disabled works, no kernel recompile required. Maybe this can be added in the README, I can create a PR @olealgoritme if you agree...

@olealgoritme
Copy link
Owner

@daniel-dona Yes, please create a PR that highlights necessary UEFI Secure Boot setting in the README. Thank you!

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

No branches or pull requests

3 participants