• 1 Post
  • 229 Comments
Joined 3 months ago
cake
Cake day: March 28th, 2024

help-circle
  • No problems. Learning a new concept is not stupid. So you are familiar with C. In C term, you are likely to do something like this:

    int a[10] = {0}; // Just imagine this is 0,1,2,etc...
    int b[10] = {0};
    for (int i=0; i < 10; i++) {
      b[i] = a[i]*2;
    }
    

    A 1 to 1 correspondent might looks like ths:

    a = range(10) # 0,1,2,etc...
    b = []
    for x in a:
      b.append(x*2)
    

    However in python, you can then simplify to this:

    a = range(10) # Same as before, 0,1,2,etc...
    b = [x*2 for x in a]
    
    # This is also works
    b = [x*2 for x in [0,1,2,...]]
    

    Remember that list comprehension is used to make a new list, not just iteration. If you want to do something other than making a list from another list, it is better to use iteration. List comprehension is just “syntactic sugar” so to speak. The concept comes from functional programming paradigm.



  • You can. Whatever the method returns will be the element of that list. So if for example I do this:

    def mul(x):
      return x*2
    
    list = [mul(value) for value in range(1,20)]
    

    It will have the same effect. But this:

    def mul(x):
      return
    
    list = [mul(value) for value in range(1,20)]
    

    Will just makes the list element all None

    Edit to add more: List comprehension works not from the range function. Rather, the range function is returning a list. Hence the name, “list comprehension”. You can use any old list for it.

    What it did under the hood is that it iterates each element on the list that you specify (the in ...), and applies those to the function that you specify in the very first place. If you are familiar with the concept of Array.map in other languages, this is that. There is also a technical explanation for it if it helps, but it requires more time to explain. Just let me know if you would like to know it.








  • Huh, interesting. I thought that Fedora was following the Debian stable model. Well then my next recommendation would be Fedora based I think.

    But I disagree that bleeding edge means you are an alpha tester. That means developers are releasing alpha willy nilly. I’d even argue that at a certain pace of Hardware and Software development, the latest version of software you have the better, since it has a certain possibility that the Hardware will already be supported.



  • Well, “just works” depends on how you define it too. But yeah, most of the “basic” stuff just works. But I will not rule out the possibility of unsupported HW just because I have my fair share of it too. For example, I’d say a keyboard is working if they are able to be used as an input device. Even without the customization or sleep, or wake from sleep. Granted, the issue being unrecognized or not working at all is very much borked tho. Hence why I request the details of the mouse itself.

    Now you mention degraded performance and glitches. Yes, I do know that. But as I said, my statement regarding the wrong driver usually entails a lot more dramatic bug than a stutter on only known 2 games. Further investigations are needed to correctly decide if it is the driver or not since we know that a compatibility layer is also playing a part here. It is also why I suggest searching the protondb to check the current support for the game. Linux gaming, as good as it is now, is not perfect yet.



  • Yeah, I may need to rethink my recommendation for the future. Especially their willingness to read and patience. I am happy to guide anyone if they asked and hence why I usually recommend it.

    Regarding the random udev rule, I doubt it was that. Cooler Master mouse has known issue in Linux in which they don’t wake up from sleep when using the dongle. So it could just be the mouse regardless of the distro.

    As for the wrong driver, the OP stated that he experiences stutter for certain games but not for others. As I said, I am not an expert for troubleshooting stutter as it could be from a lot of factors. But I doubt OP installed the wrong driver. Wrong drivers usually lead to more uniform glitches across the board.



  • Yep, the problem with the compatibility layer is that a game can be very particular about the version too.

    You’re very welcome. This is after all, the essence of Arch. Now you know what is happening and why HDR is not yet widespread on other linux. On the other hand, you get to experience HDR gaming when other distros may not yet support it.

    I can confirm that I do have the same issue regarding brightness. However, I never tried to investigate further as my mechanical keyboard has a fn keys to adjust brightness (fn + f1/f2) so I don’t need to open settings to wiggle the slider. I can understand that it can be an issue for others. I suggest reading more regarding display and monitor. If all else fails, try asking the forum. I think it is DE specific (because wayland).



  • Alright, the stuttering is not my forte for troubleshooting. It could be from the driver but it could also be just the compatibility layer or myriad of other factors. I don’t play those games myself too. However, you can try searching for protondb to see the state of the game support on linux. Here is for Elden Ring for example. And be sure to actually check the review as it really reflects the state of games. You can also try looking for those with the same hardware and see if they comment on any issue. That can at least help weed out some potential problems.

    And regarding HDR in KDE, have you also read the wiki regarding HDR in game? more info also available on the HDR monitor support page. HDR is still experimental so you still need to install packages from AUR for games.

    Lastly, the brightness issue. Can you describe it in more detail? Like, does it happen when you are turning HDR on or is it happening regardless of HDR? And what does it mean the brightness is all over the place? Is it happening when you are consuming video content? I have an OLED for example, and the black is always the same regardless of the brightness. So are you sure it isn’t from the content itself?



  • bitfucker@programming.devtoLinux Gaming@lemmy.worldSorry I can't do it.
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    2
    ·
    2 days ago

    As someone who recommends Arch to new users that have some familiarity with CLI AND also likes to tinker, I will always advise to check their wiki and forum. Check for the very specific problem you’re having. Even the model sometimes helps. From other comments, I see you’re mentioning logitech, maybe this wiki entry will help, but maybe it won’t. In which case, search for more information. Check their wiki entry for other logitech mice, for wireless mice, for general mice.

    Now, onto the next issue, what do you mean by not launch right? From there, maybe I can help with the issue.

    This is also why I recommend this to someone that would like to tinker with their system. Arch requires a lot of reading. But once you understand it, it becomes “yours” and you obtain a lot of knowledge about the system that you’re using.

    Now, for everyone who doesn’t like to tinker, use bazzite. I heard that it just works™.