def _has_integrated_gpu(self):
status = False;
path = '/var/lib/ubuntu-drivers-common/last_gfx_boot'
if os.path.isfile(path):
with open(path, 'r') as f:
t = f.read()
if t.find('8086') != -1 or t.lower().find('10de') != -1:
status = True
f.close()
return status
---
According to the discussion with Alberto[1], we are agree to check sysfs (e.g.
vendor, chassis, etc..) instead.
https://chat.canonical.com/canonical/pl/buqmskei77bkucdqj9g7dwwxcy
--
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-prime in Ubuntu.
https://bugs.launchpad.net/bugs/1942791
Title:
_has_integrated_gpu() needs to consider the desktop case
Status in OEM Priority Project:
Confirmed
Status in nvidia-prime package in Ubuntu:
New
Bug description:
In recovery (from a storage) case, the /var/lib/ubuntu-drivers-
common/last_gfx_boot is empty. Thus, the _has_integrated_gpu() returns
false in I+N laptop case. In this case, there is a iGPU actually.
---
During the recovery, a worker executes ubuntu-drivers install.
The expected result is "on-demand" but it goes to "on" because
/var/lib/ubuntu-drivers-common/last_gfx_boot doesn't exist
`ubuntu-drivers install` calls `prime-select on-demand` calls
enable_profile() and then enable_profile() calls _has_integrated_gpu()
before switching mode.
Since _has_integrated_gpu() returns false, it won't switch nvidia mode
To manage notifications about this bug go to:
https://bugs.launchpad.net/oem-priority/+bug/1942791/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp