[Bug 1575960] Re: gpu-manager: get_alternative_link() NEVER checks for a correct alternative

2016-05-06 Thread Launchpad Bug Tracker
This bug was fixed in the package ubuntu-drivers-common - 1:0.4.18

---
ubuntu-drivers-common (1:0.4.18) yakkety; urgency=medium

  * gpu-manager.c:
- Pass the arguments in the correct order when getting
  the list of alternatives (LP: #1575960).
  Thanks to Rafał Cieślak for the fix.

 -- Alberto Milone   Fri, 29 Apr 2016
12:29:03 +0200

** Changed in: ubuntu-drivers-common (Ubuntu)
   Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575960

Title:
  gpu-manager: get_alternative_link() NEVER checks for a correct
  alternative

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1575960/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1575960] Re: gpu-manager: get_alternative_link() NEVER checks for a correct alternative

2016-05-02 Thread Launchpad Bug Tracker
This bug was fixed in the package ubuntu-drivers-common - 1:0.4.17.1

---
ubuntu-drivers-common (1:0.4.17.1) xenial-proposed; urgency=medium

  * gpu-manager.c:
- Pass the arguments in the correct order when getting
  the list of alternatives (LP: #1575960).
  Thanks to Rafał Cieślak for the fix.

 -- Alberto Milone   Fri, 29 Apr 2016
12:29:03 +0200

** Changed in: ubuntu-drivers-common (Ubuntu Xenial)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575960

Title:
  gpu-manager: get_alternative_link() NEVER checks for a correct
  alternative

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1575960/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1575960] Re: gpu-manager: get_alternative_link() NEVER checks for a correct alternative

2016-04-29 Thread Rafał Cieślak
I confirm that installing 1:0.4.17.1 from -proposed fixes this bug for
me.

** Tags removed: verification-needed
** Tags added: verification-done

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575960

Title:
  gpu-manager: get_alternative_link() NEVER checks for a correct
  alternative

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1575960/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1575960] Re: gpu-manager: get_alternative_link() NEVER checks for a correct alternative

2016-04-29 Thread Timo Aaltonen
Hello Rafał, or anyone else affected,

Accepted ubuntu-drivers-common into xenial-proposed. The package will
build now and be available at https://launchpad.net/ubuntu/+source
/ubuntu-drivers-common/1:0.4.17.1 in a few hours, and then in the
-proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed.  Your feedback will aid us getting this update
out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, and change the tag
from verification-needed to verification-done. If it does not fix the
bug for you, please add a comment stating that, and change the tag to
verification-failed.  In either case, details of your testing will help
us make a better decision.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance!

** Changed in: ubuntu-drivers-common (Ubuntu Xenial)
   Status: In Progress => Fix Committed

** Tags added: verification-needed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575960

Title:
  gpu-manager: get_alternative_link() NEVER checks for a correct
  alternative

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1575960/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1575960] Re: gpu-manager: get_alternative_link() NEVER checks for a correct alternative

2016-04-29 Thread Alberto Milone
** Description changed:

+ SRU Request:
+ 
+ [Impact]
+ The current code will prevent gpu-manager from getting the correct list of 
alternatives. This breaks the detection system.
+ 
+ [Test Case]
+ Install the nvidia driver and check that gpu-manager reconfigures the system 
properly. More specifically, there should be no "Error: no alternative found 
for nvidia" line in /var/log/gpu-manager.log if the driver was installed 
correctly.
+ 
+ [Regression Potential]
+ Low, it is a one line change and a pretty obvious fix.
+ 
+ __
+ 
  I suppose this is a fairly significant bug, since it renders gpu-manager 
virtually useless.
  I found it in ubuntu-drivers-common 0.4.17 (which is the current version in 
Ubuntu 16.04), and I do not know whether it is also present in other versions.
  
  -- Symptoms --
  
  For some reason, on my machine I frequently insert and remove my nvidia
  graphics adapter. My processor has an intel HD graphics adapter as well,
  so I rely on gpu-manager to detect my hardware configuration during
  boot, and update alternatives appropriately.
  
  However, since I upgraded to Ubuntu 16.04, reconfiguring my hardware
  makes me unable to boot to desktop. However, reverting to previous
  hardware configuration solves the issue.
  
  -- Analysis and proposed solution --
  
  A quick check of symbolic links at /etc/ld.so.conf.d/x86_64-linux-
  gnu_GL.conf and similar confirms that when I change my hardware
  configuration, no changes are done to the targets of these links.
  Reading through gpu-manager.log I can see that it detects my hardware
  correctly, but it fails to configure alternatives, because:
  
- Error: no alternative found for nvidia
- Warning: no EGL alternative found for nvidia
+ Error: no alternative found for nvidia
+ Warning: no EGL alternative found for nvidia
  
  Further investigation shows that the problem is with the
  get_alternative_link() function, as it always returns NULL, regardless
  of my current hardware configuration, and function arguments.
  
  The get_alternative_link() function works by querying the list of
  available alternatives by running `update-alternatives` command with
  `--list` argument. The command is prepared by:
  
- snprintf(command, sizeof(command),
-  "update-alternatives --list %s_%s_conf",
-  alternative_pattern, arch_path);
+ snprintf(command, sizeof(command),
+  "update-alternatives --list %s_%s_conf",
+  alternative_pattern, arch_path);
  
  For example, when looking for "gl" alternatives for architecture "x86_64
  -linux-gnu", the resulting command will be:
  
- update-alternatives --list gl_x86_64-linux-gnu_conf
+ update-alternatives --list gl_x86_64-linux-gnu_conf
  
  This command always returns an empty list, and that is correct. The
  command is clearly malformed, the intention was to run another command,
  namely:
  
- update-alternatives --list x86_64-linux-gnu_gl_conf
+ update-alternatives --list x86_64-linux-gnu_gl_conf
  
  (note the order of "gl" vs "x86_64_linux_gnu")
  Indeed the `snprintf` used to prepare the command has it's arguments swapped. 
Therefore I propose to substitute the mentioned source code with:
  
- snprintf(command, sizeof(command),
-  "update-alternatives --list %s_%s_conf",
-  arch_path, alternative_pattern);
+ snprintf(command, sizeof(command),
+  "update-alternatives --list %s_%s_conf",
+  arch_path, alternative_pattern);
  
  Applying the proposed change reliably fixes the bug symptoms I
  experienced.
  
  -- Additional comment --
  
  For your convenience, I attached to this bug report a patch file that applies 
the proposed solution; the patch is intended for ubuntu-drivers-common 0.4.17 
source.
  As far as I can tell, due to these swapped arguments gpu-manager always looks 
for unexisting alternatives, and therefore there is no scenario in which it 
would correctly configure alternatives. I suppose in this case gpu-manager 
always fails to serve its purpose. I find it astonishing that nobody noticed 
this issue yet.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575960

Title:
  gpu-manager: get_alternative_link() NEVER checks for a correct
  alternative

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1575960/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1575960] Re: gpu-manager: get_alternative_link() NEVER checks for a correct alternative

2016-04-29 Thread Alberto Milone
** Also affects: ubuntu-drivers-common (Ubuntu Xenial)
   Importance: Undecided
   Status: New

** Changed in: ubuntu-drivers-common (Ubuntu)
   Status: Triaged => In Progress

** Changed in: ubuntu-drivers-common (Ubuntu Xenial)
   Status: New => In Progress

** Changed in: ubuntu-drivers-common (Ubuntu Xenial)
   Importance: Undecided => High

** Changed in: ubuntu-drivers-common (Ubuntu)
   Importance: Critical => High

** Changed in: ubuntu-drivers-common (Ubuntu Xenial)
 Assignee: (unassigned) => Alberto Milone (albertomilone)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575960

Title:
  gpu-manager: get_alternative_link() NEVER checks for a correct
  alternative

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1575960/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1575960] Re: gpu-manager: get_alternative_link() NEVER checks for a correct alternative

2016-04-28 Thread Alberto Milone
Rafał: thank you for spotting the problem. To be honest, I am a little
shocked too.

** Changed in: ubuntu-drivers-common (Ubuntu)
   Status: New => Triaged

** Changed in: ubuntu-drivers-common (Ubuntu)
   Importance: Undecided => Critical

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575960

Title:
  gpu-manager: get_alternative_link() NEVER checks for a correct
  alternative

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1575960/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1575960] Re: gpu-manager: get_alternative_link() NEVER checks for a correct alternative

2016-04-28 Thread Martin Pitt
** Changed in: ubuntu-drivers-common (Ubuntu)
 Assignee: (unassigned) => Alberto Milone (albertomilone)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575960

Title:
  gpu-manager: get_alternative_link() NEVER checks for a correct
  alternative

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1575960/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1575960] Re: gpu-manager: get_alternative_link() NEVER checks for a correct alternative

2016-04-27 Thread Ubuntu Foundations Team Bug Bot
The attachment "fix_alternative_argument_order.patch" seems to be a
patch.  If it isn't, please remove the "patch" flag from the attachment,
remove the "patch" tag, and if you are a member of the ~ubuntu-
reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1575960

Title:
  gpu-manager: get_alternative_link() NEVER checks for a correct
  alternative

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-drivers-common/+bug/1575960/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs