- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
My problem is that SGX applications run only when ran with sudo access. Without it seems that it doesn't detect the driver. I am running the SampleEnclave application on a machine with Xeon Gold 6330 CPU, Ubuntu 22.04, kernel 5.15.0-87-generic, SGX SDK 2.22.
When I run sudo ./app I get a typical output:
Checksum(0x0x7ffe61adc650, 100) = 0xfffd4143
Info: executing thread synchronization, please wait...
Info: SampleEnclave successfully returned.
Enter a character before exit ...
When I run just ./app:
[get_driver_type edmm_utility.cpp:116] Failed to open Intel SGX device.
[open_se_device edmm_utility.cpp:178] Failed to open Intel SGX device.
[get_driver_type /home/sgx/jenkins/ubuntuServer2204-release-build-trunk-222/build_target/PROD/label/Builder-UbuntuSrv2204/label_exp/ubuntu64/linux-trunk-opensource/psw/urts/linux/edmm_utility.cpp:116] Failed to open Intel SGX device.
Info: Please make sure SGX module is enabled in the BIOS, and install SGX driver afterwards.
Error: Invalid SGX device.
Enter a character before exit ...
Any idea what is going on?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Ubuntu 22.04, you need to add your user to the "sgx" user group to be able to use the SGX device:
sudo usermod -aG sgx $USER
Make sure you log out and back in for the group add to take effect.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Ubuntu 22.04, you need to add your user to the "sgx" user group to be able to use the SGX device:
sudo usermod -aG sgx $USER
Make sure you log out and back in for the group add to take effect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Kai Chi,
Thanks for reaching out to us.
Did you build the project with sudo command?
Could you please run make clean command in the terminal and build the application again without sudo?
Regards,
Wan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! Adding user to group sgx solved the problem. I overlooked it in the new installation guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott_R_Intel,
Thanks for sharing the solution in the Intel® SGX community.
Hi Kai__chi,
Glad to know that your issue has been resolved. We'll close this case now. Please open a new question if additional information is needed and we'll be happy to help.
Regards,
Wan
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page