_has_integrated_gpu() needs to consider the desktop case

Bug #1942791 reported by jeremyszu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
Critical
jeremyszu
nvidia-prime (Ubuntu)
Fix Released
Undecided
Unassigned

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

jeremyszu (os369510)
Changed in oem-priority:
assignee: nobody → jeremyszu (os369510)
importance: Undecided → High
status: New → Confirmed
tags: added: oem-priority originate-from-1942041 stella
tags: added: originate-from-1942028
Revision history for this message
jeremyszu (os369510) wrote (last edit ):

    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

jeremyszu (os369510)
tags: added: originate-from-1942822
Alex Tu (alextu)
Changed in oem-priority:
importance: High → Critical
Revision history for this message
Alex Tu (alextu) wrote :

the solution is included in the SRU from LP#1957094 and LP#1942789

Revision history for this message
jeremyszu (os369510) wrote :

as #2.

Changed in oem-priority:
status: Confirmed → Fix Released
Changed in nvidia-prime (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.